1 | import { combine } from "@pnp/core";
|
2 | import { _List, List } from "../lists/types.js";
|
3 | import { SiteScripts } from "./types.js";
|
4 | import "../folders/list.js";
|
5 | import { Web } from "../webs/types.js";
|
6 | import { extractWebUrl } from "../utils/extract-web-url.js";
|
7 | _List.prototype.getSiteScript = async function () {
|
8 | const rootFolder = await List(this).rootFolder();
|
9 | const web = await Web([this, extractWebUrl(this.toUrl())]).select("Url")();
|
10 | const absoluteListUrl = combine(web.Url, "Lists", rootFolder.Name);
|
11 | return SiteScripts(this, "").getSiteScriptFromList(absoluteListUrl);
|
12 | };
|
13 |
|
\ | No newline at end of file |