spyne 0.17.1 → 0.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -60
- package/karma.conf.js +5 -61
- package/lib/spyne.js +566 -1218
- package/lib/spyne.min.js +1 -1
- package/lib/spyne.min.js.LICENSE.txt +1 -1
- package/package.json +22 -15
- package/src/spyne/channels/channel-fetch-class.js +1 -4
- package/src/spyne/channels/channel-payload-class.js +8 -9
- package/src/spyne/channels/channel-proxy.js +1 -1
- package/src/spyne/channels/channel.js +3 -26
- package/src/spyne/channels/channels-config.js +0 -2
- package/src/spyne/channels/channels-map.js +1 -18
- package/src/spyne/channels/spyne-channel-lifecycle.js +1 -2
- package/src/spyne/channels/spyne-channel-route.js +7 -47
- package/src/spyne/channels/spyne-channel-ui.js +0 -2
- package/src/spyne/channels/spyne-channel-window.js +4 -54
- package/src/spyne/spyne-app.js +5 -21
- package/src/spyne/spyne-plugins.js +35 -64
- package/src/spyne/spyne.js +0 -1
- package/src/spyne/utils/channel-config-validator.js +0 -1
- package/src/spyne/utils/channel-fetch-util.js +1 -2
- package/src/spyne/utils/channel-payload-filter.js +4 -73
- package/src/spyne/utils/gc.js +1 -1
- package/src/spyne/utils/route-channel-updater.js +0 -4
- package/src/spyne/utils/spyne-app-properties.js +42 -72
- package/src/spyne/utils/spyne-plugins-methods.js +1 -9
- package/src/spyne/utils/spyne-trait.js +2 -5
- package/src/spyne/utils/spyne-utils-channel-route-url.js +1 -7
- package/src/spyne/utils/spyne-utils-channel-route.js +3 -13
- package/src/spyne/utils/spyne-utils-channel-window.js +2 -4
- package/src/spyne/utils/viewstream-observables.js +2 -3
- package/src/spyne/views/dom-element-template.js +1 -6
- package/src/spyne/views/dom-element.js +0 -19
- package/src/spyne/views/view-stream-broadcaster.js +2 -7
- package/src/spyne/views/view-stream-element.js +1 -18
- package/src/spyne/views/view-stream-payload.js +2 -69
- package/src/spyne/views/view-stream-selector.js +1 -6
- package/src/spyne/views/view-stream.js +253 -280
- package/webpack.config.js +0 -29
- package/lib/channel-action-filter.test.871939702.js +0 -20
- package/lib/channel-dom.test.2857423116.js +0 -20
- package/lib/channel-fetch-util.test.1782805723.js +0 -20
- package/lib/channel-fetch.test.3331576485.js +0 -20
- package/lib/channel-payload-class.test.99440410.js +0 -20
- package/lib/channel-payload-filter.test.2135136282.js +0 -20
- package/lib/channel-route.test.3036804306.js +0 -20
- package/lib/channel-stream-item.test.1523843610.js +0 -20
- package/lib/channel-ui.test.367398224.js +0 -20
- package/lib/channel-util-dom.test.3758627277.js +0 -20
- package/lib/channel.test.1717017712.js +0 -20
- package/lib/commons.js +0 -50372
- package/lib/dom-el-selectors.test.2633571626.js +0 -20
- package/lib/dom-el-template.test.268653142.js +0 -20
- package/lib/dom-el.test.4051977500.js +0 -20
- package/lib/frp-tools.test.3814897075.js +0 -20
- package/lib/index.test.1514915838.js +0 -20
- package/lib/plugins-methods.test.2326717190.js +0 -20
- package/lib/route-utils.test.2350761994.js +0 -20
- package/lib/runtime.js +0 -174
- package/lib/spyne-app-properties.test.96729569.js +0 -20
- package/lib/spyne-app.test.1443517996.js +0 -20
- package/lib/spyne-plugin.test.1247070970.js +0 -20
- package/lib/url-utils.test.516839067.js +0 -20
- package/lib/view-stream-broadcaster.test.934532750.js +0 -20
- package/lib/view-stream-enhancer-loader.test.2755314117.js +0 -20
- package/lib/view-stream-enhancer.test.414877881.js +0 -20
- package/lib/view-stream.test.2479353905.js +0 -20
- package/src/spyne/channels/lifestream-payload.js +0 -56
- package/src/spyne/utils/spyne-scroll-lock.js +0 -95
- package/src/spyne/views/view-stream-enhancer-loader.js +0 -70
package/README.md
CHANGED
|
@@ -15,8 +15,6 @@ Spyne is a full-featured, Javascript framework that reactively renders to the Re
|
|
|
15
15
|
* Two dependencies, [RxJs](https://rxjs-dev.firebaseapp.com) and [ramda](https://ramdajs.com)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
18
|
## Getting Started ##
|
|
21
19
|
**View Documentation**<br/>
|
|
22
20
|
https://spynejs.org
|
|
@@ -25,64 +23,6 @@ https://spynejs.org
|
|
|
25
23
|
```
|
|
26
24
|
npm install spyne
|
|
27
25
|
```
|
|
28
|
-
**Hello World**<br>
|
|
29
|
-
[Edit in codepen](https://codepen.io/nybatista/pen/Pvvweb)
|
|
30
|
-
```
|
|
31
|
-
// INIT SPYNE APP
|
|
32
|
-
const spyneApp = new spyne.SpyneApp({debug:true});
|
|
33
|
-
|
|
34
|
-
// PROPERTIES
|
|
35
|
-
const channelName = 'CHANNEL_HELLO_WORLD';
|
|
36
|
-
const channelAction = 'CHANNEL_HELLO_WORLD_DEFAULT_EVENT';
|
|
37
|
-
const channelConfig = {sendCachedPayload:true};
|
|
38
|
-
const channelPayload = {text: "Hello World!"}
|
|
39
|
-
|
|
40
|
-
// CHANNEL INIT
|
|
41
|
-
let helloWorld$ = new spyne.Channel(channelName, channelConfig);
|
|
42
|
-
// REGISTER ACTION
|
|
43
|
-
helloWorld$.addRegisteredActions = ()=>[channelAction];
|
|
44
|
-
// REGISTER CHANNEL
|
|
45
|
-
spyneApp.registerChannel(helloWorld$)
|
|
46
|
-
// SEND CHANNEL PAYLOAD
|
|
47
|
-
helloWorld$.sendChannelPayload(channelAction, channelPayload);
|
|
48
|
-
|
|
49
|
-
// VIEWSTREAM
|
|
50
|
-
class App extends spyne.ViewStream {
|
|
51
|
-
constructor() {
|
|
52
|
-
super();
|
|
53
|
-
}
|
|
54
|
-
addActionListeners() {
|
|
55
|
-
return [
|
|
56
|
-
[channelAction, 'onHelloWorld'],
|
|
57
|
-
];
|
|
58
|
-
}
|
|
59
|
-
onHelloWorld(e){
|
|
60
|
-
this.props.el.innerText = e.props().text;
|
|
61
|
-
}
|
|
62
|
-
onRendered() {
|
|
63
|
-
this.addChannel(channelName);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
new App().appendToDom(document.body);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
**Download or Fork Example App** (Tutorial to be added soon)<br/>
|
|
74
|
-
https://github.com/spynejs/spyne-example-app <br>
|
|
75
|
-
|
|
76
|
-
**Todos Example**<br/>
|
|
77
|
-
https://todos.spynejs.org</br>
|
|
78
|
-
|
|
79
|
-
### Feedback
|
|
80
|
-
Spyne was just released as an open source project in May, 2019, and any feedback would be greatly appreciated!<br>
|
|
81
|
-
To suggest a feature or report a bug: https://github.com/spynejs/spyne/issues
|
|
82
|
-
|
|
83
|
-
[<img src="https://bstacksupport.zendesk.com/attachments/token/PhEt6nTTBau6HVpyq3IJsmUIG/?name=browserstack-logo-600x315.png" title="BrowsersStack.com Logo" height="100">](https://browserstack.com)<br>
|
|
84
|
-
BrowserStack.com supports open source projects like Spyne.js<br>
|
|
85
|
-
Unit and Integration tests will run on real browsers and devices using BrowserStack's Automate system.<br><br>
|
|
86
26
|
|
|
87
27
|
|
|
88
28
|
Copyright (c) 2017-Present Frank Batista, Relevant Context LLC
|
package/karma.conf.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
// Generated on Fri Mar 31 2017 02:40:49 GMT-0400 (EDT)
|
|
3
|
-
const webpackEnv = {test:true};
|
|
4
|
-
//const webpackConfig = require("./webpack.config")(webpackEnv);
|
|
1
|
+
|
|
5
2
|
const webpackConfig = require("./webpack.config");
|
|
6
3
|
webpackConfig.mode = 'none';
|
|
7
4
|
webpackConfig.watch = true;
|
|
5
|
+
webpackConfig.entry = undefined;
|
|
6
|
+
webpackConfig.output = undefined;
|
|
8
7
|
|
|
9
|
-
//webpackConfig.output.filename='[name].[hash:8].js';
|
|
10
8
|
const fileGlob = './src/tests/index.test.js';
|
|
11
|
-
process.env.BABEL_ENV = 'test';
|
|
12
|
-
//const rxjs = require("rxjs");
|
|
13
9
|
|
|
14
10
|
|
|
15
11
|
module.exports = function(config) {
|
|
@@ -19,32 +15,12 @@ module.exports = function(config) {
|
|
|
19
15
|
}
|
|
20
16
|
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
24
18
|
webpackConfig.module.rules.push(
|
|
25
19
|
{
|
|
26
20
|
test: /(\.js)$/,
|
|
27
|
-
/* loader: 'babel-loader',
|
|
28
|
-
|
|
29
|
-
options: {
|
|
30
|
-
"babelrc" : false,
|
|
31
|
-
"presets": [
|
|
32
|
-
["@babel/preset-env", {
|
|
33
|
-
"targets": {
|
|
34
|
-
"ie" : 10,
|
|
35
|
-
"browsers": ["last 2 versions"]
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
"modules": false,
|
|
39
|
-
"loose": true
|
|
40
|
-
}]
|
|
41
|
-
]
|
|
42
|
-
},*/
|
|
43
21
|
exclude: /(node_modules)/
|
|
44
22
|
}
|
|
45
|
-
|
|
46
23
|
);
|
|
47
|
-
//console.log("CONFIG KARMA ",webpackConfig);
|
|
48
24
|
|
|
49
25
|
|
|
50
26
|
config.set({
|
|
@@ -57,7 +33,6 @@ module.exports = function(config) {
|
|
|
57
33
|
|
|
58
34
|
},
|
|
59
35
|
|
|
60
|
-
// frameworks to use
|
|
61
36
|
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
|
62
37
|
frameworks: ['webpack', 'mocha', 'chai'],
|
|
63
38
|
|
|
@@ -68,16 +43,12 @@ module.exports = function(config) {
|
|
|
68
43
|
'karma-coverage',
|
|
69
44
|
'karma-chrome-launcher'
|
|
70
45
|
],
|
|
71
|
-
|
|
46
|
+
|
|
47
|
+
|
|
72
48
|
files: [
|
|
73
49
|
{pattern: './node_modules/ramda/dist/ramda.min.js', watched:false},
|
|
74
|
-
|
|
75
|
-
/*
|
|
76
|
-
{ pattern: './node_modules/rxjs/!*.js', included:false, watched: false },
|
|
77
|
-
*/
|
|
78
50
|
{ pattern: './node_modules/rxjs/**/*.js', included:false, watched: false },
|
|
79
51
|
|
|
80
|
-
|
|
81
52
|
{pattern: './src/tests/index.test.js', watched: true},
|
|
82
53
|
{pattern: './src/tests/spyne-app.test.js', watched: true},
|
|
83
54
|
{pattern: './src/tests/spyne-plugin.test.js', watched: true},
|
|
@@ -88,9 +59,6 @@ module.exports = function(config) {
|
|
|
88
59
|
],
|
|
89
60
|
|
|
90
61
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
// list of files to exclude
|
|
94
62
|
exclude: [
|
|
95
63
|
|
|
96
64
|
],
|
|
@@ -115,18 +83,6 @@ module.exports = function(config) {
|
|
|
115
83
|
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
|
116
84
|
reporters: ['coverage'],
|
|
117
85
|
|
|
118
|
-
/*
|
|
119
|
-
coverageReporter: {
|
|
120
|
-
reporters: [
|
|
121
|
-
{type: 'lcov', dir: 'coverage/', subdir: '.'},
|
|
122
|
-
{type: 'text-summary'}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
|
-
|
|
130
86
|
coverageReporter: {
|
|
131
87
|
reporters: [
|
|
132
88
|
// generates ./coverage/lcov.info
|
|
@@ -153,30 +109,18 @@ module.exports = function(config) {
|
|
|
153
109
|
autoWatch: true,
|
|
154
110
|
usePolling: true,
|
|
155
111
|
|
|
156
|
-
|
|
157
|
-
|
|
158
112
|
customLaunchers: {
|
|
159
|
-
|
|
160
113
|
ChromeHeadlessNoSandbox: {
|
|
161
114
|
base: 'ChromeHeadless',
|
|
162
115
|
flags: ['--no-sandbox']
|
|
163
116
|
}
|
|
164
117
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
118
|
},
|
|
170
119
|
|
|
171
120
|
|
|
172
|
-
|
|
173
121
|
// start these browsers
|
|
174
122
|
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
|
175
123
|
browsers: ['Chrome'],
|
|
176
|
-
/*
|
|
177
|
-
browsers: ['Chrome','VirtualBoxIE11onWin7'],
|
|
178
|
-
*/
|
|
179
|
-
|
|
180
124
|
|
|
181
125
|
// Continuous Integration mode
|
|
182
126
|
// if true, Karma captures browsers, runs the tests and exits
|