@namiml/sdk-core 3.4.3-dev.202606121440 → 3.4.3-dev.202606151512
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.cjs +12 -13
- package/dist/index.mjs +12 -13
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -98,7 +98,7 @@ const {
|
|
|
98
98
|
// version — stamped by scripts/version.sh
|
|
99
99
|
NAMI_SDK_VERSION: exports.NAMI_SDK_VERSION = "3.4.3",
|
|
100
100
|
// full package version including dev suffix — stamped by scripts/version.sh
|
|
101
|
-
NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.4.3-dev.
|
|
101
|
+
NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.4.3-dev.202606151512",
|
|
102
102
|
// environments
|
|
103
103
|
PRODUCTION: exports.PRODUCTION = "production", DEVELOPMENT: exports.DEVELOPMENT = "development",
|
|
104
104
|
// error messages
|
|
@@ -6803,10 +6803,6 @@ const shouldLogHTTPTraffic = () => {
|
|
|
6803
6803
|
const namiCommands = storageService.getNamiConfig()?.namiCommands;
|
|
6804
6804
|
return namiCommands?.includes(exports.LOG_HTTP_TRAFFIC) ?? false;
|
|
6805
6805
|
};
|
|
6806
|
-
const shouldLogStartupTelemetry = () => {
|
|
6807
|
-
const namiCommands = storageService.getNamiConfig()?.namiCommands;
|
|
6808
|
-
return namiCommands?.includes(exports.STARTUP_TELEMETRY) ?? false;
|
|
6809
|
-
};
|
|
6810
6806
|
function tryParseJson(str) {
|
|
6811
6807
|
const trimmed = str.trim();
|
|
6812
6808
|
if (!trimmed.startsWith("{") && !trimmed.startsWith("["))
|
|
@@ -11944,9 +11940,10 @@ const PREFIX = "[NamiStartup]";
|
|
|
11944
11940
|
* Module-level singleton for startup timing instrumentation.
|
|
11945
11941
|
*
|
|
11946
11942
|
* All methods are cheap no-ops when the `startupTelemetry` namiCommand flag
|
|
11947
|
-
* is absent. The flag is read once at `start()`
|
|
11948
|
-
* to
|
|
11949
|
-
*
|
|
11943
|
+
* is absent. The flag is read once at `start()` from the namiCommands passed
|
|
11944
|
+
* to the current configure() call — NOT from persisted storage, which still
|
|
11945
|
+
* holds the previous run's config at that point (NAM-1876) — and cached;
|
|
11946
|
+
* subsequent calls to `mark()` and the span helpers use that cached boolean.
|
|
11950
11947
|
*
|
|
11951
11948
|
* Log format (info level via the shared logger):
|
|
11952
11949
|
* [NamiStartup] phase=<name> ms=<n>
|
|
@@ -11965,11 +11962,13 @@ class StartupTelemetry {
|
|
|
11965
11962
|
this.firstLaunchLogged = false;
|
|
11966
11963
|
}
|
|
11967
11964
|
/**
|
|
11968
|
-
* Call at the first line of configure()
|
|
11969
|
-
* stores t0 if the flag is on.
|
|
11965
|
+
* Call at the first line of configure(), passing the incoming config's
|
|
11966
|
+
* namiCommands. Reads the feature flag once and stores t0 if the flag is on.
|
|
11967
|
+
*
|
|
11968
|
+
* @param namiCommands The `namiCommands` from the current configure() options.
|
|
11970
11969
|
*/
|
|
11971
|
-
start() {
|
|
11972
|
-
this.enabled =
|
|
11970
|
+
start(namiCommands) {
|
|
11971
|
+
this.enabled = namiCommands?.includes(exports.STARTUP_TELEMETRY) ?? false;
|
|
11973
11972
|
if (!this.enabled)
|
|
11974
11973
|
return;
|
|
11975
11974
|
this.t0 = Date.now();
|
|
@@ -12363,7 +12362,7 @@ class Nami {
|
|
|
12363
12362
|
* @returns {Promise<NamiConfigurationState>}
|
|
12364
12363
|
*/
|
|
12365
12364
|
static async configure(options) {
|
|
12366
|
-
startupTelemetry.start();
|
|
12365
|
+
startupTelemetry.start(options.namiCommands);
|
|
12367
12366
|
if (!options.appPlatformID) {
|
|
12368
12367
|
throw new PlatformIDRequiredError();
|
|
12369
12368
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -96,7 +96,7 @@ const {
|
|
|
96
96
|
// version — stamped by scripts/version.sh
|
|
97
97
|
NAMI_SDK_VERSION = "3.4.3",
|
|
98
98
|
// full package version including dev suffix — stamped by scripts/version.sh
|
|
99
|
-
NAMI_SDK_PACKAGE_VERSION = "3.4.3-dev.
|
|
99
|
+
NAMI_SDK_PACKAGE_VERSION = "3.4.3-dev.202606151512",
|
|
100
100
|
// environments
|
|
101
101
|
PRODUCTION = "production", DEVELOPMENT = "development",
|
|
102
102
|
// error messages
|
|
@@ -6801,10 +6801,6 @@ const shouldLogHTTPTraffic = () => {
|
|
|
6801
6801
|
const namiCommands = storageService.getNamiConfig()?.namiCommands;
|
|
6802
6802
|
return namiCommands?.includes(LOG_HTTP_TRAFFIC) ?? false;
|
|
6803
6803
|
};
|
|
6804
|
-
const shouldLogStartupTelemetry = () => {
|
|
6805
|
-
const namiCommands = storageService.getNamiConfig()?.namiCommands;
|
|
6806
|
-
return namiCommands?.includes(STARTUP_TELEMETRY) ?? false;
|
|
6807
|
-
};
|
|
6808
6804
|
function tryParseJson(str) {
|
|
6809
6805
|
const trimmed = str.trim();
|
|
6810
6806
|
if (!trimmed.startsWith("{") && !trimmed.startsWith("["))
|
|
@@ -11942,9 +11938,10 @@ const PREFIX = "[NamiStartup]";
|
|
|
11942
11938
|
* Module-level singleton for startup timing instrumentation.
|
|
11943
11939
|
*
|
|
11944
11940
|
* All methods are cheap no-ops when the `startupTelemetry` namiCommand flag
|
|
11945
|
-
* is absent. The flag is read once at `start()`
|
|
11946
|
-
* to
|
|
11947
|
-
*
|
|
11941
|
+
* is absent. The flag is read once at `start()` from the namiCommands passed
|
|
11942
|
+
* to the current configure() call — NOT from persisted storage, which still
|
|
11943
|
+
* holds the previous run's config at that point (NAM-1876) — and cached;
|
|
11944
|
+
* subsequent calls to `mark()` and the span helpers use that cached boolean.
|
|
11948
11945
|
*
|
|
11949
11946
|
* Log format (info level via the shared logger):
|
|
11950
11947
|
* [NamiStartup] phase=<name> ms=<n>
|
|
@@ -11963,11 +11960,13 @@ class StartupTelemetry {
|
|
|
11963
11960
|
this.firstLaunchLogged = false;
|
|
11964
11961
|
}
|
|
11965
11962
|
/**
|
|
11966
|
-
* Call at the first line of configure()
|
|
11967
|
-
* stores t0 if the flag is on.
|
|
11963
|
+
* Call at the first line of configure(), passing the incoming config's
|
|
11964
|
+
* namiCommands. Reads the feature flag once and stores t0 if the flag is on.
|
|
11965
|
+
*
|
|
11966
|
+
* @param namiCommands The `namiCommands` from the current configure() options.
|
|
11968
11967
|
*/
|
|
11969
|
-
start() {
|
|
11970
|
-
this.enabled =
|
|
11968
|
+
start(namiCommands) {
|
|
11969
|
+
this.enabled = namiCommands?.includes(STARTUP_TELEMETRY) ?? false;
|
|
11971
11970
|
if (!this.enabled)
|
|
11972
11971
|
return;
|
|
11973
11972
|
this.t0 = Date.now();
|
|
@@ -12361,7 +12360,7 @@ class Nami {
|
|
|
12361
12360
|
* @returns {Promise<NamiConfigurationState>}
|
|
12362
12361
|
*/
|
|
12363
12362
|
static async configure(options) {
|
|
12364
|
-
startupTelemetry.start();
|
|
12363
|
+
startupTelemetry.start(options.namiCommands);
|
|
12365
12364
|
if (!options.appPlatformID) {
|
|
12366
12365
|
throw new PlatformIDRequiredError();
|
|
12367
12366
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@namiml/sdk-core",
|
|
3
|
-
"version": "3.4.3-dev.
|
|
3
|
+
"version": "3.4.3-dev.202606151512",
|
|
4
4
|
"description": "Platform-agnostic core for the Nami SDK — business logic, API, types, and state management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|