@eltjs/source-microsoft-sharepoint 0.3.11 → 0.3.12

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/README.md CHANGED
@@ -100,7 +100,7 @@ await new Pipeline({
100
100
  ## How to use it
101
101
 
102
102
  1. Make a `SharePointClient` from the app registration of Microsoft Entra ID: the tenant ID, the client ID and a client secret. The host reads these values, for example from its environment. The source and the SDK read no environment variable.
103
- 2. Make a `SharePointSource` with the client and the URL of each site. The identity of the source is `sharepoint:<tenantId>`, the tenant of the client.
103
+ 2. Make a `SharePointSource` with the client and the URL of each site. To load only some folders of a site, give the site as `{ url, folders }` (see [Scope](#scope)). The identity of the source is `sharepoint:<tenantId>`, the tenant of the client.
104
104
  3. Copy each stream with `syncMode: 'incremental'` and `destinationSyncMode: 'append_dedup'`. Each stream deduplicates on its primary key and sends deletions. Give each copy an ID that holds the source identity, such as `sharepoint:<tenantId>/driveItems`, so that two tenants can be in one pipeline.
105
105
  4. To get the text of documents, store the files of `driveItems` with `file.accepting(parser).store(files)`, and derive their text with a `DocumentText` computed dataset (see [elt](../../../elt/README.md#attachment-text)). A file that the parser cannot read gets a row with its error in the dataset, and fails no copy.
106
106
 
@@ -110,14 +110,43 @@ Each site is a partition of each stream, with a checkpoint of its own. Thus a si
110
110
 
111
111
  The app needs the Graph application permission `Sites.Selected`, and an administrator must grant it read access to each site. With `Sites.Selected`, the app cannot list its sites, so the host names them ([SDK ADR 0002](../../../sdks/microsoft/sharepoint/docs/adr/0002-a-sites-selected-app-cannot-list-its-sites-so-callers-name-site-urls.md)).
112
112
 
113
- | Error | When | Failure type |
114
- | ----------------------------- | --------------------------------------------------------------------- | ------------ |
115
- | `SharePointAccessError` | Graph refused the token (401) or the access to a site (403). | `config` |
116
- | `SharePointSiteNotFoundError` | No site is at a URL (404). | `config` |
117
- | Any other error | Graph failed in another way, for example 500 or a refused delta link. | `system` |
113
+ | Error | When | Failure type |
114
+ | ------------------------------- | --------------------------------------------------------------------- | ------------ |
115
+ | `SharePointAccessError` | Graph refused the token (401) or the access to a site (403). | `config` |
116
+ | `SharePointSiteNotFoundError` | No site is at a URL (404). | `config` |
117
+ | `SharePointFolderNotFoundError` | No folder of the site is at a scope folder URL. | `config` |
118
+ | Any other error | Graph failed in another way, for example 500 or a refused delta link. | `system` |
118
119
 
119
120
  A site that fails fails only its partition. The other sites load and save their checkpoints.
120
121
 
122
+ ## Scope
123
+
124
+ A site can load only some of its folders:
125
+
126
+ ```ts
127
+ new SharePointSource({
128
+ client,
129
+ sites: [
130
+ {
131
+ url: 'https://contoso.sharepoint.com/sites/Sales',
132
+ folders: [
133
+ 'https://contoso.sharepoint.com/sites/Sales/Shared Documents/Proposals',
134
+ ],
135
+ },
136
+ ],
137
+ });
138
+ ```
139
+
140
+ Each folder is the full URL of a folder in a document library of the site, as the browser shows it. A URL with spaces and one with `%20` name the same folder, and case does not matter. A site that the host names by its URL alone loads all of it.
141
+
142
+ - Each run finds each scope folder from its URL: the library whose URL starts it, then the item at the rest of the path. If no folder is there, for example because someone renamed or moved it, the site fails with `SharePointFolderNotFoundError`, a `config` failure. The source never loads nothing in silence.
143
+ - `driveItems` loads the scope folders and each file and folder under them. Only those files are downloaded.
144
+ - `drives` loads only the libraries that hold a scope folder. `sites` loads the site.
145
+ - `lists`, `listColumns`, `listItems`, `accessRequests` and `pages` load nothing: no record of them shows which folder holds it. The source exports these names as `restrictedSharePointStreams`.
146
+ - The first read of a scoped site takes the delta link of each library with a scope folder, then lists the scope folders and what they hold. A change during the listing comes again in the next read.
147
+ - Later reads read the changes of each library after its delta link, and keep only the items under the scope folders. An item that moves out of them, or is deleted, is deleted with each item under it. A folder that moves into them is listed with each item under it, because a delta does not give the items of a folder again when the folder moves.
148
+ - The checkpoint keeps the scope folders and the items under them by ID, not by path. A rename inside a scope folder keeps its items. Other scope folders than the checkpoint holds, a site that was read in full and is now scoped, and the other way round, start the site over with a `RESET`. Thus narrowing a site removes every row outside its scope folders.
149
+
121
150
  ## Streams
122
151
 
123
152
  | Stream | One record for | Primary key | Sync |
@@ -207,9 +236,11 @@ Not checked live:
207
236
  - That the `lastModifiedDateTime` of a list moves when one of its items changes, which `SiteVersion` uses. The app has only a read grant, and no test site is available.
208
237
  - A pass of this source over the site. `src/sharepoint-live.test.ts` makes one, and skips unless `SHAREPOINT_TENANT_ID`, `SHAREPOINT_CLIENT_ID` and `SHAREPOINT_CLIENT_SECRET` are set. It downloads only the workbooks of the site.
209
238
 
239
+ - Scope folders (2026-11-18), with the app token: `GET /drives/{id}/root:/02 BD Resources/Proposal Repository` answered 200 with the folder, and a path with no item answered 404 `itemNotFound`. `GET /drives/{id}/root/delta?token=latest` answered 200 with no item and a delta link, and the delta from that link answered 200 with a delta link. `GET /drives/{id}/items/{id}/children` paged with a next link, and each child gave the folder in `parentReference.id`.
210
240
  - A second pass 12 hours later (2026-11-18), from the checkpoints of the first, loaded only what the deltas gave: 10 drive items and 10 list items, no deletion. 3 files that people edited had a new `lastModifiedDateTime`; 4 folders had a new `size`, since a file in them changed; 3 documents had a new `eTag` and the same `cTag`, a change of their metadata and not of their content.
211
241
 
212
242
  ## Decisions
213
243
 
244
+ - [ADR 0003](./docs/adr/0003-a-site-limited-to-folders-is-named-by-folder-urls-and-tracked-by-item-ids.md): a site limited to folders is named by folder URLs and tracked by item IDs.
214
245
  - [ADR 0001](./docs/adr/0001-the-delta-queries-are-the-change-feed-of-drive-items-and-list-items.md): the delta queries are the change feed of drive items and list items.
215
246
  - [ADR 0002](./docs/adr/0002-a-list-whose-delta-graph-refuses-is-read-in-full.md): a list whose delta Graph refuses is read in full.
@@ -1,16 +1,34 @@
1
1
  import type { CopyConfiguration, KeyValue, SourceMessage } from '@eltjs/elt';
2
2
  import { type DeltaPage } from '@eltjs/sdk-microsoft-sharepoint';
3
+ import type { ScopeFolder } from './folder-scope.ts';
3
4
  import type { SharePointRun } from './sharepoint-run.ts';
4
5
  import { SharePointStream } from './sharepoint-stream.ts';
6
+ export type Link = {
7
+ readonly delta: string;
8
+ } | {
9
+ readonly next: string;
10
+ };
11
+ export type FolderState = {
12
+ readonly folders: readonly string[];
13
+ readonly items: Readonly<Record<string, Readonly<Record<string, string>>>>;
14
+ };
15
+ export type DeltaState = {
16
+ readonly fields: readonly string[];
17
+ readonly links: Readonly<Record<string, Link>>;
18
+ readonly scope?: FolderState;
19
+ };
20
+ export declare function resumeLink(saved: Link | undefined): string | undefined;
5
21
  /**
6
22
  * A stream read through the delta queries of Graph, one for each collection
7
23
  * of the site (ADR 0001). The first read loads every item, page by page, with
8
24
  * a checkpoint after each page, so a first load that fails resumes at the
9
25
  * next link it saved. Later reads apply the changes after each delta link:
10
26
  * an item with the deleted facet is a deletion. When Graph no longer serves
11
- * a link, when a collection of the state is gone, or when the stream carries
12
- * a field that the state was read without, the stream starts the site over
13
- * with a RESET and loads every item again.
27
+ * a link, when a collection of the state is gone, when the stream carries a
28
+ * field that the state was read without, or when the site was read with
29
+ * scope folders, the stream starts the site over with a RESET and loads every
30
+ * item again. A site that the host limited to folders loads nothing of a
31
+ * restricted stream, and the scoped read of the others (ADR 0003).
14
32
  */
15
33
  export declare abstract class DeltaStream<Item> extends SharePointStream {
16
34
  #private;
@@ -18,5 +36,9 @@ export declare abstract class DeltaStream<Item> extends SharePointStream {
18
36
  protected abstract pages(siteUrl: string, collection: string, link: string | undefined, run: SharePointRun, signal: AbortSignal): AsyncIterable<DeltaPage<Item>>;
19
37
  protected abstract messages(configuration: CopyConfiguration, siteUrl: string, collection: string, item: Item, run: SharePointRun, signal: AbortSignal): AsyncIterable<SourceMessage>;
20
38
  extract(configuration: CopyConfiguration, state: unknown, siteUrl: string, run: SharePointRun, signal: AbortSignal): AsyncGenerator<SourceMessage>;
39
+ protected scoped(_configuration: CopyConfiguration, _saved: DeltaState | null, _siteUrl: string, _folders: readonly ScopeFolder[], _run: SharePointRun, _signal: AbortSignal): AsyncGenerator<SourceMessage>;
21
40
  protected deletion(configuration: CopyConfiguration, key: Readonly<Record<string, KeyValue>>): Generator<SourceMessage>;
41
+ protected reset(): Generator<SourceMessage>;
42
+ protected state(links: ReadonlyMap<string, Link>, scope?: FolderState): SourceMessage;
43
+ protected gained(read: readonly string[]): boolean;
22
44
  }
@@ -9,19 +9,44 @@ function link(value) {
9
9
  return { next: value.next };
10
10
  return undefined;
11
11
  }
12
- function resumeLink(saved) {
12
+ export function resumeLink(saved) {
13
13
  if (saved === undefined)
14
14
  return undefined;
15
15
  return 'delta' in saved ? saved.delta : saved.next;
16
16
  }
17
+ function texts(value) {
18
+ return Array.isArray(value) && value.every((it) => typeof it === 'string');
19
+ }
20
+ function folderState(value) {
21
+ if (typeof value !== 'object' ||
22
+ value === null ||
23
+ !('folders' in value) ||
24
+ !texts(value.folders) ||
25
+ !('items' in value) ||
26
+ typeof value.items !== 'object' ||
27
+ value.items === null)
28
+ return undefined;
29
+ const items = {};
30
+ for (const [drive, parents] of Object.entries(value.items)) {
31
+ if (typeof parents !== 'object' || parents === null)
32
+ return undefined;
33
+ const byItem = {};
34
+ for (const [item, parent] of Object.entries(parents)) {
35
+ if (typeof parent !== 'string')
36
+ return undefined;
37
+ byItem[item] = parent;
38
+ }
39
+ items[drive] = byItem;
40
+ }
41
+ return { folders: value.folders, items };
42
+ }
17
43
  function parse(state) {
18
44
  if (state === null)
19
45
  return null;
20
46
  const unknown = () => new TypeError(`Unknown SharePoint delta state ${JSON.stringify(state)}`);
21
47
  if (typeof state !== 'object' ||
22
48
  !('fields' in state) ||
23
- !Array.isArray(state.fields) ||
24
- !state.fields.every((field) => typeof field === 'string') ||
49
+ !texts(state.fields) ||
25
50
  !('links' in state) ||
26
51
  typeof state.links !== 'object' ||
27
52
  state.links === null)
@@ -33,7 +58,12 @@ function parse(state) {
33
58
  throw unknown();
34
59
  links[collection] = parsed;
35
60
  }
36
- return { fields: state.fields, links };
61
+ if (!('scope' in state))
62
+ return { fields: state.fields, links };
63
+ const scope = folderState(state.scope);
64
+ if (scope === undefined)
65
+ throw unknown();
66
+ return { fields: state.fields, links, scope };
37
67
  }
38
68
  /**
39
69
  * A stream read through the delta queries of Graph, one for each collection
@@ -41,21 +71,31 @@ function parse(state) {
41
71
  * a checkpoint after each page, so a first load that fails resumes at the
42
72
  * next link it saved. Later reads apply the changes after each delta link:
43
73
  * an item with the deleted facet is a deletion. When Graph no longer serves
44
- * a link, when a collection of the state is gone, or when the stream carries
45
- * a field that the state was read without, the stream starts the site over
46
- * with a RESET and loads every item again.
74
+ * a link, when a collection of the state is gone, when the stream carries a
75
+ * field that the state was read without, or when the site was read with
76
+ * scope folders, the stream starts the site over with a RESET and loads every
77
+ * item again. A site that the host limited to folders loads nothing of a
78
+ * restricted stream, and the scoped read of the others (ADR 0003).
47
79
  */
48
80
  export class DeltaStream extends SharePointStream {
49
81
  async *extract(configuration, state, siteUrl, run, signal) {
82
+ const saved = configuration.syncMode === 'incremental' ? parse(state) : null;
83
+ const scope = await run.scope(siteUrl, signal);
84
+ if (scope !== 'site') {
85
+ yield* this.restricted
86
+ ? this.#nothing(saved)
87
+ : this.scoped(configuration, saved, siteUrl, scope, run, signal);
88
+ return;
89
+ }
50
90
  const collections = await this.collections(siteUrl, run, signal);
51
91
  const read = (links) => this.#read(configuration, siteUrl, collections, links, run, signal);
52
- const saved = configuration.syncMode === 'incremental' ? parse(state) : null;
53
92
  if (saved === null) {
54
93
  yield* read(new Map());
55
94
  return;
56
95
  }
57
96
  const links = new Map(Object.entries(saved.links));
58
- if (this.#gained(saved.fields) ||
97
+ if (saved.scope !== undefined ||
98
+ this.gained(saved.fields) ||
59
99
  links.keys().some((collection) => !collections.includes(collection))) {
60
100
  yield* this.#reload(read);
61
101
  return;
@@ -69,6 +109,11 @@ export class DeltaStream extends SharePointStream {
69
109
  yield* this.#reload(read);
70
110
  }
71
111
  }
112
+ // The read of a site that the host limited to folders, by a stream that
113
+ // is not restricted. saved is the state of the last read, whole or scoped.
114
+ scoped(_configuration, _saved, _siteUrl, _folders, _run, _signal) {
115
+ throw new TypeError(`SharePoint ${this.stream.name} has no read for a site limited to folders`);
116
+ }
72
117
  // A DELETE in an incremental read; a full refresh replaces every row, so
73
118
  // it deletes nothing.
74
119
  *deletion(configuration, key) {
@@ -79,17 +124,34 @@ export class DeltaStream extends SharePointStream {
79
124
  // "Reset"), so readers see the site fill again page by page, and a reload
80
125
  // that fails resumes at the last link it saved. A hidden reload of a
81
126
  // partition, as of a whole stream (elt ADR 0007), is backlog #4572.
82
- async *#reload(read) {
127
+ *reset() {
83
128
  yield { type: 'RESET', stream: this.stream.name };
129
+ }
130
+ state(links, scope) {
131
+ const site = { fields: this.#fields, links: Object.fromEntries(links) };
132
+ return {
133
+ type: 'STATE',
134
+ stream: this.stream.name,
135
+ state: scope === undefined ? site : { ...site, scope },
136
+ };
137
+ }
138
+ // Whether the stream carries a field that a state was read without.
139
+ gained(read) {
140
+ return this.#fields.some((field) => !read.includes(field));
141
+ }
142
+ // A restricted stream loads nothing for a site limited to folders. A RESET
143
+ // empties what an earlier read of the whole site loaded.
144
+ *#nothing(saved) {
145
+ if (saved !== null && saved.scope === undefined)
146
+ yield* this.reset();
147
+ yield this.state(new Map(), { folders: [], items: {} });
148
+ }
149
+ async *#reload(read) {
150
+ yield* this.reset();
84
151
  yield* read(new Map());
85
152
  }
86
153
  async *#read(configuration, siteUrl, collections, from, run, signal) {
87
154
  const links = new Map(from);
88
- const state = () => ({
89
- type: 'STATE',
90
- stream: this.stream.name,
91
- state: { fields: this.#fields, links: Object.fromEntries(links) },
92
- });
93
155
  for (const collection of collections) {
94
156
  const start = resumeLink(links.get(collection));
95
157
  for await (const page of this.pages(siteUrl, collection, start, run, signal)) {
@@ -98,7 +160,7 @@ export class DeltaStream extends SharePointStream {
98
160
  links.set(collection, 'deltaLink' in page
99
161
  ? { delta: page.deltaLink }
100
162
  : { next: page.nextLink });
101
- yield state();
163
+ yield this.state(links);
102
164
  }
103
165
  }
104
166
  }
@@ -109,7 +171,4 @@ export class DeltaStream extends SharePointStream {
109
171
  get #fields() {
110
172
  return Object.keys(this.stream.jsonSchema.properties ?? {});
111
173
  }
112
- #gained(read) {
113
- return this.#fields.some((field) => !read.includes(field));
114
- }
115
174
  }
@@ -0,0 +1,36 @@
1
+ import { type Drive, GraphError, type PresentDriveItem, type SharePointClient } from '@eltjs/sdk-microsoft-sharepoint';
2
+ /**
3
+ * A site of the source: its URL, which loads the whole site, or its URL with
4
+ * the full URLs of folders in its document libraries, such as
5
+ * https://contoso.sharepoint.com/sites/Sales/Shared Documents/Proposals,
6
+ * which loads only those folders and what they hold.
7
+ */
8
+ export type SharePointSite = string | {
9
+ readonly url: string;
10
+ readonly folders: readonly [string, ...string[]];
11
+ };
12
+ /** A scope folder as the host named it, and as Graph knows it now. */
13
+ export type ScopeFolder = {
14
+ readonly url: string;
15
+ readonly driveId: string;
16
+ readonly item: PresentDriveItem;
17
+ };
18
+ /** What a read of a site covers: the whole site, or its scope folders. */
19
+ export type SiteScope = 'site' | readonly ScopeFolder[];
20
+ /**
21
+ * No folder of the site is at a URL that the host named: no document library
22
+ * of the site holds the URL, or no folder is at its path, for example after
23
+ * someone renamed or moved it.
24
+ */
25
+ export declare class SharePointFolderNotFoundError extends Error {
26
+ readonly name = "SharePointFolderNotFoundError";
27
+ readonly url: string;
28
+ constructor(url: string, options?: {
29
+ cause: GraphError;
30
+ });
31
+ }
32
+ /**
33
+ * The folder at each URL: the library whose URL starts it, and the item at
34
+ * the rest of its path. SharePoint matches URLs without regard to case.
35
+ */
36
+ export declare function resolveFolders(client: SharePointClient, drives: readonly Drive[], urls: readonly string[], signal: AbortSignal): Promise<readonly ScopeFolder[]>;
@@ -0,0 +1,45 @@
1
+ import { GraphError, } from '@eltjs/sdk-microsoft-sharepoint';
2
+ /**
3
+ * No folder of the site is at a URL that the host named: no document library
4
+ * of the site holds the URL, or no folder is at its path, for example after
5
+ * someone renamed or moved it.
6
+ */
7
+ export class SharePointFolderNotFoundError extends Error {
8
+ name = 'SharePointFolderNotFoundError';
9
+ url;
10
+ constructor(url, options) {
11
+ super(`No folder of the SharePoint site is at ${url}. Name a folder in a document library of the site, as its URL shows it in the browser.`, options);
12
+ this.url = url;
13
+ }
14
+ }
15
+ // The host and the path of a URL without its encoding, so that a URL with
16
+ // spaces and one with %20 name the same folder.
17
+ function location(url) {
18
+ const parsed = new URL(url);
19
+ return `${parsed.host}${decodeURIComponent(parsed.pathname)}`.replace(/\/+$/, '');
20
+ }
21
+ /**
22
+ * The folder at each URL: the library whose URL starts it, and the item at
23
+ * the rest of its path. SharePoint matches URLs without regard to case.
24
+ */
25
+ export async function resolveFolders(client, drives, urls, signal) {
26
+ const folders = [];
27
+ for (const url of urls) {
28
+ const target = location(url);
29
+ const drive = drives.find((it) => target.toLowerCase().startsWith(`${location(it.webUrl).toLowerCase()}/`));
30
+ if (drive === undefined)
31
+ throw new SharePointFolderNotFoundError(url);
32
+ const path = target.slice(location(drive.webUrl).length + 1);
33
+ const item = await client
34
+ .driveItemAt(drive.id, path, signal)
35
+ .catch((error) => {
36
+ if (error instanceof GraphError && error.status === 404)
37
+ throw new SharePointFolderNotFoundError(url, { cause: error });
38
+ throw error;
39
+ });
40
+ if (item.folder === undefined)
41
+ throw new SharePointFolderNotFoundError(url);
42
+ folders.push({ url, driveId: drive.id, item });
43
+ }
44
+ return folders;
45
+ }
@@ -1,19 +1,21 @@
1
1
  import type { Drive, List, SharePointClient, Site } from '@eltjs/sdk-microsoft-sharepoint';
2
+ import { type SiteScope } from './folder-scope.ts';
2
3
  /**
3
4
  * One read of SharePoint: the client, the site, drives and lists that the
4
5
  * run read, and the folder of the files that it staged. Each stream of the
5
- * run sees the same drives and lists of a site, so the delta streams read the
6
- * collections that the drives and lists streams load. A read that Graph
7
- * refused is not kept: the next stream to ask for it asks Graph again.
6
+ * run sees the same drives, lists and scope of a site, so the delta streams
7
+ * read the collections that the drives and lists streams load. A read that
8
+ * Graph refused is not kept: the next stream to ask for it asks Graph again.
8
9
  */
9
10
  export declare class SharePointRun implements AsyncDisposable {
10
11
  #private;
11
12
  readonly client: SharePointClient;
12
13
  private constructor();
13
- static open(client: SharePointClient): Promise<SharePointRun>;
14
+ static open(client: SharePointClient, folders: ReadonlyMap<string, readonly string[]>): Promise<SharePointRun>;
14
15
  site(url: string, signal: AbortSignal): Promise<Site>;
15
16
  drives(url: string, signal: AbortSignal): Promise<readonly Drive[]>;
16
17
  lists(url: string, signal: AbortSignal): Promise<readonly List[]>;
18
+ scope(url: string, signal: AbortSignal): Promise<SiteScope>;
17
19
  staged(name: string): string;
18
20
  [Symbol.asyncDispose](): Promise<void>;
19
21
  }
@@ -1,11 +1,12 @@
1
1
  import { join } from 'node:path';
2
2
  import { TemporaryFiles } from '@zukhruf/fs';
3
+ import { resolveFolders } from './folder-scope.js';
3
4
  /**
4
5
  * One read of SharePoint: the client, the site, drives and lists that the
5
6
  * run read, and the folder of the files that it staged. Each stream of the
6
- * run sees the same drives and lists of a site, so the delta streams read the
7
- * collections that the drives and lists streams load. A read that Graph
8
- * refused is not kept: the next stream to ask for it asks Graph again.
7
+ * run sees the same drives, lists and scope of a site, so the delta streams
8
+ * read the collections that the drives and lists streams load. A read that
9
+ * Graph refused is not kept: the next stream to ask for it asks Graph again.
9
10
  */
10
11
  export class SharePointRun {
11
12
  client;
@@ -13,12 +14,16 @@ export class SharePointRun {
13
14
  #sites = new Map();
14
15
  #drives = new Map();
15
16
  #lists = new Map();
16
- constructor(client, staging) {
17
+ #scopes = new Map();
18
+ // The folder URLs of each site that the host limited to folders.
19
+ #folders;
20
+ constructor(client, folders, staging) {
17
21
  this.client = client;
22
+ this.#folders = folders;
18
23
  this.#staging = staging;
19
24
  }
20
- static async open(client) {
21
- return new SharePointRun(client, await new TemporaryFiles().directory('elt-sharepoint-'));
25
+ static async open(client, folders) {
26
+ return new SharePointRun(client, folders, await new TemporaryFiles().directory('elt-sharepoint-'));
22
27
  }
23
28
  async site(url, signal) {
24
29
  const known = this.#sites.get(url);
@@ -46,6 +51,19 @@ export class SharePointRun {
46
51
  this.#lists.set(url, lists);
47
52
  return lists;
48
53
  }
54
+ // The whole site, or the folders the host limited it to, each resolved
55
+ // once a run, so a folder renamed since the last run fails this one.
56
+ async scope(url, signal) {
57
+ const known = this.#scopes.get(url);
58
+ if (known !== undefined)
59
+ return known;
60
+ const urls = this.#folders.get(url);
61
+ const scope = urls === undefined
62
+ ? 'site'
63
+ : await resolveFolders(this.client, await this.drives(url, signal), urls, signal);
64
+ this.#scopes.set(url, scope);
65
+ return scope;
66
+ }
49
67
  // Where a file named name stages in the run's folder. The caller removes
50
68
  // it once its record is loaded; the run removes what is left.
51
69
  staged(name) {
@@ -1,9 +1,16 @@
1
1
  import { Catalog, type ChangeSignal, type CopyConfiguration, type ExtractionCoverage, type Partition, Source, type SourceMessage, type Stream } from '@eltjs/elt';
2
2
  import { SharePointAccessError, type SharePointClient, SharePointCredentialsError, SharePointSiteNotFoundError } from '@eltjs/sdk-microsoft-sharepoint';
3
+ import { SharePointFolderNotFoundError, type SharePointSite } from './folder-scope.ts';
3
4
  import { SharePointRun } from './sharepoint-run.ts';
5
+ export { SharePointFolderNotFoundError, type SharePointSite };
6
+ /**
7
+ * The streams that load nothing for a site limited to folders, since no
8
+ * record of them shows which folder holds it.
9
+ */
10
+ export declare const restrictedSharePointStreams: string[];
4
11
  export type SharePointSourceOptions = {
5
12
  readonly client: SharePointClient;
6
- readonly sites: readonly string[];
13
+ readonly sites: readonly SharePointSite[];
7
14
  };
8
15
  /**
9
16
  * Reads the files, lists and pages of SharePoint Online sites through
@@ -23,7 +30,7 @@ export declare class SharePointSource extends Source<SharePointRun> {
23
30
  readonly accessRequests: Stream;
24
31
  readonly pages: Stream;
25
32
  constructor({ client, sites }: SharePointSourceOptions);
26
- protected readonly configErrors: (typeof SharePointAccessError | typeof SharePointCredentialsError | typeof SharePointSiteNotFoundError)[];
33
+ protected readonly configErrors: (typeof SharePointAccessError | typeof SharePointCredentialsError | typeof SharePointSiteNotFoundError | typeof SharePointFolderNotFoundError)[];
27
34
  protected partitions(): readonly Partition[];
28
35
  protected open(): Promise<SharePointRun>;
29
36
  coverage(stream: Stream): ExtractionCoverage;
@@ -1,5 +1,6 @@
1
1
  import { Catalog, Source, } from '@eltjs/elt';
2
2
  import { SharePointAccessError, SharePointCredentialsError, SharePointSiteNotFoundError, SiteVersion, } from '@eltjs/sdk-microsoft-sharepoint';
3
+ import { SharePointFolderNotFoundError, } from './folder-scope.js';
3
4
  import { SharePointRun } from './sharepoint-run.js';
4
5
  import { AccessRequestsStream } from './streams/access-requests-stream.js';
5
6
  import { DriveItemsStream } from './streams/drive-items-stream.js';
@@ -21,6 +22,14 @@ const readers = {
21
22
  };
22
23
  const catalog = new Catalog(Object.values(readers).map((reader) => reader.stream));
23
24
  const readersByStream = new Map(Object.values(readers).map((reader) => [reader.stream, reader]));
25
+ export { SharePointFolderNotFoundError };
26
+ /**
27
+ * The streams that load nothing for a site limited to folders, since no
28
+ * record of them shows which folder holds it.
29
+ */
30
+ export const restrictedSharePointStreams = Object.values(readers)
31
+ .filter((reader) => reader.restricted)
32
+ .map((reader) => reader.stream.name);
24
33
  // How often a watch reads the version of each site, and how long one read,
25
34
  // three requests to Graph with their retries, can take.
26
35
  const checkIntervalMs = 60_000;
@@ -43,6 +52,8 @@ export class SharePointSource extends Source {
43
52
  pages = readers.pages.stream;
44
53
  #client;
45
54
  #siteUrls;
55
+ // The folder URLs of each site that the host limited to folders.
56
+ #folders;
46
57
  constructor({ client, sites }) {
47
58
  super();
48
59
  if (sites.length === 0)
@@ -51,24 +62,42 @@ export class SharePointSource extends Source {
51
62
  // of the identity: adding a site keeps the checkpoints of the others.
52
63
  this.identity = `sharepoint:${client.tenantId}`;
53
64
  this.#client = client;
54
- this.#siteUrls = Object.freeze([...sites]);
65
+ this.#siteUrls = Object.freeze(sites.map((site) => (typeof site === 'string' ? site : site.url)));
66
+ if (new Set(this.#siteUrls).size !== this.#siteUrls.length)
67
+ throw new TypeError('SharePoint names each site URL once');
68
+ const folders = new Map();
69
+ for (const site of sites) {
70
+ if (typeof site === 'string')
71
+ continue;
72
+ if (site.folders.length === 0)
73
+ throw new TypeError(`SharePoint site ${site.url} names no folder; name the site by its URL alone to load all of it`);
74
+ folders.set(site.url, Object.freeze([...site.folders]));
75
+ }
76
+ this.#folders = folders;
55
77
  Object.freeze(this);
56
78
  }
57
79
  configErrors = [
58
80
  SharePointAccessError,
59
81
  SharePointCredentialsError,
60
82
  SharePointSiteNotFoundError,
83
+ SharePointFolderNotFoundError,
61
84
  ];
62
85
  partitions() {
63
86
  return this.#siteUrls.map((siteUrl) => ({ siteUrl }));
64
87
  }
65
88
  open() {
66
- return SharePointRun.open(this.#client);
89
+ return SharePointRun.open(this.#client, this.#folders);
67
90
  }
68
91
  coverage(stream) {
92
+ const reader = this.#reader(stream);
69
93
  return {
70
- description: this.#reader(stream).covers,
71
- selection: { sites: [...this.#siteUrls] },
94
+ description: reader.restricted
95
+ ? `${reader.covers} A site limited to folders loads none of it.`
96
+ : reader.covers,
97
+ selection: {
98
+ sites: [...this.#siteUrls],
99
+ folders: Object.fromEntries([...this.#folders].map(([site, urls]) => [site, [...urls]])),
100
+ },
72
101
  };
73
102
  }
74
103
  async currentAsOf() {
@@ -51,6 +51,7 @@ type StreamDefinition = {
51
51
  readonly primaryKey: readonly ['siteUrl', ...string[]];
52
52
  readonly covers: string;
53
53
  readonly supportsFileTransfer?: true;
54
+ readonly restricted?: true;
54
55
  };
55
56
  /**
56
57
  * A SharePoint stream: its declaration, and how one read of one site turns
@@ -60,7 +61,8 @@ type StreamDefinition = {
60
61
  export declare abstract class SharePointStream {
61
62
  readonly stream: Stream;
62
63
  readonly covers: string;
63
- constructor({ name, description, properties, primaryKey, covers, supportsFileTransfer, }: StreamDefinition);
64
+ readonly restricted: boolean;
65
+ constructor({ name, description, properties, primaryKey, covers, supportsFileTransfer, restricted, }: StreamDefinition);
64
66
  abstract extract(configuration: CopyConfiguration, state: unknown, siteUrl: string, run: SharePointRun, signal: AbortSignal): AsyncGenerator<SourceMessage>;
65
67
  protected validated(draft: Record<string, unknown>): Record<string, unknown>;
66
68
  }
@@ -42,7 +42,8 @@ export const lastModifiedBy = {
42
42
  export class SharePointStream {
43
43
  stream;
44
44
  covers;
45
- constructor({ name, description, properties, primaryKey, covers, supportsFileTransfer, }) {
45
+ restricted;
46
+ constructor({ name, description, properties, primaryKey, covers, supportsFileTransfer, restricted, }) {
46
47
  this.stream = new Stream({
47
48
  name,
48
49
  jsonSchema: {
@@ -59,6 +60,7 @@ export class SharePointStream {
59
60
  supportsFileTransfer,
60
61
  });
61
62
  this.covers = covers;
63
+ this.restricted = restricted === true;
62
64
  }
63
65
  // One record, checked against the schema as it is read, so a read holds
64
66
  // one record at a time.
@@ -4,7 +4,9 @@ import { SharePointStream } from './sharepoint-stream.ts';
4
4
  /**
5
5
  * A stream that Graph lists whole on each read, with no change feed: an
6
6
  * incremental copy compares each read with the snapshot of the last one,
7
- * writes what changed and deletes what Graph no longer lists.
7
+ * writes what changed and deletes what Graph no longer lists. A restricted
8
+ * stream lists nothing for a site limited to folders, so the diff deletes
9
+ * what an earlier read of the whole site loaded.
8
10
  */
9
11
  export declare abstract class SnapshotStream extends SharePointStream {
10
12
  #private;
@@ -4,11 +4,16 @@ import { SharePointStream } from './sharepoint-stream.js';
4
4
  /**
5
5
  * A stream that Graph lists whole on each read, with no change feed: an
6
6
  * incremental copy compares each read with the snapshot of the last one,
7
- * writes what changed and deletes what Graph no longer lists.
7
+ * writes what changed and deletes what Graph no longer lists. A restricted
8
+ * stream lists nothing for a site limited to folders, so the diff deletes
9
+ * what an earlier read of the whole site loaded.
8
10
  */
9
11
  export class SnapshotStream extends SharePointStream {
10
12
  async *extract(configuration, state, siteUrl, run, signal) {
11
- yield* diffSnapshot(configuration, this.#records(siteUrl, run, signal), state, { policy: new ClosedWorld(), signal });
13
+ const scope = await run.scope(siteUrl, signal);
14
+ yield* diffSnapshot(configuration, this.restricted && scope !== 'site'
15
+ ? []
16
+ : this.#records(siteUrl, run, signal), state, { policy: new ClosedWorld(), signal });
12
17
  }
13
18
  // The pages of a collection can give one item twice, as when it changes
14
19
  // while a read pages through them, and a snapshot diff fails on a key that
@@ -4,6 +4,7 @@ export class AccessRequestsStream extends SnapshotStream {
4
4
  constructor() {
5
5
  super({
6
6
  name: 'accessRequests',
7
+ restricted: true,
7
8
  description: 'One record for each item of the lists of the requests for access to the site (template accessRequest), with the value of each column as JSON, as listItems has. Graph serves no item delta for these lists, so each read lists their items in full. Primary key siteUrl, listId, itemId. An incremental read deletes an item that Graph no longer lists.',
8
9
  properties: listItemProperties,
9
10
  primaryKey: ['siteUrl', 'listId', 'itemId'],
@@ -1,10 +1,13 @@
1
1
  import { type CopyConfiguration, type SourceMessage } from '@eltjs/elt';
2
2
  import { type DeltaPage, type DriveItem } from '@eltjs/sdk-microsoft-sharepoint';
3
- import { DeltaStream } from '../delta-stream.ts';
3
+ import { type DeltaState, DeltaStream } from '../delta-stream.ts';
4
+ import type { ScopeFolder } from '../folder-scope.ts';
4
5
  import type { SharePointRun } from '../sharepoint-run.ts';
5
6
  export declare class DriveItemsStream extends DeltaStream<DriveItem> {
7
+ #private;
6
8
  constructor();
7
9
  protected collections(url: string, run: SharePointRun, signal: AbortSignal): Promise<readonly string[]>;
8
10
  protected pages(_url: string, driveId: string, link: string | undefined, run: SharePointRun, signal: AbortSignal): AsyncIterable<DeltaPage<DriveItem>>;
9
11
  protected messages(configuration: CopyConfiguration, url: string, driveId: string, item: DriveItem, run: SharePointRun, signal: AbortSignal): AsyncGenerator<SourceMessage>;
12
+ protected scoped(configuration: CopyConfiguration, saved: DeltaState | null, url: string, folders: readonly ScopeFolder[], run: SharePointRun, signal: AbortSignal): AsyncGenerator<SourceMessage>;
10
13
  }
@@ -1,7 +1,7 @@
1
1
  import { rm } from 'node:fs/promises';
2
2
  import { fileExtension, } from '@eltjs/elt';
3
- import { GraphError, } from '@eltjs/sdk-microsoft-sharepoint';
4
- import { DeltaStream } from '../delta-stream.js';
3
+ import { DeltaExpiredError, GraphError, } from '@eltjs/sdk-microsoft-sharepoint';
4
+ import { DeltaStream, resumeLink, } from '../delta-stream.js';
5
5
  import { createdBy, instant, json, lastModifiedBy, sharePointFields, siteUrl, } from '../sharepoint-stream.js';
6
6
  const { id, text, nullableText, boolean, timestamp, count, nullableCount } = sharePointFields;
7
7
  const properties = {
@@ -72,14 +72,39 @@ const properties = {
72
72
  description: 'The item of the library list that holds the metadata columns of the file or the folder: listItems.itemId of the list of the library. NULL when Graph gives none.',
73
73
  },
74
74
  };
75
+ // The scope folders of one drive, and each item under them with the folder
76
+ // that holds it.
77
+ class Subtrees {
78
+ #roots;
79
+ items;
80
+ constructor(roots, items) {
81
+ this.#roots = new Set(roots);
82
+ this.items = items;
83
+ }
84
+ isRoot(id) {
85
+ return this.#roots.has(id);
86
+ }
87
+ contains(id) {
88
+ return this.#roots.has(id) || this.items.has(id);
89
+ }
90
+ // The item and each item under it.
91
+ subtree(id) {
92
+ const found = [id];
93
+ for (let index = 0; index < found.length; index += 1)
94
+ for (const [item, parent] of this.items)
95
+ if (parent === found[index])
96
+ found.push(item);
97
+ return found;
98
+ }
99
+ }
75
100
  export class DriveItemsStream extends DeltaStream {
76
101
  constructor() {
77
102
  super({
78
103
  name: 'driveItems',
79
- description: 'One record for each file and folder of each document library of the site, without the root folder of the library, which drives describes. A copy can take the content of a file through the file of the stream; a field that accepts only some file names downloads only those files. Primary key siteUrl, driveId, itemId. Read through the drive delta of Graph: the first read loads every item, and later reads apply the changes and deletions after it.',
104
+ description: 'One record for each file and folder of each document library of the site, without the root folder of the library, which drives describes. A site limited to folders loads only those folders and what they hold. A copy can take the content of a file through the file of the stream; a field that accepts only some file names downloads only those files. Primary key siteUrl, driveId, itemId. Read through the drive delta of Graph: the first read loads every item, and later reads apply the changes and deletions after it.',
80
105
  properties,
81
106
  primaryKey: ['siteUrl', 'driveId', 'itemId'],
82
- covers: 'Every file and folder of every document library of each configured site, then the changes that the drive delta of Graph reports.',
107
+ covers: 'Every file and folder of every document library of each configured site, or of its scope folders, then the changes that the drive delta of Graph reports.',
83
108
  supportsFileTransfer: true,
84
109
  });
85
110
  }
@@ -119,6 +144,127 @@ export class DriveItemsStream extends DeltaStream {
119
144
  await rm(file, { force: true });
120
145
  }
121
146
  }
147
+ // A site limited to folders loads the scope folders and each item under
148
+ // them (ADR 0003). The first read takes the delta link of each drive, then
149
+ // lists the folders, so a change during the listing comes again in the next
150
+ // read. Later reads apply the changes of the drive delta to the items under
151
+ // the folders: an item that leaves them is deleted with what it holds, and
152
+ // a folder that enters them is listed, since a delta gives no item again
153
+ // when its folder moves. Other scope folders than the state was read with
154
+ // start the site over with a RESET.
155
+ async *scoped(configuration, saved, url, folders, run, signal) {
156
+ // The scope folders as the checkpoint names them.
157
+ const ids = folders.map((it) => `${it.driveId}/${it.item.id}`);
158
+ const from = saved !== null &&
159
+ saved.scope !== undefined &&
160
+ sameMembers(saved.scope.folders, ids) &&
161
+ !this.gained(saved.fields)
162
+ ? saved
163
+ : null;
164
+ if (saved !== null && from === null)
165
+ yield* this.reset();
166
+ try {
167
+ yield* this.#folders(configuration, from, url, folders, ids, run, signal);
168
+ }
169
+ catch (error) {
170
+ if (!(error instanceof DeltaExpiredError))
171
+ throw error;
172
+ yield* this.reset();
173
+ yield* this.#folders(configuration, null, url, folders, ids, run, signal);
174
+ }
175
+ }
176
+ async *#folders(configuration, from, url, folders, ids, run, signal) {
177
+ const links = new Map(Object.entries(from?.links ?? {}));
178
+ const items = new Map(Object.entries(from?.scope?.items ?? {}).map(([drive, parents]) => [
179
+ drive,
180
+ new Map(Object.entries(parents)),
181
+ ]));
182
+ const state = () => this.state(links, {
183
+ folders: ids,
184
+ items: Object.fromEntries([...items].map(([drive, parents]) => [
185
+ drive,
186
+ Object.fromEntries(parents),
187
+ ])),
188
+ });
189
+ for (const driveId of new Set(folders.map((it) => it.driveId))) {
190
+ const roots = folders.filter((it) => it.driveId === driveId);
191
+ const trees = new Subtrees(roots.map((it) => it.item.id), items.get(driveId) ?? new Map());
192
+ items.set(driveId, trees.items);
193
+ const link = links.get(driveId);
194
+ if (link === undefined) {
195
+ const delta = await run.client.latestDriveDeltaLink(driveId, signal);
196
+ for (const root of roots)
197
+ yield* this.#enter(configuration, url, driveId, root.item, trees, run, signal);
198
+ links.set(driveId, { delta });
199
+ yield state();
200
+ continue;
201
+ }
202
+ for await (const page of run.client.driveDelta(driveId, resumeLink(link), signal)) {
203
+ for (const item of page.items)
204
+ yield* this.#change(configuration, url, driveId, item, trees, run, signal);
205
+ links.set(driveId, 'deltaLink' in page
206
+ ? { delta: page.deltaLink }
207
+ : { next: page.nextLink });
208
+ yield state();
209
+ }
210
+ }
211
+ }
212
+ // An item that enters the scope, and each item under it, listed.
213
+ async *#enter(configuration, url, driveId, item, trees, run, signal) {
214
+ yield* this.messages(configuration, url, driveId, item, run, signal);
215
+ if (item.folder === undefined)
216
+ return;
217
+ // A queue that grows as the walk finds folders.
218
+ const folders = [item.id];
219
+ for (const folder of folders) {
220
+ for (const child of await run.client.children(driveId, folder, signal)) {
221
+ trees.items.set(child.id, folder);
222
+ yield* this.messages(configuration, url, driveId, child, run, signal);
223
+ if (child.folder !== undefined)
224
+ folders.push(child.id);
225
+ }
226
+ }
227
+ }
228
+ // One item of a delta of a drive with scope folders. An item outside them
229
+ // that a delta gives before its new folder enters them loads when that
230
+ // folder enters, since the folder is listed then.
231
+ async *#change(configuration, url, driveId, item, trees, run, signal) {
232
+ if (item.deleted !== undefined) {
233
+ yield* this.#leave(configuration, url, driveId, item.id, trees);
234
+ return;
235
+ }
236
+ if (item.root !== undefined)
237
+ return;
238
+ const parent = item.parentReference.id;
239
+ if (!trees.isRoot(item.id) &&
240
+ (parent === undefined || !trees.contains(parent))) {
241
+ yield* this.#leave(configuration, url, driveId, item.id, trees);
242
+ return;
243
+ }
244
+ const entering = !trees.contains(item.id);
245
+ if (!trees.isRoot(item.id) && parent !== undefined)
246
+ trees.items.set(item.id, parent);
247
+ if (entering)
248
+ yield* this.#enter(configuration, url, driveId, item, trees, run, signal);
249
+ else
250
+ yield* this.messages(configuration, url, driveId, item, run, signal);
251
+ }
252
+ // An item that left the scope, or was deleted, with each item under it.
253
+ *#leave(configuration, url, driveId, id, trees) {
254
+ if (!trees.contains(id))
255
+ return;
256
+ for (const gone of trees.subtree(id)) {
257
+ trees.items.delete(gone);
258
+ yield* this.deletion(configuration, {
259
+ siteUrl: url,
260
+ driveId,
261
+ itemId: gone,
262
+ });
263
+ }
264
+ }
265
+ }
266
+ function sameMembers(a, b) {
267
+ return a.length === b.length && a.every((it) => b.includes(it));
122
268
  }
123
269
  function record(url, driveId, item) {
124
270
  return {
@@ -30,23 +30,25 @@ export class DrivesStream extends SnapshotStream {
30
30
  constructor() {
31
31
  super({
32
32
  name: 'drives',
33
- description: 'One record for each document library of the site, as Graph shows it: a drive of files and folders. Primary key siteUrl, driveId. An incremental read deletes a library that Graph no longer lists.',
33
+ description: 'One record for each document library of the site, as Graph shows it: a drive of files and folders. A site limited to folders loads only the libraries that hold them. Primary key siteUrl, driveId. An incremental read deletes a library that Graph no longer lists.',
34
34
  properties,
35
35
  primaryKey: ['siteUrl', 'driveId'],
36
36
  covers: 'Every document library of each configured site.',
37
37
  });
38
38
  }
39
39
  async *scan(url, run, signal) {
40
+ const scope = await run.scope(url, signal);
40
41
  for (const drive of await run.drives(url, signal))
41
- yield {
42
- siteUrl: url,
43
- driveId: drive.id,
44
- name: drive.name,
45
- description: drive.description ?? null,
46
- driveType: drive.driveType,
47
- webUrl: drive.webUrl,
48
- createdDateTime: instant(drive.createdDateTime),
49
- lastModifiedDateTime: instant(drive.lastModifiedDateTime),
50
- };
42
+ if (scope === 'site' || scope.some((it) => it.driveId === drive.id))
43
+ yield {
44
+ siteUrl: url,
45
+ driveId: drive.id,
46
+ name: drive.name,
47
+ description: drive.description ?? null,
48
+ driveType: drive.driveType,
49
+ webUrl: drive.webUrl,
50
+ createdDateTime: instant(drive.createdDateTime),
51
+ lastModifiedDateTime: instant(drive.lastModifiedDateTime),
52
+ };
51
53
  }
52
54
  }
@@ -45,6 +45,7 @@ export class ListColumnsStream extends SnapshotStream {
45
45
  constructor() {
46
46
  super({
47
47
  name: 'listColumns',
48
+ restricted: true,
48
49
  description: 'One record for each column of each list of the site that is not hidden from Graph. Primary key siteUrl, listId, columnId. An incremental read deletes a column that Graph no longer lists.',
49
50
  properties,
50
51
  primaryKey: ['siteUrl', 'listId', 'columnId'],
@@ -4,6 +4,7 @@ export class ListItemsStream extends DeltaStream {
4
4
  constructor() {
5
5
  super({
6
6
  name: 'listItems',
7
+ restricted: true,
7
8
  description: 'One record for each item of each list of the site, the items of document libraries included, with the value of each column as JSON. The lists of the requests for access are in accessRequests. Primary key siteUrl, listId, itemId. Read through the list items delta of Graph: the first read loads every item, and later reads apply the changes and deletions after it.',
8
9
  properties: listItemProperties,
9
10
  primaryKey: ['siteUrl', 'listId', 'itemId'],
@@ -39,6 +39,7 @@ export class ListsStream extends SnapshotStream {
39
39
  constructor() {
40
40
  super({
41
41
  name: 'lists',
42
+ restricted: true,
42
43
  description: 'One record for each list of the site, hidden lists and document libraries included. Graph leaves out the lists it marks system. Primary key siteUrl, listId. An incremental read deletes a list that Graph no longer lists.',
43
44
  properties,
44
45
  primaryKey: ['siteUrl', 'listId'],
@@ -49,6 +49,7 @@ export class PagesStream extends SnapshotStream {
49
49
  constructor() {
50
50
  super({
51
51
  name: 'pages',
52
+ restricted: true,
52
53
  description: 'One record for each modern page of the Site Pages library of the site, with the HTML of its text web parts. Primary key siteUrl, pageId. An incremental read deletes a page that Graph no longer lists.',
53
54
  properties,
54
55
  primaryKey: ['siteUrl', 'pageId'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eltjs/source-microsoft-sharepoint",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "An elt source for SharePoint Online sites: files, lists, list items and pages through the Microsoft Graph delta feeds.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -36,15 +36,15 @@
36
36
  "access": "public"
37
37
  },
38
38
  "dependencies": {
39
- "@eltjs/elt": "^0.3.11",
40
- "@eltjs/sdk-microsoft-sharepoint": "^0.3.11",
39
+ "@eltjs/elt": "^0.3.12",
40
+ "@eltjs/sdk-microsoft-sharepoint": "^0.3.12",
41
41
  "@zukhruf/async": "^0.8.27",
42
42
  "@zukhruf/fs": "^0.8.27",
43
43
  "@zukhruf/snapshot-differential": "^0.8.27"
44
44
  },
45
45
  "devDependencies": {
46
- "@eltjs/elt-sqlite": "^0.3.11",
47
- "@eltjs/parser-office": "^0.3.11",
46
+ "@eltjs/elt-sqlite": "^0.3.12",
47
+ "@eltjs/parser-office": "^0.3.12",
48
48
  "@sinonjs/fake-timers": "15.4.0",
49
49
  "@zukhruf/sqlite-open": "^0.8.27",
50
50
  "@zukhruf/testing": "^0.8.27",