wabur 0.4.0d1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -66
- data/bin/wabur +48 -11
- data/export/assets/css/wab.css +2 -0
- data/export/assets/css/wab.css.map +7 -0
- data/export/assets/fonts/wabfont/README +18 -0
- data/export/assets/fonts/wabfont/fonts/WAB.eot +0 -0
- data/export/assets/fonts/wabfont/fonts/WAB.svg +25 -0
- data/export/assets/fonts/wabfont/fonts/WAB.ttf +0 -0
- data/export/assets/fonts/wabfont/fonts/WAB.woff +0 -0
- data/export/assets/fonts/wabfont/selection.json +460 -0
- data/export/assets/fonts/wabfont/style.css +74 -0
- data/export/assets/js/transpile.js +8 -0
- data/export/assets/js/ui.js +377 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers.js +558 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/asyncGenerator.js +112 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/asyncGeneratorDelegate.js +51 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/asyncIterator.js +14 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/asyncToGenerator.js +28 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/classCallCheck.js +5 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/createClass.js +17 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/defaults.js +14 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/defineEnumerableProperties.js +10 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/defineProperty.js +14 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/extends.js +13 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/get.js +24 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/inherits.js +15 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/instanceof.js +7 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/interopRequireDefault.js +5 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/interopRequireWildcard.js +16 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/jsx.js +42 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/newArrowCheck.js +5 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/objectDestructuringEmpty.js +3 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/objectWithoutProperties.js +11 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/possibleConstructorReturn.js +7 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/selfGlobal.js +1 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/set.js +21 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/slicedToArray.js +37 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/slicedToArrayLoose.js +17 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/taggedTemplateLiteral.js +7 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/taggedTemplateLiteralLoose.js +4 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/temporalRef.js +7 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/temporalUndefined.js +1 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/toArray.js +3 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/toConsumableArray.js +9 -0
- data/export/assets/js/vendor/plugin-babel/babel-helpers/typeof.js +5 -0
- data/export/assets/js/vendor/plugin-babel/plugin-babel.js +222 -0
- data/export/assets/js/vendor/plugin-babel/regenerator-runtime.js +685 -0
- data/export/assets/js/vendor/plugin-babel/systemjs-babel-browser.js +1 -0
- data/export/assets/js/vendor/plugin-babel/systemjs-babel-node.js +55086 -0
- data/export/assets/js/vendor/systemjs/system-production.js +4 -0
- data/export/assets/js/vendor/systemjs/system-production.js.map +1 -0
- data/export/assets/js/vendor/systemjs/system-production.src.js +1711 -0
- data/export/assets/js/vendor/systemjs/system-production.src.js.map +1 -0
- data/export/assets/js/vendor/systemjs/system.js +4 -0
- data/export/assets/js/vendor/systemjs/system.js.map +1 -0
- data/export/assets/js/vendor/systemjs/system.src.js +4000 -0
- data/export/assets/js/vendor/systemjs/system.src.js.map +1 -0
- data/export/assets/js/wab.js +109 -0
- data/export/index.html +41 -0
- data/lib/wab.rb +13 -0
- data/lib/wab/controller.rb +2 -2
- data/lib/wab/errors.rb +12 -0
- data/lib/wab/impl.rb +2 -0
- data/lib/wab/impl/configuration.rb +24 -6
- data/lib/wab/impl/export_proxy.rb +39 -0
- data/lib/wab/impl/exprs/regex.rb +1 -1
- data/lib/wab/impl/handler.rb +14 -14
- data/lib/wab/impl/init.rb +108 -0
- data/lib/wab/impl/model.rb +4 -3
- data/lib/wab/impl/shell.rb +14 -4
- data/lib/wab/impl/templates/opo-rub.conf.template +253 -0
- data/lib/wab/impl/templates/opo.conf.template +224 -0
- data/lib/wab/impl/templates/spawn.rb.template +42 -0
- data/lib/wab/impl/templates/ui_controller.rb.template +12 -0
- data/lib/wab/impl/templates/wabur.conf.template +40 -0
- data/lib/wab/ui.rb +19 -0
- data/lib/wab/ui/create.rb +26 -0
- data/lib/wab/ui/display.rb +34 -0
- data/lib/wab/ui/flow.rb +54 -0
- data/lib/wab/ui/list.rb +59 -0
- data/lib/wab/ui/multi_flow.rb +23 -0
- data/lib/wab/ui/rest_flow.rb +89 -0
- data/lib/wab/ui/update.rb +27 -0
- data/lib/wab/ui/view.rb +62 -0
- data/lib/wab/utils.rb +4 -4
- data/lib/wab/version.rb +1 -1
- data/pages/Architecture.md +104 -1
- data/test/test_configuration.rb +1 -1
- data/test/test_impl.rb +1 -0
- data/test/test_init.rb +33 -0
- metadata +94 -7
- data/pages/Plan.md +0 -27
@@ -0,0 +1,112 @@
|
|
1
|
+
export default (function () {
|
2
|
+
function AwaitValue(value) {
|
3
|
+
this.value = value;
|
4
|
+
}
|
5
|
+
|
6
|
+
function AsyncGenerator(gen) {
|
7
|
+
var front, back;
|
8
|
+
|
9
|
+
function send(key, arg) {
|
10
|
+
return new Promise(function (resolve, reject) {
|
11
|
+
var request = {
|
12
|
+
key: key,
|
13
|
+
arg: arg,
|
14
|
+
resolve: resolve,
|
15
|
+
reject: reject,
|
16
|
+
next: null
|
17
|
+
};
|
18
|
+
|
19
|
+
if (back) {
|
20
|
+
back = back.next = request;
|
21
|
+
} else {
|
22
|
+
front = back = request;
|
23
|
+
resume(key, arg);
|
24
|
+
}
|
25
|
+
});
|
26
|
+
}
|
27
|
+
|
28
|
+
function resume(key, arg) {
|
29
|
+
try {
|
30
|
+
var result = gen[key](arg);
|
31
|
+
var value = result.value;
|
32
|
+
|
33
|
+
if (value instanceof AwaitValue) {
|
34
|
+
Promise.resolve(value.value).then(function (arg) {
|
35
|
+
resume("next", arg);
|
36
|
+
}, function (arg) {
|
37
|
+
resume("throw", arg);
|
38
|
+
});
|
39
|
+
} else {
|
40
|
+
settle(result.done ? "return" : "normal", result.value);
|
41
|
+
}
|
42
|
+
} catch (err) {
|
43
|
+
settle("throw", err);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
function settle(type, value) {
|
48
|
+
switch (type) {
|
49
|
+
case "return":
|
50
|
+
front.resolve({
|
51
|
+
value: value,
|
52
|
+
done: true
|
53
|
+
});
|
54
|
+
break;
|
55
|
+
|
56
|
+
case "throw":
|
57
|
+
front.reject(value);
|
58
|
+
break;
|
59
|
+
|
60
|
+
default:
|
61
|
+
front.resolve({
|
62
|
+
value: value,
|
63
|
+
done: false
|
64
|
+
});
|
65
|
+
break;
|
66
|
+
}
|
67
|
+
|
68
|
+
front = front.next;
|
69
|
+
|
70
|
+
if (front) {
|
71
|
+
resume(front.key, front.arg);
|
72
|
+
} else {
|
73
|
+
back = null;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
this._invoke = send;
|
78
|
+
|
79
|
+
if (typeof gen.return !== "function") {
|
80
|
+
this.return = undefined;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
if (typeof Symbol === "function" && Symbol.asyncIterator) {
|
85
|
+
AsyncGenerator.prototype[Symbol.asyncIterator] = function () {
|
86
|
+
return this;
|
87
|
+
};
|
88
|
+
}
|
89
|
+
|
90
|
+
AsyncGenerator.prototype.next = function (arg) {
|
91
|
+
return this._invoke("next", arg);
|
92
|
+
};
|
93
|
+
|
94
|
+
AsyncGenerator.prototype.throw = function (arg) {
|
95
|
+
return this._invoke("throw", arg);
|
96
|
+
};
|
97
|
+
|
98
|
+
AsyncGenerator.prototype.return = function (arg) {
|
99
|
+
return this._invoke("return", arg);
|
100
|
+
};
|
101
|
+
|
102
|
+
return {
|
103
|
+
wrap: function (fn) {
|
104
|
+
return function () {
|
105
|
+
return new AsyncGenerator(fn.apply(this, arguments));
|
106
|
+
};
|
107
|
+
},
|
108
|
+
await: function (value) {
|
109
|
+
return new AwaitValue(value);
|
110
|
+
}
|
111
|
+
};
|
112
|
+
})();
|
@@ -0,0 +1,51 @@
|
|
1
|
+
export default (function (inner, awaitWrap) {
|
2
|
+
var iter = {},
|
3
|
+
waiting = false;
|
4
|
+
|
5
|
+
function pump(key, value) {
|
6
|
+
waiting = true;
|
7
|
+
value = new Promise(function (resolve) {
|
8
|
+
resolve(inner[key](value));
|
9
|
+
});
|
10
|
+
return {
|
11
|
+
done: false,
|
12
|
+
value: awaitWrap(value)
|
13
|
+
};
|
14
|
+
}
|
15
|
+
|
16
|
+
;
|
17
|
+
|
18
|
+
if (typeof Symbol === "function" && Symbol.iterator) {
|
19
|
+
iter[Symbol.iterator] = function () {
|
20
|
+
return this;
|
21
|
+
};
|
22
|
+
}
|
23
|
+
|
24
|
+
iter.next = function (value) {
|
25
|
+
if (waiting) {
|
26
|
+
waiting = false;
|
27
|
+
return value;
|
28
|
+
}
|
29
|
+
|
30
|
+
return pump("next", value);
|
31
|
+
};
|
32
|
+
|
33
|
+
if (typeof inner.throw === "function") {
|
34
|
+
iter.throw = function (value) {
|
35
|
+
if (waiting) {
|
36
|
+
waiting = false;
|
37
|
+
throw value;
|
38
|
+
}
|
39
|
+
|
40
|
+
return pump("throw", value);
|
41
|
+
};
|
42
|
+
}
|
43
|
+
|
44
|
+
if (typeof inner.return === "function") {
|
45
|
+
iter.return = function (value) {
|
46
|
+
return pump("return", value);
|
47
|
+
};
|
48
|
+
}
|
49
|
+
|
50
|
+
return iter;
|
51
|
+
});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export default (function (iterable) {
|
2
|
+
if (typeof Symbol === "function") {
|
3
|
+
if (Symbol.asyncIterator) {
|
4
|
+
var method = iterable[Symbol.asyncIterator];
|
5
|
+
if (method != null) return method.call(iterable);
|
6
|
+
}
|
7
|
+
|
8
|
+
if (Symbol.iterator) {
|
9
|
+
return iterable[Symbol.iterator]();
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
throw new TypeError("Object is not async iterable");
|
14
|
+
});
|
@@ -0,0 +1,28 @@
|
|
1
|
+
export default (function (fn) {
|
2
|
+
return function () {
|
3
|
+
var gen = fn.apply(this, arguments);
|
4
|
+
return new Promise(function (resolve, reject) {
|
5
|
+
function step(key, arg) {
|
6
|
+
try {
|
7
|
+
var info = gen[key](arg);
|
8
|
+
var value = info.value;
|
9
|
+
} catch (error) {
|
10
|
+
reject(error);
|
11
|
+
return;
|
12
|
+
}
|
13
|
+
|
14
|
+
if (info.done) {
|
15
|
+
resolve(value);
|
16
|
+
} else {
|
17
|
+
return Promise.resolve(value).then(function (value) {
|
18
|
+
step("next", value);
|
19
|
+
}, function (err) {
|
20
|
+
step("throw", err);
|
21
|
+
});
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
return step("next");
|
26
|
+
});
|
27
|
+
};
|
28
|
+
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export default (function () {
|
2
|
+
function defineProperties(target, props) {
|
3
|
+
for (var i = 0; i < props.length; i++) {
|
4
|
+
var descriptor = props[i];
|
5
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
6
|
+
descriptor.configurable = true;
|
7
|
+
if ("value" in descriptor) descriptor.writable = true;
|
8
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
return function (Constructor, protoProps, staticProps) {
|
13
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
14
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
15
|
+
return Constructor;
|
16
|
+
};
|
17
|
+
})();
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export default (function (obj, defaults) {
|
2
|
+
var keys = Object.getOwnPropertyNames(defaults);
|
3
|
+
|
4
|
+
for (var i = 0; i < keys.length; i++) {
|
5
|
+
var key = keys[i];
|
6
|
+
var value = Object.getOwnPropertyDescriptor(defaults, key);
|
7
|
+
|
8
|
+
if (value && value.configurable && obj[key] === undefined) {
|
9
|
+
Object.defineProperty(obj, key, value);
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
return obj;
|
14
|
+
});
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export default Object.assign || function (target) {
|
2
|
+
for (var i = 1; i < arguments.length; i++) {
|
3
|
+
var source = arguments[i];
|
4
|
+
|
5
|
+
for (var key in source) {
|
6
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
7
|
+
target[key] = source[key];
|
8
|
+
}
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
return target;
|
13
|
+
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export default (function get(object, property, receiver) {
|
2
|
+
if (object === null) object = Function.prototype;
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(object, property);
|
4
|
+
|
5
|
+
if (desc === undefined) {
|
6
|
+
var parent = Object.getPrototypeOf(object);
|
7
|
+
|
8
|
+
if (parent === null) {
|
9
|
+
return undefined;
|
10
|
+
} else {
|
11
|
+
return get(parent, property, receiver);
|
12
|
+
}
|
13
|
+
} else if ("value" in desc) {
|
14
|
+
return desc.value;
|
15
|
+
} else {
|
16
|
+
var getter = desc.get;
|
17
|
+
|
18
|
+
if (getter === undefined) {
|
19
|
+
return undefined;
|
20
|
+
}
|
21
|
+
|
22
|
+
return getter.call(receiver);
|
23
|
+
}
|
24
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export default (function (subClass, superClass) {
|
2
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
3
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
4
|
+
}
|
5
|
+
|
6
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
7
|
+
constructor: {
|
8
|
+
value: subClass,
|
9
|
+
enumerable: false,
|
10
|
+
writable: true,
|
11
|
+
configurable: true
|
12
|
+
}
|
13
|
+
});
|
14
|
+
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
15
|
+
});
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export default (function (obj) {
|
2
|
+
if (obj && obj.__esModule) {
|
3
|
+
return obj;
|
4
|
+
} else {
|
5
|
+
var newObj = {};
|
6
|
+
|
7
|
+
if (obj != null) {
|
8
|
+
for (var key in obj) {
|
9
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
newObj.default = obj;
|
14
|
+
return newObj;
|
15
|
+
}
|
16
|
+
});
|
@@ -0,0 +1,42 @@
|
|
1
|
+
export default (function () {
|
2
|
+
var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
|
3
|
+
return function createRawReactElement(type, props, key, children) {
|
4
|
+
var defaultProps = type && type.defaultProps;
|
5
|
+
var childrenLength = arguments.length - 3;
|
6
|
+
|
7
|
+
if (!props && childrenLength !== 0) {
|
8
|
+
props = {};
|
9
|
+
}
|
10
|
+
|
11
|
+
if (props && defaultProps) {
|
12
|
+
for (var propName in defaultProps) {
|
13
|
+
if (props[propName] === void 0) {
|
14
|
+
props[propName] = defaultProps[propName];
|
15
|
+
}
|
16
|
+
}
|
17
|
+
} else if (!props) {
|
18
|
+
props = defaultProps || {};
|
19
|
+
}
|
20
|
+
|
21
|
+
if (childrenLength === 1) {
|
22
|
+
props.children = children;
|
23
|
+
} else if (childrenLength > 1) {
|
24
|
+
var childArray = Array(childrenLength);
|
25
|
+
|
26
|
+
for (var i = 0; i < childrenLength; i++) {
|
27
|
+
childArray[i] = arguments[i + 3];
|
28
|
+
}
|
29
|
+
|
30
|
+
props.children = childArray;
|
31
|
+
}
|
32
|
+
|
33
|
+
return {
|
34
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
35
|
+
type: type,
|
36
|
+
key: key === undefined ? null : '' + key,
|
37
|
+
ref: null,
|
38
|
+
props: props,
|
39
|
+
_owner: null
|
40
|
+
};
|
41
|
+
};
|
42
|
+
})();
|