@be-link/cls-logger 1.0.1-beta.19 → 1.0.1-beta.20
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/dist/index.esm.js +24 -5
- package/dist/index.js +24 -5
- package/dist/index.umd.js +24 -5
- package/dist/mini/behaviorMonitor.d.ts.map +1 -1
- package/dist/mini/errorMonitor.d.ts.map +1 -1
- package/dist/mini.esm.js +21 -2
- package/dist/mini.js +21 -2
- package/dist/web.esm.js +3 -3
- package/dist/web.js +3 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1467,7 +1467,7 @@ function getPagePath$1() {
|
|
|
1467
1467
|
try {
|
|
1468
1468
|
if (typeof window === 'undefined')
|
|
1469
1469
|
return '';
|
|
1470
|
-
return window.location?.
|
|
1470
|
+
return window.location?.href ?? '';
|
|
1471
1471
|
}
|
|
1472
1472
|
catch {
|
|
1473
1473
|
return '';
|
|
@@ -1674,7 +1674,17 @@ function getMpPagePath() {
|
|
|
1674
1674
|
const pages = globalThis.getCurrentPages?.();
|
|
1675
1675
|
if (Array.isArray(pages) && pages.length > 0) {
|
|
1676
1676
|
const page = pages[pages.length - 1];
|
|
1677
|
-
|
|
1677
|
+
const route = page.route || page.__route__;
|
|
1678
|
+
if (typeof route === 'string') {
|
|
1679
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1680
|
+
const options = page.options || {};
|
|
1681
|
+
const keys = Object.keys(options);
|
|
1682
|
+
if (keys.length > 0) {
|
|
1683
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1684
|
+
path = `${path}?${qs}`;
|
|
1685
|
+
}
|
|
1686
|
+
return path;
|
|
1687
|
+
}
|
|
1678
1688
|
}
|
|
1679
1689
|
return '';
|
|
1680
1690
|
}
|
|
@@ -1942,7 +1952,7 @@ function getPagePath() {
|
|
|
1942
1952
|
try {
|
|
1943
1953
|
if (typeof window === 'undefined')
|
|
1944
1954
|
return '';
|
|
1945
|
-
return window.location?.
|
|
1955
|
+
return window.location?.href ?? '';
|
|
1946
1956
|
}
|
|
1947
1957
|
catch {
|
|
1948
1958
|
return '';
|
|
@@ -2310,7 +2320,7 @@ function writeUvMeta$1(key, meta) {
|
|
|
2310
2320
|
function getWebPagePath() {
|
|
2311
2321
|
if (typeof window === 'undefined')
|
|
2312
2322
|
return '';
|
|
2313
|
-
return window.location?.
|
|
2323
|
+
return window.location?.href || '';
|
|
2314
2324
|
}
|
|
2315
2325
|
function buildCommonUvFields$1(uvId, uvMeta, isFirstVisit) {
|
|
2316
2326
|
return {
|
|
@@ -2562,7 +2572,16 @@ function getMiniProgramPagePath() {
|
|
|
2562
2572
|
const pages = typeof g.getCurrentPages === 'function' ? g.getCurrentPages() : [];
|
|
2563
2573
|
const last = Array.isArray(pages) ? pages[pages.length - 1] : undefined;
|
|
2564
2574
|
const route = (last?.route || last?.__route__);
|
|
2565
|
-
|
|
2575
|
+
if (typeof route !== 'string')
|
|
2576
|
+
return '';
|
|
2577
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
2578
|
+
const options = last?.options || {};
|
|
2579
|
+
const keys = Object.keys(options);
|
|
2580
|
+
if (keys.length > 0) {
|
|
2581
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
2582
|
+
path = `${path}?${qs}`;
|
|
2583
|
+
}
|
|
2584
|
+
return path;
|
|
2566
2585
|
}
|
|
2567
2586
|
catch {
|
|
2568
2587
|
return '';
|
package/dist/index.js
CHANGED
|
@@ -1471,7 +1471,7 @@ function getPagePath$1() {
|
|
|
1471
1471
|
try {
|
|
1472
1472
|
if (typeof window === 'undefined')
|
|
1473
1473
|
return '';
|
|
1474
|
-
return window.location?.
|
|
1474
|
+
return window.location?.href ?? '';
|
|
1475
1475
|
}
|
|
1476
1476
|
catch {
|
|
1477
1477
|
return '';
|
|
@@ -1678,7 +1678,17 @@ function getMpPagePath() {
|
|
|
1678
1678
|
const pages = globalThis.getCurrentPages?.();
|
|
1679
1679
|
if (Array.isArray(pages) && pages.length > 0) {
|
|
1680
1680
|
const page = pages[pages.length - 1];
|
|
1681
|
-
|
|
1681
|
+
const route = page.route || page.__route__;
|
|
1682
|
+
if (typeof route === 'string') {
|
|
1683
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1684
|
+
const options = page.options || {};
|
|
1685
|
+
const keys = Object.keys(options);
|
|
1686
|
+
if (keys.length > 0) {
|
|
1687
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1688
|
+
path = `${path}?${qs}`;
|
|
1689
|
+
}
|
|
1690
|
+
return path;
|
|
1691
|
+
}
|
|
1682
1692
|
}
|
|
1683
1693
|
return '';
|
|
1684
1694
|
}
|
|
@@ -1946,7 +1956,7 @@ function getPagePath() {
|
|
|
1946
1956
|
try {
|
|
1947
1957
|
if (typeof window === 'undefined')
|
|
1948
1958
|
return '';
|
|
1949
|
-
return window.location?.
|
|
1959
|
+
return window.location?.href ?? '';
|
|
1950
1960
|
}
|
|
1951
1961
|
catch {
|
|
1952
1962
|
return '';
|
|
@@ -2314,7 +2324,7 @@ function writeUvMeta$1(key, meta) {
|
|
|
2314
2324
|
function getWebPagePath() {
|
|
2315
2325
|
if (typeof window === 'undefined')
|
|
2316
2326
|
return '';
|
|
2317
|
-
return window.location?.
|
|
2327
|
+
return window.location?.href || '';
|
|
2318
2328
|
}
|
|
2319
2329
|
function buildCommonUvFields$1(uvId, uvMeta, isFirstVisit) {
|
|
2320
2330
|
return {
|
|
@@ -2566,7 +2576,16 @@ function getMiniProgramPagePath() {
|
|
|
2566
2576
|
const pages = typeof g.getCurrentPages === 'function' ? g.getCurrentPages() : [];
|
|
2567
2577
|
const last = Array.isArray(pages) ? pages[pages.length - 1] : undefined;
|
|
2568
2578
|
const route = (last?.route || last?.__route__);
|
|
2569
|
-
|
|
2579
|
+
if (typeof route !== 'string')
|
|
2580
|
+
return '';
|
|
2581
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
2582
|
+
const options = last?.options || {};
|
|
2583
|
+
const keys = Object.keys(options);
|
|
2584
|
+
if (keys.length > 0) {
|
|
2585
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
2586
|
+
path = `${path}?${qs}`;
|
|
2587
|
+
}
|
|
2588
|
+
return path;
|
|
2570
2589
|
}
|
|
2571
2590
|
catch {
|
|
2572
2591
|
return '';
|
package/dist/index.umd.js
CHANGED
|
@@ -1473,7 +1473,7 @@
|
|
|
1473
1473
|
try {
|
|
1474
1474
|
if (typeof window === 'undefined')
|
|
1475
1475
|
return '';
|
|
1476
|
-
return window.location?.
|
|
1476
|
+
return window.location?.href ?? '';
|
|
1477
1477
|
}
|
|
1478
1478
|
catch {
|
|
1479
1479
|
return '';
|
|
@@ -1680,7 +1680,17 @@
|
|
|
1680
1680
|
const pages = globalThis.getCurrentPages?.();
|
|
1681
1681
|
if (Array.isArray(pages) && pages.length > 0) {
|
|
1682
1682
|
const page = pages[pages.length - 1];
|
|
1683
|
-
|
|
1683
|
+
const route = page.route || page.__route__;
|
|
1684
|
+
if (typeof route === 'string') {
|
|
1685
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1686
|
+
const options = page.options || {};
|
|
1687
|
+
const keys = Object.keys(options);
|
|
1688
|
+
if (keys.length > 0) {
|
|
1689
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1690
|
+
path = `${path}?${qs}`;
|
|
1691
|
+
}
|
|
1692
|
+
return path;
|
|
1693
|
+
}
|
|
1684
1694
|
}
|
|
1685
1695
|
return '';
|
|
1686
1696
|
}
|
|
@@ -1948,7 +1958,7 @@
|
|
|
1948
1958
|
try {
|
|
1949
1959
|
if (typeof window === 'undefined')
|
|
1950
1960
|
return '';
|
|
1951
|
-
return window.location?.
|
|
1961
|
+
return window.location?.href ?? '';
|
|
1952
1962
|
}
|
|
1953
1963
|
catch {
|
|
1954
1964
|
return '';
|
|
@@ -2316,7 +2326,7 @@
|
|
|
2316
2326
|
function getWebPagePath() {
|
|
2317
2327
|
if (typeof window === 'undefined')
|
|
2318
2328
|
return '';
|
|
2319
|
-
return window.location?.
|
|
2329
|
+
return window.location?.href || '';
|
|
2320
2330
|
}
|
|
2321
2331
|
function buildCommonUvFields$1(uvId, uvMeta, isFirstVisit) {
|
|
2322
2332
|
return {
|
|
@@ -2568,7 +2578,16 @@
|
|
|
2568
2578
|
const pages = typeof g.getCurrentPages === 'function' ? g.getCurrentPages() : [];
|
|
2569
2579
|
const last = Array.isArray(pages) ? pages[pages.length - 1] : undefined;
|
|
2570
2580
|
const route = (last?.route || last?.__route__);
|
|
2571
|
-
|
|
2581
|
+
if (typeof route !== 'string')
|
|
2582
|
+
return '';
|
|
2583
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
2584
|
+
const options = last?.options || {};
|
|
2585
|
+
const keys = Object.keys(options);
|
|
2586
|
+
if (keys.length > 0) {
|
|
2587
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
2588
|
+
path = `${path}?${qs}`;
|
|
2589
|
+
}
|
|
2590
|
+
return path;
|
|
2572
2591
|
}
|
|
2573
2592
|
catch {
|
|
2574
2593
|
return '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behaviorMonitor.d.ts","sourceRoot":"","sources":["../../src/mini/behaviorMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAU,MAAM,UAAU,CAAC;AAG3E,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"behaviorMonitor.d.ts","sourceRoot":"","sources":["../../src/mini/behaviorMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAU,MAAM,UAAU,CAAC;AAG3E,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;AAgFzD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAE,sBAA2B,GAAG,MAAM,IAAI,CA6N7G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMonitor.d.ts","sourceRoot":"","sources":["../../src/mini/errorMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGhE,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"errorMonitor.d.ts","sourceRoot":"","sources":["../../src/mini/errorMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGhE,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;AAkQzD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,GAAE,OAAO,GAAG,mBAAmB,GAAG,SAAc,GAAG,IAAI,CAiBpH"}
|
package/dist/mini.esm.js
CHANGED
|
@@ -1167,7 +1167,17 @@ function getMpPagePath() {
|
|
|
1167
1167
|
const pages = globalThis.getCurrentPages?.();
|
|
1168
1168
|
if (Array.isArray(pages) && pages.length > 0) {
|
|
1169
1169
|
const page = pages[pages.length - 1];
|
|
1170
|
-
|
|
1170
|
+
const route = page.route || page.__route__;
|
|
1171
|
+
if (typeof route === 'string') {
|
|
1172
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1173
|
+
const options = page.options || {};
|
|
1174
|
+
const keys = Object.keys(options);
|
|
1175
|
+
if (keys.length > 0) {
|
|
1176
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1177
|
+
path = `${path}?${qs}`;
|
|
1178
|
+
}
|
|
1179
|
+
return path;
|
|
1180
|
+
}
|
|
1171
1181
|
}
|
|
1172
1182
|
return '';
|
|
1173
1183
|
}
|
|
@@ -1532,7 +1542,16 @@ function getMiniProgramPagePath() {
|
|
|
1532
1542
|
const pages = typeof g.getCurrentPages === 'function' ? g.getCurrentPages() : [];
|
|
1533
1543
|
const last = Array.isArray(pages) ? pages[pages.length - 1] : undefined;
|
|
1534
1544
|
const route = (last?.route || last?.__route__);
|
|
1535
|
-
|
|
1545
|
+
if (typeof route !== 'string')
|
|
1546
|
+
return '';
|
|
1547
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1548
|
+
const options = last?.options || {};
|
|
1549
|
+
const keys = Object.keys(options);
|
|
1550
|
+
if (keys.length > 0) {
|
|
1551
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1552
|
+
path = `${path}?${qs}`;
|
|
1553
|
+
}
|
|
1554
|
+
return path;
|
|
1536
1555
|
}
|
|
1537
1556
|
catch {
|
|
1538
1557
|
return '';
|
package/dist/mini.js
CHANGED
|
@@ -1190,7 +1190,17 @@ function getMpPagePath() {
|
|
|
1190
1190
|
const pages = globalThis.getCurrentPages?.();
|
|
1191
1191
|
if (Array.isArray(pages) && pages.length > 0) {
|
|
1192
1192
|
const page = pages[pages.length - 1];
|
|
1193
|
-
|
|
1193
|
+
const route = page.route || page.__route__;
|
|
1194
|
+
if (typeof route === 'string') {
|
|
1195
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1196
|
+
const options = page.options || {};
|
|
1197
|
+
const keys = Object.keys(options);
|
|
1198
|
+
if (keys.length > 0) {
|
|
1199
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1200
|
+
path = `${path}?${qs}`;
|
|
1201
|
+
}
|
|
1202
|
+
return path;
|
|
1203
|
+
}
|
|
1194
1204
|
}
|
|
1195
1205
|
return '';
|
|
1196
1206
|
}
|
|
@@ -1555,7 +1565,16 @@ function getMiniProgramPagePath() {
|
|
|
1555
1565
|
const pages = typeof g.getCurrentPages === 'function' ? g.getCurrentPages() : [];
|
|
1556
1566
|
const last = Array.isArray(pages) ? pages[pages.length - 1] : undefined;
|
|
1557
1567
|
const route = (last?.route || last?.__route__);
|
|
1558
|
-
|
|
1568
|
+
if (typeof route !== 'string')
|
|
1569
|
+
return '';
|
|
1570
|
+
let path = route.startsWith('/') ? route : `/${route}`;
|
|
1571
|
+
const options = last?.options || {};
|
|
1572
|
+
const keys = Object.keys(options);
|
|
1573
|
+
if (keys.length > 0) {
|
|
1574
|
+
const qs = keys.map((k) => `${k}=${options[k]}`).join('&');
|
|
1575
|
+
path = `${path}?${qs}`;
|
|
1576
|
+
}
|
|
1577
|
+
return path;
|
|
1559
1578
|
}
|
|
1560
1579
|
catch {
|
|
1561
1580
|
return '';
|
package/dist/web.esm.js
CHANGED
|
@@ -1224,7 +1224,7 @@ function getPagePath$1() {
|
|
|
1224
1224
|
try {
|
|
1225
1225
|
if (typeof window === 'undefined')
|
|
1226
1226
|
return '';
|
|
1227
|
-
return window.location?.
|
|
1227
|
+
return window.location?.href ?? '';
|
|
1228
1228
|
}
|
|
1229
1229
|
catch {
|
|
1230
1230
|
return '';
|
|
@@ -1427,7 +1427,7 @@ function getPagePath() {
|
|
|
1427
1427
|
try {
|
|
1428
1428
|
if (typeof window === 'undefined')
|
|
1429
1429
|
return '';
|
|
1430
|
-
return window.location?.
|
|
1430
|
+
return window.location?.href ?? '';
|
|
1431
1431
|
}
|
|
1432
1432
|
catch {
|
|
1433
1433
|
return '';
|
|
@@ -1696,7 +1696,7 @@ function writeUvMeta(key, meta) {
|
|
|
1696
1696
|
function getWebPagePath() {
|
|
1697
1697
|
if (typeof window === 'undefined')
|
|
1698
1698
|
return '';
|
|
1699
|
-
return window.location?.
|
|
1699
|
+
return window.location?.href || '';
|
|
1700
1700
|
}
|
|
1701
1701
|
function buildCommonUvFields(uvId, uvMeta, isFirstVisit) {
|
|
1702
1702
|
return {
|
package/dist/web.js
CHANGED
|
@@ -1247,7 +1247,7 @@ function getPagePath$1() {
|
|
|
1247
1247
|
try {
|
|
1248
1248
|
if (typeof window === 'undefined')
|
|
1249
1249
|
return '';
|
|
1250
|
-
return window.location?.
|
|
1250
|
+
return window.location?.href ?? '';
|
|
1251
1251
|
}
|
|
1252
1252
|
catch {
|
|
1253
1253
|
return '';
|
|
@@ -1450,7 +1450,7 @@ function getPagePath() {
|
|
|
1450
1450
|
try {
|
|
1451
1451
|
if (typeof window === 'undefined')
|
|
1452
1452
|
return '';
|
|
1453
|
-
return window.location?.
|
|
1453
|
+
return window.location?.href ?? '';
|
|
1454
1454
|
}
|
|
1455
1455
|
catch {
|
|
1456
1456
|
return '';
|
|
@@ -1719,7 +1719,7 @@ function writeUvMeta(key, meta) {
|
|
|
1719
1719
|
function getWebPagePath() {
|
|
1720
1720
|
if (typeof window === 'undefined')
|
|
1721
1721
|
return '';
|
|
1722
|
-
return window.location?.
|
|
1722
|
+
return window.location?.href || '';
|
|
1723
1723
|
}
|
|
1724
1724
|
function buildCommonUvFields(uvId, uvMeta, isFirstVisit) {
|
|
1725
1725
|
return {
|