Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare General Release #5

Merged
merged 26 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1315ba8
Update to Node 16
martindale Jun 6, 2022
35d0e86
Finalize import of schemas, add Actor definition
martindale Jun 9, 2022
218af89
Add local settings, begin update to latest Fabric API
martindale Oct 11, 2022
6411a30
Update to latest Fabric APIs
martindale Oct 11, 2022
132fc66
Add Schema import to sync
martindale Oct 11, 2022
56255ce
Temporarily remove Peer from Hub (using Fabric the Node class)
martindale Oct 11, 2022
4b88d8a
Add Travis config
martindale Oct 11, 2022
6ceb789
Add coverage reports
martindale Oct 11, 2022
bbbd858
Add browser script
martindale Oct 13, 2022
3cd6a03
Use latest Fabric
martindale Feb 10, 2023
fa93ff8
Enable Peer connections
martindale Feb 10, 2023
c90785f
Assign public defaults
martindale Feb 10, 2023
b47a62c
Update package-lock.json
martindale Feb 10, 2023
47d21f3
Add install report
martindale Feb 10, 2023
f404817
Listen for new events from Node
martindale Feb 10, 2023
c1ef420
Update to latest Fabric
martindale Feb 10, 2023
12e6e54
Prepare 0.1.0-RC1, add and update reports
martindale Feb 12, 2023
4552294
Add Hub error handler, update package-lock.json
martindale Feb 15, 2023
7dfb292
Capture new install reports
martindale Mar 1, 2023
6d4e702
Update package-lock.json, add hub.html
martindale Mar 23, 2023
d5400d6
Add .nvmrc, netlify.toml
martindale Mar 23, 2023
e5c9a5f
Update package-lock.json
martindale Mar 23, 2023
bac459f
General snapshot of latest builds
martindale Mar 23, 2023
0a46d47
Enable React
martindale Mar 23, 2023
79b0913
Cleanup dependencies, fix build
martindale Mar 23, 2023
fc3596d
Add fomantic distributables
martindale Mar 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ dist

# TernJS port file
.tern-port

# Fabric Schema Store
stores/schemata
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.17.1
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dist: focal
language: node_js
node_js:
- 16.17.1
before_install:
- npm install -g codecov
after_success:
- npm run report:coverage
- codecov
11,594 changes: 11,594 additions & 0 deletions assets/bundles/browser.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions assets/hub.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>undefined</title>
</head>
<body>
<div id="fabric-container">
<p>Loading...</p>
</div>
<fabric-site />
<script src="bundles/browser.js" data-fullhash="undefined"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions assets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>Default Site</title>
</head>
<body>
<div id="fabric-container">
<p>Loading...</p>
</div>
<fabric-site></fabric-site>
<script src="bundles/browser.js" data-fullhash=""></script>
</body>
</html>
21 changes: 21 additions & 0 deletions assets/schemata/SpendMessage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hub.fabric.pub/schemata/SpendMessage.json",
"title": "SpendMessage",
"description": "Instance of a spend.",
"type": "object",
"properties": {
"amount": {
"description": "Amount (in BTC) to spend.",
"type": "string"
},
"destination": {
"description": "Destination for funds.",
"type": "string"
}
},
"required": [
"amount",
"destination"
]
}
35 changes: 35 additions & 0 deletions assets/schemata/activity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hub.fabric.pub/schemata/activity.schema.json",
"title": "Activity",
"description": "Activity in a Stream.",
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for an activity.",
"type": "string"
},
"actor": {
"description": "The activity's creator.",
"type": "Actor|String"
},
"created": {
"description": "ISO 8601 creation time.",
"type": "string"
},
"object": {
"description": "The unique identifier for an activity.",
"type": "object"
},
"target": {
"description": "Path to write.",
"type": "object"
}
},
"required": [
"id",
"object",
"target"
],
"version": "0.1.0-RC1"
}
15 changes: 15 additions & 0 deletions assets/schemata/actor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hub.fabric.pub/schemata/actor.schema.json",
"title": "Actor",
"description": "Any Fabric entity.",
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for an actor",
"type": "string"
}
},
"required": [ "id" ],
"version": "0.0.0"
}
8 changes: 8 additions & 0 deletions assets/schemata/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

const Actor = require('./actor');

module.exports = {
Actor: Actor,
version: 'v0.1.0-RC1'
};
15 changes: 15 additions & 0 deletions components/dashboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const Component = require('@fabric/http/types/component');

class Dashboard extends Component {
constructor (settings = {}) {
super(settings);

this.settings = Object.assign({
status: 'PAUSED'
}, settings);

return this;
}
}

module.exports = Dashboard;
62 changes: 62 additions & 0 deletions components/hub.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
const LIMIT_PER_PAGE = 3;

import React from 'react';
// import '../libraries/fomantic/dist/semantic.css';

import {
Header,
Segment
} from 'semantic-ui-react';

export default class Hub extends React.Component {
state = {
network: 'playnet'
}

constructor (props = {}) {
super(props);

this._state = {
assets: {},
content: this.state // TODO: inherit get state () from Actor
};

this.ref = React.createRef();

return this;
}

componentDidMount () {
console.log('[HUB]', 'Mounted!', this);
}

trust (source) {
source.on('log', this._handleSourceLog.bind(this));
}

_handleBridgeChange (change) {
console.log('[HUB] Bridge Reported Change:', change);
}

_handleBridgeReady (info) {
console.log('[HUB] Bridge Reported Ready:', info);
}

_handleSourceLog (log) {
this.emit('log', `Source log: ${log}`);
}

render () {
return (
<fabric-content-page className="ui page" ref={this.ref}>
<Segment>
<Header>
<h1>@fabric/hub</h1>
</Header>
</Segment>
{/* <FabricBridge path="/" onChange={this._handleBridgeChange.bind(this)} host="localhost" port="3000" secure="false" /> */}
{/* <Sample host="localhost" secure="false" port="3000" /> */}
</fabric-content-page>
);
}
}
Loading