update to new CLR version, refine deployment script with better log output
This commit is contained in:
Generated
+431
-609
File diff suppressed because it is too large
Load Diff
+3
-4
@@ -13,7 +13,7 @@
|
|||||||
"copy-gui": "cp src/frontend/build/index.html gui",
|
"copy-gui": "cp src/frontend/build/index.html gui",
|
||||||
"webpack-gateway": "webpack --config webpack.gateway.js --progress && cp build/gateway/main.js gateway",
|
"webpack-gateway": "webpack --config webpack.gateway.js --progress && cp build/gateway/main.js gateway",
|
||||||
"deploy": "node ./lib/Deploy.js",
|
"deploy": "node ./lib/Deploy.js",
|
||||||
"github": "cp gateway/* ~/caisar.github.io && cd ~/caisar.github.io && git checkout master && git add -A && git commit -m \"update\" --allow-empty && git push origin master --force && git checkout main && git add -A && git commit -m \"update\" --allow-empty && git push origin main --force"
|
"github": "cp gateway/index.html ~/caisar.github.io && cp gateway/main.js ~/caisar.github.io && cd ~/caisar.github.io && git checkout master && git add -A && git commit -m \"update\" --allow-empty && git push origin master --force && git checkout main && git add -A && git commit -m \"update\" --allow-empty && git push origin main --force"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
@@ -36,8 +36,7 @@
|
|||||||
"typescript": "^4.9.3",
|
"typescript": "^4.9.3",
|
||||||
"url": "^0.11.0",
|
"url": "^0.11.0",
|
||||||
"utf8": "^3.0.0",
|
"utf8": "^3.0.0",
|
||||||
"webpack": "^5.75.0",
|
"webpack": "^5.88.2",
|
||||||
"webpack-bundle-analyzer": "^4.7.0",
|
"webpack-cli": "^5.1.4"
|
||||||
"webpack-cli": "^5.0.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -11,9 +11,11 @@ const path = require('path');
|
|||||||
console.log("Getting html from "+htmlPath)
|
console.log("Getting html from "+htmlPath)
|
||||||
const htmlBuf = await fs.readFile(htmlPath)
|
const htmlBuf = await fs.readFile(htmlPath)
|
||||||
const html = htmlBuf.toString('ascii')
|
const html = htmlBuf.toString('ascii')
|
||||||
|
console.log(`Writing ${html.length} bytes to blockchain...`)
|
||||||
const dataHash = await api.treeWrite(html, config.contractAddress, config.secret)
|
const dataHash = await api.treeWrite(html, config.contractAddress, config.secret)
|
||||||
await api.disconnect()
|
await api.disconnect()
|
||||||
console.log("Done. Your upload is at: ", dataHash);
|
console.log("Done. Your upload is at: ", dataHash);
|
||||||
console.log("Building gateway ...")
|
console.log("Building gateway...")
|
||||||
child_process.exec(`DATA_HASH=${dataHash} npm run webpack-gateway`, console.log)
|
child_process.exec(`DATA_HASH=${dataHash} npm run webpack-gateway`, ()=>{})
|
||||||
|
console.log(`Success. You can now open the application under ${path.join(__dirname, '..', 'gateway', 'index.html')}`)
|
||||||
})()
|
})()
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
||||||
# For additional information regarding the format and rule options, please see:
|
|
||||||
# https://github.com/browserslist/browserslist#queries
|
|
||||||
|
|
||||||
# For the full list of supported browsers by the Angular framework, please see:
|
|
||||||
# https://angular.io/guide/browser-support
|
|
||||||
|
|
||||||
# You can see what browsers were selected by your queries by running:
|
|
||||||
# npx browserslist
|
|
||||||
|
|
||||||
last 1 Chrome version
|
|
||||||
last 1 Firefox version
|
|
||||||
last 2 Edge major versions
|
|
||||||
last 2 Safari major versions
|
|
||||||
last 2 iOS major versions
|
|
||||||
Firefox ESR
|
|
||||||
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Editor configuration, see https://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.ts]
|
||||||
|
quote_type = single
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
max_line_length = off
|
||||||
|
trim_trailing_whitespace = false
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# Compiled output
|
||||||
|
/dist
|
||||||
|
/tmp
|
||||||
|
/out-tsc
|
||||||
|
/bazel-out
|
||||||
|
|
||||||
|
# Node
|
||||||
|
/node_modules
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
|
||||||
|
# IDEs and editors
|
||||||
|
.idea/
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
.c9/
|
||||||
|
*.launch
|
||||||
|
.settings/
|
||||||
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode
|
||||||
|
.history
|
||||||
|
|
||||||
|
# Miscellaneous
|
||||||
|
/.angular/cache
|
||||||
|
.sass-cache/
|
||||||
|
/connect.lock
|
||||||
|
/coverage
|
||||||
|
/libpeerconnection.log
|
||||||
|
testem.log
|
||||||
|
/typings
|
||||||
|
|
||||||
|
# System files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# AngularClr
|
||||||
|
|
||||||
|
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.3.0.
|
||||||
|
|
||||||
|
## Development server
|
||||||
|
|
||||||
|
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
|
||||||
|
|
||||||
|
## Code scaffolding
|
||||||
|
|
||||||
|
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
||||||
|
|
||||||
|
## Running unit tests
|
||||||
|
|
||||||
|
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||||
|
|
||||||
|
## Running end-to-end tests
|
||||||
|
|
||||||
|
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
||||||
|
|
||||||
|
## Further help
|
||||||
|
|
||||||
|
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
||||||
+24
-17
@@ -1,9 +1,12 @@
|
|||||||
{
|
{
|
||||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||||
|
"cli": {
|
||||||
|
"analytics": false
|
||||||
|
},
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"newProjectRoot": "projects",
|
"newProjectRoot": "projects",
|
||||||
"projects": {
|
"projects": {
|
||||||
"angular-cli": {
|
"angular-clr": {
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"@schematics/angular:component": {
|
"@schematics/angular:component": {
|
||||||
@@ -20,29 +23,29 @@
|
|||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/angular-cli",
|
"outputPath": "dist/angular-clr",
|
||||||
"index": "src/index.html",
|
"index": "src/index.html",
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
"polyfills": "src/polyfills.ts",
|
"polyfills": "src/polyfills.ts",
|
||||||
"tsConfig": "tsconfig.app.json",
|
"tsConfig": "tsconfig.app.json",
|
||||||
"inlineStyleLanguage": "scss",
|
"inlineStyleLanguage": "scss",
|
||||||
"assets": ["src/favicon.ico", "src/assets"],
|
"assets": [
|
||||||
|
"src/favicon.ico",
|
||||||
|
"src/assets"
|
||||||
|
],
|
||||||
"styles": [
|
"styles": [
|
||||||
"./node_modules/@cds/city/css/bundles/default.min.css",
|
|
||||||
"./node_modules/@cds/core/global.min.css",
|
|
||||||
"./node_modules/normalize.css/normalize.css",
|
|
||||||
"node_modules/@clr/icons/clr-icons.min.css",
|
|
||||||
"node_modules/@clr/ui/clr-ui.min.css",
|
|
||||||
"src/styles.scss"
|
"src/styles.scss"
|
||||||
],
|
],
|
||||||
"scripts": []
|
"scripts": [
|
||||||
|
"node_modules/buffer/index.js"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"budgets": [
|
"budgets": [
|
||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "3mb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "10mb"
|
"maximumError": "10mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -74,10 +77,10 @@
|
|||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "angular-cli:build:production"
|
"browserTarget": "angular-clr:build:production"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"browserTarget": "angular-cli:build:development"
|
"browserTarget": "angular-clr:build:development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "development"
|
"defaultConfiguration": "development"
|
||||||
@@ -85,7 +88,7 @@
|
|||||||
"extract-i18n": {
|
"extract-i18n": {
|
||||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "angular-cli:build"
|
"browserTarget": "angular-clr:build"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
@@ -96,13 +99,17 @@
|
|||||||
"tsConfig": "tsconfig.spec.json",
|
"tsConfig": "tsconfig.spec.json",
|
||||||
"karmaConfig": "karma.conf.js",
|
"karmaConfig": "karma.conf.js",
|
||||||
"inlineStyleLanguage": "scss",
|
"inlineStyleLanguage": "scss",
|
||||||
"assets": ["src/favicon.ico", "src/assets"],
|
"assets": [
|
||||||
"styles": ["src/styles.scss"],
|
"src/favicon.ico",
|
||||||
|
"src/assets"
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"src/styles.scss"
|
||||||
|
],
|
||||||
"scripts": []
|
"scripts": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"defaultProject": "angular-cli"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
// Karma configuration file, see link for more information
|
||||||
|
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||||
|
|
||||||
|
module.exports = function (config) {
|
||||||
|
config.set({
|
||||||
|
basePath: '',
|
||||||
|
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||||
|
plugins: [
|
||||||
|
require('karma-jasmine'),
|
||||||
|
require('karma-chrome-launcher'),
|
||||||
|
require('karma-jasmine-html-reporter'),
|
||||||
|
require('karma-coverage'),
|
||||||
|
require('@angular-devkit/build-angular/plugins/karma')
|
||||||
|
],
|
||||||
|
client: {
|
||||||
|
jasmine: {
|
||||||
|
// you can add configuration options for Jasmine here
|
||||||
|
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||||
|
// for example, you can disable the random execution with `random: false`
|
||||||
|
// or set a specific seed with `seed: 4321`
|
||||||
|
},
|
||||||
|
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||||
|
},
|
||||||
|
jasmineHtmlReporter: {
|
||||||
|
suppressAll: true // removes the duplicated traces
|
||||||
|
},
|
||||||
|
coverageReporter: {
|
||||||
|
dir: require('path').join(__dirname, './coverage/angular-clr'),
|
||||||
|
subdir: '.',
|
||||||
|
reporters: [
|
||||||
|
{ type: 'html' },
|
||||||
|
{ type: 'text-summary' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
reporters: ['progress', 'kjhtml'],
|
||||||
|
port: 9876,
|
||||||
|
colors: true,
|
||||||
|
logLevel: config.LOG_INFO,
|
||||||
|
autoWatch: true,
|
||||||
|
browsers: ['Chrome'],
|
||||||
|
singleRun: false,
|
||||||
|
restartOnFileChange: true
|
||||||
|
});
|
||||||
|
};
|
||||||
Generated
+8635
-7606
File diff suppressed because it is too large
Load Diff
+42
-34
@@ -1,55 +1,63 @@
|
|||||||
{
|
{
|
||||||
"name": "angular-cli",
|
"name": "angular-clr",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"postinstall": "npm run start",
|
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "npm run build-aot && npm run bundle",
|
"build": "npm run build-aot && npm run bundle",
|
||||||
"watch": "ng build --watch --configuration development",
|
|
||||||
"test": "ng test",
|
|
||||||
"build-aot": "ng build --aot --optimization --build-optimizer",
|
|
||||||
"bundle": "webpack --config webpack-bundle.config.js --progress",
|
"bundle": "webpack --config webpack-bundle.config.js --progress",
|
||||||
"clean": "rm -rf dist/* build/*"
|
"build-aot": "ng build --aot --optimization --build-optimizer",
|
||||||
|
"watch": "ng build --watch --configuration development",
|
||||||
|
"test": "ng test"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "~14.0.0",
|
"@angular/animations": "^15.2.9",
|
||||||
"@angular/common": "~14.0.0",
|
"@angular/cdk": "^15.2.9",
|
||||||
"@angular/compiler": "~14.0.0",
|
"@angular/common": "^15.2.9",
|
||||||
"@angular/core": "~14.0.0",
|
"@angular/compiler": "^15.2.9",
|
||||||
"@angular/forms": "~14.0.0",
|
"@angular/core": "^15.2.9",
|
||||||
"@angular/platform-browser": "~14.0.0",
|
"@angular/forms": "^15.2.9",
|
||||||
"@angular/platform-browser-dynamic": "~14.0.0",
|
"@angular/platform-browser": "^15.2.9",
|
||||||
"@angular/router": "~14.0.0",
|
"@angular/platform-browser-dynamic": "^15.2.9",
|
||||||
"@cds/angular": "^6.0.0",
|
"@angular/router": "^15.2.9",
|
||||||
|
"@cds/angular": "6.6.2",
|
||||||
"@cds/city": "^1.1.0",
|
"@cds/city": "^1.1.0",
|
||||||
"@cds/core": "^6.0.0",
|
"@cds/core": "6.6.2",
|
||||||
"@clr/angular": "~13.0.0",
|
"@clr/angular": "^15.12.0",
|
||||||
"@clr/icons": "~13.0.0",
|
"@clr/ui": "^15.12.0",
|
||||||
"@clr/ui": "~13.0.0",
|
"buffer": "^6.0.3",
|
||||||
"mini-css-extract-plugin": "^1.6.0",
|
"modern-normalize": "^1.1.0",
|
||||||
"normalize.css": "^8.0.1",
|
"process": "^0.11.10",
|
||||||
"rxjs": "~6.6.0",
|
"rxjs": "~7.5.0",
|
||||||
"style-loader": "^3.3.1",
|
"tslib": "^2.3.0",
|
||||||
"tslib": "^2.1.0",
|
"zod": "^3.22.4",
|
||||||
"zone.js": "~0.11.4"
|
"zone.js": "~0.11.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "~14.0.0",
|
"@angular-devkit/build-angular": "^15.2.9",
|
||||||
"@angular/cli": "~14.0.0",
|
"@angular/cli": "^15.2.9",
|
||||||
"@angular/compiler-cli": "~14.0.0",
|
"@angular/compiler-cli": "^15.2.9",
|
||||||
"@types/jasmine": "~3.6.0",
|
"@types/jasmine": "~3.10.0",
|
||||||
"@types/node": "^12.11.1",
|
"@types/node": "^12.11.1",
|
||||||
"css-loader": "^6.7.2",
|
"browserify-zlib": "^0.2.0",
|
||||||
"html-webpack-plugin": "^5.5.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
|
"glob": "^10.3.10",
|
||||||
|
"html-webpack-plugin": "^5.5.3",
|
||||||
|
"https-browserify": "^1.0.0",
|
||||||
"inline-chunk-html-plugin": "^1.1.1",
|
"inline-chunk-html-plugin": "^1.1.1",
|
||||||
"jasmine-core": "~3.7.0",
|
"jasmine-core": "~4.0.0",
|
||||||
"karma": "~6.3.0",
|
"karma": "~6.3.0",
|
||||||
"karma-chrome-launcher": "~3.1.0",
|
"karma-chrome-launcher": "~3.1.0",
|
||||||
"karma-coverage": "~2.0.3",
|
"karma-coverage": "~2.1.0",
|
||||||
"karma-jasmine": "~4.0.0",
|
"karma-jasmine": "~4.0.0",
|
||||||
"karma-jasmine-html-reporter": "^1.5.0",
|
"karma-jasmine-html-reporter": "~1.7.0",
|
||||||
"typescript": "~4.7.0"
|
"purgecss-webpack-plugin": "^5.0.0",
|
||||||
|
"stream-browserify": "^3.0.0",
|
||||||
|
"stream-http": "^3.2.0",
|
||||||
|
"style-loader": "^3.3.3",
|
||||||
|
"typescript": "~4.9.5",
|
||||||
|
"url": "^0.11.3",
|
||||||
|
"webpack-cli": "^5.1.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ const routes: Routes = [];
|
|||||||
imports: [RouterModule.forRoot(routes)],
|
imports: [RouterModule.forRoot(routes)],
|
||||||
exports: [RouterModule]
|
exports: [RouterModule]
|
||||||
})
|
})
|
||||||
export class AppRoutingModule {}
|
export class AppRoutingModule { }
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { ShoutboxDataService } from './services/ShoutboxData.service';
|
|||||||
styleUrls: ['./app.component.scss'],
|
styleUrls: ['./app.component.scss'],
|
||||||
})
|
})
|
||||||
export class AppComponent implements OnInit{
|
export class AppComponent implements OnInit{
|
||||||
title = 'httXrp';
|
title = 'httXrp Shoutbox';
|
||||||
shouts: any[] = []
|
shouts: any[] = []
|
||||||
sending = false
|
sending = false
|
||||||
newShout = {
|
newShout = {
|
||||||
|
|||||||
@@ -1,116 +1,106 @@
|
|||||||
import { Injectable } from "@angular/core";
|
import { Injectable } from "@angular/core";
|
||||||
import { DataParser } from "../util/Dataparser";
|
|
||||||
import { makeTestnetWallet } from "../util/TestnetUtils";
|
import { makeTestnetWallet } from "../util/TestnetUtils";
|
||||||
|
import { z } from 'zod';
|
||||||
|
|
||||||
declare const xrpIO: any
|
declare const RJSVM: any;
|
||||||
declare const xrpl: any
|
declare const RJSVM_Builder: any;
|
||||||
|
declare const Datawriter: any;
|
||||||
|
|
||||||
const xrpNode = "wss://s.altnet.rippletest.net:51233"
|
const xrpNode = "wss://s.altnet.rippletest.net:51233"
|
||||||
|
const listeningAddress = "rB4v4taosTUvuup8prxj2wbrBMbmvmxgXx"
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ShoutboxDataService {
|
export class ShoutboxDataService {
|
||||||
|
|
||||||
public history: any[] = []
|
public history: any[] = []
|
||||||
|
private dataWriter = undefined as any
|
||||||
private userWallet1: any
|
|
||||||
private userWallet2: any
|
|
||||||
private shoutboxAddress = "rBGqUNVzrNJ6CNpTriBts8QCTNi5VqUMnZ"
|
|
||||||
private rippleApi: any;
|
|
||||||
private xrpio: any;
|
|
||||||
|
|
||||||
private getTransactions = async () => {
|
|
||||||
const resp = await this.rippleApi.request({
|
|
||||||
command: "account_tx",
|
|
||||||
account: this.shoutboxAddress,
|
|
||||||
forward: false,
|
|
||||||
})
|
|
||||||
return resp.result.transactions.map((entry: any) => entry.tx)
|
|
||||||
}
|
|
||||||
|
|
||||||
private submit = async (shoutHash: string) => {
|
|
||||||
const data = {
|
|
||||||
endpoint: 'submit',
|
|
||||||
data: shoutHash
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log("Submitting shout root hash", data)
|
|
||||||
const submitTx = await this.xrpio.writeRaw({data: JSON.stringify(data)}, this.shoutboxAddress, this.userWallet1.secret)
|
|
||||||
|
|
||||||
console.log("submit TX @", submitTx)
|
|
||||||
|
|
||||||
return submitTx
|
|
||||||
}
|
|
||||||
|
|
||||||
public submitShout = async (shout: any) => {
|
public submitShout = async (shout: any) => {
|
||||||
console.log("writing shout data", shout)
|
await this.dataWriter.callEndpoint('submit', shout, 10)
|
||||||
const shoutHash = await this.xrpio.treeWrite(JSON.stringify(shout), this.userWallet1.address, this.userWallet2.secret)
|
|
||||||
console.log("shout data @ ", shoutHash)
|
|
||||||
return await this.submit(shoutHash)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private parseMemos = async (memos: any) => {
|
|
||||||
const shouts = await Promise.all(memos
|
|
||||||
.map((memo: any) => {
|
|
||||||
if (!memo.Memo || !memo.Memo.MemoData)
|
|
||||||
return
|
|
||||||
|
|
||||||
try {
|
|
||||||
return DataParser.parse('TxHash', hex_to_ascii(memo.Memo.MemoData))
|
|
||||||
} catch (e) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.filter((hash: string) => hash != undefined)
|
|
||||||
.map((root_hash: string) => this.xrpio.treeRead([root_hash]))
|
|
||||||
)
|
|
||||||
return shouts.map((jsonStr: string) => JSON.parse(jsonStr))
|
|
||||||
}
|
|
||||||
|
|
||||||
private loadHistory = async () => {
|
|
||||||
const raw_txs = await this.getTransactions()
|
|
||||||
return await this.parseMemos(raw_txs.flatMap((htx: any) => htx.Memos))
|
|
||||||
}
|
|
||||||
|
|
||||||
private subscribeTxs = async (callback: Function) => {
|
|
||||||
this.rippleApi.on('transaction', (tx: any) => callback(tx))
|
|
||||||
await this.rippleApi.connection.request({
|
|
||||||
command: 'subscribe',
|
|
||||||
accounts: [this.shoutboxAddress]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
private listen = async () => {
|
|
||||||
await this.subscribeTxs(async (raw_tx: any) => {
|
|
||||||
const shouts = await this.parseMemos(raw_tx.transaction.Memos)
|
|
||||||
this.history.unshift(...shouts)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
initialize = async () => {
|
initialize = async () => {
|
||||||
this.userWallet1 = await makeTestnetWallet()
|
|
||||||
this.userWallet2 = await makeTestnetWallet()
|
|
||||||
|
|
||||||
this.rippleApi = new xrpl.Client(xrpNode)
|
const [userWallet, drainWallet] = await Promise.all([makeTestnetWallet(), makeTestnetWallet()])
|
||||||
await this.rippleApi.connect()
|
this.dataWriter = new Datawriter({
|
||||||
|
receiveAddress: drainWallet.address,
|
||||||
|
sendWallet: userWallet,
|
||||||
|
xrpNode: xrpNode,
|
||||||
|
contractAddress: listeningAddress
|
||||||
|
})
|
||||||
|
|
||||||
this.xrpio = new xrpIO(xrpNode);
|
const shoutSchema = z.object({
|
||||||
await this.xrpio.connect()
|
title: z.string(),
|
||||||
|
body: z.string(),
|
||||||
|
from: z.string(),
|
||||||
|
id: z.optional(z.string())
|
||||||
|
})
|
||||||
|
//type Shout = z.infer<typeof shoutSchema>
|
||||||
|
|
||||||
this.history = await this.loadHistory()
|
type State = {
|
||||||
|
shouts: any[]
|
||||||
|
}
|
||||||
|
|
||||||
await this.listen();
|
// #########################
|
||||||
|
// Define endpoints
|
||||||
|
// #########################
|
||||||
|
|
||||||
|
type RJSVM_Endpoints = {
|
||||||
|
submit: (data: any) => void
|
||||||
|
}
|
||||||
|
|
||||||
|
// #########################
|
||||||
|
// Define init state
|
||||||
|
// #########################
|
||||||
|
|
||||||
|
abstract class RJSVM_Base
|
||||||
|
extends RJSVM<State, RJSVM_Endpoints>
|
||||||
|
{
|
||||||
|
|
||||||
|
owner = userWallet.address
|
||||||
|
|
||||||
|
state: State = {
|
||||||
|
shouts: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// #########################
|
||||||
|
// Implement logic
|
||||||
|
// #########################
|
||||||
|
|
||||||
|
const RJSVM_Contract = {
|
||||||
|
submit: {
|
||||||
|
implementation: function (env:any, shout:any) {
|
||||||
|
(this as any).state.shouts.unshift(shout)
|
||||||
|
},
|
||||||
|
visibility: 'public',
|
||||||
|
fee: 10,
|
||||||
|
parameterSchema: shoutSchema
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// #########################
|
||||||
|
// Build and connect
|
||||||
|
// #########################
|
||||||
|
|
||||||
|
const Rjsvm = RJSVM_Builder.from(RJSVM_Base, RJSVM_Contract);
|
||||||
|
|
||||||
|
const conf = {
|
||||||
|
listeningAddress: listeningAddress,
|
||||||
|
rippleNode: xrpNode
|
||||||
|
}
|
||||||
|
|
||||||
|
const rjsvm = new Rjsvm(conf)
|
||||||
|
await rjsvm.connect()
|
||||||
|
|
||||||
|
rjsvm.on('error', console.log)
|
||||||
|
rjsvm.on('submit', console.log)
|
||||||
|
|
||||||
|
this.history = rjsvm.state.shouts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initShoutboxSvc(svc: ShoutboxDataService): () => Promise<any> {
|
export function initShoutboxSvc(svc: ShoutboxDataService): () => Promise<any> {
|
||||||
return svc.initialize;
|
return svc.initialize;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hex_to_ascii(input: any) {
|
|
||||||
var hex = input.toString();
|
|
||||||
var str = '';
|
|
||||||
for (var n = 0; n < hex.length; n += 2) {
|
|
||||||
str += String.fromCharCode(parseInt(hex.substr(n, 2), 16));
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
import { Injectable } from "@angular/core";
|
|
||||||
import { DataParser } from "../util/Dataparser";
|
|
||||||
import { makeTestnetWallet } from "../util/TestnetUtils";
|
|
||||||
|
|
||||||
declare const xrpIO: any
|
|
||||||
declare const xrpl: any
|
|
||||||
|
|
||||||
const xrpNode = "wss://s.altnet.rippletest.net:51233"
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class ShoutboxDataService {
|
|
||||||
|
|
||||||
public history: any[] = []
|
|
||||||
|
|
||||||
private userWallet1: any
|
|
||||||
private userWallet2: any
|
|
||||||
private shoutboxAddress = "rBGqUNVzrNJ6CNpTriBts8QCTNi5VqUMnZ"
|
|
||||||
private rippleApi: any;
|
|
||||||
private xrpio: any;
|
|
||||||
|
|
||||||
private getTransactions = async () => {
|
|
||||||
const resp = await this.rippleApi.request({
|
|
||||||
command: "account_tx",
|
|
||||||
account: this.shoutboxAddress,
|
|
||||||
forward: false,
|
|
||||||
})
|
|
||||||
return resp.result.transactions.map((entry: any) => entry.tx)
|
|
||||||
}
|
|
||||||
|
|
||||||
private submit = async (shoutHash: string) => {
|
|
||||||
const data = {
|
|
||||||
endpoint: 'submit',
|
|
||||||
data: shoutHash
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log("Submitting shout root hash", data)
|
|
||||||
const submitTx = await this.xrpio.writeRaw({data: JSON.stringify(data)}, this.shoutboxAddress, this.userWallet1.secret)
|
|
||||||
|
|
||||||
console.log("submit TX @", submitTx)
|
|
||||||
|
|
||||||
return submitTx
|
|
||||||
}
|
|
||||||
|
|
||||||
public submitShout = async (shout: any) => {
|
|
||||||
console.log("writing shout data", shout)
|
|
||||||
const shoutHash = await this.xrpio.treeWrite(JSON.stringify(shout), this.userWallet1.address, this.userWallet2.secret)
|
|
||||||
console.log("shout data @ ", shoutHash)
|
|
||||||
return await this.submit(shoutHash)
|
|
||||||
}
|
|
||||||
|
|
||||||
private parseMemos = async (memos: any) => {
|
|
||||||
const shouts = await Promise.all(memos
|
|
||||||
.map((memo: any) => {
|
|
||||||
if (!memo.Memo || !memo.Memo.MemoData)
|
|
||||||
return
|
|
||||||
|
|
||||||
try {
|
|
||||||
return DataParser.parse('TxHash', hex_to_ascii(memo.Memo.MemoData))
|
|
||||||
} catch (e) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.filter((hash: string) => hash != undefined)
|
|
||||||
.map((root_hash: string) => this.xrpio.treeRead([root_hash]))
|
|
||||||
)
|
|
||||||
return shouts.map((jsonStr: string) => JSON.parse(jsonStr))
|
|
||||||
}
|
|
||||||
|
|
||||||
private loadHistory = async () => {
|
|
||||||
const raw_txs = await this.getTransactions()
|
|
||||||
return await this.parseMemos(raw_txs.flatMap((htx: any) => htx.Memos))
|
|
||||||
}
|
|
||||||
|
|
||||||
private subscribeTxs = async (callback: Function) => {
|
|
||||||
this.rippleApi.on('transaction', (tx: any) => callback(tx))
|
|
||||||
await this.rippleApi.connection.request({
|
|
||||||
command: 'subscribe',
|
|
||||||
accounts: [this.shoutboxAddress]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
private listen = async () => {
|
|
||||||
await this.subscribeTxs(async (raw_tx: any) => {
|
|
||||||
const shouts = await this.parseMemos(raw_tx.transaction.Memos)
|
|
||||||
this.history.unshift(...shouts)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
initialize = async () => {
|
|
||||||
this.userWallet1 = await makeTestnetWallet()
|
|
||||||
this.userWallet2 = await makeTestnetWallet()
|
|
||||||
|
|
||||||
this.rippleApi = new xrpl.Client(xrpNode)
|
|
||||||
await this.rippleApi.connect()
|
|
||||||
|
|
||||||
this.xrpio = new xrpIO(xrpNode);
|
|
||||||
await this.xrpio.connect()
|
|
||||||
|
|
||||||
this.history = await this.loadHistory()
|
|
||||||
|
|
||||||
await this.listen();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function initShoutboxSvc(svc: ShoutboxDataService): () => Promise<any> {
|
|
||||||
return svc.initialize;
|
|
||||||
}
|
|
||||||
|
|
||||||
function hex_to_ascii(input: any) {
|
|
||||||
var hex = input.toString();
|
|
||||||
var str = '';
|
|
||||||
for (var n = 0; n < hex.length; n += 2) {
|
|
||||||
str += String.fromCharCode(parseInt(hex.substr(n, 2), 16));
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
@@ -66,7 +66,7 @@ export class DataParser {
|
|||||||
|
|
||||||
private static parseTxHash(input: any): TxHash{
|
private static parseTxHash(input: any): TxHash{
|
||||||
if(typeof input !== 'string' || !NON_ZERO_TX_HASH.test(input)){
|
if(typeof input !== 'string' || !NON_ZERO_TX_HASH.test(input)){
|
||||||
throw new Error('Input is not a trasnaction hash')
|
throw new Error(`Input '${input}'is not a trasnaction hash`)
|
||||||
}
|
}
|
||||||
return input
|
return input
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 948 B |
+15
-18
@@ -1,22 +1,19 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv='cache-control' content='no-cache'>
|
<script>
|
||||||
<meta http-equiv='expires' content='0'>
|
window.process = { env: { NODE_ENV: 'production' } }
|
||||||
<meta http-equiv='pragma' content='no-cache'>
|
</script>
|
||||||
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8">
|
||||||
<title>httXrp</title>
|
<title>AngularClr</title>
|
||||||
<base href="" />
|
<base href="/">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/xrpl@2.7.0"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/xrpio@0.1.8/lib/browser/xrpio.browser.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body cds-text="body">
|
<script src="https://cdn.jsdelivr.net/npm/rjsvm@0.2.5/lib/browser/rjsvm.browser.js"></script>
|
||||||
<app-root>
|
</head>
|
||||||
<div style="text-align: center;">Loading application state</div>
|
<body cds-text="body" cds-theme="dark">
|
||||||
</app-root>
|
<app-root></app-root>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -8,6 +8,5 @@ if (environment.production) {
|
|||||||
enableProdMode();
|
enableProdMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
platformBrowserDynamic()
|
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||||
.bootstrapModule(AppModule)
|
|
||||||
.catch(err => console.error(err));
|
.catch(err => console.error(err));
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
* file.
|
* file.
|
||||||
*
|
*
|
||||||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
||||||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
* automatically update themselves. This includes recent versions of Safari, Chrome (including
|
||||||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
|
||||||
*
|
*
|
||||||
* Learn more in https://angular.io/guide/browser-support
|
* Learn more in https://angular.io/guide/browser-support
|
||||||
*/
|
*/
|
||||||
@@ -18,18 +18,6 @@
|
|||||||
* BROWSER POLYFILLS
|
* BROWSER POLYFILLS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* IE11 requires the following for NgClass support on SVG elements
|
|
||||||
*/
|
|
||||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Web Animations `@angular/platform-browser/animations`
|
|
||||||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
|
||||||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
|
||||||
*/
|
|
||||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By default, zone.js will patch all possible macroTask and DomEvents
|
* By default, zone.js will patch all possible macroTask and DomEvents
|
||||||
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
||||||
@@ -57,7 +45,13 @@
|
|||||||
/***************************************************************************************************
|
/***************************************************************************************************
|
||||||
* Zone JS is required by default for Angular itself.
|
* Zone JS is required by default for Angular itself.
|
||||||
*/
|
*/
|
||||||
import 'zone.js'; // Included with Angular CLI.
|
import 'zone.js'; // Included with Angular CLI.
|
||||||
|
import * as process from 'process';
|
||||||
|
(window as any)['process'] = process;
|
||||||
|
(window as any)['buffer'] = (window as any).Buffer || require('buffer').Buffer;
|
||||||
|
(window as any)['Buffer'] = (window as any).Buffer || require('buffer').Buffer;
|
||||||
|
(window as any)['global'] = (window as any);
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************************************
|
/***************************************************************************************************
|
||||||
* APPLICATION IMPORTS
|
* APPLICATION IMPORTS
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
@import '~modern-normalize/modern-normalize.css';
|
@import 'modern-normalize/modern-normalize.css';
|
||||||
@import '~@cds/core/global.min.css';
|
@import '@cds/core/global.min.css';
|
||||||
@import '~@cds/city/css/bundles/default.min.css';
|
@import '@cds/core/styles/theme.dark.min.css';
|
||||||
@import '~@cds/core/styles/theme.dark.min.css';
|
@import '@cds/city/css/bundles/default.css';
|
||||||
|
|
||||||
|
@import '@clr/ui/shim.cds-core.min.css';
|
||||||
|
@import '@clr/ui/clr-ui.min.css';
|
||||||
|
|
||||||
|
[cds-card-remove-margin] {
|
||||||
|
--color: var(--cds-alias-object-container-border-color);
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||||
|
|
||||||
|
import 'zone.js/testing';
|
||||||
|
import { getTestBed } from '@angular/core/testing';
|
||||||
|
import {
|
||||||
|
BrowserDynamicTestingModule,
|
||||||
|
platformBrowserDynamicTesting
|
||||||
|
} from '@angular/platform-browser-dynamic/testing';
|
||||||
|
|
||||||
|
// First, initialize the Angular testing environment.
|
||||||
|
getTestBed().initTestEnvironment(
|
||||||
|
BrowserDynamicTestingModule,
|
||||||
|
platformBrowserDynamicTesting(),
|
||||||
|
);
|
||||||
@@ -6,6 +6,8 @@
|
|||||||
"outDir": "./dist/out-tsc",
|
"outDir": "./dist/out-tsc",
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"noImplicitOverride": true,
|
||||||
|
"noPropertyAccessFromIndexSignature": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
@@ -14,9 +16,23 @@
|
|||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"target": "ES2020",
|
"target": "ES2022",
|
||||||
"module": "es2020",
|
"module": "es2020",
|
||||||
"lib": ["es2018", "dom"]
|
"lib": [
|
||||||
|
"es2020",
|
||||||
|
"dom"
|
||||||
|
],
|
||||||
|
"useDefineForClassFields": false,
|
||||||
|
"paths": {
|
||||||
|
"stream": ["./node_modules/stream-browserify"],
|
||||||
|
"http": ["./node_modules/stream-http"],
|
||||||
|
"crypto": ["./node_modules/crypto-browserify"],
|
||||||
|
"zlib": ["./node_modules/browserify-zlib"],
|
||||||
|
"https": ["./node_modules/https-browserify"],
|
||||||
|
"url": ["./node_modules/url/"],
|
||||||
|
"buffer": ["./node_modules/buffer/"],
|
||||||
|
"Buffer": ["./node_modules/buffer/"],
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"enableI18nLegacyMessageIdFormat": false,
|
"enableI18nLegacyMessageIdFormat": false,
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "./out-tsc/spec",
|
||||||
|
"types": [
|
||||||
|
"jasmine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/test.ts",
|
||||||
|
"src/polyfills.ts"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"src/**/*.spec.ts",
|
||||||
|
"src/**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -4,10 +4,11 @@ const webpack = require('webpack')
|
|||||||
const path = require('path')
|
const path = require('path')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
|
||||||
const distDir = path.resolve(__dirname, 'dist', 'angular-cli')
|
const distDir = path.resolve(__dirname, 'dist', 'angular-clr')
|
||||||
const buildDir = path.resolve(__dirname, 'build')
|
const buildDir = path.resolve(__dirname, 'build')
|
||||||
const srcDir = path.resolve(__dirname, 'src')
|
const srcDir = path.resolve(__dirname, 'src')
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
target: 'web',
|
target: 'web',
|
||||||
@@ -21,13 +22,21 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.js', '.jsx', '.css'],
|
extensions: ['', '.js', '.jsx', '.css'],
|
||||||
|
fallback: {
|
||||||
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new webpack.ProvidePlugin({
|
||||||
|
Buffer: ['buffer', 'Buffer'],
|
||||||
|
}),
|
||||||
|
new webpack.ProvidePlugin({
|
||||||
|
process: 'process/browser',
|
||||||
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
inject: "body",
|
inject: "body",
|
||||||
template: path.resolve(srcDir, 'index.html'),
|
template: path.resolve(srcDir, 'index.html'),
|
||||||
}),
|
}),
|
||||||
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/.*/]),
|
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/.*/])
|
||||||
],
|
],
|
||||||
optimization: {
|
optimization: {
|
||||||
},
|
},
|
||||||
@@ -39,6 +48,5 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
externals: {
|
externals: {},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
|
||||||
|
|
||||||
if(!process.env['DATA_HASH']){
|
if(!process.env['DATA_HASH']){
|
||||||
console.log("Environment DATA_HASH not set")
|
console.log("Environment DATA_HASH not set")
|
||||||
|
|||||||
Reference in New Issue
Block a user