Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rip
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fanxuehui
rip
Commits
f47349e4
Commit
f47349e4
authored
Aug 19, 2019
by
aiduck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
14
parent
894b2296
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
42 deletions
+32
-42
package-lock.json
package-lock.json
+20
-39
package.json
package.json
+1
-1
monitor.js
src/lib/monitor.js
+10
-2
tracks.worker.js
src/lib/tracks.worker.js
+1
-0
No files found.
package-lock.json
View file @
f47349e4
{
"name"
:
"@tuia/rip"
,
"version"
:
"0.1.
2
"
,
"version"
:
"0.1.
3
"
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"dependencies"
:
{
...
...
@@ -1690,7 +1690,7 @@
},
"commander"
:
{
"version"
:
"2.20.0"
,
"resolved"
:
"http
s://registry.npm.taobao.org/commander/download/commander-2.20.0.tgz?cache=0&sync_timestamp=1564195111889&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2F
commander-2.20.0.tgz"
,
"resolved"
:
"http
://registry.npm.taobao.org/commander/download/
commander-2.20.0.tgz"
,
"integrity"
:
"sha1-1YuytcHuj4ew00ACfp6U4iLFpCI="
,
"dev"
:
true
},
...
...
@@ -1838,7 +1838,7 @@
},
"cross-env"
:
{
"version"
:
"5.2.0"
,
"resolved"
:
"http
s
://registry.npm.taobao.org/cross-env/download/cross-env-5.2.0.tgz"
,
"resolved"
:
"http://registry.npm.taobao.org/cross-env/download/cross-env-5.2.0.tgz"
,
"integrity"
:
"sha1-bs1MAV1Xc+YUA57lKQdmabnRJvI="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -2393,8 +2393,7 @@
"ansi-regex"
:
{
"version"
:
"2.1.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"aproba"
:
{
"version"
:
"1.2.0"
,
...
...
@@ -2415,14 +2414,12 @@
"balanced-match"
:
{
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"brace-expansion"
:
{
"version"
:
"1.1.11"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"balanced-match"
:
"^1.0.0"
,
"concat-map"
:
"0.0.1"
...
...
@@ -2437,20 +2434,17 @@
"code-point-at"
:
{
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"concat-map"
:
{
"version"
:
"0.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"console-control-strings"
:
{
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"core-util-is"
:
{
"version"
:
"1.0.2"
,
...
...
@@ -2567,8 +2561,7 @@
"inherits"
:
{
"version"
:
"2.0.3"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"ini"
:
{
"version"
:
"1.3.5"
,
...
...
@@ -2580,7 +2573,6 @@
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"number-is-nan"
:
"^1.0.0"
}
...
...
@@ -2595,7 +2587,6 @@
"version"
:
"3.0.4"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"brace-expansion"
:
"^1.1.7"
}
...
...
@@ -2603,14 +2594,12 @@
"minimist"
:
{
"version"
:
"0.0.8"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"minipass"
:
{
"version"
:
"2.3.5"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"safe-buffer"
:
"^5.1.2"
,
"yallist"
:
"^3.0.0"
...
...
@@ -2629,7 +2618,6 @@
"version"
:
"0.5.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"minimist"
:
"0.0.8"
}
...
...
@@ -2710,8 +2698,7 @@
"number-is-nan"
:
{
"version"
:
"1.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"object-assign"
:
{
"version"
:
"4.1.1"
,
...
...
@@ -2723,7 +2710,6 @@
"version"
:
"1.4.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"wrappy"
:
"1"
}
...
...
@@ -2809,8 +2795,7 @@
"safe-buffer"
:
{
"version"
:
"5.1.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"safer-buffer"
:
{
"version"
:
"2.1.2"
,
...
...
@@ -2846,7 +2831,6 @@
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"code-point-at"
:
"^1.0.0"
,
"is-fullwidth-code-point"
:
"^1.0.0"
,
...
...
@@ -2866,7 +2850,6 @@
"version"
:
"3.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-regex"
:
"^2.0.0"
}
...
...
@@ -2910,14 +2893,12 @@
"wrappy"
:
{
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"yallist"
:
{
"version"
:
"3.0.3"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
}
}
},
...
...
@@ -2970,7 +2951,7 @@
},
"globals"
:
{
"version"
:
"11.12.0"
,
"resolved"
:
"https://registry.npm.taobao.org/globals/download/globals-11.12.0.tgz
?cache=0&sync_timestamp=1563721993391&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobals%2Fdownload%2Fglobals-11.12.0.tgz
"
,
"resolved"
:
"https://registry.npm.taobao.org/globals/download/globals-11.12.0.tgz"
,
"integrity"
:
"sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4="
,
"dev"
:
true
},
...
...
@@ -3387,7 +3368,7 @@
},
"lodash"
:
{
"version"
:
"4.17.15"
,
"resolved"
:
"https://registry.npm.taobao.org/lodash/download/lodash-4.17.15.tgz
?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.15.tgz
"
,
"resolved"
:
"https://registry.npm.taobao.org/lodash/download/lodash-4.17.15.tgz"
,
"integrity"
:
"sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg="
,
"dev"
:
true
},
...
...
@@ -3575,7 +3556,7 @@
},
"mkdirp"
:
{
"version"
:
"0.5.1"
,
"resolved"
:
"http
s
://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz"
,
"resolved"
:
"http://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz"
,
"integrity"
:
"sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -3889,7 +3870,7 @@
},
"path-key"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"http://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz"
,
"resolved"
:
"http
s
://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz"
,
"integrity"
:
"sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
,
"dev"
:
true
},
...
...
@@ -4265,7 +4246,7 @@
},
"schema-utils"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"http
s://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz?cache=0&sync_timestamp=1563466381874&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2F
schema-utils-1.0.0.tgz"
,
"resolved"
:
"http
://registry.npm.taobao.org/schema-utils/download/
schema-utils-1.0.0.tgz"
,
"integrity"
:
"sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -5027,7 +5008,7 @@
"dependencies"
:
{
"schema-utils"
:
{
"version"
:
"0.4.7"
,
"resolved"
:
"http
s://registry.npm.taobao.org/schema-utils/download/schema-utils-0.4.7.tgz?cache=0&sync_timestamp=1563466381874&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2F
schema-utils-0.4.7.tgz"
,
"resolved"
:
"http
://registry.npm.taobao.org/schema-utils/download/
schema-utils-0.4.7.tgz"
,
"integrity"
:
"sha1-unT1l9K+LqiAExdG7hfQoJPGgYc="
,
"dev"
:
true
,
"requires"
:
{
...
...
package.json
View file @
f47349e4
{
"name"
:
"@tuia/rip"
,
"version"
:
"0.1.
3
"
,
"version"
:
"0.1.
4
"
,
"description"
:
"Tools for user behavior recording and playback based on rrweb"
,
"main"
:
"dist/index.js"
,
"scripts"
:
{
...
...
src/lib/monitor.js
View file @
f47349e4
...
...
@@ -26,6 +26,15 @@ class Monitor {
}
else
{
this
.
reset
({
userIdentifier
});
}
this
.
tracksWorker
.
onmessage
=
(
event
)
=>
{
switch
(
event
.
data
)
{
case
"resetRecord"
:
this
.
record
();
break
;
default
:
console
.
log
(
"unknow action"
,
event
.
data
);
}
}
}
/**
* 关闭rrweb
...
...
@@ -84,8 +93,7 @@ class Monitor {
*/
reset
(
event
)
{
console
.
log
(
"重置数据"
);
this
.
record
();
this
.
tracksWorker
.
postMessage
({
type
:
"reset"
,
payload
:
event
});
this
.
tracksWorker
.
postMessage
({
type
:
"reset"
,
payload
:
event
})
}
}
...
...
src/lib/tracks.worker.js
View file @
f47349e4
...
...
@@ -33,6 +33,7 @@ onmessage = ({ data: { type, payload } }) => {
// todo : 重置参数,重新生成recordKey
reporter
.
updateData
(
payload
);
reporter
.
reset
();
postMessage
(
'resetRecord'
);
log
(
"path"
,
reporter
.
baseInfo
.
path
);
log
(
"分片id"
,
reporter
.
recordKey
);
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment