@churchapps/content-providers 0.5.0 → 0.5.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.cjs +1 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -108
- package/dist/index.d.ts +16 -108
- package/dist/index.js +1 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -596,7 +596,6 @@ var SignPresenterProvider = class extends BaseProvider {
|
|
|
596
596
|
const instructions = filesToInstructions(title, files, { id: playlistId + "-section", label: title });
|
|
597
597
|
return { name: title, items: [{ id: playlistId + "-header", itemType: "header", label: title, children: instructions.items }] };
|
|
598
598
|
}
|
|
599
|
-
// Auth methods
|
|
600
599
|
generateCodeVerifier() {
|
|
601
600
|
return this.oauthHelper.generateCodeVerifier();
|
|
602
601
|
}
|
|
@@ -1713,7 +1712,6 @@ var DropboxProvider = class extends BaseProvider {
|
|
|
1713
1712
|
mediaLicensing: false
|
|
1714
1713
|
};
|
|
1715
1714
|
}
|
|
1716
|
-
// -- Pagination helper --
|
|
1717
1715
|
dropboxPost(endpoint, body, auth) {
|
|
1718
1716
|
if (!auth) {
|
|
1719
1717
|
console.error("[Dropbox] No auth token provided");
|
|
@@ -1747,7 +1745,6 @@ var DropboxProvider = class extends BaseProvider {
|
|
|
1747
1745
|
}
|
|
1748
1746
|
return allEntries;
|
|
1749
1747
|
}
|
|
1750
|
-
// -- File link helpers --
|
|
1751
1748
|
async getSharedLink(filePath, auth) {
|
|
1752
1749
|
if (!auth) return null;
|
|
1753
1750
|
try {
|
|
@@ -1803,7 +1800,6 @@ var DropboxProvider = class extends BaseProvider {
|
|
|
1803
1800
|
);
|
|
1804
1801
|
return results.filter((r) => r.viewUrl || r.downloadUrl).map((r) => fileEntryToContentFile(r.entry, r.viewUrl || r.downloadUrl, r.downloadUrl));
|
|
1805
1802
|
}
|
|
1806
|
-
// -- Leaf detection --
|
|
1807
1803
|
async checkIsLeaf(folderPath, auth) {
|
|
1808
1804
|
const response = await this.dropboxPost(
|
|
1809
1805
|
"/2/files/list_folder",
|
|
@@ -1813,7 +1809,6 @@ var DropboxProvider = class extends BaseProvider {
|
|
|
1813
1809
|
if (!response) return false;
|
|
1814
1810
|
return !response.entries.some((e) => e[".tag"] === "folder");
|
|
1815
1811
|
}
|
|
1816
|
-
// -- IProvider methods --
|
|
1817
1812
|
async browse(path, auth) {
|
|
1818
1813
|
const dropboxPath = path && path !== "/" ? path.startsWith("/") ? path : "/" + path : "";
|
|
1819
1814
|
const allEntries = await this.listAllEntries(dropboxPath, auth);
|
|
@@ -1825,7 +1820,6 @@ var DropboxProvider = class extends BaseProvider {
|
|
|
1825
1820
|
const fileItems = await this.resolveFileLinks(mediaFiles, auth);
|
|
1826
1821
|
return [...folderItems, ...fileItems];
|
|
1827
1822
|
}
|
|
1828
|
-
/** Resolve a folder path to playable files (list + media filter + link resolution). */
|
|
1829
1823
|
async resolveMediaFiles(path, auth) {
|
|
1830
1824
|
if (!path || path === "/") return null;
|
|
1831
1825
|
const dropboxPath = path.startsWith("/") ? path : "/" + path;
|
|
@@ -1847,7 +1841,6 @@ var DropboxProvider = class extends BaseProvider {
|
|
|
1847
1841
|
const folderName = segments[segments.length - 1] || "Dropbox";
|
|
1848
1842
|
return filesToInstructions(folderName, resolved.files, { id: "dropbox-section", label: folderName });
|
|
1849
1843
|
}
|
|
1850
|
-
// -- Auth methods --
|
|
1851
1844
|
generateCodeVerifier() {
|
|
1852
1845
|
return this.oauthHelper.generateCodeVerifier();
|
|
1853
1846
|
}
|
|
@@ -16367,7 +16360,7 @@ function getAvailableProviders(ids) {
|
|
|
16367
16360
|
}
|
|
16368
16361
|
|
|
16369
16362
|
// src/index.ts
|
|
16370
|
-
var VERSION = true ? "0.5.
|
|
16363
|
+
var VERSION = true ? "0.5.1" : "dev";
|
|
16371
16364
|
// Annotate the CommonJS export names for ESM import in node:
|
|
16372
16365
|
0 && (module.exports = {
|
|
16373
16366
|
APlayProvider,
|