@packall/core 0.5.2 → 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.
Files changed (88) hide show
  1. package/dist/{archive-D1AFjtiX.js → archive-HuF2fp2A.js} +10 -2
  2. package/dist/archive-HuF2fp2A.js.map +1 -0
  3. package/dist/archive.d.ts +9 -18
  4. package/dist/archive.d.ts.map +1 -1
  5. package/dist/bundle.d.ts +0 -18
  6. package/dist/bundle.d.ts.map +1 -1
  7. package/dist/dependency-range.d.ts.map +1 -1
  8. package/dist/download.d.ts +0 -7
  9. package/dist/download.d.ts.map +1 -1
  10. package/dist/errors.d.ts +0 -12
  11. package/dist/errors.d.ts.map +1 -1
  12. package/dist/index.d.ts +0 -10
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +29 -36
  15. package/dist/index.js.map +1 -1
  16. package/dist/input-file.d.ts +0 -15
  17. package/dist/input-file.d.ts.map +1 -1
  18. package/dist/integrity.d.ts +0 -14
  19. package/dist/integrity.d.ts.map +1 -1
  20. package/dist/layout.d.ts +22 -57
  21. package/dist/layout.d.ts.map +1 -1
  22. package/dist/locked-resolve.d.ts +0 -19
  23. package/dist/locked-resolve.d.ts.map +1 -1
  24. package/dist/lockfile/bun.d.ts.map +1 -1
  25. package/dist/lockfile/detect.d.ts +0 -7
  26. package/dist/lockfile/detect.d.ts.map +1 -1
  27. package/dist/lockfile/json.d.ts.map +1 -1
  28. package/dist/lockfile/npm.d.ts.map +1 -1
  29. package/dist/lockfile/parse.d.ts +0 -14
  30. package/dist/lockfile/parse.d.ts.map +1 -1
  31. package/dist/lockfile/pnpm.d.ts.map +1 -1
  32. package/dist/lockfile/tree-builder.d.ts.map +1 -1
  33. package/dist/lockfile/types.d.ts +0 -7
  34. package/dist/lockfile/types.d.ts.map +1 -1
  35. package/dist/manifest.d.ts.map +1 -1
  36. package/dist/node/archiver.d.ts.map +1 -1
  37. package/dist/node/index.d.ts +0 -11
  38. package/dist/node/index.d.ts.map +1 -1
  39. package/dist/node/index.js +1 -1
  40. package/dist/node/index.js.map +1 -1
  41. package/dist/node/platform.d.ts +0 -9
  42. package/dist/node/platform.d.ts.map +1 -1
  43. package/dist/options.d.ts +0 -7
  44. package/dist/options.d.ts.map +1 -1
  45. package/dist/platform.d.ts +0 -10
  46. package/dist/platform.d.ts.map +1 -1
  47. package/dist/progress.d.ts +0 -8
  48. package/dist/progress.d.ts.map +1 -1
  49. package/dist/registry.d.ts +5 -12
  50. package/dist/registry.d.ts.map +1 -1
  51. package/dist/resolve.d.ts +0 -18
  52. package/dist/resolve.d.ts.map +1 -1
  53. package/dist/schemas/lenient.d.ts.map +1 -1
  54. package/dist/schemas/package-json.d.ts +3 -12
  55. package/dist/schemas/package-json.d.ts.map +1 -1
  56. package/dist/spec.d.ts.map +1 -1
  57. package/package.json +12 -2
  58. package/src/archive.ts +9 -18
  59. package/src/bundle.ts +3 -18
  60. package/src/dependency-range.ts +0 -11
  61. package/src/download.ts +0 -7
  62. package/src/errors.ts +3 -13
  63. package/src/index.ts +2 -14
  64. package/src/input-file.ts +0 -15
  65. package/src/integrity.ts +0 -14
  66. package/src/layout.ts +22 -58
  67. package/src/locked-resolve.ts +5 -19
  68. package/src/lockfile/bun.ts +0 -8
  69. package/src/lockfile/detect.ts +0 -7
  70. package/src/lockfile/json.ts +0 -9
  71. package/src/lockfile/npm.ts +0 -8
  72. package/src/lockfile/parse.ts +0 -14
  73. package/src/lockfile/pnpm.ts +0 -7
  74. package/src/lockfile/tree-builder.ts +0 -6
  75. package/src/lockfile/types.ts +0 -7
  76. package/src/manifest.ts +0 -4
  77. package/src/node/archiver.ts +4 -12
  78. package/src/node/index.ts +0 -12
  79. package/src/node/platform.ts +0 -10
  80. package/src/options.ts +0 -7
  81. package/src/platform.ts +0 -11
  82. package/src/progress.ts +0 -8
  83. package/src/registry.ts +5 -12
  84. package/src/resolve.ts +4 -18
  85. package/src/schemas/lenient.ts +0 -15
  86. package/src/schemas/package-json.ts +4 -13
  87. package/src/spec.ts +0 -7
  88. package/dist/archive-D1AFjtiX.js.map +0 -1
