@savvy-web/silk 3.0.1 → 3.0.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.
@@ -4503,7 +4503,7 @@ declare class GlobPattern extends GlobPattern_base {
4503
4503
  static readonly FromString: Schema.Codec<GlobPattern, string>;
4504
4504
  }
4505
4505
  //#endregion
4506
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/index.d.ts
4506
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.4_@effected+jsonc@0.3.0_effect@4.0.0-beta.98__@effected+npm@0.2_7fc50d596abf9879356de67fd92b0252/node_modules/@effected/lockfiles/index.d.ts
4507
4507
  //#region src/BunExtension.d.ts
4508
4508
  declare const BunExtension_base: Schema.Class<BunExtension, Schema.Struct<{
4509
4509
  readonly _tag: Schema.tag<"bun">;
@@ -5330,7 +5330,7 @@ declare class Package extends Package_base {
5330
5330
  toJsonString(options?: PackageFormatOptions): string;
5331
5331
  }
5332
5332
  //#endregion
5333
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/index.d.ts
5333
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.0_@effected+jsonc@0.3.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/index.d.ts
5334
5334
  //#region src/WorkspacePackage.d.ts
5335
5335
  declare const PublishConfig_base: Schema.Class<PublishConfig, Schema.Struct<{
5336
5336
  /** Scoped-package visibility. Its presence overrides `private`. */
@@ -5758,6 +5758,72 @@ declare class WorkspaceDiscovery extends WorkspaceDiscovery_base {
5758
5758
  * rather than calling `layer(...)` at each composition site.
5759
5759
  */
5760
5760
  static readonly layer: (options?: WorkspaceDiscoveryOptions) => Layer.Layer<WorkspaceDiscovery, never, WorkspaceRoot | FileSystem.FileSystem | Path.Path>;
5761
+ /**
5762
+ * An in-memory test double of the service shape, with every method
5763
+ * defaulted so a test stubs only what it exercises.
5764
+ *
5765
+ * @remarks
5766
+ * The defaults model an **empty workspace**, and the derived methods run
5767
+ * over the *effective* `listPackages` — the override when one is supplied —
5768
+ * so stubbing only `listPackages` yields a consistent double:
5769
+ *
5770
+ * - `listPackages` — succeeds with `[]`.
5771
+ * - `importerMap` — derived: the packages keyed by `relativePath`.
5772
+ * - `getPackage` — derived: a name lookup that fails with the service's own
5773
+ * typed {@link PackageNotFoundError} on a miss, exactly as the live
5774
+ * implementation does.
5775
+ * - `resolveFile` / `resolveFiles` — derived: longest-prefix ownership over
5776
+ * `pkg.path`, POSIX-terminated (`"/"`); supply a win32 double explicitly
5777
+ * if your fixture paths are win32.
5778
+ * - `refresh` — a no-op (`Effect.void`); there is nothing memoized to drop.
5779
+ * - `info` — **dies** with an explanatory defect. No honest default exists
5780
+ * (a fabricated root path would leak into consumer path logic), so an
5781
+ * unstubbed `info()` call is a test-wiring mistake and fails loudly as a
5782
+ * defect rather than succeeding with a lie or failing with a dishonest
5783
+ * typed error.
5784
+ *
5785
+ * @example
5786
+ * ```ts
5787
+ * import { WorkspaceDiscovery, WorkspacePackage } from "@effected/workspaces";
5788
+ * import { Effect } from "effect";
5789
+ *
5790
+ * const double = WorkspaceDiscovery.makeTest({
5791
+ * listPackages: () =>
5792
+ * Effect.succeed([
5793
+ * WorkspacePackage.make({
5794
+ * name: "@my-org/utils",
5795
+ * version: "1.0.0",
5796
+ * path: "/repo/packages/utils",
5797
+ * packageJsonPath: "/repo/packages/utils/package.json",
5798
+ * relativePath: "packages/utils",
5799
+ * }),
5800
+ * ]),
5801
+ * });
5802
+ * // `getPackage`, `importerMap`, `resolveFile(s)` now answer consistently.
5803
+ * ```
5804
+ */
5805
+ static readonly makeTest: (overrides?: Partial<WorkspaceDiscoveryShape>) => WorkspaceDiscoveryShape;
5806
+ /**
5807
+ * The test layer: {@link WorkspaceDiscovery.makeTest} behind
5808
+ * `Layer.succeed`, so a suite provides only the methods it exercises.
5809
+ *
5810
+ * @remarks
5811
+ * A parameterized layer factory mints a **fresh reference per call**, and
5812
+ * layers memoize by reference — bind the result to a `const` and reuse it
5813
+ * rather than calling `layerTest(...)` at each composition site.
5814
+ *
5815
+ * @example
5816
+ * ```ts
5817
+ * import { WorkspaceDiscovery } from "@effected/workspaces";
5818
+ * import { Effect } from "effect";
5819
+ *
5820
+ * const TestDiscovery = WorkspaceDiscovery.layerTest({
5821
+ * listPackages: () => Effect.succeed([]),
5822
+ * });
5823
+ * // program.pipe(Effect.provide(TestDiscovery))
5824
+ * ```
5825
+ */
5826
+ static readonly layerTest: (overrides?: Partial<WorkspaceDiscoveryShape>) => Layer.Layer<WorkspaceDiscovery>;
5761
5827
  /**
5762
5828
  * The real implementation of `@effected/npm`'s `WorkspaceResolver` contract
5763
5829
  * — the one `@effected/package-json` declares but cannot fill.
@@ -4503,7 +4503,7 @@ declare class GlobPattern extends GlobPattern_base {
4503
4503
  static readonly FromString: Schema.Codec<GlobPattern, string>;
4504
4504
  }
4505
4505
  //#endregion
4506
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.3_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__@effected+npm@0.2_2bd071ae657036cda4f0e368b3590d06/node_modules/@effected/lockfiles/index.d.ts
4506
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.4_@effected+jsonc@0.3.0_effect@4.0.0-beta.98__@effected+npm@0.2_7fc50d596abf9879356de67fd92b0252/node_modules/@effected/lockfiles/index.d.ts
4507
4507
  //#region src/BunExtension.d.ts
4508
4508
  declare const BunExtension_base: Schema.Class<BunExtension, Schema.Struct<{
4509
4509
  readonly _tag: Schema.tag<"bun">;
@@ -5330,7 +5330,7 @@ declare class Package extends Package_base {
5330
5330
  toJsonString(options?: PackageFormatOptions): string;
5331
5331
  }
5332
5332
  //#endregion
5333
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.3.1_@effected+jsonc@0.2.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/index.d.ts
5333
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.4.0_@effected+jsonc@0.3.0_effect@4.0.0-beta.98__effect@4.0.0-beta.98/node_modules/@effected/workspaces/index.d.ts
5334
5334
  //#region src/WorkspacePackage.d.ts
5335
5335
  declare const PublishConfig_base: Schema.Class<PublishConfig, Schema.Struct<{
5336
5336
  /** Scoped-package visibility. Its presence overrides `private`. */
@@ -5758,6 +5758,72 @@ declare class WorkspaceDiscovery extends WorkspaceDiscovery_base {
5758
5758
  * rather than calling `layer(...)` at each composition site.
5759
5759
  */
5760
5760
  static readonly layer: (options?: WorkspaceDiscoveryOptions) => Layer.Layer<WorkspaceDiscovery, never, WorkspaceRoot | FileSystem.FileSystem | Path.Path>;
5761
+ /**
5762
+ * An in-memory test double of the service shape, with every method
5763
+ * defaulted so a test stubs only what it exercises.
5764
+ *
5765
+ * @remarks
5766
+ * The defaults model an **empty workspace**, and the derived methods run
5767
+ * over the *effective* `listPackages` — the override when one is supplied —
5768
+ * so stubbing only `listPackages` yields a consistent double:
5769
+ *
5770
+ * - `listPackages` — succeeds with `[]`.
5771
+ * - `importerMap` — derived: the packages keyed by `relativePath`.
5772
+ * - `getPackage` — derived: a name lookup that fails with the service's own
5773
+ * typed {@link PackageNotFoundError} on a miss, exactly as the live
5774
+ * implementation does.
5775
+ * - `resolveFile` / `resolveFiles` — derived: longest-prefix ownership over
5776
+ * `pkg.path`, POSIX-terminated (`"/"`); supply a win32 double explicitly
5777
+ * if your fixture paths are win32.
5778
+ * - `refresh` — a no-op (`Effect.void`); there is nothing memoized to drop.
5779
+ * - `info` — **dies** with an explanatory defect. No honest default exists
5780
+ * (a fabricated root path would leak into consumer path logic), so an
5781
+ * unstubbed `info()` call is a test-wiring mistake and fails loudly as a
5782
+ * defect rather than succeeding with a lie or failing with a dishonest
5783
+ * typed error.
5784
+ *
5785
+ * @example
5786
+ * ```ts
5787
+ * import { WorkspaceDiscovery, WorkspacePackage } from "@effected/workspaces";
5788
+ * import { Effect } from "effect";
5789
+ *
5790
+ * const double = WorkspaceDiscovery.makeTest({
5791
+ * listPackages: () =>
5792
+ * Effect.succeed([
5793
+ * WorkspacePackage.make({
5794
+ * name: "@my-org/utils",
5795
+ * version: "1.0.0",
5796
+ * path: "/repo/packages/utils",
5797
+ * packageJsonPath: "/repo/packages/utils/package.json",
5798
+ * relativePath: "packages/utils",
5799
+ * }),
5800
+ * ]),
5801
+ * });
5802
+ * // `getPackage`, `importerMap`, `resolveFile(s)` now answer consistently.
5803
+ * ```
5804
+ */
5805
+ static readonly makeTest: (overrides?: Partial<WorkspaceDiscoveryShape>) => WorkspaceDiscoveryShape;
5806
+ /**
5807
+ * The test layer: {@link WorkspaceDiscovery.makeTest} behind
5808
+ * `Layer.succeed`, so a suite provides only the methods it exercises.
5809
+ *
5810
+ * @remarks
5811
+ * A parameterized layer factory mints a **fresh reference per call**, and
5812
+ * layers memoize by reference — bind the result to a `const` and reuse it
5813
+ * rather than calling `layerTest(...)` at each composition site.
5814
+ *
5815
+ * @example
5816
+ * ```ts
5817
+ * import { WorkspaceDiscovery } from "@effected/workspaces";
5818
+ * import { Effect } from "effect";
5819
+ *
5820
+ * const TestDiscovery = WorkspaceDiscovery.layerTest({
5821
+ * listPackages: () => Effect.succeed([]),
5822
+ * });
5823
+ * // program.pipe(Effect.provide(TestDiscovery))
5824
+ * ```
5825
+ */
5826
+ static readonly layerTest: (overrides?: Partial<WorkspaceDiscoveryShape>) => Layer.Layer<WorkspaceDiscovery>;
5761
5827
  /**
5762
5828
  * The real implementation of `@effected/npm`'s `WorkspaceResolver` contract
5763
5829
  * — the one `@effected/package-json` declares but cannot fill.