fast-simon-sdk 1.6.151 → 1.6.152
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
CHANGED
|
@@ -16,18 +16,6 @@ By using the described JavaScript SDK web developers can easily retrieve data to
|
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
19
|
-
### Authenticate with Fast Simon private NPM packages
|
|
20
|
-
|
|
21
|
-
Before installation, run:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
# NPM_TOKEN must hold a read-only token for the private @fast-simon scope.
|
|
25
|
-
# PowerShell: use "$env:NPM_TOKEN" — a bare "$NPM_TOKEN" expands to empty and sets no token.
|
|
26
|
-
npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
> Never commit the token. See [NPM_AUTH.md](../NPM_AUTH.md) for how to obtain a read-only token for the private `@fast-simon` scope and export it as `NPM_TOKEN`.
|
|
30
|
-
|
|
31
19
|
### CDN Global Script
|
|
32
20
|
```html title="Latest Version"
|
|
33
21
|
<script src="https://assets.fastsimon.com/sdk/latest/fast_simon_sdk.js" async/>
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.executeCallbacks = exports.registerCallback = exports.getPlatform = exports.setCartToken = exports.getUserSessionToken = exports.setSessionToken = exports.surfaceOutsideInit = exports.printSDKError = exports.printDebugNotice = exports.printSDKReady = exports.setLoadData = void 0;
|
|
40
|
-
var
|
|
40
|
+
var consoleBanner_1 = require("../../utils/consoleBanner");
|
|
41
41
|
var common_1 = require("../../services/common");
|
|
42
42
|
var shopifyMarkets_1 = require("../../utils/shopifyMarkets");
|
|
43
43
|
var config_1 = require("../../config");
|
|
@@ -98,7 +98,7 @@ var sdkVersion = function () {
|
|
|
98
98
|
};
|
|
99
99
|
var printSDKReady = function (self) {
|
|
100
100
|
self.status = "ready";
|
|
101
|
-
(0,
|
|
101
|
+
(0, consoleBanner_1.registerProduct)({
|
|
102
102
|
product: 'SDK',
|
|
103
103
|
install: 'SDK',
|
|
104
104
|
version: sdkVersion(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/sections/initialization/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/sections/initialization/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA0D;AAG1D,gDAA6C;AAC7C,6DAAgE;AAChE,uCAQsB;AACtB,2CAAmE;AACnE,+CAA0C;AAC1C,iDAAwD;AACxD,mDAAyE;AACzE,iDAAqD;AACrD,6EAA6E;AAC7E,6CAA8C;AAC9C,mDAAgG;AAGzF,IAAM,WAAW,GAAG,UAAC,IAAc,EAAE,IAAuB;;IAC/D,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;IACpD,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;IAEjC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG;QAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,8BAA8B,EAAE,IAAI,CAAC,8BAA8B;QACnE,kCAAkC,EAAE,IAAI,CAAC,kCAAkC;QAC3E,gCAAgC,EAAE,IAAI,CAAC,gCAAgC;QACvE,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;QACrD,aAAa,EAAE,IAAI;QACnB,+BAA+B,EAAE,IAAI,CAAC,+BAA+B;QACrE,mCAAmC,EAAE,MAAA,IAA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AAmB;IAChE,IAAG,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,YAAK,iCAAwB,CAAE,EAAE,gDAAgD,CAAC,CAAA;IAClG,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACjB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,SAAS,GAAG,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC;QACD,IAAA,mBAAU,EAAC,uCAAgC,IAAI,CAAC,MAAM,MAAG,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAfW,QAAA,gBAAgB,oBAe3B;AAEK,IAAM,gBAAgB,GAAG,UAAC,IAAc;IAC3C,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAA,mBAAU,EAAC,oBAAa,IAAI,CAAC,SAAS,CAAC,MAAM,wBAAqB,CAAC,CAAC;QACpE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,EAAE,EAAV,CAAU,CAAC,CAAC;IACnD,CAAC;AACL,CAAC,CAAC;AALW,QAAA,gBAAgB,oBAK3B"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The SDK's own copy of @fast-simon/widget-console (services/frontends/widget-console/src/main.ts),
|
|
3
|
+
* below this header unchanged. That package is restricted on npm, so it cannot be a dependency of
|
|
4
|
+
* fast-simon-sdk, a public package: as one it made `npm install fast-simon-sdk` fail with E404 for
|
|
5
|
+
* anyone without Fast Simon's npm token.
|
|
6
|
+
*
|
|
7
|
+
* Copying costs nothing at runtime. Every product bundle already inlines its own copy of that
|
|
8
|
+
* package, and the copies meet only through the window registry, so the contract is SINGLETON_KEY,
|
|
9
|
+
* SCHEMA and the Registry shape: keep those identical to widget-console's. When two copies with
|
|
10
|
+
* different SCHEMA values meet, whichever registers second prints its own single line instead of
|
|
11
|
+
* joining the entry, so drift degrades the banner rather than breaking it. Re-copy on any change to
|
|
12
|
+
* widget-console's: .github/scripts/tests/test_widget_console_sdk_copy.sh fails a PR on which this
|
|
13
|
+
* file does not end with that one verbatim.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Shared console banner for Fast Simon storefront products.
|
|
17
|
+
*
|
|
18
|
+
* Every product (Autocomplete, Search Page, Collection Page, Recommendations,
|
|
19
|
+
* SDK, Shopper Agent) registers itself here instead of printing its own line.
|
|
20
|
+
* One combined console entry is printed for the whole site.
|
|
21
|
+
*
|
|
22
|
+
* Why the registry lives on `window` rather than in this module: these products
|
|
23
|
+
* ship as separately-built bundles served from separate CDN URLs and loaded
|
|
24
|
+
* independently, sometimes carrying different versions of THIS package. The npm
|
|
25
|
+
* package shares source, not an instance — each bundle inlines its own copy. So
|
|
26
|
+
* the rendezvous has to be a window singleton that whichever bundle loads first
|
|
27
|
+
* creates and owns.
|
|
28
|
+
*/
|
|
29
|
+
export type ProductName = 'Autocomplete' | 'Search Page' | 'Collection Page' | 'Recommendations' | 'SDK' | 'Shopper Agent';
|
|
30
|
+
export type InstallKind = 'V-Next' | 'SSR' | 'SDK' | 'No-Code' | 'Snippet' | 'Widget';
|
|
31
|
+
export interface ProductRegistration {
|
|
32
|
+
product: ProductName;
|
|
33
|
+
install: InstallKind;
|
|
34
|
+
/** Injected at build time from the package's own version — see __FS_VERSION__. */
|
|
35
|
+
version: string;
|
|
36
|
+
site?: string;
|
|
37
|
+
uuid?: string;
|
|
38
|
+
storeId?: string | number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Register one product into the shared console entry.
|
|
42
|
+
*
|
|
43
|
+
* Registering the same product twice overwrites the earlier row — SSR and the
|
|
44
|
+
* client `serving` app never load on the same page, so there is no case where
|
|
45
|
+
* two installs of one product legitimately coexist.
|
|
46
|
+
*/
|
|
47
|
+
export declare function registerProduct(registration: ProductRegistration): void;
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The SDK's own copy of @fast-simon/widget-console (services/frontends/widget-console/src/main.ts),
|
|
4
|
+
* below this header unchanged. That package is restricted on npm, so it cannot be a dependency of
|
|
5
|
+
* fast-simon-sdk, a public package: as one it made `npm install fast-simon-sdk` fail with E404 for
|
|
6
|
+
* anyone without Fast Simon's npm token.
|
|
7
|
+
*
|
|
8
|
+
* Copying costs nothing at runtime. Every product bundle already inlines its own copy of that
|
|
9
|
+
* package, and the copies meet only through the window registry, so the contract is SINGLETON_KEY,
|
|
10
|
+
* SCHEMA and the Registry shape: keep those identical to widget-console's. When two copies with
|
|
11
|
+
* different SCHEMA values meet, whichever registers second prints its own single line instead of
|
|
12
|
+
* joining the entry, so drift degrades the banner rather than breaking it. Re-copy on any change to
|
|
13
|
+
* widget-console's: .github/scripts/tests/test_widget_console_sdk_copy.sh fails a PR on which this
|
|
14
|
+
* file does not end with that one verbatim.
|
|
15
|
+
*/
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
28
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
29
|
+
if (ar || !(i in from)) {
|
|
30
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
31
|
+
ar[i] = from[i];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.registerProduct = registerProduct;
|
|
38
|
+
/**
|
|
39
|
+
* Bumped only on a breaking change to the Registry shape above. An older
|
|
40
|
+
* bundle's copy meeting a newer one degrades to its own single line rather than
|
|
41
|
+
* corrupting the shared entry.
|
|
42
|
+
*
|
|
43
|
+
* 2 — dropped the `flushed` flag. A 1.0.1 bundle reads it to decide between an
|
|
44
|
+
* addendum line and a full print; against a registry that no longer carries
|
|
45
|
+
* it, that read is `undefined` and the two copies disagree about what has
|
|
46
|
+
* already been printed. Consumers redeploy independently, so the two WILL
|
|
47
|
+
* meet in the wild during rollout.
|
|
48
|
+
*/
|
|
49
|
+
var SCHEMA = 2;
|
|
50
|
+
var SINGLETON_KEY = '__fastSimonConsole';
|
|
51
|
+
/**
|
|
52
|
+
* Each registration resets the timer to FLOOR_MS, so products arriving close
|
|
53
|
+
* together share one entry; CAP_MS stops a slow drip from delaying it forever.
|
|
54
|
+
* Both are measured from the batch's first registration, not from page start.
|
|
55
|
+
*
|
|
56
|
+
* Sized from live storefronts rather than guessed. On whitefoxboutique.com the
|
|
57
|
+
* Collection Page registered at 3.8s and Autocomplete at 5.3s; a 700ms window
|
|
58
|
+
* split that 1.5s gap into two entries. FLOOR_MS now covers gaps of that order.
|
|
59
|
+
*
|
|
60
|
+
* Landing a little later is a feature, not a cost. An e-commerce page floods its
|
|
61
|
+
* console with third-party noise in the first seconds, so an entry printed after
|
|
62
|
+
* that settles is markedly easier for support to find.
|
|
63
|
+
*
|
|
64
|
+
* They are deliberately NOT tuned to catch every product, because nothing could:
|
|
65
|
+
* Autocomplete injects on first user interaction on Shopify
|
|
66
|
+
* (autocomplete/init/src/init.ts:237), so it may register at 30s or never, and
|
|
67
|
+
* the Shopper Agent loader retries every 4s waiting for its config. A product
|
|
68
|
+
* arriving after a flush simply starts a fresh cycle and the whole entry is
|
|
69
|
+
* printed again — see flush().
|
|
70
|
+
*/
|
|
71
|
+
var FLOOR_MS = 2000;
|
|
72
|
+
var CAP_MS = 5000;
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
// Styling
|
|
75
|
+
//
|
|
76
|
+
// A page cannot detect the DevTools color theme — `prefers-color-scheme`
|
|
77
|
+
// reports the OS/page theme, which is independent of it. So every style here
|
|
78
|
+
// has to survive both light and dark consoles unchanged:
|
|
79
|
+
//
|
|
80
|
+
// BADGE supplies its own background, so it is self-contained on either theme.
|
|
81
|
+
// The solid color is declared before the gradient so browsers that do
|
|
82
|
+
// not render `background-image` in console styles fall back to it
|
|
83
|
+
// rather than to transparent.
|
|
84
|
+
// LABEL bold #1371ff measures ~4.4:1 on light and ~3.9:1 on dark, clearing
|
|
85
|
+
// the 3:1 bar for bold text both ways.
|
|
86
|
+
// VALUE sets no color at all, inheriting the console's own foreground — the
|
|
87
|
+
// one color guaranteed readable on both. A mid-gray is not.
|
|
88
|
+
// ---------------------------------------------------------------------------
|
|
89
|
+
var MONO = 'font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace';
|
|
90
|
+
var ACCENT = '#1371ff';
|
|
91
|
+
var BADGE = "background:".concat(ACCENT, ";background-image:linear-gradient(90deg,").concat(ACCENT, ",#6d5efc);") +
|
|
92
|
+
'color:#fff;font-weight:700;padding:2px 7px;border-radius:4px';
|
|
93
|
+
var HEAD = "color:".concat(ACCENT, ";font-weight:700");
|
|
94
|
+
// Accent but deliberately NOT bold, so the tagline reads as a subtitle rather
|
|
95
|
+
// than competing with the badge next to it.
|
|
96
|
+
var TAG = "color:".concat(ACCENT);
|
|
97
|
+
var LABEL = "".concat(HEAD, ";").concat(MONO);
|
|
98
|
+
var VALUE = MONO;
|
|
99
|
+
var BADGE_TEXT = '⚡ Powered by Fast Simon';
|
|
100
|
+
var TAGLINE = 'Conversion optimization · Personalization · Merchandising';
|
|
101
|
+
var DOCS_URL = 'https://docs.fastsimon.com';
|
|
102
|
+
var SUPPORT_EMAIL = 'support@fastsimon.com';
|
|
103
|
+
function elapsedMs() {
|
|
104
|
+
return typeof performance === 'undefined' ? 0 : Math.round(performance.now());
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Multi-second loads are routine — Autocomplete injects on first user
|
|
108
|
+
* interaction on Shopify, so it can register 10s in — and at that magnitude the
|
|
109
|
+
* milliseconds are noise.
|
|
110
|
+
*/
|
|
111
|
+
function readableMs(ms) {
|
|
112
|
+
return ms >= 1000 ? "".concat((ms / 1000).toFixed(1), "s") : "".concat(ms, " ms");
|
|
113
|
+
}
|
|
114
|
+
/** Versions reach us as bare package versions; the display carries a `v`. */
|
|
115
|
+
function displayVersion(version) {
|
|
116
|
+
return version.startsWith('v') ? version : "v".concat(version);
|
|
117
|
+
}
|
|
118
|
+
function getRegistry() {
|
|
119
|
+
// `vnext-ssr` renders on the server too, where there is no window and no
|
|
120
|
+
// console worth writing to.
|
|
121
|
+
if (typeof window === 'undefined' || typeof console === 'undefined') {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
var host = window;
|
|
125
|
+
var registry = host[SINGLETON_KEY];
|
|
126
|
+
if (!registry) {
|
|
127
|
+
registry = {
|
|
128
|
+
schema: SCHEMA,
|
|
129
|
+
rows: [],
|
|
130
|
+
site: {},
|
|
131
|
+
firstAt: 0,
|
|
132
|
+
timer: undefined,
|
|
133
|
+
};
|
|
134
|
+
host[SINGLETON_KEY] = registry;
|
|
135
|
+
}
|
|
136
|
+
return registry;
|
|
137
|
+
}
|
|
138
|
+
/** First non-empty value wins, so whichever product boots first still yields a complete block. */
|
|
139
|
+
function mergeSite(site, registration) {
|
|
140
|
+
if (!site.site && registration.site) {
|
|
141
|
+
site.site = registration.site;
|
|
142
|
+
}
|
|
143
|
+
if (!site.uuid && registration.uuid) {
|
|
144
|
+
site.uuid = registration.uuid;
|
|
145
|
+
}
|
|
146
|
+
// Falsy means absent, not "store 0". The svelte stores in serving and the
|
|
147
|
+
// recommendations packages initialise storeID to the number 0 and fill it in
|
|
148
|
+
// later, so a product registering early would otherwise pin the identity
|
|
149
|
+
// block to a literal "0" and, being first, block the real value.
|
|
150
|
+
if (!site.storeId && registration.storeId) {
|
|
151
|
+
site.storeId = String(registration.storeId);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Collects [text, style] pairs and folds them into a single format string plus
|
|
156
|
+
* its style arguments. This is what lets one `console.log` carry per-segment
|
|
157
|
+
* styling across many lines — `console.group` would render each line as its own
|
|
158
|
+
* child entry instead.
|
|
159
|
+
*/
|
|
160
|
+
var Segments = /** @class */ (function () {
|
|
161
|
+
function Segments() {
|
|
162
|
+
this.parts = [];
|
|
163
|
+
}
|
|
164
|
+
Segments.prototype.add = function (text, style) {
|
|
165
|
+
if (style === void 0) { style = VALUE; }
|
|
166
|
+
this.parts.push([text, style]);
|
|
167
|
+
};
|
|
168
|
+
Segments.prototype.log = function () {
|
|
169
|
+
console.log.apply(console, __spreadArray([this.parts.map(function (_a) {
|
|
170
|
+
var text = _a[0];
|
|
171
|
+
return "%c".concat(text);
|
|
172
|
+
}).join('')], this.parts.map(function (_a) {
|
|
173
|
+
var style = _a[1];
|
|
174
|
+
return style;
|
|
175
|
+
}), false));
|
|
176
|
+
};
|
|
177
|
+
return Segments;
|
|
178
|
+
}());
|
|
179
|
+
function columnWidth(rows, pick) {
|
|
180
|
+
return rows.reduce(function (widest, row) { return Math.max(widest, pick(row).length); }, 0);
|
|
181
|
+
}
|
|
182
|
+
function flush(registry) {
|
|
183
|
+
var _a;
|
|
184
|
+
// Reset the batch, not just the timer. A product registering after this
|
|
185
|
+
// point starts a fresh debounce cycle and re-prints the WHOLE entry, so the
|
|
186
|
+
// newest entry is always the complete picture. A console entry cannot be
|
|
187
|
+
// edited once printed, so re-printing is the only way to stay accurate.
|
|
188
|
+
registry.timer = undefined;
|
|
189
|
+
registry.firstAt = 0;
|
|
190
|
+
var rows = registry.rows, site = registry.site;
|
|
191
|
+
var segments = new Segments();
|
|
192
|
+
var nameWidth = columnWidth(rows, function (row) { return row.product; });
|
|
193
|
+
var installWidth = columnWidth(rows, function (row) { return row.install; });
|
|
194
|
+
var versionWidth = columnWidth(rows, function (row) { return displayVersion(row.version); });
|
|
195
|
+
// No site in the header: `Site` appears in the detail block below, and a
|
|
196
|
+
// header naming the domain read as a site-wide install claim. The registry
|
|
197
|
+
// only ever sees what loaded on THIS page — a homepage loads no collection
|
|
198
|
+
// or search bundle — so that claim was wrong wherever it mattered most.
|
|
199
|
+
segments.add(BADGE_TEXT, BADGE);
|
|
200
|
+
segments.add(" ".concat(TAGLINE, "\n\n"), TAG);
|
|
201
|
+
rows.forEach(function (row) {
|
|
202
|
+
segments.add(" ".concat(row.product.padEnd(nameWidth + 4)), LABEL);
|
|
203
|
+
segments.add(row.install.padEnd(installWidth + 3) +
|
|
204
|
+
displayVersion(row.version).padEnd(versionWidth + 3) +
|
|
205
|
+
readableMs(row.readyAt).padStart(7) + '\n');
|
|
206
|
+
});
|
|
207
|
+
var detail = [
|
|
208
|
+
// Fall back to the host: chat-assistant registers uuid and storeId but
|
|
209
|
+
// no site, which left the Site row missing entirely on a page where it
|
|
210
|
+
// was the only product.
|
|
211
|
+
['Site', (_a = site.site) !== null && _a !== void 0 ? _a : window.location.host],
|
|
212
|
+
['UUID', site.uuid],
|
|
213
|
+
['Store', site.storeId],
|
|
214
|
+
];
|
|
215
|
+
var known = detail.filter(function (entry) { return !!entry[1]; });
|
|
216
|
+
var labelWidth = Math.max.apply(Math, __spreadArray(__spreadArray([], known.map(function (_a) {
|
|
217
|
+
var label = _a[0];
|
|
218
|
+
return label.length;
|
|
219
|
+
}), false), ['Support'.length], false));
|
|
220
|
+
segments.add('\n');
|
|
221
|
+
known.forEach(function (_a) {
|
|
222
|
+
var label = _a[0], value = _a[1];
|
|
223
|
+
segments.add(" ".concat(label.padEnd(labelWidth + 3)), LABEL);
|
|
224
|
+
segments.add("".concat(value, "\n"));
|
|
225
|
+
});
|
|
226
|
+
segments.add('\n');
|
|
227
|
+
segments.add(" ".concat('Docs'.padEnd(labelWidth + 3)), LABEL);
|
|
228
|
+
segments.add("".concat(DOCS_URL, "\n"));
|
|
229
|
+
segments.add(" ".concat('Support'.padEnd(labelWidth + 3)), LABEL);
|
|
230
|
+
segments.add("".concat(SUPPORT_EMAIL, "\n"));
|
|
231
|
+
segments.log();
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Printed only when an older bundle's copy of this package meets a newer one and
|
|
235
|
+
* the shared registry shape cannot be trusted. Not the late-arrival path — late
|
|
236
|
+
* arrivals go through the normal debounce and re-print the full entry.
|
|
237
|
+
*/
|
|
238
|
+
function logStandalone(row) {
|
|
239
|
+
console.log("%c".concat(BADGE_TEXT, "%c %c").concat(row.product, "%c ").concat(row.install, " ").concat(displayVersion(row.version)) +
|
|
240
|
+
" ".concat(readableMs(row.readyAt)), BADGE, VALUE, LABEL, VALUE);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Trailing debounce. Each registration pushes the flush out by FLOOR_MS, so
|
|
244
|
+
* products arriving close together share one entry; CAP_MS stops a slow drip
|
|
245
|
+
* from delaying it indefinitely.
|
|
246
|
+
*
|
|
247
|
+
* `firstAt` is reset by flush(), so this same cycle governs re-prints: a late
|
|
248
|
+
* product waits FLOOR_MS of quiet before the entry is printed again, and a
|
|
249
|
+
* cluster of late products still yields a single re-print rather than one each.
|
|
250
|
+
*/
|
|
251
|
+
function scheduleFlush(registry) {
|
|
252
|
+
if (registry.firstAt === 0) {
|
|
253
|
+
registry.firstAt = elapsedMs();
|
|
254
|
+
}
|
|
255
|
+
if (registry.timer !== undefined) {
|
|
256
|
+
clearTimeout(registry.timer);
|
|
257
|
+
}
|
|
258
|
+
var sinceFirst = elapsedMs() - registry.firstAt;
|
|
259
|
+
var delay = Math.max(0, Math.min(FLOOR_MS, CAP_MS - sinceFirst));
|
|
260
|
+
registry.timer = setTimeout(function () { return flush(registry); }, delay);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Register one product into the shared console entry.
|
|
264
|
+
*
|
|
265
|
+
* Registering the same product twice overwrites the earlier row — SSR and the
|
|
266
|
+
* client `serving` app never load on the same page, so there is no case where
|
|
267
|
+
* two installs of one product legitimately coexist.
|
|
268
|
+
*/
|
|
269
|
+
function registerProduct(registration) {
|
|
270
|
+
var registry = getRegistry();
|
|
271
|
+
if (!registry) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
var row = __assign(__assign({}, registration), { readyAt: elapsedMs() });
|
|
275
|
+
// An older bundle's copy of this package met a newer one. Rather than write
|
|
276
|
+
// into a shape we do not understand, say our piece and get out of the way.
|
|
277
|
+
if (registry.schema !== SCHEMA) {
|
|
278
|
+
logStandalone(row);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
mergeSite(registry.site, registration);
|
|
282
|
+
var existing = registry.rows.findIndex(function (candidate) { return candidate.product === row.product; });
|
|
283
|
+
// Re-registering an unchanged product is a no-op. `serving` registers from a
|
|
284
|
+
// store subscription that fires again on SPA navigation, so without this a
|
|
285
|
+
// shopper moving collection -> search -> collection would re-print the entry
|
|
286
|
+
// on every transition without anything having actually changed.
|
|
287
|
+
if (existing !== -1) {
|
|
288
|
+
var previous = registry.rows[existing];
|
|
289
|
+
if (previous.install === row.install && previous.version === row.version) {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
registry.rows[existing] = row;
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
registry.rows.push(row);
|
|
296
|
+
}
|
|
297
|
+
scheduleFlush(registry);
|
|
298
|
+
}
|
|
299
|
+
//# sourceMappingURL=consoleBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consoleBanner.js","sourceRoot":"","sources":["../../src/utils/consoleBanner.ts"],"names":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1.0.44",
|
|
41
41
|
"@fast-simon/utilities": "^1.0.54",
|
|
42
|
-
"@fast-simon/widget-console": "^1.0.3",
|
|
43
42
|
"axios": "^0.21.1"
|
|
44
43
|
}
|
|
45
44
|
}
|