@@ -266,7 +266,15 @@ const makeCollector = Effect.gen(function* () {
266
266
 
267
267
  //#endregion
268
268
  //#region src/archive.ts
269
- /** Service tag for archive creation. */
269
+ /**
270
+ * Service tag for archive creation.
271
+ *
272
+ * Packing is a service rather than a plain function because it is the one step
273
+ * that cannot go through `effect/FileSystem`: a tar writer reads the paths it
274
+ * is handed with the host's own file APIs, so a direct call would bypass the
275
+ * injected filesystem the rest of the engine runs on. Provide `layerArchiver`
276
+ * from `@packall/core/node`, or an implementation of your own.
277
+ */
270
278
  var Archiver = class extends Context.Service()("@packall/core/Archiver") {};
271
279
  /**
272
280
  * Packs an archive with whichever backend is installed.
@@ -292,4 +300,4 @@ const createArchive = (options) => Effect.gen(function* () {
292
300
 
293
301
  //#endregion
294
302
  export { VersionNotFoundError as S, OutputError as _, layerCallback as a, RegistryResponseUnavailableError as b, ArchiveError as c, InvalidInputFileError as d, InvalidSpecError as f, NoMatchingVersionsError as g, LockfileOutOfDateError as h, emit as i, AuthenticationError as l, LockfileIncompleteError as m, createArchive as n, layerSilent as o, LockfileError as p, Progress as r, makeCollector as s, Archiver as t, IntegrityError as u, PackageNotFoundError as v, RegistryUnreachableError as x, RegistryResponseError as y };
295
- //# sourceMappingURL=archive-D1AFjtiX.js.map
303
+ //# sourceMappingURL=archive-HuF2fp2A.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archive-HuF2fp2A.js","names":["layerSilent: Layer.Layer<Progress>","Progress.emit"],"sources":["../src/errors.ts","../src/progress.ts","../src/archive.ts"],"sourcesContent":["/** Discriminant union of every failure the bundler can produce. */\nexport type BundlerError =\n\t| InvalidSpecError\n\t| InvalidInputFileError\n\t| LockfileError\n\t| LockfileIncompleteError\n\t| LockfileOutOfDateError\n\t| RegistryUnreachableError\n\t| RegistryResponseUnavailableError\n\t| PackageNotFoundError\n\t| VersionNotFoundError\n\t| NoMatchingVersionsError\n\t| RegistryResponseError\n\t| AuthenticationError\n\t| IntegrityError\n\t| ArchiveError\n\t| OutputError;\n\n// Plain classes with a literal `_tag` rather than `Data.TaggedError`. They work\n// with `catchTag` / `catchTags` identically, and this keeps the public error\n// surface off a helper that may still move while Effect v4 is in beta.\nabstract class BundlerErrorBase extends Error {\n\tabstract readonly _tag: string;\n\tconstructor(message: string, options?: ErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.name = new.target.name;\n\t}\n}\n\n/** A package spec on the command line or in an input file could not be parsed. */\nexport class InvalidSpecError extends BundlerErrorBase {\n\treadonly _tag = \"InvalidSpecError\" as const;\n\treadonly spec: string;\n\treadonly reason: string;\n\tconstructor(spec: string, reason: string) {\n\t\tsuper(`Invalid package spec ${JSON.stringify(spec)}: ${reason}`);\n\t\tthis.spec = spec;\n\t\tthis.reason = reason;\n\t}\n}\n\n/** `--file` pointed at something that is neither a usable package.json nor a spec list. */\nexport class InvalidInputFileError extends BundlerErrorBase {\n\treadonly _tag = \"InvalidInputFileError\" as const;\n\treadonly path: string;\n\treadonly reason: string;\n\tconstructor(path: string, reason: string, options?: { cause?: unknown }) {\n\t\tsuper(`Cannot read specs from ${path}: ${reason}`, options);\n\t\tthis.path = path;\n\t\tthis.reason = reason;\n\t}\n}\n\n/** A lockfile could not be read, or is in a format we do not support. */\nexport class LockfileError extends BundlerErrorBase {\n\treadonly _tag = \"LockfileError\" as const;\n\treadonly path: string;\n\treadonly reason: string;\n\tconstructor(path: string, reason: string, options?: { cause?: unknown }) {\n\t\t// Opens with \"Lockfile\" so the renderer's tag prefix does not stutter, and\n\t\t// because not every reason is a read failure — \"does not cover this\n\t\t// package\" is about a file that read perfectly well.\n\t\tsuper(`Lockfile ${path}: ${reason}`, options);\n\t\tthis.path = path;\n\t\tthis.reason = reason;\n\t}\n}\n\n/**\n * The lockfile parsed, but does not pin everything the bundle needs.\n *\n * Falling back to a range here would defeat the entire point of reading a\n * lockfile — you would get a bundle that is *mostly* what CI installed, with no\n * indication of which parts were guessed. So this is fatal, and it names every\n * gap at once so one `npm install` fixes all of them.\n */\nexport class LockfileIncompleteError extends BundlerErrorBase {\n\treadonly _tag = \"LockfileIncompleteError\" as const;\n\treadonly path: string;\n\treadonly missing: ReadonlyArray<string>;\n\tconstructor(path: string, missing: ReadonlyArray<string>, detail: string, remedy: string) {\n\t\tconst shown = missing\n\t\t\t.slice(0, 10)\n\t\t\t.map((entry) => ` ${entry}`)\n\t\t\t.join(\"\\n\");\n\t\tconst rest = missing.length > 10 ? `\\n … and ${missing.length - 10} more` : \"\";\n\t\tsuper(\n\t\t\t`${path} is incomplete — ${detail}:\\n${shown}${rest}\\n` +\n\t\t\t\t` ${remedy}\\n` +\n\t\t\t\t` Or pass --lockfile off to resolve version ranges fresh instead.`,\n\t\t);\n\t\tthis.path = path;\n\t\tthis.missing = missing;\n\t}\n}\n\n/**\n * The lockfile pins versions the registry no longer serves.\n *\n * Unpublished, or never mirrored into a private registry. Either way the\n * bundle cannot be built as specified, and quietly substituting a nearby\n * version would produce exactly the mismatch this feature exists to prevent.\n */\nexport class LockfileOutOfDateError extends BundlerErrorBase {\n\treadonly _tag = \"LockfileOutOfDateError\" as const;\n\treadonly path: string;\n\treadonly registry: string;\n\treadonly missing: ReadonlyArray<{ readonly name: string; readonly version: string }>;\n\tconstructor(\n\t\tpath: string,\n\t\tregistry: string,\n\t\tmissing: ReadonlyArray<{\n\t\t\treadonly name: string;\n\t\t\treadonly version: string;\n\t\t\treadonly detail: string;\n\t\t}>,\n\t) {\n\t\tconst shown = missing\n\t\t\t.slice(0, 10)\n\t\t\t.map((entry) => ` ${entry.name}@${entry.version} — ${entry.detail}`)\n\t\t\t.join(\"\\n\");\n\t\tconst rest = missing.length > 10 ? `\\n … and ${missing.length - 10} more` : \"\";\n\t\tsuper(\n\t\t\t`${path} pins ${missing.length} version${missing.length === 1 ? \"\" : \"s\"} ` +\n\t\t\t\t`that ${registry} does not serve:\\n${shown}${rest}\\n` +\n\t\t\t\t` Refresh the lockfile against this registry, or pass --lockfile off to\\n` +\n\t\t\t\t` resolve version ranges fresh instead.`,\n\t\t);\n\t\tthis.path = path;\n\t\tthis.registry = registry;\n\t\tthis.missing = missing.map(({ name, version }) => ({ name, version }));\n\t}\n}\n\n/**\n * The registry could not be reached at all — DNS failure, refused connection,\n * a certificate the machine does not trust, proxy blackhole, or a preflight\n * that timed out.\n *\n * This is the error that fixes \"hangs forever with no network\": we surface it\n * quickly and say which host we could not reach.\n */\nexport class RegistryUnreachableError extends BundlerErrorBase {\n\treadonly _tag = \"RegistryUnreachableError\" as const;\n\treadonly registry: string;\n\treadonly timeoutMs: number | undefined;\n\t/**\n\t * `hint` replaces the closing line of advice.\n\t *\n\t * The default suits the common case and is wrong for at least one: a\n\t * rejected certificate is not a network problem, and telling somebody to\n\t * check their VPN sends them to look at the one thing that is working. The\n\t * backend knows which failure it saw, so it is the backend that gets to say.\n\t */\n\tconstructor(\n\t\tregistry: string,\n\t\tdetail: string,\n\t\toptions?: { cause?: unknown; timeoutMs?: number; hint?: string | undefined },\n\t) {\n\t\tsuper(\n\t\t\t`Cannot reach registry ${registry}: ${detail}.\\n ${options?.hint ?? NETWORK_HINT}`,\n\t\t\toptions,\n\t\t);\n\t\tthis.registry = registry;\n\t\tthis.timeoutMs = options?.timeoutMs;\n\t}\n}\n\nconst NETWORK_HINT = \"Check your network connection, VPN, and the proxy settings in your .npmrc.\";\n\n/** No response was exposed, so neither an HTTP status nor a network failure can be claimed. */\nexport class RegistryResponseUnavailableError extends BundlerErrorBase {\n\treadonly _tag = \"RegistryResponseUnavailableError\" as const;\n\treadonly registry: string;\n\treadonly packageName: string;\n\tconstructor(registry: string, packageName: string, options?: { cause?: unknown }) {\n\t\tsuper(\n\t\t\t`No readable response from ${registry} while fetching \"${packageName}\".\\n` +\n\t\t\t\t` The requested package or file may not exist, the registry may block this environment, or the network may be unavailable.\\n` +\n\t\t\t\t` Check the package name and registry access, or run the command locally for a more specific error.`,\n\t\t\toptions,\n\t\t);\n\t\tthis.registry = registry;\n\t\tthis.packageName = packageName;\n\t}\n}\n\n/** The registry answered, but has never heard of this package. */\nexport class PackageNotFoundError extends BundlerErrorBase {\n\treadonly _tag = \"PackageNotFoundError\" as const;\n\treadonly packageName: string;\n\treadonly registry: string;\n\tconstructor(packageName: string, registry: string) {\n\t\tsuper(`Package \"${packageName}\" was not found on ${registry}`);\n\t\tthis.packageName = packageName;\n\t\tthis.registry = registry;\n\t}\n}\n\n/** The package exists but the exact version requested does not. */\nexport class VersionNotFoundError extends BundlerErrorBase {\n\treadonly _tag = \"VersionNotFoundError\" as const;\n\treadonly packageName: string;\n\treadonly version: string;\n\treadonly available: ReadonlyArray<string>;\n\tconstructor(packageName: string, version: string, available: ReadonlyArray<string>) {\n\t\tconst tail = available.slice(-5).join(\", \");\n\t\tsuper(\n\t\t\t`${packageName}@${version} does not exist.` +\n\t\t\t\t(tail.length > 0 ? ` Most recent published versions: ${tail}` : \"\"),\n\t\t);\n\t\tthis.packageName = packageName;\n\t\tthis.version = version;\n\t\tthis.available = available;\n\t}\n}\n\n/** A range (or dist-tag) matched nothing that is actually published. */\nexport class NoMatchingVersionsError extends BundlerErrorBase {\n\treadonly _tag = \"NoMatchingVersionsError\" as const;\n\treadonly packageName: string;\n\treadonly selector: string;\n\treadonly available: ReadonlyArray<string>;\n\tconstructor(packageName: string, selector: string, available: ReadonlyArray<string>) {\n\t\tconst tail = available.slice(-5).join(\", \");\n\t\tsuper(\n\t\t\t`No published version of ${packageName} satisfies \"${selector}\".` +\n\t\t\t\t(tail.length > 0 ? ` Most recent published versions: ${tail}` : \"\"),\n\t\t);\n\t\tthis.packageName = packageName;\n\t\tthis.selector = selector;\n\t\tthis.available = available;\n\t}\n}\n\n/** The registry responded, but with something we cannot use. */\nexport class RegistryResponseError extends BundlerErrorBase {\n\treadonly _tag = \"RegistryResponseError\" as const;\n\treadonly url: string;\n\treadonly status: number | undefined;\n\tconstructor(url: string, detail: string, options?: { cause?: unknown; status?: number }) {\n\t\tsuper(`Unexpected response from ${url}: ${detail}`, options);\n\t\tthis.url = url;\n\t\tthis.status = options?.status;\n\t}\n}\n\n/** 401/403 — almost always a missing or stale token in `.npmrc`. */\nexport class AuthenticationError extends BundlerErrorBase {\n\treadonly _tag = \"AuthenticationError\" as const;\n\treadonly registry: string;\n\treadonly status: number;\n\tconstructor(registry: string, status: number, packageName?: string) {\n\t\tsuper(\n\t\t\t`Registry ${registry} rejected the request with HTTP ${status}` +\n\t\t\t\t(packageName ? ` while fetching \"${packageName}\"` : \"\") +\n\t\t\t\t`.\\n Add credentials to your .npmrc, e.g.\\n` +\n\t\t\t\t` //${safeHost(registry)}/:_authToken=\\${NPM_TOKEN}`,\n\t\t);\n\t\tthis.registry = registry;\n\t\tthis.status = status;\n\t}\n}\n\n/**\n * A downloaded tarball did not match the checksum the registry advertised.\n *\n * Never soft-fail this: a bundle is a supply-chain artifact and a corrupt or\n * substituted tarball is exactly what integrity checking exists to catch.\n */\nexport class IntegrityError extends BundlerErrorBase {\n\treadonly _tag = \"IntegrityError\" as const;\n\treadonly packageName: string;\n\treadonly version: string;\n\treadonly expected: string;\n\treadonly actual: string;\n\tconstructor(packageName: string, version: string, expected: string, actual: string) {\n\t\tsuper(\n\t\t\t`Integrity check failed for ${packageName}@${version}.\\n` +\n\t\t\t\t` expected: ${expected}\\n` +\n\t\t\t\t` actual: ${actual}\\n` +\n\t\t\t\t` The download was discarded. This is either corruption in transit or a tampered artifact.`,\n\t\t);\n\t\tthis.packageName = packageName;\n\t\tthis.version = version;\n\t\tthis.expected = expected;\n\t\tthis.actual = actual;\n\t}\n}\n\n/** Something went wrong writing the `.tgz`. */\nexport class ArchiveError extends BundlerErrorBase {\n\treadonly _tag = \"ArchiveError\" as const;\n\treadonly path: string;\n\tconstructor(path: string, detail: string, options?: { cause?: unknown }) {\n\t\tsuper(`Failed to create archive ${path}: ${detail}`, options);\n\t\tthis.path = path;\n\t}\n}\n\n/** Something went wrong preparing or writing to the output directory. */\nexport class OutputError extends BundlerErrorBase {\n\treadonly _tag = \"OutputError\" as const;\n\treadonly path: string;\n\tconstructor(path: string, detail: string, options?: { cause?: unknown }) {\n\t\tsuper(`Output error at ${path}: ${detail}`, options);\n\t\tthis.path = path;\n\t}\n}\n\nconst safeHost = (registry: string): string => {\n\ttry {\n\t\tconst url = new URL(registry);\n\t\treturn url.host + url.pathname.replace(/\\/+$/, \"\");\n\t} catch {\n\t\treturn registry;\n\t}\n};\n","import * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Ref from \"effect/Ref\";\n\nimport type { Phase } from \"./enums/phase.js\";\n\n/** A structured progress event. */\nexport type ProgressEvent =\n\t/** A phase began. `total` is set only when it is known up front. */\n\t| { readonly _tag: \"PhaseStarted\"; readonly phase: Phase; readonly total?: number | undefined }\n\t/** A phase finished. */\n\t| { readonly _tag: \"PhaseCompleted\"; readonly phase: Phase }\n\t/** The resolver discovered a package that has to be included. */\n\t| {\n\t\t\treadonly _tag: \"PackageResolved\";\n\t\t\treadonly name: string;\n\t\t\treadonly version: string;\n\t\t\t/** Running count of resolved packages, for a live counter. */\n\t\t\treadonly resolvedCount: number;\n\t\t\t/** Packages still queued for resolution. */\n\t\t\treadonly pendingCount: number;\n\t }\n\t/** A tarball download started. */\n\t| { readonly _tag: \"DownloadStarted\"; readonly name: string; readonly version: string }\n\t/** A tarball download finished. */\n\t| {\n\t\t\treadonly _tag: \"DownloadCompleted\";\n\t\t\treadonly name: string;\n\t\t\treadonly version: string;\n\t\t\treadonly bytes: number;\n\t\t\treadonly completedCount: number;\n\t\t\treadonly totalCount: number;\n\t }\n\t/** A download failed and will be retried. */\n\t| {\n\t\t\treadonly _tag: \"DownloadRetrying\";\n\t\t\treadonly name: string;\n\t\t\treadonly version: string;\n\t\t\treadonly attempt: number;\n\t\t\treadonly reason: string;\n\t }\n\t/** An archive is being written. */\n\t| { readonly _tag: \"ArchiveStarted\"; readonly path: string; readonly entryCount: number }\n\t/** An archive finished. */\n\t| { readonly _tag: \"ArchiveCompleted\"; readonly path: string; readonly bytes: number }\n\t/** Something noteworthy but non-fatal, e.g. a deprecated package. */\n\t| { readonly _tag: \"Warning\"; readonly message: string };\n\nexport declare namespace Progress {\n\t/** The reporting sink. */\n\texport type Service = {\n\t\treadonly emit: (event: ProgressEvent) => Effect.Effect<void>;\n\t};\n}\n\n/** Service tag for progress reporting. */\nexport class Progress extends Context.Service<Progress, Progress.Service>()(\n\t\"@packall/core/Progress\",\n) {}\n\n/** Emits an event to whichever reporter is installed. */\nexport const emit = (event: ProgressEvent): Effect.Effect<void, never, Progress> =>\n\tEffect.gen(function* () {\n\t\tconst progress = yield* Progress;\n\t\tyield* progress.emit(event);\n\t});\n\n/**\n * Discards every event.\n *\n * The default for library consumers and for tests that do not care about\n * progress — silence should never require ceremony.\n */\nexport const layerSilent: Layer.Layer<Progress> = Layer.succeed(Progress)({\n\temit: () => Effect.void,\n});\n\n/** Sends every event to a callback. Used by the CLI renderer. */\nexport const layerCallback = (onEvent: (event: ProgressEvent) => void): Layer.Layer<Progress> =>\n\tLayer.succeed(Progress)({\n\t\temit: (event) => Effect.sync(() => onEvent(event)),\n\t});\n\n/**\n * Accumulates every event into a `Ref`, for assertions.\n *\n * Returned as `{ layer, events }` so a test can provide the layer and then read\n * the transcript afterwards.\n */\nexport const makeCollector = Effect.gen(function* () {\n\tconst ref = yield* Ref.make<ReadonlyArray<ProgressEvent>>([]);\n\tconst layer = Layer.succeed(Progress)({\n\t\temit: (event: ProgressEvent) => Ref.update(ref, (events) => [...events, event]),\n\t});\n\treturn { layer, events: Ref.get(ref) } as const;\n});\n","import * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport type * as FileSystem from \"effect/FileSystem\";\nimport type { PlatformError } from \"effect/PlatformError\";\n\nimport type { ArchiveError } from \"./errors.js\";\nimport * as Progress from \"./progress.js\";\n\n/** A finished archive. */\nexport type ArchiveResult = {\n\treadonly path: string;\n\treadonly bytes: number;\n};\n\n/** What to pack, and where to put it. */\nexport type CreateArchiveOptions = {\n\treadonly cwd: string;\n\t/** Entry paths, relative to `cwd`. */\n\treadonly entries: ReadonlyArray<string>;\n\treadonly outPath: string;\n\treadonly gzipLevel?: number | undefined;\n};\n\nexport declare namespace Archiver {\n\t/** The packing backend. */\n\texport type Service = {\n\t\t/**\n\t\t * Packs `entries` (paths relative to `cwd`) into a gzipped tar at\n\t\t * `outPath`.\n\t\t *\n\t\t * Implementations must produce byte-identical output for identical inputs —\n\t\t * normalised uid/gid/mtime, entries in a stable order — because a security\n\t\t * team diffing two bundles, or re-deriving one from its manifest, is a\n\t\t * thing that actually happens.\n\t\t */\n\t\treadonly create: (\n\t\t\toptions: CreateArchiveOptions,\n\t\t) => Effect.Effect<ArchiveResult, ArchiveError | PlatformError, FileSystem.FileSystem>;\n\t};\n}\n\n/**\n * Service tag for archive creation.\n *\n * Packing is a service rather than a plain function because it is the one step\n * that cannot go through `effect/FileSystem`: a tar writer reads the paths it\n * is handed with the host's own file APIs, so a direct call would bypass the\n * injected filesystem the rest of the engine runs on. Provide `layerArchiver`\n * from `@packall/core/node`, or an implementation of your own.\n */\nexport class Archiver extends Context.Service<Archiver, Archiver.Service>()(\n\t\"@packall/core/Archiver\",\n) {}\n\n/**\n * Packs an archive with whichever backend is installed.\n *\n * The progress events are emitted here rather than inside the backends, so\n * every implementation reports identically and a new one cannot forget to.\n */\nexport const createArchive = (\n\toptions: CreateArchiveOptions,\n): Effect.Effect<\n\tArchiveResult,\n\tArchiveError | PlatformError,\n\tArchiver | FileSystem.FileSystem | Progress.Progress\n> =>\n\tEffect.gen(function* () {\n\t\tconst archiver = yield* Archiver;\n\n\t\tyield* Progress.emit({\n\t\t\t_tag: \"ArchiveStarted\",\n\t\t\tpath: options.outPath,\n\t\t\tentryCount: options.entries.length,\n\t\t});\n\n\t\tconst result = yield* archiver.create(options);\n\n\t\tyield* Progress.emit({\n\t\t\t_tag: \"ArchiveCompleted\",\n\t\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,CAAC;;;;;;;AAQF,MAAa,iBACZ,YAMA,OAAO,IAAI,aAAa;CACvB,MAAM,WAAW,OAAO;AAExB,QAAOC,KAAc;EACpB,MAAM;EACN,MAAM,QAAQ;EACd,YAAY,QAAQ,QAAQ;EAC5B,CAAC;CAEF,MAAM,SAAS,OAAO,SAAS,OAAO,QAAQ;AAE9C,QAAOA,KAAc;EACpB,MAAM;EACN,MAAM,OAAO;EACb,OAAO,OAAO;EACd,CAAC;AAEF,QAAO;EACN"}
package/dist/archive.d.ts CHANGED
@@ -1,20 +1,3 @@
1
- /**
2
- * Turning a staged directory tree into a gzipped tarball.
3
- *
4
- * A service rather than a function, because packing is the one step that has
5
- * to be implemented differently per platform. Everywhere else the engine
6
- * reaches the disk through `effect/FileSystem`, which is what lets an in-memory
7
- * filesystem carry the whole pipeline — but a tar writer is not filesystem
8
- * access, it is a format, and `node-tar` reads the paths it is given with
9
- * Node's own `fs` rather than through the injected service. Left as a direct
10
- * call, packing would quietly bypass the abstraction the rest of the engine
11
- * depends on, which stays invisible until something other than Node provides
12
- * the filesystem.
13
- *
14
- * The implementations live outside this module — `@packall/core/node` for
15
- * Node, a Web Streams writer in the browser — so nothing platform-specific is
16
- * reachable from the engine's own graph.
17
- */
18
1
  import * as Context from "effect/Context";
19
2
  import * as Effect from "effect/Effect";
20
3
  import type * as FileSystem from "effect/FileSystem";
@@ -50,7 +33,15 @@ export declare namespace Archiver {
50
33
  };
51
34
  }
52
35
  declare const Archiver_base: Context.ServiceClass<Archiver, "@packall/core/Archiver", Archiver.Service>;
53
- /** Service tag for archive creation. */
36
+ /**
37
+ * Service tag for archive creation.
38
+ *
39
+ * Packing is a service rather than a plain function because it is the one step
40
+ * that cannot go through `effect/FileSystem`: a tar writer reads the paths it
41
+ * is handed with the host's own file APIs, so a direct call would bypass the
42
+ * injected filesystem the rest of the engine runs on. Provide `layerArchiver`
43
+ * from `@packall/core/node`, or an implementation of your own.
44
+ */
54
45
  export declare class Archiver extends Archiver_base {
55
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AAa,QAAS,SAAQ,aAE7B;CAAG;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,aAAa,YAChB,oBAAoB,KAC3B,MAAM,CAAC,MAAM,CACf,aAAa,EACb,YAAY,GAAG,aAAa,EAC5B,QAAQ,GAAG,UAAU,CAAC,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAoBlD,CAAC"}
package/dist/bundle.d.ts CHANGED
@@ -1,21 +1,3 @@
1
- /**
2
- * End-to-end orchestration: specs in, tarballs out.
3
- *
4
- * Two properties this module is responsible for — see `notes/requirements.md`
5
- * § FR-5 and § NFR-9 for why they are requirements, and the mechanisms below
6
- * for why the code reads as it does:
7
- *
8
- * 1. **Nothing is written outside the output directory.** Every intermediate
9
- * file lives in a scoped temp directory obtained from
10
- * `makeTempDirectoryScoped`, so the scope closing — on success, on failure,
11
- * or on Ctrl-C — takes the whole staging tree with it. The working
12
- * directory is never touched.
13
- *
14
- * 2. **Each package is downloaded exactly once**, no matter how many bundles
15
- * it ends up in. Per-spec archives are assembled by hard-linking out of one
16
- * shared download tree, so `per-spec` costs extra disk in the *output*, not
17
- * extra network.
18
- */
19
1
  import type * as Crypto from "effect/Crypto";
20
2
  import * as Effect from "effect/Effect";
21
3
  import * as FileSystem from "effect/FileSystem";
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B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AAsC;AACtC,eAAO,MAAM,YAAY,aACd,UAAU,WACX,aAAa,GAAG,oBAAoB,KAC3C,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,aAAa,EAAE,SAAS,CAInE,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,eACd,UAAU,WACb,aAAa,KACpB,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,aAAa,EAAE,SAAS,CAYnE,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,cAAc,eACd,UAAU,WACb,aAAa,KACpB,aAAa,CAAC,aAAa,CAY7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"dependency-range.d.ts","sourceRoot":"","sources":["../src/dependency-range.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,wCAAwC;AACxC,MAAM,MAAM,gBAAgB;AAC3B,mFAAmF;AACjF;IACA,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AACH,iDAAiD;GAC/C;IACA,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACvB,CAAC;AAiBL;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,SAAU,MAAM,OAAO,MAAM,KAAG,gBAuCjE,CAAC"}
1
+ {"version":3,"file":"dependency-range.d.ts","sourceRoot":"","sources":["../src/dependency-range.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,wCAAwC;AACxC,MAAM,MAAM,gBAAgB;AAC3B,mFAAmF;AACjF;IACA,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AACH,iDAAiD;GAC/C;IACA,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACvB,CAAC;AAiBL;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,SAAU,MAAM,OAAO,MAAM,KAAG,gBAuCjE,CAAC"}
@@ -1,10 +1,3 @@
1
- /**
2
- * Fetching tarballs into the staging tree.
3
- *
4
- * Downloads run concurrently, every one is checksum-verified before it is
5
- * written, and the destination is always the scoped temp directory — nothing
6
- * lands next to the user's own files.
7
- */
8
1
  import type * as Crypto from "effect/Crypto";
9
2
  import * as Effect from "effect/Effect";
10
3
  import * as FileSystem from "effect/FileSystem";
@@ -1 +1 @@
1
- {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../src/download.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,OAAO,KAAK,Q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KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,8CAA8C;AAC9C,MAAM,MAAM,cAAc,GAAG;IAC5B,uCAAuC;IACvC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,aACb,aAAa,CAAC,eAAe,CAAC,WAC/B,MAAM,WACN;IAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;CAAE,KAC1E,MAAM,CAAC,MAAM,CACf,cAAc,EACd,YAAY,GAAG,aAAa,EAC5B,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CA6G9E,CAAC"}
package/dist/errors.d.ts CHANGED
@@ -1,15 +1,3 @@
1
- /**
2
- * Failure types for the bundler.
3
- *
4
- * These are deliberately plain classes carrying a literal `_tag` rather than
5
- * `Data.TaggedError`. They work with `Effect.catchTag` / `Effect.catchTags`
6
- * exactly the same way, and they keep the public error surface independent of
7
- * any single Effect release — useful while Effect v4 is still in beta.
8
- *
9
- * Every error carries enough context to be actionable without a stack trace,
10
- * because the primary consumer is somebody staring at a terminal on a
11
- * locked-down network trying to work out why a download did not happen.
12
- */
13
1
  /** Discriminant union of every failure the bundler can produce. */
14
2
  export type BundlerError = InvalidSpecError | InvalidInputFileError | LockfileError | LockfileIncompleteError | LockfileOutOfDateError | RegistryUnreachableError | RegistryResponseUnavailableError | PackageNotFoundError | VersionNotFoundError | NoMatchingVersionsError | RegistryResponseError | AuthenticationError | IntegrityError | ArchiveError | OutputError;
15
3
  declare abstract class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,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAGtE;CACD"}
package/dist/index.d.ts CHANGED
@@ -1,13 +1,3 @@
1
- /**
2
- * `@packall/core` — the registry-agnostic bundling engine.
3
- *
4
- * Nothing in here knows about npm specifically. Point it at any implementation
5
- * of the `Registry` service and it will resolve, download, verify and package
6
- * a dependency closure.
7
- *
8
- * This is the package's whole public API. Everything not named here is an
9
- * implementation detail, including modules that happen to be reachable.
10
- */
11
1
  export type * from "./errors.js";
12
2
  export { ArchiveError, AuthenticationError, IntegrityError, InvalidInputFileError, InvalidSpecError, LockfileError, LockfileIncompleteError, LockfileOutOfDateError, NoMatchingVersionsError, OutputError, PackageNotFoundError, RegistryResponseError, RegistryResponseUnavailableError, RegistryUnreachableError, VersionNotFoundError, } from "./errors.js";
13
3
  export { ArtifactKind } from "./enums/artifact-kind.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,mBAAmB,aAAa,CAAC;AACjC,OAAO,EACN,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,gCAAgC,EAChC,wBAAwB,EACxB,oBAAoB,GACpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4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
@@ -1,4 +1,4 @@
1
- import { S as VersionNotFoundError, _ as OutputError, a as layerCallback, b as RegistryResponseUnavailableError, c as ArchiveError, d as InvalidInputFileError, f as InvalidSpecError, g as NoMatchingVersionsError, h as LockfileOutOfDateError, i as emit, l as AuthenticationError, m as LockfileIncompleteError, n as createArchive, o as layerSilent, p as LockfileError, r as Progress, s as makeCollector, t as Archiver, u as IntegrityError, v as PackageNotFoundError, x as RegistryUnreachableError, y as RegistryResponseError } from "./archive-D1AFjtiX.js";
1
+ import { S as VersionNotFoundError, _ as OutputError, a as layerCallback, b as RegistryResponseUnavailableError, c as ArchiveError, d as InvalidInputFileError, f as InvalidSpecError, g as NoMatchingVersionsError, h as LockfileOutOfDateError, i as emit, l as AuthenticationError, m as LockfileIncompleteError, n as createArchive, o as layerSilent, p as LockfileError, r as Progress, s as makeCollector, t as Archiver, u as IntegrityError, v as PackageNotFoundError, x as RegistryUnreachableError, y as RegistryResponseError } from "./archive-HuF2fp2A.js";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Option from "effect/Option";
4
4
  import * as Schema from "effect/Schema";
@@ -536,6 +536,11 @@ const defaultBundleOptions = {
536
536
  /**
537
537
  * Service tag for the registry backend.
538
538
  *
539
+ * The engine's only route to a registry. Version selection, the dependency
540
+ * walk, layout and archiving are all written against these four operations, so
541
+ * backing a registry that does not speak the npm protocol means implementing
542
+ * this interface and nothing else.
543
+ *
539
544
  * @example
540
545
  * ```ts
541
546
  * import { Effect } from "effect"
@@ -673,7 +678,12 @@ const splitName = (name) => {
673
678
  bare: name.slice(slash + 1)
674
679
  };
675
680
  };
676
- /** `@babel/core` + `7.24.0` -> `core-7.24.0.tgz` */
681
+ /**
682
+ * `@babel/core` + `7.24.0` -> `core-7.24.0.tgz`
683
+ *
684
+ * The scope is dropped, because that is what the registry serves. It is also
685
+ * why a flat directory of tarballs cannot use this name — see {@link flatName}.
686
+ */
677
687
  const tarballFileName = (name, version) => {
678
688
  const { bare } = splitName(name);
679
689
  return `${bare}-${version}.tgz`;
@@ -689,43 +699,22 @@ const MANIFEST_FILE = "bundle-manifest.json";
689
699
  /** File name of the short import guide that ships inside every bundle. */
690
700
  const README_FILE = "IMPORT.md";
691
701
  /**
692
- * A flat, collision-free file name for one `name@version`.
693
- *
694
- * It is the spec, with the one character a file name cannot hold taken out:
695
- * `@types/react@19.2.18` becomes `@types-react@19.2.18.tgz`. So the name of the
696
- * file answers the question somebody has when they are looking at a directory
697
- * of them — which package, and which version — in the notation they would have
698
- * typed to ask for it.
702
+ * A flat, collision-free file name for one `name@version`:
703
+ * `@types/react@19.2.18` becomes `@types-react@19.2.18.tgz`.
699
704
  *
700
- * The version is joined with `@` rather than `-` for the same reason. A
701
- * hyphen made `foo-bar-1.0.0` ambiguous by eye: package `foo` at `bar-1.0.0`,
702
- * or `foo-bar` at `1.0.0`? npm's own syntax has no such problem, because a
703
- * package name may not contain `@` beyond its scope.
705
+ * **The scope's `@` stays.** Dropping it which this did, matching `npm pack`
706
+ * put `@something/somewhat` and `something-somewhat` on the same file name,
707
+ * and the run reported two artifacts for the one file that survived. Keeping it
708
+ * makes that impossible by construction rather than by a check, because an
709
+ * unscoped npm name may not begin with `@`.
704
710
  *
705
- * **The scope's `@` stays**, and it is the difference between a correct bundle
706
- * and a quietly incomplete one.
711
+ * The version joins with `@` rather than `-` because `foo-bar-1.0.0` is
712
+ * ambiguous by eye: `foo` at `bar-1.0.0`, or `foo-bar` at `1.0.0`?
707
713
  *
708
- * Dropping it which this did, matching what `npm pack` produces — meant
709
- * `@something/somewhat` and `something-somewhat` were both
710
- * `something-somewhat-1.0.0.tgz`. Two different packages, one path: the second
711
- * landed on the first, and the run reported two artifacts for the one file that
712
- * survived. A bundle short a package, called complete, found at the far end of
713
- * an air gap.
714
- *
715
- * Keeping the `@` makes that impossible by construction rather than by a check,
716
- * because an unscoped npm name may not begin with one. It is also the more
717
- * honest name: the scope is part of what the package *is*, and a directory of
718
- * archives that has forgotten which ones were scoped is a directory somebody
719
- * has to cross-reference against a manifest.
720
- *
721
- * It does not make every collision impossible — `@a/b-c` and `@a-b/c` still
722
- * meet — so the run still checks before downloading anything. That pair is
723
- * pathological; the scoped-against-unscoped one is `@babel/core` beside
724
- * `babel-core`, which is a real migration somebody could be bundling.
725
- *
726
- * The leading `@` is safe here in a way it is not inside the archive: tar's
727
- * splice convention applies to the *file list* it is given, which is what
728
- * `archive.ts` guards with `./`. These are output paths, not entries.
714
+ * `@a/b-c` against `@a-b/c` still collides, so callers check before
715
+ * downloading. The leading `@` is safe here in a way it is not inside an
716
+ * archive: tar's splice convention applies to the entry list, which the
717
+ * archiver guards with `./`. These are output paths, not entries.
729
718
  */
730
719
  const flatName = (name, version) => {
731
720
  const { scope, bare } = splitName(name);
@@ -2239,6 +2228,10 @@ const resolveFormat = (path, content) => {
2239
2228
 
2240
2229
  //#endregion
2241
2230
  //#region src/schemas/package-json.ts
2231
+ /**
2232
+ * Every block is optional and a wrongly-typed one decodes as absent, so a
2233
+ * hand-edited manifest produces a shorter spec list rather than a failed read.
2234
+ */
2242
2235
  const PackageJsonSchema = Schema.Struct({
2243
2236
  dependencies: tolerant(StringRecordSchema),
2244
2237
  devDependencies: tolerant(StringRecordSchema),