@septkit/shell-lib 0.0.34 → 0.0.35
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.d.ts +1 -1
- package/dist/index.js +50 -120
- package/dist/shell-context.d.ts +3 -0
- package/dist/types/api.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/project-storage.d.ts +5 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type * from './types';
|
|
2
2
|
export { SHELL_DB_PREFIX, LIBRARY_DB_PREFIX, TEMP_DOCUMENT_PREFIX, TEMP_PROJECT_PREFIX, RESERVED_DB_PREFIXES, isReservedDatabaseName, } from './constants';
|
|
3
|
-
export { setShellContext, clearShellContext, getProject, getActiveDocumentId, getCommands, getStorageSources, getPwa, } from './shell-context';
|
|
3
|
+
export { setShellContext, clearShellContext, getProject, getActiveDocumentId, getCommands, getStorageSources, getPwa, getProjectStorage, } from './shell-context';
|
package/dist/index.js
CHANGED
|
@@ -9,8 +9,13 @@ function a(e) {
|
|
|
9
9
|
return i.some((t) => e.startsWith(t));
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region node_modules/.pnpm/@dialecte+core@0.
|
|
13
|
-
var o = "https://dialecte.github.io/core", s =
|
|
12
|
+
//#region node_modules/.pnpm/@dialecte+core@0.9.0/node_modules/@dialecte/core/dist/utils-Cv4oHia0.js
|
|
13
|
+
var o = "https://dialecte.github.io/core", s = /* @__PURE__ */ new Set([
|
|
14
|
+
"throwDialecteError",
|
|
15
|
+
"createDialecteError",
|
|
16
|
+
"invariant",
|
|
17
|
+
"reportFailure"
|
|
18
|
+
]), c = {
|
|
14
19
|
UNKNOWN: {
|
|
15
20
|
code: "D0001",
|
|
16
21
|
message: "An unknown error occurred",
|
|
@@ -24,7 +29,7 @@ var o = "https://dialecte.github.io/core", s = {
|
|
|
24
29
|
code: "D0002",
|
|
25
30
|
message: "Assertion failed",
|
|
26
31
|
explanation: {
|
|
27
|
-
when: "An `invariant` without its own key failed, or core met a state it never expects (a catalogue built wrong, an inconsistent export,
|
|
32
|
+
when: "An `invariant` without its own key failed, or core met a state it never expects (a catalogue built wrong, an inconsistent export, a store running on a dependency older than the one it supports).",
|
|
28
33
|
fix: "Read `detail`: it names the condition. Give `invariant` a key of its own when the failure is one a caller should handle.",
|
|
29
34
|
docs: `${o}/guide/development/state-and-errors#error-catalog`
|
|
30
35
|
}
|
|
@@ -33,8 +38,8 @@ var o = "https://dialecte.github.io/core", s = {
|
|
|
33
38
|
code: "D1001",
|
|
34
39
|
message: "Failed to open database",
|
|
35
40
|
explanation: {
|
|
36
|
-
when: "The
|
|
37
|
-
fix: "Check the browser supports the store
|
|
41
|
+
when: "The store could not open the project's data, or could not reach what serves it (its database, a worker, a server): it failed to start, was blocked, or went unanswered; the failure is the `cause` when there is one.",
|
|
42
|
+
fix: "Check the browser supports what the store needs and that no other tab holds the project; reload, or open the project with another storage. The store's own docs name what it needs.",
|
|
38
43
|
docs: `${o}/api/project#store-errors`
|
|
39
44
|
}
|
|
40
45
|
},
|
|
@@ -123,38 +128,11 @@ var o = "https://dialecte.github.io/core", s = {
|
|
|
123
128
|
code: "D1011",
|
|
124
129
|
message: "Failed to read from database",
|
|
125
130
|
explanation: {
|
|
126
|
-
when: "The
|
|
131
|
+
when: "The store's database failed under a read; the failure is the `cause`.",
|
|
127
132
|
fix: "Read `cause`; reopen the project. A lasting failure means the file is damaged: import its documents again.",
|
|
128
133
|
docs: `${o}/api/project#store-errors`
|
|
129
134
|
}
|
|
130
135
|
},
|
|
131
|
-
STORE_PROTOCOL_MISMATCH: {
|
|
132
|
-
code: "D1012",
|
|
133
|
-
message: "Another version of the library holds the shared store connection",
|
|
134
|
-
explanation: {
|
|
135
|
-
when: "Another version of the library already holds the shared store connection (another tab runs an older or newer build).",
|
|
136
|
-
fix: "Close the other tabs of the app, or reload them all on the same version.",
|
|
137
|
-
docs: `${o}/api/project#store-errors`
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
STORE_REALM_ID_TAKEN: {
|
|
141
|
-
code: "D1013",
|
|
142
|
-
message: "A view with this id is already connected to the shared store",
|
|
143
|
-
explanation: {
|
|
144
|
-
when: "A view joined the shared store with an id another connected view already uses.",
|
|
145
|
-
fix: "Give each view its own id; reload the page that reused one.",
|
|
146
|
-
docs: `${o}/api/project#store-errors`
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
STORE_REALM_UNKNOWN: {
|
|
150
|
-
code: "D1014",
|
|
151
|
-
message: "The shared store does not know this view",
|
|
152
|
-
explanation: {
|
|
153
|
-
when: "A view spoke to the shared store without having joined it, or after it left.",
|
|
154
|
-
fix: "Join (open the project) before reading or writing; reload a view that was disconnected.",
|
|
155
|
-
docs: `${o}/api/project#store-errors`
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
136
|
STORE_VALUE_NOT_JSON: {
|
|
159
137
|
code: "D1015",
|
|
160
138
|
message: "A value handed to the store is not JSON",
|
|
@@ -168,8 +146,8 @@ var o = "https://dialecte.github.io/core", s = {
|
|
|
168
146
|
code: "D1016",
|
|
169
147
|
message: "This browser gives the page no storage for a project",
|
|
170
148
|
explanation: {
|
|
171
|
-
when: "The browser gives the page
|
|
172
|
-
fix: "Open the app in a normal (not private) window of a browser that supports the
|
|
149
|
+
when: "The browser gives the page none of the storage the store needs (a private window, an API the browser lacks), so it cannot create, open or destroy the project; nothing is changed.",
|
|
150
|
+
fix: "Open the app in a normal (not private) window of a browser that supports what the project's store needs, or open the project with another storage.",
|
|
173
151
|
docs: `${o}/api/project#store-errors`
|
|
174
152
|
}
|
|
175
153
|
},
|
|
@@ -177,27 +155,27 @@ var o = "https://dialecte.github.io/core", s = {
|
|
|
177
155
|
code: "D1017",
|
|
178
156
|
message: "Not enough storage left for the project",
|
|
179
157
|
explanation: {
|
|
180
|
-
when: "The origin has too little storage left
|
|
158
|
+
when: "The origin has too little storage left for what the call needs (a new project's files, an import's room ahead of it), or the store's storage refused a write for want of space; nothing of the call applied. A store that checks the room it needs answers it; the local (IndexedDB) store answers the failing write's own error (`STORE_COMMIT_FAILED`, `STORE_BULK_ADD_FAILED`, `STORE_BULK_UPDATE_FAILED`; an import `IMPORT_FAILED`); the in-memory store has no limit.",
|
|
181
159
|
fix: "Free storage for the origin (delete projects no longer needed) or import a smaller file, then try again; `meta.needed` and `meta.available` give the sizes when known.",
|
|
182
160
|
docs: `${o}/api/project#store-errors`
|
|
183
161
|
}
|
|
184
162
|
},
|
|
185
|
-
|
|
163
|
+
STORE_CONNECTION_LOST: {
|
|
186
164
|
code: "D1018",
|
|
187
|
-
message: "The
|
|
165
|
+
message: "The store lost its connection",
|
|
188
166
|
explanation: {
|
|
189
|
-
when: "A call to a project
|
|
190
|
-
fix: "A Document's commit and a Project's import ask the outcome themselves, once: a commit that landed resolves; otherwise the refusal says `meta.outcome` - `not-applied` (make it again if wanted), `running` (
|
|
191
|
-
docs: `${o}/api/project#
|
|
167
|
+
when: "A call to a store whose project is served elsewhere (a worker, another realm, a server) lost its connection to what serves it: that went away or gave no answer within its budget, sent nothing for too long while the call waited (the call may still finish), or dropped this view. `meta.reason` is the store's own word for why, listed in its docs; a write's refusal carries `meta.writeId`.",
|
|
168
|
+
fix: "A Document's commit and a Project's import ask the outcome themselves, once: a commit that landed resolves; otherwise the refusal says `meta.outcome` - `not-applied` (make it again if wanted), `running` (what serves the store may still apply it: tell the user, read again later), `unknown` (it could not be asked), or `applied` for an import (its document is in the project; its diagnostics were lost). Elsewhere ask `getWriteOutcome({ writeId })` with `meta.writeId` before writing again; never retry a write blindly. The store's docs say what each `meta.reason` asks of the app.",
|
|
169
|
+
docs: `${o}/api/project#a-lost-connection`
|
|
192
170
|
}
|
|
193
171
|
},
|
|
194
|
-
|
|
195
|
-
code: "
|
|
196
|
-
message: "
|
|
172
|
+
STORE_KIND_TAKEN: {
|
|
173
|
+
code: "D1021",
|
|
174
|
+
message: "This storage type is registered already by another kind",
|
|
197
175
|
explanation: {
|
|
198
|
-
when: "`
|
|
199
|
-
fix: "
|
|
200
|
-
docs: `${o}/
|
|
176
|
+
when: "`registerStorageKind({ type, kind })` named a type a kind of another `id` holds already: the first registration in the realm is kept, nothing replaced (the same `id` again does nothing: a module evaluated twice, or another copy of the package). `meta`: `type`, `registered` (the id kept), `asked` (the id refused).",
|
|
177
|
+
fix: "Register each storage type once, from one package: import the entry that registers it from a single copy, or give the other kind a type of its own.",
|
|
178
|
+
docs: `${o}/guide/development/implementing-a-store#register-a-storage-kind`
|
|
201
179
|
}
|
|
202
180
|
},
|
|
203
181
|
ELEMENT_NOT_FOUND: {
|
|
@@ -488,47 +466,20 @@ var o = "https://dialecte.github.io/core", s = {
|
|
|
488
466
|
docs: `${o}/api/project#blobs`
|
|
489
467
|
}
|
|
490
468
|
},
|
|
491
|
-
PROJECT_LAYOUT_OUTDATED: {
|
|
492
|
-
code: "D7005",
|
|
493
|
-
message: "Project stored by another version of the library",
|
|
494
|
-
explanation: {
|
|
495
|
-
when: "The project file was stored by another version of the library (another layout); nothing was written to it.",
|
|
496
|
-
fix: "Delete the project and import its files again with this version.",
|
|
497
|
-
docs: `${o}/api/project#store-errors`
|
|
498
|
-
}
|
|
499
|
-
},
|
|
500
|
-
PROJECT_ENGINE_UNAVAILABLE: {
|
|
501
|
-
code: "D7006",
|
|
502
|
-
message: "No view can start the project engine",
|
|
503
|
-
explanation: {
|
|
504
|
-
when: "The project's engine could not be started or reached: its worker failed to load or never answered its open within the open budget; through the origin's hub, no open view offers an engine for the project's dialecte, or the engine never said it opened; a destroy still running past the open budget, or one asked by a page suspended before the hub granted it.",
|
|
505
|
-
fix: "Keep one tab of the app open and reload; check the dialecte's `engineUrl` points at its worker and that it loads (the console names a script that fails); a destroy refused so is asked again once the project is closed elsewhere.",
|
|
506
|
-
docs: `${o}/api/project#store-errors`
|
|
507
|
-
}
|
|
508
|
-
},
|
|
509
|
-
PROJECT_ENGINE_BUSY: {
|
|
510
|
-
code: "D7007",
|
|
511
|
-
message: "The project is still held by another engine",
|
|
512
|
-
explanation: {
|
|
513
|
-
when: "Another engine still holds the project (another tab or a worker that did not stop).",
|
|
514
|
-
fix: "Close the other tabs of the app, then open the project again.",
|
|
515
|
-
docs: `${o}/api/project#store-errors`
|
|
516
|
-
}
|
|
517
|
-
},
|
|
518
469
|
PROJECT_DIALECTE_MISMATCH: {
|
|
519
470
|
code: "D7008",
|
|
520
|
-
message: "The project's
|
|
471
|
+
message: "The project's data is of another dialecte",
|
|
521
472
|
explanation: {
|
|
522
|
-
when: "A project
|
|
523
|
-
fix: "Open the project with the dialecte it was created with;
|
|
473
|
+
when: "A project stored by another dialecte was opened (nothing of it written), or what serves the store (a worker, a server) was asked for a project of a dialecte it does not serve. Two dialectes' projects of one name are two projects: opening one never meets the other. `meta`: `project`, `realmDialecteId` (the one asked), and `projectDialecteId` (the project's), or the dialectes served, as the store's docs name them.",
|
|
474
|
+
fix: "Open the project with the dialecte it was created with; serve every dialecte the app opens projects of, as the store's docs say.",
|
|
524
475
|
docs: `${o}/api/project#store-errors`
|
|
525
476
|
}
|
|
526
477
|
},
|
|
527
478
|
PROJECT_DIALECTE_VERSION_MISMATCH: {
|
|
528
479
|
code: "D7009",
|
|
529
|
-
message: "The project
|
|
480
|
+
message: "The project's store runs another version of the dialecte",
|
|
530
481
|
explanation: {
|
|
531
|
-
when: "
|
|
482
|
+
when: "What serves the project's store (a worker, a server) runs another version of the dialecte than this view: another tab's, or one this page runs already for the project (a page runs one version of each dialecte).",
|
|
532
483
|
fix: "Reload every tab of the app so they run the same version.",
|
|
533
484
|
docs: `${o}/api/project#store-errors`
|
|
534
485
|
}
|
|
@@ -537,7 +488,7 @@ var o = "https://dialecte.github.io/core", s = {
|
|
|
537
488
|
code: "D7010",
|
|
538
489
|
message: "The project could not be deleted",
|
|
539
490
|
explanation: {
|
|
540
|
-
when: "Destroying a project left its
|
|
491
|
+
when: "Destroying a project left its data in place: another tab, window or connection still holds it.",
|
|
541
492
|
fix: "Close the other tabs or windows of the app that have the project open, then destroy it again.",
|
|
542
493
|
docs: `${o}/api/project#lifecycle`
|
|
543
494
|
}
|
|
@@ -551,20 +502,11 @@ var o = "https://dialecte.github.io/core", s = {
|
|
|
551
502
|
docs: `${o}/api/project#lifecycle`
|
|
552
503
|
}
|
|
553
504
|
},
|
|
554
|
-
PROJECT_DATABASE_LOST: {
|
|
555
|
-
code: "D7012",
|
|
556
|
-
message: "The project's database is gone",
|
|
557
|
-
explanation: {
|
|
558
|
-
when: "The project's files hold data but none of them is its database any more: the database file's header was damaged (by the disk, another program, or site data changed outside the app). Nothing is opened or changed: no empty database is made in its place. `meta.project` names the project.",
|
|
559
|
-
fix: "The project's data cannot be read back. Offer the user a reset, never automatically: `destroy()` on the same Project instance whose `open` was refused (keep it: `const project = new Project(params)`, then `await project.open(name)`) removes what the refused store holds, without opening it; `open(name)` then makes it again, empty, and its documents can be imported again.",
|
|
560
|
-
docs: `${o}/api/project#lifecycle`
|
|
561
|
-
}
|
|
562
|
-
},
|
|
563
505
|
PROJECT_DESTROYED_WHILE_AWAY: {
|
|
564
506
|
code: "D7013",
|
|
565
507
|
message: "The project was deleted while this view was away",
|
|
566
508
|
explanation: {
|
|
567
|
-
when: "A view's connection to a project came back - the page back from a freeze or the back/forward cache, its
|
|
509
|
+
when: "A view's connection to a project came back - the page back from a freeze or the back/forward cache, what serves its store started again - and the project it had open was destroyed meanwhile by another tab (and maybe made again under its name): nothing is opened in its place and nothing of it is read. `meta.project` names the project.",
|
|
568
510
|
fix: "Tell the user the project was deleted elsewhere; close it in this view (`project.close()`), then open it again by its name for what is there now, or choose another.",
|
|
569
511
|
docs: `${o}/api/project#lifecycle`
|
|
570
512
|
}
|
|
@@ -573,27 +515,18 @@ var o = "https://dialecte.github.io/core", s = {
|
|
|
573
515
|
code: "D7014",
|
|
574
516
|
message: "The project's name cannot name its files",
|
|
575
517
|
explanation: {
|
|
576
|
-
when: "A project's name or its dialecte's id is empty, `.` or `..`: every store refuses it before it is built (a
|
|
518
|
+
when: "A project's name or its dialecte's id is empty, `.` or `..`: every store refuses it before it is built (a store may name its files after both, which no file can be); nothing was opened or written. `meta.project` and `meta.dialecteId` say which.",
|
|
577
519
|
fix: "Give the project a name of its own (and the dialecte an id) other than an empty one, `.` or `..`.",
|
|
578
520
|
docs: `${o}/api/project#lifecycle`
|
|
579
521
|
}
|
|
580
522
|
},
|
|
581
|
-
|
|
582
|
-
code: "
|
|
583
|
-
message: "
|
|
584
|
-
explanation: {
|
|
585
|
-
when: "A project was opened on `storage: { type: 'sqlite' }` but made by no dialecte's project factory: its engine (the dialecte's id, its version and its engine worker's URL) is known to no one, so nothing can start it. Nothing was opened.",
|
|
586
|
-
fix: "Make the project with the dialecte's project factory (`createProjectFactory({ dialecte, engineUrl })`, as a dialecte package exports it), or open it on another storage.",
|
|
587
|
-
docs: `${o}/api/project#sqlite-storage`
|
|
588
|
-
}
|
|
589
|
-
},
|
|
590
|
-
PROJECT_SQLITE_NOT_IMPORTED: {
|
|
591
|
-
code: "D7016",
|
|
592
|
-
message: "SQLite storage needs `import '@dialecte/core/sqlite'`",
|
|
523
|
+
PROJECT_STORAGE_NOT_REGISTERED: {
|
|
524
|
+
code: "D7018",
|
|
525
|
+
message: "The project's storage type is not registered",
|
|
593
526
|
explanation: {
|
|
594
|
-
when: "A project was opened (or destroyed by name)
|
|
595
|
-
fix: "
|
|
596
|
-
docs: `${o}/
|
|
527
|
+
when: "A project was opened (or destroyed by name), or a test asked for a test store, on a `storage.type` no kind is registered for in this realm: core serves `local`, `inMemory` and `custom` itself, every other type comes from the entry that registers it (`registerStorageKind`). Nothing was opened. `meta`: `project`, `type`.",
|
|
528
|
+
fix: "Import the entry that registers the type once in the app's entry (for tests, in the test runner's setup file), before the first project opens on it; or open the project on another storage. Imported already? A kind is shared by every copy of @dialecte/core of the same storage version in the realm: one registered by a copy of another version (a package bringing its own core) is not seen - align the core versions.",
|
|
529
|
+
docs: `${o}/guide/development/implementing-a-store#register-a-storage-kind`
|
|
597
530
|
}
|
|
598
531
|
},
|
|
599
532
|
DOCUMENT_PATH_INVALID: {
|
|
@@ -615,13 +548,14 @@ var o = "https://dialecte.github.io/core", s = {
|
|
|
615
548
|
}
|
|
616
549
|
}
|
|
617
550
|
};
|
|
618
|
-
|
|
619
|
-
throw l(e, t);
|
|
620
|
-
}
|
|
551
|
+
new Set(Object.values(c).map((e) => e.code));
|
|
621
552
|
function l(e, t) {
|
|
553
|
+
throw u(e, t);
|
|
554
|
+
}
|
|
555
|
+
function u(e, t) {
|
|
622
556
|
let n = typeof e == "string" ? {
|
|
623
557
|
key: e,
|
|
624
|
-
...
|
|
558
|
+
...c[e]
|
|
625
559
|
} : e, r = {
|
|
626
560
|
code: n.code,
|
|
627
561
|
key: n.key,
|
|
@@ -634,13 +568,6 @@ function l(e, t) {
|
|
|
634
568
|
}, i = Error(t.detail);
|
|
635
569
|
return i.cause = r, i;
|
|
636
570
|
}
|
|
637
|
-
new Set(Object.values(s).map((e) => e.code));
|
|
638
|
-
var u = /* @__PURE__ */ new Set([
|
|
639
|
-
"throwDialecteError",
|
|
640
|
-
"createDialecteError",
|
|
641
|
-
"invariant",
|
|
642
|
-
"reportFailure"
|
|
643
|
-
]);
|
|
644
571
|
function d(e) {
|
|
645
572
|
if (!e) return "unknown";
|
|
646
573
|
let t = e.split("\n").slice(1).map((e) => e.match(/\bat\s+(?:async\s+)?(\S+)(?:\s+\[as\s+[^\]]+\])?\s+\(([^)]+)\)/)).find((e) => !f(e?.[1])), n = t?.[1]?.replace(/^Object\./, ""), r = t?.[2];
|
|
@@ -649,7 +576,7 @@ function d(e) {
|
|
|
649
576
|
return i ? `${i[1].replace(/\.[^/.]+$/, "")}::${n}` : n;
|
|
650
577
|
}
|
|
651
578
|
function f(e) {
|
|
652
|
-
return e ?
|
|
579
|
+
return e ? s.has(e.slice(e.lastIndexOf(".") + 1)) : !1;
|
|
653
580
|
}
|
|
654
581
|
`${{
|
|
655
582
|
uri: "http://dialecte.dev/XML/DEV",
|
|
@@ -663,7 +590,7 @@ var p = {
|
|
|
663
590
|
function m(e, t) {
|
|
664
591
|
if (e) return;
|
|
665
592
|
let { detail: n, key: r = "ASSERTION_FAILED", ref: i, meta: a } = t;
|
|
666
|
-
|
|
593
|
+
l(r, {
|
|
667
594
|
detail: n,
|
|
668
595
|
ref: i,
|
|
669
596
|
meta: a
|
|
@@ -693,5 +620,8 @@ function x() {
|
|
|
693
620
|
function S() {
|
|
694
621
|
return m(h, { detail: "getPwa: shell context not set. Call setShellContext(api) before app.mount()." }), m(h.pwa, { detail: "getPwa: no PWA surface provided by the shell." }), h.pwa;
|
|
695
622
|
}
|
|
623
|
+
function C() {
|
|
624
|
+
return h?.projectStorage ?? { type: "local" };
|
|
625
|
+
}
|
|
696
626
|
//#endregion
|
|
697
|
-
export { t as LIBRARY_DB_PREFIX, i as RESERVED_DB_PREFIXES, e as SHELL_DB_PREFIX, n as TEMP_DOCUMENT_PREFIX, r as TEMP_PROJECT_PREFIX, _ as clearShellContext, y as getActiveDocumentId, b as getCommands, v as getProject, S as getPwa, x as getStorageSources, a as isReservedDatabaseName, g as setShellContext };
|
|
627
|
+
export { t as LIBRARY_DB_PREFIX, i as RESERVED_DB_PREFIXES, e as SHELL_DB_PREFIX, n as TEMP_DOCUMENT_PREFIX, r as TEMP_PROJECT_PREFIX, _ as clearShellContext, y as getActiveDocumentId, b as getCommands, v as getProject, C as getProjectStorage, S as getPwa, x as getStorageSources, a as isReservedDatabaseName, g as setShellContext };
|
package/dist/shell-context.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Scl } from '@dialecte/scl/v2019C1';
|
|
2
2
|
import { Observable, ShellCommands } from './types/api';
|
|
3
|
+
import { ProjectStorage } from './types/project-storage';
|
|
3
4
|
import { PwaInstall } from './types/pwa-install';
|
|
4
5
|
import { StorageSources } from './types/storage-source';
|
|
5
6
|
interface ShellContext {
|
|
@@ -8,6 +9,7 @@ interface ShellContext {
|
|
|
8
9
|
commands: ShellCommands;
|
|
9
10
|
storageSources?: StorageSources;
|
|
10
11
|
pwa?: PwaInstall;
|
|
12
|
+
projectStorage?: ProjectStorage;
|
|
11
13
|
}
|
|
12
14
|
export declare function setShellContext(ctx: ShellContext): void;
|
|
13
15
|
export declare function clearShellContext(): void;
|
|
@@ -16,4 +18,5 @@ export declare function getActiveDocumentId(): Observable<string>;
|
|
|
16
18
|
export declare function getCommands(): ShellCommands;
|
|
17
19
|
export declare function getStorageSources(): StorageSources;
|
|
18
20
|
export declare function getPwa(): PwaInstall;
|
|
21
|
+
export declare function getProjectStorage(): ProjectStorage;
|
|
19
22
|
export {};
|
package/dist/types/api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Scl } from '@dialecte/scl/v2019C1';
|
|
2
|
+
import { ProjectStorage } from './project-storage';
|
|
2
3
|
import { PwaInstall } from './pwa-install';
|
|
3
4
|
import { StorageSources } from './storage-source';
|
|
4
5
|
export interface ShellCommands {
|
|
@@ -17,4 +18,5 @@ export interface ExtensionAPI {
|
|
|
17
18
|
commands: ShellCommands;
|
|
18
19
|
storageSources?: StorageSources;
|
|
19
20
|
pwa?: PwaInstall;
|
|
21
|
+
projectStorage?: ProjectStorage;
|
|
20
22
|
}
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@septkit/shell-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@dialecte/core": "0.
|
|
17
|
-
"@dialecte/scl": "0.
|
|
16
|
+
"@dialecte/core": "0.9.0",
|
|
17
|
+
"@dialecte/scl": "0.14.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"oxlint": "~1.6.0",
|