@jx3box/jx3box-ui 2.4.5 → 2.4.7
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/package.json +1 -1
- package/src/author/AuthorInfo.vue +1 -2
- package/src/author/AuthorLink.vue +1 -2
- package/src/author/AuthorMedals.vue +1 -2
- package/src/author/UserPop.vue +1 -2
- package/src/bread/Admin.vue +1 -2
- package/src/comment/CommentContent.vue +1 -2
- package/src/footer/official.vue +1 -1
- package/src/interact/Contributors.vue +1 -2
- package/src/single/Collection.vue +1 -2
- package/src/utils/traffic-analytics.js +2 -2
- package/tests/traffic-analytics-contract.test.js +7 -7
package/package.json
CHANGED
|
@@ -70,8 +70,7 @@
|
|
|
70
70
|
|
|
71
71
|
<script>
|
|
72
72
|
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
73
|
-
import
|
|
74
|
-
const { authorLink } = utilModule;
|
|
73
|
+
import { authorLink } from "@jx3box/jx3box-common/js/utils";
|
|
75
74
|
import User from "@jx3box/jx3box-common/js/user";
|
|
76
75
|
import { getUserInfo } from "../../service/author";
|
|
77
76
|
import Avatar from "./Avatar.vue";
|
|
@@ -22,8 +22,7 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import
|
|
26
|
-
const { getMedalLink } = utilModule;
|
|
25
|
+
import { getMedalLink } from "@jx3box/jx3box-common/js/utils";
|
|
27
26
|
import { getUserMedals } from "../../service/author";
|
|
28
27
|
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
29
28
|
import i18nMixin from "../../i18n/mixin";
|
package/src/author/UserPop.vue
CHANGED
|
@@ -52,8 +52,7 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
54
|
<script>
|
|
55
|
-
import
|
|
56
|
-
const { showAvatar } = utilModule;
|
|
55
|
+
import { showAvatar } from "@jx3box/jx3box-common/js/utils";
|
|
57
56
|
import { getUserInfoByUidOrName } from "../../service/author";
|
|
58
57
|
import i18nMixin from "../../i18n/mixin";
|
|
59
58
|
export default {
|
package/src/bread/Admin.vue
CHANGED
|
@@ -129,8 +129,7 @@
|
|
|
129
129
|
|
|
130
130
|
<script>
|
|
131
131
|
import Bus from "../../utils/bus";
|
|
132
|
-
import
|
|
133
|
-
const { getRewrite } = utilModule;
|
|
132
|
+
import { getRewrite } from "@jx3box/jx3box-common/js/utils";
|
|
134
133
|
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
135
134
|
import { getSetting, postSetting, refreshPostCache } from "../../service/admin";
|
|
136
135
|
import User from "@jx3box/jx3box-common/js/user";
|
|
@@ -152,8 +152,7 @@
|
|
|
152
152
|
|
|
153
153
|
<script>
|
|
154
154
|
import Uploader from "./Upload.vue";
|
|
155
|
-
import
|
|
156
|
-
const { resolveImagePath } = utilModule;
|
|
155
|
+
import { resolveImagePath } from "@jx3box/jx3box-common/js/utils";
|
|
157
156
|
import { formatContent } from "../../utils/emotion";
|
|
158
157
|
import Emotion from "@jx3box/jx3box-emotion/src/Emotion2.vue";
|
|
159
158
|
import i18nMixin from "../../i18n/mixin";
|
package/src/footer/official.vue
CHANGED
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script>
|
|
23
|
-
import
|
|
24
|
-
const { getLink } = utilModule;
|
|
23
|
+
import { getLink } from "@jx3box/jx3box-common/js/utils";
|
|
25
24
|
import { getCollection } from "../../service/cms";
|
|
26
25
|
import i18nMixin from "../../i18n/mixin";
|
|
27
26
|
export default {
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
installVueRouterAnalytics,
|
|
11
11
|
} from "@jx3box/jx3box-common/js/analytics.js";
|
|
12
12
|
|
|
13
|
-
const DEFAULT_CONFIG_ENDPOINT = "/api/cms/system/traffic/config";
|
|
14
|
-
const DEFAULT_BATCH_ENDPOINT = "/api/cms/system/traffic/visits/batch";
|
|
13
|
+
const DEFAULT_CONFIG_ENDPOINT = "https://cms.jx3box.com/api/cms/system/traffic/config";
|
|
14
|
+
const DEFAULT_BATCH_ENDPOINT = "https://cms.jx3box.com/api/cms/system/traffic/visits/batch";
|
|
15
15
|
const DEFAULT_QUEUE_STORAGE_KEY = "jx3box:analytics:traffic:queue:v1";
|
|
16
16
|
const DEFAULT_BLOCK_STORAGE_KEY = "jx3box:analytics:traffic:block:v1";
|
|
17
17
|
const EMBEDDED_SURFACES = new Set(["app", "miniprogram", "pc_game", "mobile_game"]);
|
|
@@ -271,7 +271,7 @@ test("headless opt-in emits the official Traffic fixture once and honors per-id
|
|
|
271
271
|
ids: [fixture.canonical_event.page_view_id, fixture.canonical_event.event_id],
|
|
272
272
|
async fetch(url, options) {
|
|
273
273
|
requests.push({ url, options: options || {} });
|
|
274
|
-
if (String(url).startsWith("/api/cms/system/traffic/config")) {
|
|
274
|
+
if (String(url).startsWith("https://cms.jx3box.com/api/cms/system/traffic/config")) {
|
|
275
275
|
return createResponse(200, {
|
|
276
276
|
code: 0,
|
|
277
277
|
data: {
|
|
@@ -348,7 +348,7 @@ test("headless opt-in emits the official Traffic fixture once and honors per-id
|
|
|
348
348
|
await waitForRouter();
|
|
349
349
|
|
|
350
350
|
assert.equal(requests.length, 1, "navigation should request config but defer Traffic until finalization");
|
|
351
|
-
assert.match(requests[0].url,
|
|
351
|
+
assert.match(requests[0].url, /^https:\/\/cms\.jx3box\.com\/api\/cms\/system\/traffic\/config\?/);
|
|
352
352
|
assert.equal(requests[0].url.includes("must-stay-local"), false);
|
|
353
353
|
assert.equal(requests[0].url.includes("section=home"), false);
|
|
354
354
|
assert.equal(traffic.getState().analytics.queue.pending, 1);
|
|
@@ -422,7 +422,7 @@ test("embedded hosts use the backend recipient domain in both Config and envelop
|
|
|
422
422
|
const runtime = createRuntime({
|
|
423
423
|
async fetch(url, options) {
|
|
424
424
|
requests.push({ url, options: options || {} });
|
|
425
|
-
if (String(url).startsWith("/api/cms/system/traffic/config")) {
|
|
425
|
+
if (String(url).startsWith("https://cms.jx3box.com/api/cms/system/traffic/config")) {
|
|
426
426
|
return createResponse(200, {
|
|
427
427
|
code: 0,
|
|
428
428
|
data: {
|
|
@@ -485,7 +485,7 @@ test("an explicit unknown permission pauses in memory until the host unblocks",
|
|
|
485
485
|
localStorage,
|
|
486
486
|
async fetch(url, options) {
|
|
487
487
|
requests.push({ url, options: options || {} });
|
|
488
|
-
if (String(url).startsWith("/api/cms/system/traffic/config")) {
|
|
488
|
+
if (String(url).startsWith("https://cms.jx3box.com/api/cms/system/traffic/config")) {
|
|
489
489
|
return createResponse(200, {
|
|
490
490
|
code: 0,
|
|
491
491
|
data: {
|
|
@@ -545,7 +545,7 @@ test("an explicit unknown permission pauses in memory until the host unblocks",
|
|
|
545
545
|
"unknown state is not a persistent device block"
|
|
546
546
|
);
|
|
547
547
|
await traffic.flush({ reason: "permission_unknown" });
|
|
548
|
-
assert.equal(requests.filter((request) => request.url === "/api/cms/system/traffic/visits/batch").length, 0);
|
|
548
|
+
assert.equal(requests.filter((request) => request.url === "https://cms.jx3box.com/api/cms/system/traffic/visits/batch").length, 0);
|
|
549
549
|
|
|
550
550
|
assert.deepEqual(traffic.unblock(), { known: true, allow: true });
|
|
551
551
|
assert.equal(traffic.getState().analytics.queue.blocked, false);
|
|
@@ -822,7 +822,7 @@ test("a trusted server ACK block is persisted before the queue is cleared", asyn
|
|
|
822
822
|
const runtime = createRuntime({
|
|
823
823
|
localStorage,
|
|
824
824
|
async fetch(url, options) {
|
|
825
|
-
if (String(url).startsWith("/api/cms/system/traffic/config")) {
|
|
825
|
+
if (String(url).startsWith("https://cms.jx3box.com/api/cms/system/traffic/config")) {
|
|
826
826
|
return createResponse(200, {
|
|
827
827
|
code: 0,
|
|
828
828
|
data: {
|
|
@@ -889,7 +889,7 @@ test("the Traffic-only Journal never consumes or rewrites a shared Tracking Jour
|
|
|
889
889
|
runtime: createRuntime({
|
|
890
890
|
localStorage,
|
|
891
891
|
async fetch(url, options) {
|
|
892
|
-
if (String(url).startsWith("/api/cms/system/traffic/config")) {
|
|
892
|
+
if (String(url).startsWith("https://cms.jx3box.com/api/cms/system/traffic/config")) {
|
|
893
893
|
return createResponse(200, {
|
|
894
894
|
code: 0,
|
|
895
895
|
data: {
|