@valbuild/shared 0.150.8 → 0.150.11
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/CHANGELOG.md +30 -0
- package/client/dist/valbuild-shared-client.cjs.dev.js +16 -2
- package/client/dist/valbuild-shared-client.cjs.prod.js +16 -2
- package/client/dist/valbuild-shared-client.esm.js +2 -2
- package/dist/{acquireTypes-dd976839.cjs.prod.js → acquireTypes-6250a305.cjs.prod.js} +46 -46
- package/dist/{acquireTypes-6e2f7961.esm.js → acquireTypes-c2227b23.esm.js} +2 -2
- package/dist/{acquireTypes-84a4077a.cjs.dev.js → acquireTypes-c9e757a1.cjs.dev.js} +46 -46
- package/dist/{slicedToArray-22567815.esm.js → createForOfIteratorHelper-9b80f1a2.esm.js} +136 -106
- package/dist/{slicedToArray-d99b4e2e.cjs.prod.js → createForOfIteratorHelper-9ca2078d.cjs.prod.js} +142 -111
- package/dist/{slicedToArray-c8a29f6b.cjs.dev.js → createForOfIteratorHelper-f2d7ac6d.cjs.dev.js} +142 -111
- package/dist/declarations/src/client/index.d.ts +2 -0
- package/dist/declarations/src/internal/ApiRoutes.d.ts +23 -0
- package/dist/declarations/src/internal/index.d.ts +2 -0
- package/dist/declarations/src/internal/pageInspection.d.ts +117 -0
- package/dist/declarations/src/internal/quickPreview.d.ts +91 -0
- package/dist/declarations/src/internal/valCanvasProtocol.d.ts +53 -0
- package/dist/declarations/src/publish/buildProposal.d.ts +16 -1
- package/dist/declarations/src/publish/buildQuickPreview.d.ts +46 -0
- package/dist/declarations/src/publish/index.d.ts +3 -2
- package/dist/declarations/src/publish/runStudioDeploy.d.ts +10 -0
- package/dist/getSitemapTree-5354ce90.cjs.prod.js +1421 -0
- package/dist/getSitemapTree-97b3166f.esm.js +1381 -0
- package/dist/getSitemapTree-d934ff9c.cjs.dev.js +1421 -0
- package/dist/{proposalProject-689c24cc.esm.js → proposalProject-5da177d5.esm.js} +1 -2
- package/dist/{proposalProject-926f2c68.cjs.dev.js → proposalProject-76caa377.cjs.prod.js} +2 -3
- package/dist/{proposalProject-fab0c026.cjs.prod.js → proposalProject-81fee08f.cjs.dev.js} +2 -3
- package/dist/{protocol-7ddc1a71.esm.js → protocol-55cfa3cf.esm.js} +1 -1
- package/dist/{protocol-4e2a455b.cjs.prod.js → protocol-b1055ef0.cjs.prod.js} +6 -6
- package/dist/{protocol-ac1c3ec7.cjs.dev.js → protocol-d0efb8cd.cjs.dev.js} +6 -6
- package/dist/wrapNativeSuper-639b12b7.esm.js +107 -0
- package/dist/wrapNativeSuper-8673414f.cjs.prod.js +113 -0
- package/dist/wrapNativeSuper-933f991e.cjs.dev.js +113 -0
- package/internal/dist/valbuild-shared-internal.cjs.dev.js +72 -34
- package/internal/dist/valbuild-shared-internal.cjs.prod.js +72 -34
- package/internal/dist/valbuild-shared-internal.esm.js +30 -7
- package/package.json +2 -2
- package/publish/dist/valbuild-shared-publish.cjs.dev.js +589 -237
- package/publish/dist/valbuild-shared-publish.cjs.prod.js +589 -237
- package/publish/dist/valbuild-shared-publish.esm.js +504 -155
- package/typecheck/dist/valbuild-shared-typecheck.cjs.dev.js +34 -34
- package/typecheck/dist/valbuild-shared-typecheck.cjs.prod.js +34 -34
- package/typecheck/dist/valbuild-shared-typecheck.esm.js +5 -5
- package/typecheck/testing/dist/valbuild-shared-typecheck-testing.cjs.dev.js +7 -7
- package/typecheck/testing/dist/valbuild-shared-typecheck-testing.cjs.prod.js +7 -7
- package/typecheck/testing/dist/valbuild-shared-typecheck-testing.esm.js +3 -3
- package/dist/createForOfIteratorHelper-666a6d17.esm.js +0 -137
- package/dist/createForOfIteratorHelper-87a33eff.cjs.dev.js +0 -145
- package/dist/createForOfIteratorHelper-fef4fa7d.cjs.prod.js +0 -145
- package/dist/getSitemapTree-873f7266.cjs.prod.js +0 -743
- package/dist/getSitemapTree-b6161fd8.esm.js +0 -717
- package/dist/getSitemapTree-be70d9fc.cjs.dev.js +0 -743
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @valbuild/shared
|
|
2
2
|
|
|
3
|
+
## 0.150.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#976](https://github.com/valbuild/val/pull/976) [`9abd5ef`](https://github.com/valbuild/val/commit/9abd5efea0c1adc7e7ff2d05b2ea38b76af73b38) Thanks [@freekh](https://github.com/freekh)! - Images the assistant adds now show up in remote storage, which is where every image in a hosted project lives: in a remote gallery (`s.imagedir(...).remote()`), in a remote image field (`s.image().remote()`) and inline in rich text whose images are remote. They used to be saved under a plain `/public/...` path while their bytes were stored as a remote file, so the Studio looked for a local file that did not exist and showed a broken image, and a published site would have named a file nothing serves. They are now saved under a remote ref, the same as an image uploaded with the Studio's own Upload button.
|
|
8
|
+
|
|
9
|
+
The image is still moved from the chat to the change rather than copied: the content service points the change at the image it already holds, and nothing is downloaded or uploaded again. The content service now says what the image's bytes hash to, which is what a remote ref is named by; against one that does not yet, the Studio downloads the image once to hash it.
|
|
10
|
+
|
|
11
|
+
The assistant can also now put an image into an empty rich text by writing the whole value; that used to be refused.
|
|
12
|
+
|
|
13
|
+
- [#974](https://github.com/valbuild/val/pull/974) [`9c6bc8d`](https://github.com/valbuild/val/commit/9c6bc8d25f40427a6fb9eec6ff5506996b718a78) Thanks [@freekh](https://github.com/freekh)! - The design tab no longer makes you wait.
|
|
14
|
+
|
|
15
|
+
- **Quick preview.** A change to components, layout or styles is shown in seconds, without a build: the proposal's browser code is bundled in the tab and the page in the preview runs it. What runs on the server (loaders, server functions, the page's first render) stays the last build's, and the tab says so, with a button to build. The assistant has it too (`quick_preview`).
|
|
16
|
+
- **Cancel and Try again.** A build can be cancelled from the tab, and a build that stops making progress for three minutes is stopped, saying at which step, so it never spins until a reload. The assistant waits for a build with `wait` instead of holding its turn, and has `build_status` and `cancel_build`.
|
|
17
|
+
- **Each step of a build is timed**, and the Build check lists where the time went.
|
|
18
|
+
- **A new build fades in where you were**, at the same page and scroll, instead of the preview going blank and starting over at the top.
|
|
19
|
+
- **`read_page`** lets the assistant check its change on the page: the headings, text, links, images and inputs in order, and one element's computed styles and how many lines it wraps to, at desktop, tablet or phone width.
|
|
20
|
+
- **On a phone**, the design tab shows the preview, the assistant and the changes one at a time, as tabs. Picking is Select, then a tap, and a pick takes you to the assistant with it. On Safari and on an iPhone, where the tab cannot bundle code itself, the quick preview is prepared in a builder tab, as a build already is.
|
|
21
|
+
- **Queue messages in the assistant's chat.** Write while it answers: what you write waits and is sent when the answer is done, one at a time. A queued message can be taken back to edit, moved up or removed, and Stop or a failed answer holds the queue until you go on.
|
|
22
|
+
|
|
23
|
+
The quick preview and `read_page` run in the proposal's own page, through the canvas bridge in `@valbuild/next` and `@valbuild/tanstack`, so a site needs those packages at this version for them. The quick preview is served by a service worker on the proposal's address (`/api/val/quick-preview-sw.js`), which takes code only from the site's own design tab.
|
|
24
|
+
|
|
25
|
+
## 0.150.10
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- [#970](https://github.com/valbuild/val/pull/970) [`bc39500`](https://github.com/valbuild/val/commit/bc395000866ae9cbde8825f53d1bb606e1093c94) Thanks [@freekh](https://github.com/freekh)! - A proposal's shared AI chat now shows other people's turns live: their question appears as they send it, each tool the turn runs shows as a step, and the answer streams in as it is written, instead of turning up a few seconds later. Who is asking is what the content server says rather than a guess. Against a content server that does not relay chats yet, the Studio falls back to reading the chat again every few seconds, as before.
|
|
30
|
+
|
|
31
|
+
An answer's tool steps are now also shown when a chat is opened again or the page is reloaded, for every chat on a content server that keeps them.
|
|
32
|
+
|
|
3
33
|
## 0.150.8
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var getSitemapTree = require('../../dist/getSitemapTree-
|
|
6
|
-
require('../../dist/createForOfIteratorHelper-
|
|
5
|
+
var getSitemapTree = require('../../dist/getSitemapTree-d934ff9c.cjs.dev.js');
|
|
6
|
+
require('../../dist/createForOfIteratorHelper-f2d7ac6d.cjs.dev.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
exports.DEFAULT_CANVAS_SELECTION = getSitemapTree.DEFAULT_CANVAS_SELECTION;
|
|
12
12
|
exports.DEFAULT_CANVAS_SELECTION_SOFT = getSitemapTree.DEFAULT_CANVAS_SELECTION_SOFT;
|
|
13
|
+
exports.QUICK_PREVIEW_PARAM = getSitemapTree.QUICK_PREVIEW_PARAM;
|
|
14
|
+
exports.QUICK_PREVIEW_SERVICE_WORKER_PATH = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_PATH;
|
|
15
|
+
exports.QUICK_PREVIEW_SERVICE_WORKER_SOURCE = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_SOURCE;
|
|
16
|
+
exports.QUICK_PREVIEW_STORE_MESSAGE = getSitemapTree.QUICK_PREVIEW_STORE_MESSAGE;
|
|
13
17
|
exports.VAL_AI_SESSION_STORAGE_KEY = getSitemapTree.VAL_AI_SESSION_STORAGE_KEY;
|
|
14
18
|
exports.VAL_CANVAS_MESSAGE = getSitemapTree.VAL_CANVAS_MESSAGE;
|
|
15
19
|
exports.VAL_CANVAS_PARAM = getSitemapTree.VAL_CANVAS_PARAM;
|
|
@@ -19,17 +23,27 @@ exports.attachElementPicker = getSitemapTree.attachElementPicker;
|
|
|
19
23
|
exports.createPickerOverlay = getSitemapTree.createPickerOverlay;
|
|
20
24
|
exports.describeElement = getSitemapTree.describeElement;
|
|
21
25
|
exports.elementLabel = getSitemapTree.elementLabel;
|
|
26
|
+
exports.findBySelector = getSitemapTree.findBySelector;
|
|
22
27
|
exports.formatRoutePattern = getSitemapTree.formatRoutePattern;
|
|
23
28
|
exports.getNextAppRouterSourceFolder = getSitemapTree.getNextAppRouterSourceFolder;
|
|
24
29
|
exports.getPageRouterSitemapTree = getSitemapTree.getPageRouterSitemapTree;
|
|
25
30
|
exports.getPageRouterSourceFolder = getSitemapTree.getPageRouterSourceFolder;
|
|
26
31
|
exports.getPatternFromModuleFilePath = getSitemapTree.getPatternFromModuleFilePath;
|
|
27
32
|
exports.getTanStackRouterSourceFolder = getSitemapTree.getTanStackRouterSourceFolder;
|
|
33
|
+
exports.isDesignTabOrigin = getSitemapTree.isDesignTabOrigin;
|
|
34
|
+
exports.isQuickPreviewFiles = getSitemapTree.isQuickPreviewFiles;
|
|
28
35
|
exports.isTanStackRoutesFolder = getSitemapTree.isTanStackRoutesFolder;
|
|
29
36
|
exports.isValCanvasFrame = getSitemapTree.isValCanvasFrame;
|
|
30
37
|
exports.isValCanvasPageMessage = getSitemapTree.isValCanvasPageMessage;
|
|
31
38
|
exports.isValCanvasStudioMessage = getSitemapTree.isValCanvasStudioMessage;
|
|
32
39
|
exports.modifierLabel = getSitemapTree.modifierLabel;
|
|
40
|
+
exports.pageLocationOf = getSitemapTree.pageLocationOf;
|
|
33
41
|
exports.parseRoutePattern = getSitemapTree.parseRoutePattern;
|
|
42
|
+
exports.quickPreviewSiteOrigin = getSitemapTree.quickPreviewSiteOrigin;
|
|
43
|
+
exports.readPageSnapshot = getSitemapTree.readPageSnapshot;
|
|
44
|
+
exports.restoreScroll = getSitemapTree.restoreScroll;
|
|
34
45
|
exports.startElementPicking = getSitemapTree.startElementPicking;
|
|
46
|
+
exports.storeQuickPreview = getSitemapTree.storeQuickPreview;
|
|
47
|
+
exports.watchPageLocation = getSitemapTree.watchPageLocation;
|
|
48
|
+
exports.withQuickPreviewParam = getSitemapTree.withQuickPreviewParam;
|
|
35
49
|
exports.withValCanvasParam = getSitemapTree.withValCanvasParam;
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var getSitemapTree = require('../../dist/getSitemapTree-
|
|
6
|
-
require('../../dist/createForOfIteratorHelper-
|
|
5
|
+
var getSitemapTree = require('../../dist/getSitemapTree-5354ce90.cjs.prod.js');
|
|
6
|
+
require('../../dist/createForOfIteratorHelper-9ca2078d.cjs.prod.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
exports.DEFAULT_CANVAS_SELECTION = getSitemapTree.DEFAULT_CANVAS_SELECTION;
|
|
12
12
|
exports.DEFAULT_CANVAS_SELECTION_SOFT = getSitemapTree.DEFAULT_CANVAS_SELECTION_SOFT;
|
|
13
|
+
exports.QUICK_PREVIEW_PARAM = getSitemapTree.QUICK_PREVIEW_PARAM;
|
|
14
|
+
exports.QUICK_PREVIEW_SERVICE_WORKER_PATH = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_PATH;
|
|
15
|
+
exports.QUICK_PREVIEW_SERVICE_WORKER_SOURCE = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_SOURCE;
|
|
16
|
+
exports.QUICK_PREVIEW_STORE_MESSAGE = getSitemapTree.QUICK_PREVIEW_STORE_MESSAGE;
|
|
13
17
|
exports.VAL_AI_SESSION_STORAGE_KEY = getSitemapTree.VAL_AI_SESSION_STORAGE_KEY;
|
|
14
18
|
exports.VAL_CANVAS_MESSAGE = getSitemapTree.VAL_CANVAS_MESSAGE;
|
|
15
19
|
exports.VAL_CANVAS_PARAM = getSitemapTree.VAL_CANVAS_PARAM;
|
|
@@ -19,17 +23,27 @@ exports.attachElementPicker = getSitemapTree.attachElementPicker;
|
|
|
19
23
|
exports.createPickerOverlay = getSitemapTree.createPickerOverlay;
|
|
20
24
|
exports.describeElement = getSitemapTree.describeElement;
|
|
21
25
|
exports.elementLabel = getSitemapTree.elementLabel;
|
|
26
|
+
exports.findBySelector = getSitemapTree.findBySelector;
|
|
22
27
|
exports.formatRoutePattern = getSitemapTree.formatRoutePattern;
|
|
23
28
|
exports.getNextAppRouterSourceFolder = getSitemapTree.getNextAppRouterSourceFolder;
|
|
24
29
|
exports.getPageRouterSitemapTree = getSitemapTree.getPageRouterSitemapTree;
|
|
25
30
|
exports.getPageRouterSourceFolder = getSitemapTree.getPageRouterSourceFolder;
|
|
26
31
|
exports.getPatternFromModuleFilePath = getSitemapTree.getPatternFromModuleFilePath;
|
|
27
32
|
exports.getTanStackRouterSourceFolder = getSitemapTree.getTanStackRouterSourceFolder;
|
|
33
|
+
exports.isDesignTabOrigin = getSitemapTree.isDesignTabOrigin;
|
|
34
|
+
exports.isQuickPreviewFiles = getSitemapTree.isQuickPreviewFiles;
|
|
28
35
|
exports.isTanStackRoutesFolder = getSitemapTree.isTanStackRoutesFolder;
|
|
29
36
|
exports.isValCanvasFrame = getSitemapTree.isValCanvasFrame;
|
|
30
37
|
exports.isValCanvasPageMessage = getSitemapTree.isValCanvasPageMessage;
|
|
31
38
|
exports.isValCanvasStudioMessage = getSitemapTree.isValCanvasStudioMessage;
|
|
32
39
|
exports.modifierLabel = getSitemapTree.modifierLabel;
|
|
40
|
+
exports.pageLocationOf = getSitemapTree.pageLocationOf;
|
|
33
41
|
exports.parseRoutePattern = getSitemapTree.parseRoutePattern;
|
|
42
|
+
exports.quickPreviewSiteOrigin = getSitemapTree.quickPreviewSiteOrigin;
|
|
43
|
+
exports.readPageSnapshot = getSitemapTree.readPageSnapshot;
|
|
44
|
+
exports.restoreScroll = getSitemapTree.restoreScroll;
|
|
34
45
|
exports.startElementPicking = getSitemapTree.startElementPicking;
|
|
46
|
+
exports.storeQuickPreview = getSitemapTree.storeQuickPreview;
|
|
47
|
+
exports.watchPageLocation = getSitemapTree.watchPageLocation;
|
|
48
|
+
exports.withQuickPreviewParam = getSitemapTree.withQuickPreviewParam;
|
|
35
49
|
exports.withValCanvasParam = getSitemapTree.withValCanvasParam;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DEFAULT_CANVAS_SELECTION, e as DEFAULT_CANVAS_SELECTION_SOFT, b as VAL_AI_SESSION_STORAGE_KEY, d as VAL_CANVAS_MESSAGE, c as VAL_CANVAS_PARAM, V as VAL_CONFIG_SESSION_STORAGE_KEY, a as VAL_THEME_SESSION_STORAGE_KEY, j as attachElementPicker, k as createPickerOverlay, h as describeElement, l as elementLabel,
|
|
2
|
-
import '../../dist/createForOfIteratorHelper-
|
|
1
|
+
export { D as DEFAULT_CANVAS_SELECTION, e as DEFAULT_CANVAS_SELECTION_SOFT, Q as QUICK_PREVIEW_PARAM, t as QUICK_PREVIEW_SERVICE_WORKER_PATH, x as QUICK_PREVIEW_SERVICE_WORKER_SOURCE, u as QUICK_PREVIEW_STORE_MESSAGE, b as VAL_AI_SESSION_STORAGE_KEY, d as VAL_CANVAS_MESSAGE, c as VAL_CANVAS_PARAM, V as VAL_CONFIG_SESSION_STORAGE_KEY, a as VAL_THEME_SESSION_STORAGE_KEY, j as attachElementPicker, k as createPickerOverlay, h as describeElement, l as elementLabel, q as findBySelector, E as formatRoutePattern, F as getNextAppRouterSourceFolder, J as getPageRouterSitemapTree, H as getPageRouterSourceFolder, K as getPatternFromModuleFilePath, G as getTanStackRouterSourceFolder, B as isDesignTabOrigin, v as isQuickPreviewFiles, I as isTanStackRoutesFolder, g as isValCanvasFrame, i as isValCanvasPageMessage, f as isValCanvasStudioMessage, m as modifierLabel, p as pageLocationOf, C as parseRoutePattern, A as quickPreviewSiteOrigin, o as readPageSnapshot, r as restoreScroll, s as startElementPicking, y as storeQuickPreview, n as watchPageLocation, z as withQuickPreviewParam, w as withValCanvasParam } from '../../dist/getSitemapTree-97b3166f.esm.js';
|
|
2
|
+
import '../../dist/createForOfIteratorHelper-9b80f1a2.esm.js';
|
|
3
3
|
import '@valbuild/core';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var createForOfIteratorHelper = require('./createForOfIteratorHelper-9ca2078d.cjs.prod.js');
|
|
4
|
+
var wrapNativeSuper = require('./wrapNativeSuper-8673414f.cjs.prod.js');
|
|
5
5
|
var yaml = require('yaml');
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -20,12 +20,12 @@ var yaml = require('yaml');
|
|
|
20
20
|
/** A lockfile this cannot read: not YAML, or not pnpm's version 9 shape. */
|
|
21
21
|
var LockfileError = /*#__PURE__*/function (_Error) {
|
|
22
22
|
function LockfileError() {
|
|
23
|
-
|
|
24
|
-
return
|
|
23
|
+
wrapNativeSuper._classCallCheck(this, LockfileError);
|
|
24
|
+
return wrapNativeSuper._callSuper(this, LockfileError, arguments);
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
}(/*#__PURE__*/
|
|
26
|
+
wrapNativeSuper._inherits(LockfileError, _Error);
|
|
27
|
+
return wrapNativeSuper._createClass(LockfileError);
|
|
28
|
+
}(/*#__PURE__*/wrapNativeSuper._wrapNativeSuper(Error));
|
|
29
29
|
function isRecord(value) {
|
|
30
30
|
return createForOfIteratorHelper._typeof(value) === "object" && value !== null && !Array.isArray(value);
|
|
31
31
|
}
|
|
@@ -58,7 +58,7 @@ function referenceMap(value, where) {
|
|
|
58
58
|
throw new LockfileError("".concat(where, " is not a map of dependencies."));
|
|
59
59
|
}
|
|
60
60
|
for (var _i = 0, _Object$entries = Object.entries(value); _i < _Object$entries.length; _i++) {
|
|
61
|
-
var _Object$entries$_i =
|
|
61
|
+
var _Object$entries$_i = createForOfIteratorHelper._slicedToArray(_Object$entries[_i], 2),
|
|
62
62
|
alias = _Object$entries$_i[0],
|
|
63
63
|
entry = _Object$entries$_i[1];
|
|
64
64
|
var version = isRecord(entry) ? textOf(entry["version"]) : textOf(entry);
|
|
@@ -107,7 +107,7 @@ function parsePnpmLockfile(text) {
|
|
|
107
107
|
throw new LockfileError("pnpm-lock.yaml's importers is not a map.");
|
|
108
108
|
}
|
|
109
109
|
for (var _i2 = 0, _Object$entries2 = Object.entries(rawImporters); _i2 < _Object$entries2.length; _i2++) {
|
|
110
|
-
var _Object$entries2$_i =
|
|
110
|
+
var _Object$entries2$_i = createForOfIteratorHelper._slicedToArray(_Object$entries2[_i2], 2),
|
|
111
111
|
id = _Object$entries2$_i[0],
|
|
112
112
|
raw = _Object$entries2$_i[1];
|
|
113
113
|
var importer = isRecord(raw) ? raw : {};
|
|
@@ -122,7 +122,7 @@ function parsePnpmLockfile(text) {
|
|
|
122
122
|
var rawPackages = lockfile["packages"];
|
|
123
123
|
if (isRecord(rawPackages)) {
|
|
124
124
|
for (var _i3 = 0, _Object$entries3 = Object.entries(rawPackages); _i3 < _Object$entries3.length; _i3++) {
|
|
125
|
-
var _Object$entries3$_i =
|
|
125
|
+
var _Object$entries3$_i = createForOfIteratorHelper._slicedToArray(_Object$entries3[_i3], 2),
|
|
126
126
|
key = _Object$entries3$_i[0],
|
|
127
127
|
_raw = _Object$entries3$_i[1];
|
|
128
128
|
var info = isRecord(_raw) ? _raw : {};
|
|
@@ -141,7 +141,7 @@ function parsePnpmLockfile(text) {
|
|
|
141
141
|
var rawSnapshots = lockfile["snapshots"];
|
|
142
142
|
if (isRecord(rawSnapshots)) {
|
|
143
143
|
for (var _i4 = 0, _Object$entries4 = Object.entries(rawSnapshots); _i4 < _Object$entries4.length; _i4++) {
|
|
144
|
-
var _Object$entries4$_i =
|
|
144
|
+
var _Object$entries4$_i = createForOfIteratorHelper._slicedToArray(_Object$entries4[_i4], 2),
|
|
145
145
|
_key = _Object$entries4$_i[0],
|
|
146
146
|
_raw2 = _Object$entries4$_i[1];
|
|
147
147
|
var snapshot = isRecord(_raw2) ? _raw2 : {};
|
|
@@ -250,7 +250,7 @@ function sha256Hex(text) {
|
|
|
250
250
|
var s1 = rotr(w2, 17) ^ rotr(w2, 19) ^ w2 >>> 10;
|
|
251
251
|
w[_i] = w[_i - 16] + s0 + w[_i - 7] + s1 >>> 0;
|
|
252
252
|
}
|
|
253
|
-
var _h =
|
|
253
|
+
var _h = createForOfIteratorHelper._slicedToArray(h, 8),
|
|
254
254
|
a = _h[0],
|
|
255
255
|
b = _h[1],
|
|
256
256
|
c = _h[2],
|
|
@@ -618,7 +618,7 @@ function reachableSnapshots(lockfile, blocked) {
|
|
|
618
618
|
for (var _i2 = 0, _arr = [importer.dependencies, importer.devDependencies, importer.optionalDependencies]; _i2 < _arr.length; _i2++) {
|
|
619
619
|
var group = _arr[_i2];
|
|
620
620
|
for (var _i3 = 0, _Object$entries = Object.entries(group); _i3 < _Object$entries.length; _i3++) {
|
|
621
|
-
var _Object$entries$_i =
|
|
621
|
+
var _Object$entries$_i = createForOfIteratorHelper._slicedToArray(_Object$entries[_i3], 2),
|
|
622
622
|
alias = _Object$entries$_i[0],
|
|
623
623
|
reference = _Object$entries$_i[1];
|
|
624
624
|
visit(alias, reference);
|
|
@@ -630,7 +630,7 @@ function reachableSnapshots(lockfile, blocked) {
|
|
|
630
630
|
for (var _i4 = 0, _arr2 = [snapshot.dependencies, snapshot.optionalDependencies]; _i4 < _arr2.length; _i4++) {
|
|
631
631
|
var _group = _arr2[_i4];
|
|
632
632
|
for (var _i5 = 0, _Object$entries2 = Object.entries(_group); _i5 < _Object$entries2.length; _i5++) {
|
|
633
|
-
var _Object$entries2$_i =
|
|
633
|
+
var _Object$entries2$_i = createForOfIteratorHelper._slicedToArray(_Object$entries2[_i5], 2),
|
|
634
634
|
_alias = _Object$entries2$_i[0],
|
|
635
635
|
_reference = _Object$entries2$_i[1];
|
|
636
636
|
visit(_alias, _reference);
|
|
@@ -649,7 +649,7 @@ function reachableSnapshots(lockfile, blocked) {
|
|
|
649
649
|
function skippedSnapshots(lockfile, platform) {
|
|
650
650
|
var skipped = new Set();
|
|
651
651
|
for (var _i6 = 0, _Object$entries3 = Object.entries(lockfile.snapshots); _i6 < _Object$entries3.length; _i6++) {
|
|
652
|
-
var _Object$entries3$_i =
|
|
652
|
+
var _Object$entries3$_i = createForOfIteratorHelper._slicedToArray(_Object$entries3[_i6], 2),
|
|
653
653
|
key = _Object$entries3$_i[0],
|
|
654
654
|
snapshot = _Object$entries3$_i[1];
|
|
655
655
|
var info = lockfile.packages[packageKeyOf(key)];
|
|
@@ -742,7 +742,7 @@ function directDepsByImporter(lockfile) {
|
|
|
742
742
|
for (var _i8 = 0, _arr4 = [importer.dependencies, importer.devDependencies, importer.optionalDependencies]; _i8 < _arr4.length; _i8++) {
|
|
743
743
|
var group = _arr4[_i8];
|
|
744
744
|
for (var _i9 = 0, _Object$entries4 = Object.entries(group); _i9 < _Object$entries4.length; _i9++) {
|
|
745
|
-
var _Object$entries4$_i =
|
|
745
|
+
var _Object$entries4$_i = createForOfIteratorHelper._slicedToArray(_Object$entries4[_i9], 2),
|
|
746
746
|
alias = _Object$entries4$_i[0],
|
|
747
747
|
reference = _Object$entries4$_i[1];
|
|
748
748
|
var key = snapshotKeyOf(alias, reference);
|
|
@@ -800,7 +800,7 @@ function hoist(lockfile, graph, skipped, kindOf, workspacePackages) {
|
|
|
800
800
|
_step16;
|
|
801
801
|
try {
|
|
802
802
|
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
|
803
|
-
var _step16$value =
|
|
803
|
+
var _step16$value = createForOfIteratorHelper._slicedToArray(_step16.value, 2),
|
|
804
804
|
_alias3 = _step16$value[0],
|
|
805
805
|
key = _step16$value[1];
|
|
806
806
|
if (!merged.has(_alias3)) merged.set(_alias3, key);
|
|
@@ -924,7 +924,7 @@ function hoist(lockfile, graph, skipped, kindOf, workspacePackages) {
|
|
|
924
924
|
var hoistWorkspace = function hoistWorkspace() {
|
|
925
925
|
workspaceDone = true;
|
|
926
926
|
var candidates = createForOfIteratorHelper._toConsumableArray(workspacePackages).flatMap(function (_ref2) {
|
|
927
|
-
var _ref3 =
|
|
927
|
+
var _ref3 = createForOfIteratorHelper._slicedToArray(_ref2, 2),
|
|
928
928
|
name = _ref3[0],
|
|
929
929
|
dir = _ref3[1];
|
|
930
930
|
var kind = kindOf(name);
|
|
@@ -980,7 +980,7 @@ function hoist(lockfile, graph, skipped, kindOf, workspacePackages) {
|
|
|
980
980
|
_step15;
|
|
981
981
|
try {
|
|
982
982
|
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
|
983
|
-
var _step15$value =
|
|
983
|
+
var _step15$value = createForOfIteratorHelper._slicedToArray(_step15.value, 2),
|
|
984
984
|
alias = _step15$value[0],
|
|
985
985
|
child = _step15$value[1];
|
|
986
986
|
var kind = kindOf(alias);
|
|
@@ -1011,12 +1011,12 @@ function hoist(lockfile, graph, skipped, kindOf, workspacePackages) {
|
|
|
1011
1011
|
/** A setting in `pnpm-workspace.yaml` the layout cannot follow. */
|
|
1012
1012
|
var UnsupportedLayoutError = /*#__PURE__*/function (_Error) {
|
|
1013
1013
|
function UnsupportedLayoutError() {
|
|
1014
|
-
|
|
1015
|
-
return
|
|
1014
|
+
wrapNativeSuper._classCallCheck(this, UnsupportedLayoutError);
|
|
1015
|
+
return wrapNativeSuper._callSuper(this, UnsupportedLayoutError, arguments);
|
|
1016
1016
|
}
|
|
1017
|
-
|
|
1018
|
-
return
|
|
1019
|
-
}(/*#__PURE__*/
|
|
1017
|
+
wrapNativeSuper._inherits(UnsupportedLayoutError, _Error);
|
|
1018
|
+
return wrapNativeSuper._createClass(UnsupportedLayoutError);
|
|
1019
|
+
}(/*#__PURE__*/wrapNativeSuper._wrapNativeSuper(Error));
|
|
1020
1020
|
function isPatternList(value) {
|
|
1021
1021
|
return Array.isArray(value) && value.every(function (item) {
|
|
1022
1022
|
return typeof item === "string";
|
|
@@ -1100,7 +1100,7 @@ function computePnpmLayout(lockfile) {
|
|
|
1100
1100
|
if (target !== path) links.set(path, target);
|
|
1101
1101
|
};
|
|
1102
1102
|
for (var _i10 = 0, _Object$entries5 = Object.entries(lockfile.importers); _i10 < _Object$entries5.length; _i10++) {
|
|
1103
|
-
var _Object$entries5$_i =
|
|
1103
|
+
var _Object$entries5$_i = createForOfIteratorHelper._slicedToArray(_Object$entries5[_i10], 2),
|
|
1104
1104
|
id = _Object$entries5$_i[0],
|
|
1105
1105
|
importer = _Object$entries5$_i[1];
|
|
1106
1106
|
var dir = importerDir(id);
|
|
@@ -1108,7 +1108,7 @@ function computePnpmLayout(lockfile) {
|
|
|
1108
1108
|
for (var _i11 = 0, _arr6 = [importer.dependencies, importer.devDependencies, importer.optionalDependencies]; _i11 < _arr6.length; _i11++) {
|
|
1109
1109
|
var group = _arr6[_i11];
|
|
1110
1110
|
for (var _i12 = 0, _Object$entries6 = Object.entries(group); _i12 < _Object$entries6.length; _i12++) {
|
|
1111
|
-
var _Object$entries6$_i =
|
|
1111
|
+
var _Object$entries6$_i = createForOfIteratorHelper._slicedToArray(_Object$entries6[_i12], 2),
|
|
1112
1112
|
alias = _Object$entries6$_i[0],
|
|
1113
1113
|
reference = _Object$entries6$_i[1];
|
|
1114
1114
|
linkDependency("".concat(dir, "/node_modules"), alias, reference, dir);
|
|
@@ -1118,7 +1118,7 @@ function computePnpmLayout(lockfile) {
|
|
|
1118
1118
|
var graph = new Map();
|
|
1119
1119
|
for (var _i13 = 0, _Object$entries7 = Object.entries(lockfile.snapshots); _i13 < _Object$entries7.length; _i13++) {
|
|
1120
1120
|
var _info$integrity;
|
|
1121
|
-
var _Object$entries7$_i =
|
|
1121
|
+
var _Object$entries7$_i = createForOfIteratorHelper._slicedToArray(_Object$entries7[_i13], 2),
|
|
1122
1122
|
key = _Object$entries7$_i[0],
|
|
1123
1123
|
snapshot = _Object$entries7$_i[1];
|
|
1124
1124
|
var packageKey = packageKeyOf(key);
|
|
@@ -1143,7 +1143,7 @@ function computePnpmLayout(lockfile) {
|
|
|
1143
1143
|
for (var _i14 = 0, _arr7 = [snapshot.dependencies, snapshot.optionalDependencies]; _i14 < _arr7.length; _i14++) {
|
|
1144
1144
|
var _group3 = _arr7[_i14];
|
|
1145
1145
|
for (var _i15 = 0, _Object$entries8 = Object.entries(_group3); _i15 < _Object$entries8.length; _i15++) {
|
|
1146
|
-
var _Object$entries8$_i =
|
|
1146
|
+
var _Object$entries8$_i = createForOfIteratorHelper._slicedToArray(_Object$entries8[_i15], 2),
|
|
1147
1147
|
_alias4 = _Object$entries8$_i[0],
|
|
1148
1148
|
_reference2 = _Object$entries8$_i[1];
|
|
1149
1149
|
linkDependency(modulesDir, _alias4, _reference2, root);
|
|
@@ -1156,7 +1156,7 @@ function computePnpmLayout(lockfile) {
|
|
|
1156
1156
|
if (options.hoistWorkspacePackages !== false) {
|
|
1157
1157
|
for (var _i16 = 0, _Object$entries9 = Object.entries((_options$workspaceNam = options.workspaceNames) !== null && _options$workspaceNam !== void 0 ? _options$workspaceNam : {}); _i16 < _Object$entries9.length; _i16++) {
|
|
1158
1158
|
var _options$workspaceNam;
|
|
1159
|
-
var _Object$entries9$_i =
|
|
1159
|
+
var _Object$entries9$_i = createForOfIteratorHelper._slicedToArray(_Object$entries9[_i16], 2),
|
|
1160
1160
|
_id = _Object$entries9$_i[0],
|
|
1161
1161
|
name = _Object$entries9$_i[1];
|
|
1162
1162
|
if (_id !== "." && lockfile.importers[_id]) {
|
|
@@ -1171,7 +1171,7 @@ function computePnpmLayout(lockfile) {
|
|
|
1171
1171
|
_step18;
|
|
1172
1172
|
try {
|
|
1173
1173
|
for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
|
|
1174
|
-
var _step18$value =
|
|
1174
|
+
var _step18$value = createForOfIteratorHelper._slicedToArray(_step18.value, 2),
|
|
1175
1175
|
_alias5 = _step18$value[0],
|
|
1176
1176
|
_step18$value$ = _step18$value[1],
|
|
1177
1177
|
kind = _step18$value$.kind,
|
|
@@ -1221,7 +1221,7 @@ function computePnpmLayout(lockfile) {
|
|
|
1221
1221
|
*/
|
|
1222
1222
|
var LinkedFileSystem = /*#__PURE__*/function () {
|
|
1223
1223
|
function LinkedFileSystem(links) {
|
|
1224
|
-
|
|
1224
|
+
wrapNativeSuper._classCallCheck(this, LinkedFileSystem);
|
|
1225
1225
|
createForOfIteratorHelper._defineProperty(this, "files", new Map());
|
|
1226
1226
|
/** Real directory → the names of its entries, files and directories (links included). */
|
|
1227
1227
|
createForOfIteratorHelper._defineProperty(this, "directories", new Map());
|
|
@@ -1235,7 +1235,7 @@ var LinkedFileSystem = /*#__PURE__*/function () {
|
|
|
1235
1235
|
_step;
|
|
1236
1236
|
try {
|
|
1237
1237
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1238
|
-
var _step$value =
|
|
1238
|
+
var _step$value = createForOfIteratorHelper._slicedToArray(_step.value, 2),
|
|
1239
1239
|
link = _step$value[0],
|
|
1240
1240
|
target = _step$value[1];
|
|
1241
1241
|
this.addDirectory(target);
|
|
@@ -1247,7 +1247,7 @@ var LinkedFileSystem = /*#__PURE__*/function () {
|
|
|
1247
1247
|
_iterator.f();
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
|
-
return
|
|
1250
|
+
return wrapNativeSuper._createClass(LinkedFileSystem, [{
|
|
1251
1251
|
key: "entriesOf",
|
|
1252
1252
|
value: function entriesOf(realDir) {
|
|
1253
1253
|
var entries = this.directories.get(realDir);
|
|
@@ -1399,16 +1399,16 @@ var SourceError = /*#__PURE__*/function (_Error) {
|
|
|
1399
1399
|
function SourceError(message, code, retryable) {
|
|
1400
1400
|
var _this;
|
|
1401
1401
|
var status = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1402
|
-
|
|
1403
|
-
_this =
|
|
1402
|
+
wrapNativeSuper._classCallCheck(this, SourceError);
|
|
1403
|
+
_this = wrapNativeSuper._callSuper(this, SourceError, [message]);
|
|
1404
1404
|
_this.code = code;
|
|
1405
1405
|
_this.retryable = retryable;
|
|
1406
1406
|
_this.status = status;
|
|
1407
1407
|
return _this;
|
|
1408
1408
|
}
|
|
1409
|
-
|
|
1410
|
-
return
|
|
1411
|
-
}(/*#__PURE__*/
|
|
1409
|
+
wrapNativeSuper._inherits(SourceError, _Error);
|
|
1410
|
+
return wrapNativeSuper._createClass(SourceError);
|
|
1411
|
+
}(/*#__PURE__*/wrapNativeSuper._wrapNativeSuper(Error));
|
|
1412
1412
|
|
|
1413
1413
|
/** A package whose types could not be had, so the check that follows is incomplete. */
|
|
1414
1414
|
|
|
@@ -1471,7 +1471,7 @@ function isSafeRelative(path) {
|
|
|
1471
1471
|
var TypeAcquisition = /*#__PURE__*/function () {
|
|
1472
1472
|
function TypeAcquisition(ts, fs, layout, sources) {
|
|
1473
1473
|
var concurrency = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 8;
|
|
1474
|
-
|
|
1474
|
+
wrapNativeSuper._classCallCheck(this, TypeAcquisition);
|
|
1475
1475
|
createForOfIteratorHelper._defineProperty(this, "started", new Set());
|
|
1476
1476
|
createForOfIteratorHelper._defineProperty(this, "running", new Set());
|
|
1477
1477
|
createForOfIteratorHelper._defineProperty(this, "queue", []);
|
|
@@ -1492,7 +1492,7 @@ var TypeAcquisition = /*#__PURE__*/function () {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
|
|
1494
1494
|
/** Whether `dir` is a package this has fetched, or tried to. */
|
|
1495
|
-
return
|
|
1495
|
+
return wrapNativeSuper._createClass(TypeAcquisition, [{
|
|
1496
1496
|
key: "has",
|
|
1497
1497
|
value: function has(dir) {
|
|
1498
1498
|
return this.started.has(dir);
|
|
@@ -1617,8 +1617,8 @@ var TypeAcquisition = /*#__PURE__*/function () {
|
|
|
1617
1617
|
}, {
|
|
1618
1618
|
key: "settle",
|
|
1619
1619
|
value: (function () {
|
|
1620
|
-
var _settle =
|
|
1621
|
-
return
|
|
1620
|
+
var _settle = createForOfIteratorHelper._asyncToGenerator(/*#__PURE__*/createForOfIteratorHelper._regenerator().m(function _callee() {
|
|
1621
|
+
return createForOfIteratorHelper._regenerator().w(function (_context) {
|
|
1622
1622
|
while (1) switch (_context.n) {
|
|
1623
1623
|
case 0:
|
|
1624
1624
|
if (!(this.running.size > 0)) {
|
|
@@ -1655,9 +1655,9 @@ var TypeAcquisition = /*#__PURE__*/function () {
|
|
|
1655
1655
|
}, {
|
|
1656
1656
|
key: "fetch",
|
|
1657
1657
|
value: function () {
|
|
1658
|
-
var _fetch =
|
|
1658
|
+
var _fetch = createForOfIteratorHelper._asyncToGenerator(/*#__PURE__*/createForOfIteratorHelper._regenerator().m(function _callee2(dir, via) {
|
|
1659
1659
|
var pkg, ref, bundle, attempt, _retryable, _i, _Object$entries, _Object$entries$_i, path, text, _iterator4, _step4, stub, _i2, _Object$entries2, _Object$entries2$_i, _path, _text, _t, _t2;
|
|
1660
|
-
return
|
|
1660
|
+
return createForOfIteratorHelper._regenerator().w(function (_context2) {
|
|
1661
1661
|
while (1) switch (_context2.p = _context2.n) {
|
|
1662
1662
|
case 0:
|
|
1663
1663
|
pkg = this.layout.packages.get(dir);
|
|
@@ -1732,7 +1732,7 @@ var TypeAcquisition = /*#__PURE__*/function () {
|
|
|
1732
1732
|
_context2.n = 14;
|
|
1733
1733
|
break;
|
|
1734
1734
|
}
|
|
1735
|
-
_Object$entries$_i =
|
|
1735
|
+
_Object$entries$_i = createForOfIteratorHelper._slicedToArray(_Object$entries[_i], 2), path = _Object$entries$_i[0], text = _Object$entries$_i[1];
|
|
1736
1736
|
if (isSafeRelative(path)) {
|
|
1737
1737
|
_context2.n = 12;
|
|
1738
1738
|
break;
|
|
@@ -1782,7 +1782,7 @@ var TypeAcquisition = /*#__PURE__*/function () {
|
|
|
1782
1782
|
return _context2.f(21);
|
|
1783
1783
|
case 22:
|
|
1784
1784
|
for (_i2 = 0, _Object$entries2 = Object.entries(bundle.files); _i2 < _Object$entries2.length; _i2++) {
|
|
1785
|
-
_Object$entries2$_i =
|
|
1785
|
+
_Object$entries2$_i = createForOfIteratorHelper._slicedToArray(_Object$entries2[_i2], 2), _path = _Object$entries2$_i[0], _text = _Object$entries2$_i[1];
|
|
1786
1786
|
if (DECLARATION.test(_path) && isSafeRelative(_path)) {
|
|
1787
1787
|
this.wantImportsOf("".concat(dir, "/").concat(_path), _text);
|
|
1788
1788
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as
|
|
1
|
+
import { a as _slicedToArray, _ as _typeof, f as _createForOfIteratorHelper, e as _toConsumableArray, g as _defineProperty, b as _asyncToGenerator, c as _regenerator, d as _objectSpread2 } from './createForOfIteratorHelper-9b80f1a2.esm.js';
|
|
2
|
+
import { _ as _inherits, a as _createClass, b as _wrapNativeSuper, c as _classCallCheck, d as _callSuper } from './wrapNativeSuper-639b12b7.esm.js';
|
|
3
3
|
import { parseAllDocuments } from 'yaml';
|
|
4
4
|
|
|
5
5
|
/**
|