@tinycloud/sdk-core 2.11.0-beta.3 → 2.11.0-beta.4
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 +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2776,7 +2776,7 @@ interface LocationRecord extends LocationRecordPayload {
|
|
|
2776
2776
|
type LocationSource = "explicit" | "local-loopback" | "local-link" | "blockchain" | "centralized" | "fallback";
|
|
2777
2777
|
declare const DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL = "https://registry.tinycloud.xyz";
|
|
2778
2778
|
declare const DEFAULT_TINYCLOUD_FALLBACK_HOST = "https://node.tinycloud.xyz";
|
|
2779
|
-
/**
|
|
2779
|
+
/** Conventional local loopback node URL. Probed only when explicitly configured. */
|
|
2780
2780
|
declare const DEFAULT_LOCAL_NODE_URL = "http://127.0.0.1:8000";
|
|
2781
2781
|
/** Probe timeout for the local loopback candidate. No retries. */
|
|
2782
2782
|
declare const LOCAL_LOOPBACK_PROBE_TIMEOUT_MS = 250;
|
|
@@ -2863,7 +2863,7 @@ interface DiscoverLocalTinyCloudNodeOptions {
|
|
|
2863
2863
|
subject?: string;
|
|
2864
2864
|
/** Enable local-node auto-discovery. Default true. */
|
|
2865
2865
|
autoDiscoverLocalNode?: boolean;
|
|
2866
|
-
/** Local loopback node URL to probe.
|
|
2866
|
+
/** Local loopback node URL to probe. Omit to avoid probing loopback. */
|
|
2867
2867
|
localNodeUrl?: string;
|
|
2868
2868
|
/** Known `*.local.tinycloud.link` subdomain name, probed directly. */
|
|
2869
2869
|
localLinkName?: string;
|
|
@@ -2897,12 +2897,12 @@ interface ResolveTinyCloudHostsOptions {
|
|
|
2897
2897
|
/** Verify centralized/blockchain record signatures. Default true. */
|
|
2898
2898
|
verifyRecords?: boolean;
|
|
2899
2899
|
/**
|
|
2900
|
-
* Probe
|
|
2901
|
-
* registry/hosted resolution. Default true.
|
|
2902
|
-
*
|
|
2900
|
+
* Probe configured and registered local TinyCloud node endpoints before
|
|
2901
|
+
* falling back to registry/hosted resolution. Default true. The loopback
|
|
2902
|
+
* URL is probed only when `localNodeUrl` is explicitly configured.
|
|
2903
2903
|
*/
|
|
2904
2904
|
autoDiscoverLocalNode?: boolean;
|
|
2905
|
-
/** Local loopback node URL to probe.
|
|
2905
|
+
/** Local loopback node URL to probe. Omit to avoid probing loopback. */
|
|
2906
2906
|
localNodeUrl?: string;
|
|
2907
2907
|
/** Known `*.local.tinycloud.link` subdomain name, probed directly. */
|
|
2908
2908
|
localLinkName?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2776,7 +2776,7 @@ interface LocationRecord extends LocationRecordPayload {
|
|
|
2776
2776
|
type LocationSource = "explicit" | "local-loopback" | "local-link" | "blockchain" | "centralized" | "fallback";
|
|
2777
2777
|
declare const DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL = "https://registry.tinycloud.xyz";
|
|
2778
2778
|
declare const DEFAULT_TINYCLOUD_FALLBACK_HOST = "https://node.tinycloud.xyz";
|
|
2779
|
-
/**
|
|
2779
|
+
/** Conventional local loopback node URL. Probed only when explicitly configured. */
|
|
2780
2780
|
declare const DEFAULT_LOCAL_NODE_URL = "http://127.0.0.1:8000";
|
|
2781
2781
|
/** Probe timeout for the local loopback candidate. No retries. */
|
|
2782
2782
|
declare const LOCAL_LOOPBACK_PROBE_TIMEOUT_MS = 250;
|
|
@@ -2863,7 +2863,7 @@ interface DiscoverLocalTinyCloudNodeOptions {
|
|
|
2863
2863
|
subject?: string;
|
|
2864
2864
|
/** Enable local-node auto-discovery. Default true. */
|
|
2865
2865
|
autoDiscoverLocalNode?: boolean;
|
|
2866
|
-
/** Local loopback node URL to probe.
|
|
2866
|
+
/** Local loopback node URL to probe. Omit to avoid probing loopback. */
|
|
2867
2867
|
localNodeUrl?: string;
|
|
2868
2868
|
/** Known `*.local.tinycloud.link` subdomain name, probed directly. */
|
|
2869
2869
|
localLinkName?: string;
|
|
@@ -2897,12 +2897,12 @@ interface ResolveTinyCloudHostsOptions {
|
|
|
2897
2897
|
/** Verify centralized/blockchain record signatures. Default true. */
|
|
2898
2898
|
verifyRecords?: boolean;
|
|
2899
2899
|
/**
|
|
2900
|
-
* Probe
|
|
2901
|
-
* registry/hosted resolution. Default true.
|
|
2902
|
-
*
|
|
2900
|
+
* Probe configured and registered local TinyCloud node endpoints before
|
|
2901
|
+
* falling back to registry/hosted resolution. Default true. The loopback
|
|
2902
|
+
* URL is probed only when `localNodeUrl` is explicitly configured.
|
|
2903
2903
|
*/
|
|
2904
2904
|
autoDiscoverLocalNode?: boolean;
|
|
2905
|
-
/** Local loopback node URL to probe.
|
|
2905
|
+
/** Local loopback node URL to probe. Omit to avoid probing loopback. */
|
|
2906
2906
|
localNodeUrl?: string;
|
|
2907
2907
|
/** Known `*.local.tinycloud.link` subdomain name, probed directly. */
|
|
2908
2908
|
localLinkName?: string;
|
package/dist/index.js
CHANGED
|
@@ -15132,13 +15132,14 @@ async function discoverLocalTinyCloudNode(options2 = {}) {
|
|
|
15132
15132
|
}
|
|
15133
15133
|
const fetchFn = options2.fetch ?? globalThis.fetch;
|
|
15134
15134
|
const identityStore = options2.identityStore ?? defaultLocalNodeIdentityStore;
|
|
15135
|
-
const staticCandidates = [
|
|
15136
|
-
|
|
15135
|
+
const staticCandidates = [];
|
|
15136
|
+
if (options2.localNodeUrl) {
|
|
15137
|
+
staticCandidates.push({
|
|
15137
15138
|
source: "local-loopback",
|
|
15138
|
-
url: options2.localNodeUrl
|
|
15139
|
+
url: options2.localNodeUrl,
|
|
15139
15140
|
timeoutMs: LOCAL_LOOPBACK_PROBE_TIMEOUT_MS
|
|
15140
|
-
}
|
|
15141
|
-
|
|
15141
|
+
});
|
|
15142
|
+
}
|
|
15142
15143
|
if (options2.localLinkName) {
|
|
15143
15144
|
if (isValidDnsLabel(options2.localLinkName)) {
|
|
15144
15145
|
staticCandidates.push({
|