@digitalculture/ochre-sdk 0.17.0 → 0.17.1
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.mjs +1 -12
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3746,16 +3746,6 @@ async function fetchByUuidMetadata(uuid, customFetch) {
|
|
|
3746
3746
|
|
|
3747
3747
|
//#endregion
|
|
3748
3748
|
//#region src/utils/fetchers/website.ts
|
|
3749
|
-
const KNOWN_ABBREVIATIONS = {
|
|
3750
|
-
"uchicago-node": "60a1e386-7e53-4e14-b8cf-fb4ed953d57e",
|
|
3751
|
-
"uchicago-node-staging": "62b60a47-fad5-49d7-a06a-2fa059f6e79a",
|
|
3752
|
-
"guerrilla-television": "fad1e1bd-989d-4159-b195-4c32adc5cdc7",
|
|
3753
|
-
"mapping-chicagoland": "8db5e83e-0c06-48b7-b4ac-a060d9bb5689",
|
|
3754
|
-
"hannah-papanek": "20b2c919-021f-4774-b2c3-2f1ae5b910e7",
|
|
3755
|
-
mepa: "85ddaa5a-535b-4809-8714-855d2d812a3e",
|
|
3756
|
-
ssmc: "8ff977dd-d440-40f5-ad93-8ad7e2d39e74",
|
|
3757
|
-
"sosc-core-at-smart": "db26c953-9b2a-4691-a909-5e8726b531d7"
|
|
3758
|
-
};
|
|
3759
3749
|
/**
|
|
3760
3750
|
* Parses the version suffix from an API abbreviation
|
|
3761
3751
|
*
|
|
@@ -3825,8 +3815,7 @@ async function fetchWebsite(abbreviation, options) {
|
|
|
3825
3815
|
abbreviation: parseFakeString(data.result.ochre.belongsTo)
|
|
3826
3816
|
};
|
|
3827
3817
|
} else {
|
|
3828
|
-
const
|
|
3829
|
-
const response = await (customFetch ?? fetch)(uuid != null ? `https://ochre.lib.uchicago.edu/ochre?uuid=${uuid}&format=json` : `https://ochre.lib.uchicago.edu/ochre?xquery=${encodeURIComponent(`for $q in input()/ochre[tree[@type='lesson'][identification/abbreviation='${abbreviationToUse}']] return $q`)}&format=json`);
|
|
3818
|
+
const response = await (customFetch ?? fetch)(`https://ochre.lib.uchicago.edu/ochre?xquery=${encodeURIComponent(`for $q in input()/ochre[tree[@type='lesson'][identification/abbreviation='${abbreviationToUse}']] return $q`)}&format=json`);
|
|
3830
3819
|
if (!response.ok) throw new Error("Failed to fetch website");
|
|
3831
3820
|
const data = await response.json();
|
|
3832
3821
|
const result = "result" in data && !Array.isArray(data.result) ? data.result : !("result" in data) ? data : null;
|
package/package.json
CHANGED