@seed-hypermedia/client 0.0.95 → 0.0.96
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.
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/schema-engine.ts
|
|
8
8
|
var LIBRARY_AUTHORITY = "hyper.media";
|
|
9
|
+
var LEGACY_LIBRARY_AUTHORITIES = /* @__PURE__ */ new Set(["seed.hyper.media", "example.com"]);
|
|
9
10
|
var KINDS = ["null", "boolean", "integer", "float", "string", "bytes", "list", "map", "struct", "link"];
|
|
10
11
|
var LIBRARY_CORE = new Set(
|
|
11
12
|
[
|
|
@@ -34,7 +35,7 @@ function refToName(ref) {
|
|
|
34
35
|
const m = /^hm:\/\/([^/]+)\/(.+)$/.exec(ref);
|
|
35
36
|
if (!m) return ref.replace(/\.schema\.json$|\.json$/, "");
|
|
36
37
|
const [, auth = "", name = ""] = m;
|
|
37
|
-
return auth === LIBRARY_AUTHORITY ? name : ref;
|
|
38
|
+
return auth === LIBRARY_AUTHORITY || LEGACY_LIBRARY_AUTHORITIES.has(auth) ? name : ref;
|
|
38
39
|
}
|
|
39
40
|
function nameToUrl(name) {
|
|
40
41
|
return `hm://${LIBRARY_AUTHORITY}/${name}`;
|
package/dist/schema-engine.mjs
CHANGED
package/dist/schema-resolve.mjs
CHANGED
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
resolveSchemaRef,
|
|
18
18
|
schemaDefinitionCid,
|
|
19
19
|
withoutSchemaLink
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-OHN5ILTT.mjs";
|
|
21
|
+
import "./chunk-FFH7G6KW.mjs";
|
|
22
22
|
import "./chunk-ZWKMAGDU.mjs";
|
|
23
23
|
import "./chunk-VWSAFDOL.mjs";
|
|
24
24
|
import "./chunk-3NYKSLJ4.mjs";
|
package/dist/schema-subtypes.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
classifyRef
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OHN5ILTT.mjs";
|
|
4
4
|
import {
|
|
5
5
|
kindOf,
|
|
6
6
|
nameForCid,
|
|
7
7
|
nameToUrl,
|
|
8
8
|
schemaCid
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FFH7G6KW.mjs";
|
|
10
10
|
import {
|
|
11
11
|
HM_SCHEMAS
|
|
12
12
|
} from "./chunk-ZWKMAGDU.mjs";
|
package/dist/signed-blob.mjs
CHANGED