@packall/core 0.5.1 → 0.5.3
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/{archive-D1AFjtiX.js → archive-HuF2fp2A.js} +10 -2
- package/dist/archive-HuF2fp2A.js.map +1 -0
- package/dist/archive.d.ts +9 -18
- package/dist/archive.d.ts.map +1 -1
- package/dist/bundle.d.ts +0 -18
- package/dist/bundle.d.ts.map +1 -1
- package/dist/dependency-range.d.ts.map +1 -1
- package/dist/download.d.ts +0 -7
- package/dist/download.d.ts.map +1 -1
- package/dist/errors.d.ts +0 -12
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -36
- package/dist/index.js.map +1 -1
- package/dist/input-file.d.ts +0 -15
- package/dist/input-file.d.ts.map +1 -1
- package/dist/integrity.d.ts +0 -14
- package/dist/integrity.d.ts.map +1 -1
- package/dist/layout.d.ts +22 -57
- package/dist/layout.d.ts.map +1 -1
- package/dist/locked-resolve.d.ts +0 -19
- package/dist/locked-resolve.d.ts.map +1 -1
- package/dist/lockfile/bun.d.ts.map +1 -1
- package/dist/lockfile/detect.d.ts +0 -7
- package/dist/lockfile/detect.d.ts.map +1 -1
- package/dist/lockfile/json.d.ts.map +1 -1
- package/dist/lockfile/npm.d.ts.map +1 -1
- package/dist/lockfile/parse.d.ts +0 -14
- package/dist/lockfile/parse.d.ts.map +1 -1
- package/dist/lockfile/pnpm.d.ts.map +1 -1
- package/dist/lockfile/tree-builder.d.ts.map +1 -1
- package/dist/lockfile/types.d.ts +0 -7
- package/dist/lockfile/types.d.ts.map +1 -1
- package/dist/manifest.d.ts.map +1 -1
- package/dist/node/archiver.d.ts.map +1 -1
- package/dist/node/index.d.ts +0 -11
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/platform.d.ts +0 -9
- package/dist/node/platform.d.ts.map +1 -1
- package/dist/options.d.ts +0 -7
- package/dist/options.d.ts.map +1 -1
- package/dist/platform.d.ts +0 -10
- package/dist/platform.d.ts.map +1 -1
- package/dist/progress.d.ts +0 -8
- package/dist/progress.d.ts.map +1 -1
- package/dist/registry.d.ts +5 -12
- package/dist/registry.d.ts.map +1 -1
- package/dist/resolve.d.ts +0 -18
- package/dist/resolve.d.ts.map +1 -1
- package/dist/schemas/lenient.d.ts.map +1 -1
- package/dist/schemas/package-json.d.ts +3 -12
- package/dist/schemas/package-json.d.ts.map +1 -1
- package/dist/spec.d.ts.map +1 -1
- package/package.json +14 -4
- package/src/archive.ts +9 -18
- package/src/bundle.ts +3 -18
- package/src/dependency-range.ts +0 -11
- package/src/download.ts +0 -7
- package/src/errors.ts +3 -13
- package/src/index.ts +2 -14
- package/src/input-file.ts +0 -15
- package/src/integrity.ts +0 -14
- package/src/layout.ts +22 -58
- package/src/locked-resolve.ts +5 -19
- package/src/lockfile/bun.ts +0 -8
- package/src/lockfile/detect.ts +0 -7
- package/src/lockfile/json.ts +0 -9
- package/src/lockfile/npm.ts +0 -8
- package/src/lockfile/parse.ts +0 -14
- package/src/lockfile/pnpm.ts +0 -7
- package/src/lockfile/tree-builder.ts +0 -6
- package/src/lockfile/types.ts +0 -7
- package/src/manifest.ts +0 -4
- package/src/node/archiver.ts +4 -12
- package/src/node/index.ts +0 -12
- package/src/node/platform.ts +0 -10
- package/src/options.ts +0 -7
- package/src/platform.ts +0 -11
- package/src/progress.ts +0 -8
- package/src/registry.ts +5 -12
- package/src/resolve.ts +4 -18
- package/src/schemas/lenient.ts +0 -15
- package/src/schemas/package-json.ts +4 -13
- package/src/spec.ts +0 -7
- package/dist/archive-D1AFjtiX.js.map +0 -1
package/dist/input-file.d.ts
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `--file` handling.
|
|
3
|
-
*
|
|
4
|
-
* One flag, three accepted shapes, detected from the content rather than the
|
|
5
|
-
* extension so that `--file deps.json` and `--file my-packages` both do the
|
|
6
|
-
* obvious thing:
|
|
7
|
-
*
|
|
8
|
-
* - a **package.json** — bundle everything it depends on
|
|
9
|
-
* - a **lockfile** — npm, pnpm or bun; bundle the exact versions it pins
|
|
10
|
-
* - a **newline-delimited list** — one spec per line, `#` and `//` comments
|
|
11
|
-
* allowed, blank lines ignored
|
|
12
|
-
*
|
|
13
|
-
* A lockfile is checked for first, because `package-lock.json` and
|
|
14
|
-
* `package.json` are both JSON objects and only the content tells them apart.
|
|
15
|
-
*/
|
|
16
1
|
import * as Effect from "effect/Effect";
|
|
17
2
|
import * as FileSystem from "effect/FileSystem";
|
|
18
3
|
import { InputFileKind } from "./enums/input-file-kind.js";
|
package/dist/input-file.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-file.d.ts","sourceRoot":"","sources":["../src/input-file.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"input-file.d.ts","sourceRoot":"","sources":["../src/input-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAIhD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,KAAK,EAAoB,aAAa,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,MAAM,MAAM,eAAe,GAAG;IAC7B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAC3C,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC3C;;;;;;;;;OASG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CACtD,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,gBAAuC,CAAC;AAE9E,sCAAsC;AACtC,eAAO,MAAM,aAAa,aACf,MAAM,YACP,gBAAgB,KACvB,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,qBAAqB,GAAG,aAAa,EAAE,UAAU,CAAC,UAAU,CAgC3F,CAAC;AAKJ;;;;;GAKG;AACH,eAAO,MAAM,cAAc,aAChB,MAAM,WACP,MAAM,YACN,gBAAgB,KACvB,eAoBF,CAAC"}
|
package/dist/integrity.d.ts
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checksum verification for downloaded tarballs.
|
|
3
|
-
*
|
|
4
|
-
* A failed check discards the download rather than warning and carrying on —
|
|
5
|
-
* see `notes/requirements.md` § FR-9 for why that strictness is a requirement
|
|
6
|
-
* rather than a preference.
|
|
7
|
-
*
|
|
8
|
-
* Built on Effect's `Crypto` service rather than `node:crypto` directly. The
|
|
9
|
-
* four digests `Crypto` offers — SHA-1, SHA-256, SHA-384, SHA-512 — are exactly
|
|
10
|
-
* the four npm publishes, so nothing is given up, and the same verification
|
|
11
|
-
* then runs unchanged against WebCrypto in a browser. Parsing stays here
|
|
12
|
-
* because the subset of Subresource Integrity npm actually emits is small and
|
|
13
|
-
* entirely mechanical; `ssri` would be a dependency for a regex.
|
|
14
|
-
*/
|
|
15
1
|
import * as Crypto from "effect/Crypto";
|
|
16
2
|
import * as Effect from "effect/Effect";
|
|
17
3
|
import type { PlatformError } from "effect/PlatformError";
|
package/dist/integrity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrity.d.ts","sourceRoot":"","sources":["../src/integrity.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"integrity.d.ts","sourceRoot":"","sources":["../src/integrity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;GAKG;AACH,QAAA,MAAM,qBAAqB;qBAClB,SAAS;qBACT,SAAS;qBACT,SAAS;mBACX,OAAO;CAC6C,CAAC;AAE5D,mDAAmD;AACnD,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,qBAAqB,CAAC;AAKpE,2BAA2B;AAC3B,MAAM,MAAM,aAAa,GAAG;IAC3B,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,cAAe,MAAM,KAAG,aAAa,CAAC,aAAa,CAY7E,CAAC;AAWF,oEAAoE;AACpE,eAAO,MAAM,QAAQ,SACd,UAAU,aACL,kBAAkB,KAC3B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,CACW,CAAC;AAEjE,6EAA6E;AAC7E,eAAO,MAAM,WAAW,SACjB,UAAU,aACL,kBAAkB,KAC3B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,CACQ,CAAC;AAE9D,qCAAqC;AACrC,MAAM,MAAM,kBAAkB;AAC7B,8CAA8C;AAC5C;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AACvD,wDAAwD;GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAC5D,gDAAgD;GAC9C;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAmBrF;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,SACZ,UAAU,QACV;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,KACrF,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,CAgC9D,CAAC"}
|
package/dist/layout.d.ts
CHANGED
|
@@ -1,29 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The on-disk shape of a bundle.
|
|
3
|
-
*
|
|
4
|
-
* Under every layout but `flat`, everything is laid out exactly the way a
|
|
5
|
-
* registry serves it:
|
|
6
|
-
*
|
|
7
|
-
* lodash/-/lodash-4.17.21.tgz
|
|
8
|
-
* @babel/core/-/core-7.24.0.tgz
|
|
9
|
-
*
|
|
10
|
-
* That is not an Artifactory convention — it is the path structure in every
|
|
11
|
-
* `dist.tarball` URL npm publishes. See `notes/requirements.md` § FR-12 for
|
|
12
|
-
* what that buys.
|
|
13
|
-
*
|
|
14
|
-
* The one shape worth noticing before editing anything here: a scoped
|
|
15
|
-
* package's file name drops the scope, so `@babel/core` becomes
|
|
16
|
-
* `core-7.24.0.tgz` under an `@babel/core/-/` directory.
|
|
17
|
-
*
|
|
18
|
-
* `flat` layout is the exception; `bundlePath` is where the two part company.
|
|
19
|
-
*/
|
|
20
1
|
import { Layout } from "./enums/layout.js";
|
|
21
2
|
/** Splits `@scope/name` into its parts. `scope` is undefined when unscoped. */
|
|
22
3
|
export declare const splitName: (name: string) => {
|
|
23
4
|
readonly scope: string | undefined;
|
|
24
5
|
readonly bare: string;
|
|
25
6
|
};
|
|
26
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* `@babel/core` + `7.24.0` -> `core-7.24.0.tgz`
|
|
9
|
+
*
|
|
10
|
+
* The scope is dropped, because that is what the registry serves. It is also
|
|
11
|
+
* why a flat directory of tarballs cannot use this name — see {@link flatName}.
|
|
12
|
+
*/
|
|
27
13
|
export declare const tarballFileName: (name: string, version: string) => string;
|
|
28
14
|
/**
|
|
29
15
|
* The path of one package tarball within a bundle, using `/` separators
|
|
@@ -36,43 +22,22 @@ export declare const MANIFEST_FILE = "bundle-manifest.json";
|
|
|
36
22
|
/** File name of the short import guide that ships inside every bundle. */
|
|
37
23
|
export declare const README_FILE = "IMPORT.md";
|
|
38
24
|
/**
|
|
39
|
-
* A flat, collision-free file name for one `name@version
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* or `foo-bar` at `1.0.0`?
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* Dropping it — which this did, matching what `npm pack` produces — meant
|
|
56
|
-
* `@something/somewhat` and `something-somewhat` were both
|
|
57
|
-
* `something-somewhat-1.0.0.tgz`. Two different packages, one path: the second
|
|
58
|
-
* landed on the first, and the run reported two artifacts for the one file that
|
|
59
|
-
* survived. A bundle short a package, called complete, found at the far end of
|
|
60
|
-
* an air gap.
|
|
61
|
-
*
|
|
62
|
-
* Keeping the `@` makes that impossible by construction rather than by a check,
|
|
63
|
-
* because an unscoped npm name may not begin with one. It is also the more
|
|
64
|
-
* honest name: the scope is part of what the package *is*, and a directory of
|
|
65
|
-
* archives that has forgotten which ones were scoped is a directory somebody
|
|
66
|
-
* has to cross-reference against a manifest.
|
|
67
|
-
*
|
|
68
|
-
* It does not make every collision impossible — `@a/b-c` and `@a-b/c` still
|
|
69
|
-
* meet — so the run still checks before downloading anything. That pair is
|
|
70
|
-
* pathological; the scoped-against-unscoped one is `@babel/core` beside
|
|
71
|
-
* `babel-core`, which is a real migration somebody could be bundling.
|
|
72
|
-
*
|
|
73
|
-
* The leading `@` is safe here in a way it is not inside the archive: tar's
|
|
74
|
-
* splice convention applies to the *file list* it is given, which is what
|
|
75
|
-
* `archive.ts` guards with `./`. These are output paths, not entries.
|
|
25
|
+
* A flat, collision-free file name for one `name@version`:
|
|
26
|
+
* `@types/react@19.2.18` becomes `@types-react@19.2.18.tgz`.
|
|
27
|
+
*
|
|
28
|
+
* **The scope's `@` stays.** Dropping it — which this did, matching `npm pack`
|
|
29
|
+
* — put `@something/somewhat` and `something-somewhat` on the same file name,
|
|
30
|
+
* and the run reported two artifacts for the one file that survived. Keeping it
|
|
31
|
+
* makes that impossible by construction rather than by a check, because an
|
|
32
|
+
* unscoped npm name may not begin with `@`.
|
|
33
|
+
*
|
|
34
|
+
* The version joins with `@` rather than `-` because `foo-bar-1.0.0` is
|
|
35
|
+
* ambiguous by eye: `foo` at `bar-1.0.0`, or `foo-bar` at `1.0.0`?
|
|
36
|
+
*
|
|
37
|
+
* `@a/b-c` against `@a-b/c` still collides, so callers check before
|
|
38
|
+
* downloading. The leading `@` is safe here in a way it is not inside an
|
|
39
|
+
* archive: tar's splice convention applies to the entry list, which the
|
|
40
|
+
* archiver guards with `./`. These are output paths, not entries.
|
|
76
41
|
*/
|
|
77
42
|
export declare const flatName: (name: string, version: string) => string;
|
|
78
43
|
/**
|
package/dist/layout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,+EAA+E;AAC/E,eAAO,MAAM,SAAS,SACf,MAAM,KACV;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAK7D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,WAAW,MAAM,KAAG,MAG/D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,SAAU,MAAM,WAAW,MAAM,KAAG,MACd,CAAC;AAE/C,gEAAgE;AAChE,eAAO,MAAM,aAAa,yBAAyB,CAAC;AAEpD,0EAA0E;AAC1E,eAAO,MAAM,WAAW,cAAc,CAAC;AAEvC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,QAAQ,SAAU,MAAM,WAAW,MAAM,KAAG,MAIxD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,iBAAW,CAAC;AAE3C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,WAAY,MAAM,QAAQ,MAAM,WAAW,MAAM,KAAG,MACG,CAAC;AAE/E,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,qBAAsB,MAAuB,CAAC;AAE5E,6BAA6B;AAC7B,KAAK,YAAY,GAAG;IACnB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,YAAa,YAAY,KAAG,MACqB,CAAC"}
|
package/dist/locked-resolve.d.ts
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolution driven by a lockfile instead of by semver.
|
|
3
|
-
*
|
|
4
|
-
* The distinction matters more than it first looks. Feeding a lockfile's
|
|
5
|
-
* versions in as exact root specs and letting the ordinary walk run would still
|
|
6
|
-
* produce the wrong bundle: every *transitive* edge is a range, and
|
|
7
|
-
* `Resolve.walk` answers a range with whatever is newest today. Lock `tslib` at
|
|
8
|
-
* 2.6.0 and let something depending on `tslib@^2` be re-resolved, and the
|
|
9
|
-
* bundle grows a second copy at 2.8.1 that CI never installed.
|
|
10
|
-
*
|
|
11
|
-
* So the lockfile is treated as the graph, not as a set of hints. The package
|
|
12
|
-
* set *is* what the file pins, and every edge is satisfied from inside it.
|
|
13
|
-
* Nothing here calls `selectVersions`; the only thing the registry is asked for
|
|
14
|
-
* is the metadata that a lockfile does not record — `dist`, and the `os`/`cpu`
|
|
15
|
-
* constraints that `--platform` narrows on.
|
|
16
|
-
*
|
|
17
|
-
* The result is an ordinary `Resolution`, so layout, archiving, the manifest
|
|
18
|
-
* and the summary cannot tell which path produced it.
|
|
19
|
-
*/
|
|
20
1
|
import * as Effect from "effect/Effect";
|
|
21
2
|
import type { BundlerError } from "./errors.js";
|
|
22
3
|
import type { LockedTree } from "./lockfile/types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locked-resolve.d.ts","sourceRoot":"","sources":["../src/locked-resolve.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"locked-resolve.d.ts","sourceRoot":"","sources":["../src/locked-resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAGX,UAAU,EAIV,MAAM,cAAc,CAAC;AAKtB,gDAAgD;AAChD,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IACnD;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CACtD,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,aAAa,SACnB,UAAU,WACP,oBAAoB,KAC3B,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAmFpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../../src/lockfile/bun.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../../src/lockfile/bun.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,YAAY,CAAC;AAqBzD,eAAO,MAAM,gBAAgB,SACtB,MAAM,WACH,MAAM,YACL,MAAM,GAAG,SAAS,KAC1B,UAsBF,CAAC"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Working out which lockfile — if any — some content is.
|
|
3
|
-
*
|
|
4
|
-
* Detection is by content, matching how `--file` treats everything else: a
|
|
5
|
-
* lockfile renamed to `deps.txt` still parses, and a `package-lock.json` that
|
|
6
|
-
* is actually a package.json still gets read as one.
|
|
7
|
-
*/
|
|
8
1
|
import { LockfileFormat } from "../enums/lockfile-format.js";
|
|
9
2
|
/** What a blob of file content turned out to be. */
|
|
10
3
|
export type LockfileDetection = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../src/lockfile/detect.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../src/lockfile/detect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAI7D,oDAAoD;AACpD,MAAM,MAAM,iBAAiB,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;CAAE;AACjE;;;;GAIG;GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/E;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC;AAErC;;;GAGG;AACH,eAAO,MAAM,cAAc,YAAa,MAAM,KAAG,iBA8BhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/lockfile/json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/lockfile/json.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,QAAQ,UAAW,OAAO,YAAY,MAAM,KAAG,MACf,CAAC;AAI9C,iEAAiE;AACjE,eAAO,MAAM,YAAY,UAAW,OAAO,KAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CACG,CAAC;AAIjF,sDAAsD;AACtD,eAAO,MAAM,iBAAiB,UAAW,OAAO,KAAG,WAAW,CAAC,MAAM,CAMpE,CAAC;AAEF,eAAO,MAAM,eAAe,SAAU,MAAM,WAAW,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CASrF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,YAAa,MAAM,KAAG,OAU/C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,YAAa,MAAM,KAAG,MAuD5C,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,OAAO,KAAG,MACQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm.d.ts","sourceRoot":"","sources":["../../src/lockfile/npm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"npm.d.ts","sourceRoot":"","sources":["../../src/lockfile/npm.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,YAAY,CAAC;AAgCzD,eAAO,MAAM,gBAAgB,SACtB,MAAM,WACH,MAAM,YACL,MAAM,GAAG,SAAS,KAC1B,UAuBF,CAAC"}
|
package/dist/lockfile/parse.d.ts
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lockfile parsing — npm, pnpm and bun.
|
|
3
|
-
*
|
|
4
|
-
* `--file package.json` reads *ranges*, and a range resolves to whatever is
|
|
5
|
-
* newest at the moment the command runs. That is the right answer for "bundle
|
|
6
|
-
* me something installable" and the wrong one for "bundle exactly what CI
|
|
7
|
-
* installed" — which is what a lockfile records and what this module reads.
|
|
8
|
-
*
|
|
9
|
-
* Three formats, one output shape. Each parser's real job is the same: turn a
|
|
10
|
-
* manager-specific encoding of "package X at path P depends on Y" into a flat
|
|
11
|
-
* graph keyed by `name@version`, with every edge already pointing at a concrete
|
|
12
|
-
* version. Once that is done, nothing downstream has to know which manager
|
|
13
|
-
* wrote the file.
|
|
14
|
-
*/
|
|
15
1
|
import { LockfileFormat } from "../enums/lockfile-format.js";
|
|
16
2
|
import type { LockedTree, LockfileParseOptions } from "./types.js";
|
|
17
3
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/lockfile/parse.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/lockfile/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAM7D,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,aAAa,SACnB,MAAM,WACH,MAAM,WACN,cAAc,YACd,oBAAoB,KAC3B,UAWF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pnpm.d.ts","sourceRoot":"","sources":["../../src/lockfile/pnpm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pnpm.d.ts","sourceRoot":"","sources":["../../src/lockfile/pnpm.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,YAAY,CAAC;AAEzD,mEAAmE;AACnE,KAAK,aAAa,GAAG;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB,CAAC;AAKF,eAAO,MAAM,iBAAiB,SACvB,MAAM,WACH,MAAM,YACL,MAAM,GAAG,SAAS,KAC1B,UAgDF,CAAC;AAgGF;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,aAAa,GAAG,IAc1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-builder.d.ts","sourceRoot":"","sources":["../../src/lockfile/tree-builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tree-builder.d.ts","sourceRoot":"","sources":["../../src/lockfile/tree-builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGlE,OAAO,KAAK,EAAc,aAAa,EAAE,UA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AAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAOzD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,SAAU,MAAM,YAAY,MAAM,SAAS,aAAa,CAAC,MAAM,CAAC,KAAG,KAazF,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,WAAW,aAAc,MAAM,KAAG,MAA4C,CAAC"}
|
package/dist/lockfile/types.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The one output shape every lockfile parser produces.
|
|
3
|
-
*
|
|
4
|
-
* npm, pnpm and bun encode "package X at path P depends on Y" in three
|
|
5
|
-
* different ways; once flattened into this graph, nothing downstream has to
|
|
6
|
-
* know which manager wrote the file.
|
|
7
|
-
*/
|
|
8
1
|
import type { EdgeKind, LockedRootKind } from "../enums/edge-kind.js";
|
|
9
2
|
import type { LockfileFormat } from "../enums/lockfile-format.js";
|
|
10
3
|
/** One edge out of a locked package, already pinned to an exact version. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lockfile/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lockfile/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,4EAA4E;AAC5E,MAAM,MAAM,UAAU,GAAG;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACxB,CAAC;A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
package/dist/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGhE,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,MAAM,MAAM,aAAa,GAAG;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,wDAAwD;IACxD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,qCAAqC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,IAAI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,CAAC,eAAe,CAAC,CAAC;IAClD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACtC,KAAG,cAgDH,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,iBAAiB,aAAc,cAAc,KAAG,MACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/node/archiver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/node/archiver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAKtC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAyCzC,gCAAgC;AAChC,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAE9C,CAAC"}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `@packall/core/node` — the engine's Node-specific layers.
|
|
3
|
-
*
|
|
4
|
-
* Everything here is separated from the main barrel for one reason: importing
|
|
5
|
-
* `@packall/core` must stay safe in a browser. The engine itself reaches the
|
|
6
|
-
* outside world only through services — `Registry`, `Progress`, `Archiver`,
|
|
7
|
-
* `FileSystem`, `Path`, `Crypto` — so the platform lives at the edges, and this
|
|
8
|
-
* is the Node edge. A browser supplies its own.
|
|
9
|
-
*
|
|
10
|
-
* This is the entry point's whole public API.
|
|
11
|
-
*/
|
|
12
1
|
export { layerArchiver } from "./archiver.js";
|
|
13
2
|
export { currentPlatform } from "./platform.js";
|
|
14
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as ArchiveError, t as Archiver } from "../archive-
|
|
1
|
+
import { c as ArchiveError, t as Archiver } from "../archive-HuF2fp2A.js";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
4
|
import * as FileSystem from "effect/FileSystem";
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["layerArchiver: Layer.Layer<Archiver>"],"sources":["../../src/node/archiver.ts","../../src/node/platform.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["layerArchiver: Layer.Layer<Archiver>"],"sources":["../../src/node/archiver.ts","../../src/node/platform.ts"],"sourcesContent":["import * as Effect from \"effect/Effect\";\nimport * as FileSystem from \"effect/FileSystem\";\nimport * as Layer from \"effect/Layer\";\nimport type { PlatformError } from \"effect/PlatformError\";\nimport { create } from \"tar\";\n\nimport type { ArchiveResult, CreateArchiveOptions } from \"../archive.js\";\nimport { Archiver } from \"../archive.js\";\nimport { ArchiveError } from \"../errors.js\";\n\n// node-tar is what npm itself packs with, and the dependency is load-bearing\n// rather than convenient: scoped package paths routinely exceed tar's 100-byte\n// name field, so anything hand-written here would have to get prefix-splitting\n// and PAX headers right before npm could read the result.\nconst createArchive = (\n\toptions: CreateArchiveOptions,\n): Effect.Effect<ArchiveResult, ArchiveError | PlatformError, FileSystem.FileSystem> =>\n\tEffect.gen(function* () {\n\t\tconst fs = yield* FileSystem.FileSystem;\n\n\t\tyield* Effect.tryPromise({\n\t\t\ttry: () =>\n\t\t\t\tcreate(\n\t\t\t\t\t{\n\t\t\t\t\t\tgzip: options.gzipLevel === undefined ? true : { level: options.gzipLevel },\n\t\t\t\t\t\tfile: options.outPath,\n\t\t\t\t\t\tcwd: options.cwd,\n\t\t\t\t\t\t// Normalises uid/gid/mtime so the same inputs produce byte-identical\n\t\t\t\t\t\t// output — which matters when a security team wants to diff two\n\t\t\t\t\t\t// bundles or re-derive one from a manifest.\n\t\t\t\t\t\tportable: true,\n\t\t\t\t\t\t// Undo the `./` added below, so recorded entry names stay exactly\n\t\t\t\t\t\t// the registry paths the manifest lists.\n\t\t\t\t\t\tonWriteEntry: (entry) => {\n\t\t\t\t\t\t\tentry.path = entry.path.replace(/^\\.\\//, \"\");\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t// Sorted so archive order is stable across runs and platforms.\n\t\t\t\t\toptions.entries.toSorted().map(dotSlash),\n\t\t\t\t),\n\t\t\tcatch: (cause) => new ArchiveError(options.outPath, describe(cause), { cause }),\n\t\t});\n\n\t\tconst info = yield* fs.stat(options.outPath);\n\n\t\treturn { path: options.outPath, bytes: Number(info.size) };\n\t});\n\n/** The Node packing backend. */\nexport const layerArchiver: Layer.Layer<Archiver> = Layer.succeed(Archiver)({\n\tcreate: createArchive,\n});\n\n/**\n * Guards every entry against tar's `@` convention.\n *\n * In a tar file list, a leading `@` means \"splice in the entries of this other\n * archive\" — a GNU convention `node-tar` implements by stripping the `@` and\n * looking for what is left. Every scoped package is a top-level entry starting\n * with `@`, so this hit the bundler in both possible ways:\n *\n * - `@oxc-project` became `oxc-project`, which does not exist, and the run died\n * with an ENOENT naming a path that appears nowhere in the staging tree.\n * - `@esbuild` became `esbuild`, which *does* exist — the unscoped package of\n * the same name sitting right next to it. No error, and every scoped tarball\n * silently missing from a bundle that reported success. That is the dangerous\n * one: you would not find out until the install failed behind the firewall.\n *\n * `./@scope` is not subject to the convention and resolves identically.\n *\n * Any other backend has to answer this question too — the browser writer must\n * be held to the same test.\n */\nconst dotSlash = (entry: string): string => (entry.startsWith(\"./\") ? entry : `./${entry}`);\n\nconst describe = (cause: unknown): string =>\n\tcause instanceof Error ? cause.message : String(cause);\n","import type { PlatformTarget } from \"../platform.js\";\n\n/** The machine we are currently running on. */\nexport const currentPlatform = (): PlatformTarget => ({\n\tos: process.platform,\n\tcpu: process.arch,\n});\n"],"mappings":";;;;;;;AAcA,MAAM,iBACL,YAEA,OAAO,IAAI,aAAa;CACvB,MAAM,KAAK,OAAO,WAAW;AAE7B,QAAO,OAAO,WAAW;EACxB,WACC,OACC;GACC,MAAM,QAAQ,cAAc,SAAY,OAAO,EAAE,OAAO,QAAQ,WAAW;GAC3E,MAAM,QAAQ;GACd,KAAK,QAAQ;GAIb,UAAU;GAGV,eAAe,UAAU;AACxB,UAAM,OAAO,MAAM,KAAK,QAAQ,SAAS,GAAG;;GAE7C,EAED,QAAQ,QAAQ,UAAU,CAAC,IAAI,SAAS,CACxC;EACF,QAAQ,UAAU,IAAI,aAAa,QAAQ,SAAS,SAAS,MAAM,EAAE,EAAE,OAAO,CAAC;EAC/E,CAAC;CAEF,MAAM,OAAO,OAAO,GAAG,KAAK,QAAQ,QAAQ;AAE5C,QAAO;EAAE,MAAM,QAAQ;EAAS,OAAO,OAAO,KAAK,KAAK;EAAE;EACzD;;AAGH,MAAaA,gBAAuC,MAAM,QAAQ,SAAS,CAAC,EAC3E,QAAQ,eACR,CAAC;;;;;;;;;;;;;;;;;;;;;AAsBF,MAAM,YAAY,UAA2B,MAAM,WAAW,KAAK,GAAG,QAAQ,KAAK;AAEnF,MAAM,YAAY,UACjB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM;;;;;ACzEvD,MAAa,yBAAyC;CACrD,IAAI,QAAQ;CACZ,KAAK,QAAQ;CACb"}
|
package/dist/node/platform.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The machine we are currently running on.
|
|
3
|
-
*
|
|
4
|
-
* One function, in its own file, for the reason the whole `/node` subpath
|
|
5
|
-
* exists: it reads `process`, and importing `@packall/core` has to stay safe in
|
|
6
|
-
* a browser. Everything else in `platform.ts` is string work over what a
|
|
7
|
-
* manifest declares — it has no host and needs none, so it stays on the main
|
|
8
|
-
* entry where the engine can reach it.
|
|
9
|
-
*/
|
|
10
1
|
import type { PlatformTarget } from "../platform.js";
|
|
11
2
|
/** The machine we are currently running on. */
|
|
12
3
|
export declare const currentPlatform: () => PlatformTarget;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/node/platform.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/node/platform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,+CAA+C;AAC/C,eAAO,MAAM,eAAe,QAAO,cAGjC,CAAC"}
|
package/dist/options.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Option types shared by the resolver and the bundler, plus their defaults.
|
|
3
|
-
*
|
|
4
|
-
* The rule the defaults below are derived from is stated once, beside the flags
|
|
5
|
-
* that expose them — see `descriptors.ts` in `@packall/cli`, and
|
|
6
|
-
* `notes/requirements.md` § FR-13.
|
|
7
|
-
*/
|
|
8
1
|
import { Layout } from "./enums/layout.js";
|
|
9
2
|
import type { PlatformFilter } from "./platform.js";
|
|
10
3
|
/** Which dependency edges the resolver follows. */
|
package/dist/options.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,mDAAmD;AACnD,MAAM,MAAM,eAAe,GAAG;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAI1B,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,cAAc,GAAG;IAC5B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,yEAAyE;IACzE,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,cAKnC,CAAC;AAEF,qCAAqC;AACrC,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,kEAAkE;IAClE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACxD;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAM9D,CAAC"}
|
package/dist/platform.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Platform matching for optional dependencies.
|
|
3
|
-
*
|
|
4
|
-
* The default is "keep every platform" and narrowing is opt-in — see
|
|
5
|
-
* `notes/requirements.md` § FR-13 for the failure mode that decides it.
|
|
6
|
-
*
|
|
7
|
-
* The mechanics that decision rests on are here rather than there: a package
|
|
8
|
-
* declares `os`, `cpu` and `libc` in its own manifest, and this module keeps a
|
|
9
|
-
* package when the filter *could* install it, not when it matches exactly.
|
|
10
|
-
*/
|
|
11
1
|
/** A target to keep, e.g. `linux-x64`, `linux-x64-musl`, or just `linux`. */
|
|
12
2
|
export type PlatformTarget = {
|
|
13
3
|
readonly os: string;
|
package/dist/platform.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GAAG;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,sDAAsD;IACtD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACvB;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CAAE,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;CAAE,CAAC;AAEjF,yEAAyE;AACzE,MAAM,MAAM,mBAAmB,GAAG;IACjC,QAAQ,CAAC,EAAE,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,cAAgC,CAAC;AAE5D,eAAO,MAAM,eAAe,YAAa,aAAa,CAAC,cAAc,CAAC,KAAG,cAGvE,CAAC;AAkCH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,UAAW,MAAM,KAAG,cAAc,GAAG,IAqBpE,CAAC;AA+BF,0DAA0D;AAC1D,eAAO,MAAM,aAAa,gBACZ,mBAAmB,UACxB,cAAc,KACpB,OAOF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,gBAAiB,mBAAmB,UAAU,cAAc,KAAG,OAGrF,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,WAAY,cAAc,KAAG,MAO7D,CAAC"}
|
package/dist/progress.d.ts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Progress reporting.
|
|
3
|
-
*
|
|
4
|
-
* The engine emits structured events; it never writes to a terminal. That
|
|
5
|
-
* separation is what lets the CLI draw a live TTY view, CI print plain lines,
|
|
6
|
-
* and the test suite assert on an array of events without any of them
|
|
7
|
-
* interfering with each other.
|
|
8
|
-
*/
|
|
9
1
|
import * as Context from "effect/Context";
|
|
10
2
|
import * as Effect from "effect/Effect";
|
|
11
3
|
import * as Layer from "effect/Layer";
|
package/dist/progress.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../src/progress.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../src/progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,mCAAmC;AACnC,MAAM,MAAM,aAAa;AACxB,oEAAoE;AAClE;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE;AAC/F,wBAAwB;GACtB;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE;AAC5D,iEAAiE;GAC/D;IACA,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8DAA8D;IAC9D,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,4CAA4C;IAC5C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC7B;AACH,kCAAkC;GAChC;IAAE,QAAQ,CAAC,IAAI,EAAE,iB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AAM,CAAC,IAAI,CAAC,CAAC;KAC7D,CAAC;CACF;;AAED,0CAA0C;AAC1C,qBAAa,QAAS,SAAQ,aAE7B;CAAG;AAEJ,yDAAyD;AACzD,eAAO,MAAM,IAAI,UAAW,aAAa,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAI5E,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAE5C,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,aAAa,YAAa,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,KAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAGzF,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;gBAMxB,CAAC"}
|
package/dist/registry.d.ts
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The registry seam.
|
|
3
|
-
*
|
|
4
|
-
* This is the **only** place in the engine that knows a registry exists.
|
|
5
|
-
* Everything downstream — range resolution, the dependency walk, layout,
|
|
6
|
-
* archiving — is expressed against these three operations, so swapping npm for
|
|
7
|
-
* something else means implementing this interface and nothing more.
|
|
8
|
-
*
|
|
9
|
-
* `@packall/registry-npm` provides the implementation that speaks the plain
|
|
10
|
-
* npm registry protocol, which is what Artifactory, Nexus, Verdaccio, GitHub
|
|
11
|
-
* Packages and registry.npmjs.org all serve.
|
|
12
|
-
*/
|
|
13
1
|
import * as Context from "effect/Context";
|
|
14
2
|
import type * as Effect from "effect/Effect";
|
|
15
3
|
import type { BundlerError } from "./errors.js";
|
|
@@ -87,6 +75,11 @@ declare const Registry_base: Context.ServiceClass<Registry, "@packall/core/Regis
|
|
|
87
75
|
/**
|
|
88
76
|
* Service tag for the registry backend.
|
|
89
77
|
*
|
|
78
|
+
* The engine's only route to a registry. Version selection, the dependency
|
|
79
|
+
* walk, layout and archiving are all written against these four operations, so
|
|
80
|
+
* backing a registry that does not speak the npm protocol means implementing
|
|
81
|
+
* this interface and nothing else.
|
|
82
|
+
*
|
|
90
83
|
* @example
|
|
91
84
|
* ```ts
|
|
92
85
|
* import { Effect } from "effect"
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,kEAAkE;AAClE,MAAM,MAAM,WAAW,GAAG;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC;IACrE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC;IAC7E,QA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AY,OAAO,GAAG;QACrB,8EAA8E;QAC9E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAEtB;;;WAGG;QACH,QAAQ,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;QAEtD;;;;;WAKG;QACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAEtD;;;WAGG;QACH,QAAQ,CAAC,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAEpF,2DAA2D;QAC3D,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;KAC1F,CAAC;CACF;;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,QAAS,SAAQ,aAE7B;CAAG"}
|
package/dist/resolve.d.ts
CHANGED
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version selection and the dependency closure walk.
|
|
3
|
-
*
|
|
4
|
-
* This is the part that decides *what* ends up in a bundle. Its only side
|
|
5
|
-
* effect is asking the `Registry` service for metadata, which makes the whole
|
|
6
|
-
* of it testable against a fake registry with no network at all.
|
|
7
|
-
*
|
|
8
|
-
* The walk is breadth-first in waves: resolve the current frontier
|
|
9
|
-
* concurrently, collect the newly discovered edges, repeat. Wave-based BFS
|
|
10
|
-
* gives real parallelism without a dynamic worker pool, and because each wave
|
|
11
|
-
* merges its results serially there is no shared mutable state being written
|
|
12
|
-
* from more than one fiber.
|
|
13
|
-
*
|
|
14
|
-
* One subtlety worth calling out: metadata is cached across walks, but each
|
|
15
|
-
* walk still traverses the full graph. That is what lets `per-spec` layout ask
|
|
16
|
-
* "what does *this* root version depend on" many times over while the network
|
|
17
|
-
* is touched exactly once per package.
|
|
18
|
-
*/
|
|
19
1
|
import * as Effect from "effect/Effect";
|
|
20
2
|
import { EdgeKind } from "./enums/edge-kind.js";
|
|
21
3
|
import type { BundlerError } from "./errors.js";
|
package/dist/resolve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGvD,sDAAsD;AACtD,MAAM,MAAM,MAAM,GACf;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE7E,iFAAiF;AACjF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,8EAA8E;AAC9E,MAAM,MAAM,eAAe,GAAG;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;I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AkC,CAAC;AAE9F,4EAA4E;AAC5E,eAAO,MAAM,aAAa,eAAgB,UAAU,KAAG,WAAW,CAAC,UAAU,EAAE,eAAe,CACV,CAAC;AAMrF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,cACf,SAAS,YACV,QAAQ,WACT;IACR,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;CACpC,KACC,aAAa,CAAC,MAAM,CAqDtB,CAAC;AA+EF,wEAAwE;AACxE,eAAO,MAAM,OAAO,aACT,eAAe,WAChB,cAAc,KACrB;IACF,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAsDpD,CAAC;AAkMF;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,UACZ,aAAa,CAAC,WAAW,CAAC,WACxB,cAAc,KACrB,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAkDpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lenient.d.ts","sourceRoot":"","sources":["../../src/schemas/lenient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lenient.d.ts","sourceRoot":"","sources":["../../src/schemas/lenient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,MAAM,CAAC,GAAG,UAAU,CAAC,6FAKtD,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,4HAW9B,CAAC;AAEF,sFAAsF;AACtF,eAAO,MAAM,iBAAiB,4FAO7B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;iEAWpC,CAAC;AAcF,eAAO,MAAM,0BAA0B,6NAKtC,CAAC;AAEF,eAAO,MAAM,yBAAyB,6KAOrC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;gFAc5C,CAAC"}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* A narrow view on purpose: the only thing this tool wants from a package.json
|
|
5
|
-
* is which packages it declares. Everything else — `scripts`, `exports`, the
|
|
6
|
-
* half of the file that belongs to a bundler — is none of its business, and a
|
|
7
|
-
* schema that insisted on understanding it would reject files that are fine.
|
|
8
|
-
*
|
|
9
|
-
* Every block is optional and every wrongly-typed one is simply absent, so a
|
|
10
|
-
* hand-edited manifest produces a smaller spec list rather than a crash. That
|
|
11
|
-
* is what `tolerant` buys: a `dependencies: "all of them"` loses one block, not
|
|
12
|
-
* the file.
|
|
3
|
+
* Every block is optional and a wrongly-typed one decodes as absent, so a
|
|
4
|
+
* hand-edited manifest produces a shorter spec list rather than a failed read.
|
|
13
5
|
*/
|
|
14
|
-
import * as Schema from "effect/Schema";
|
|
15
6
|
export declare const PackageJsonSchema: Schema.Struct<{
|
|
16
7
|
readonly dependencies: Schema.optional<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.decodeTo<Schema.$Record<Schema.String, Schema.String>, Schema.$Record<Schema.String, Schema.Unknown>, never, never>>, never>>;
|
|
17
8
|
readonly devDependencies: Schema.optional<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.decodeTo<Schema.$Record<Schema.String, Schema.String>, Schema.$Record<Schema.String, Schema.Unknown>, never, never>>, never>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../../src/schemas/package-json.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../../src/schemas/package-json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;EAM5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAC;AAExD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAAgD,CAAC"}
|
package/dist/spec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,qEAAqE;AACrE,MAAM,MAAM,QAAQ;AACnB,yDAAyD;AACvD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AACtD,gEAAgE;GAC9D;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AACpD,qDAAqD;GACnD;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,wCAAwC;AACxC,MAAM,MAAM,WAAW,GAAG;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACrB,CAAC;AASF,mEAAmE;AACnE,eAAO,MAAM,UAAU,SAAU,WAAW,KAAG,MACC,CAAC;AAEjD,qDAAqD;AACrD,eAA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