@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.
- package/changesets-changelog.cjs +219 -67
- package/changesets-changelog.d.cts +68 -2
- package/changesets-changelog.d.ts +68 -2
- package/changesets-changelog.js +224 -70
- package/changesets-markdownlint.cjs +219 -67
- package/changesets-markdownlint.d.cts +68 -2
- package/changesets-markdownlint.d.ts +68 -2
- package/changesets-markdownlint.js +224 -70
- package/package.json +3 -3
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
|
@@ -2305,7 +2305,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
|
|
|
2305
2305
|
}
|
|
2306
2306
|
};
|
|
2307
2307
|
//#endregion
|
|
2308
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
2308
|
+
//#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/BunExtension.js
|
|
2309
2309
|
/**
|
|
2310
2310
|
* Extension data specific to bun lockfiles, attached to `Lockfile.extension`
|
|
2311
2311
|
* when the format is `"bun"`.
|
|
@@ -4107,7 +4107,7 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
|
|
|
4107
4107
|
decode: decode$2
|
|
4108
4108
|
});
|
|
4109
4109
|
//#endregion
|
|
4110
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4110
|
+
//#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/ImporterDependency.js
|
|
4111
4111
|
/**
|
|
4112
4112
|
* One declared dependency of one workspace importer, as the lockfile records it.
|
|
4113
4113
|
*
|
|
@@ -4135,7 +4135,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
|
|
|
4135
4135
|
depType: DependencyField
|
|
4136
4136
|
}) {};
|
|
4137
4137
|
//#endregion
|
|
4138
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4138
|
+
//#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/LockfileImporter.js
|
|
4139
4139
|
/**
|
|
4140
4140
|
* One workspace importer's declared dependencies, as the lockfile records them.
|
|
4141
4141
|
*
|
|
@@ -4159,7 +4159,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
|
|
|
4159
4159
|
dependencies: effect.Schema.Array(ImporterDependency)
|
|
4160
4160
|
}) {};
|
|
4161
4161
|
//#endregion
|
|
4162
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4162
|
+
//#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/ResolvedPackage.js
|
|
4163
4163
|
const EMPTY_DEPENDENCIES = {};
|
|
4164
4164
|
/**
|
|
4165
4165
|
* A package resolved from a lockfile.
|
|
@@ -4194,7 +4194,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
|
|
|
4194
4194
|
dependencies: effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY_DEPENDENCIES)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY_DEPENDENCIES)))
|
|
4195
4195
|
}) {};
|
|
4196
4196
|
//#endregion
|
|
4197
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4197
|
+
//#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/WorkspaceDependency.js
|
|
4198
4198
|
/**
|
|
4199
4199
|
* A directed dependency edge between two workspace packages as recorded in
|
|
4200
4200
|
* the lockfile.
|
|
@@ -4216,7 +4216,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
|
|
|
4216
4216
|
constraint: effect.Schema.String
|
|
4217
4217
|
}) {};
|
|
4218
4218
|
//#endregion
|
|
4219
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4219
|
+
//#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/PnpmExtension.js
|
|
4220
4220
|
/**
|
|
4221
4221
|
* Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
|
|
4222
4222
|
* when the format is `"pnpm"`.
|
|
@@ -4241,7 +4241,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
|
|
|
4241
4241
|
}))
|
|
4242
4242
|
}) {};
|
|
4243
4243
|
//#endregion
|
|
4244
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4244
|
+
//#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/LockfileFormat.js
|
|
4245
4245
|
/**
|
|
4246
4246
|
* The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
|
|
4247
4247
|
* `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
|
|
@@ -4275,7 +4275,7 @@ const FILENAMES = {
|
|
|
4275
4275
|
*/
|
|
4276
4276
|
const filenameFor = (format) => FILENAMES[format];
|
|
4277
4277
|
//#endregion
|
|
4278
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4278
|
+
//#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/internal/shared.js
|
|
4279
4279
|
/**
|
|
4280
4280
|
* The four dependency sections of a manifest, in a stable order — the shared
|
|
4281
4281
|
* dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
|
|
@@ -4401,7 +4401,7 @@ const extractWorkspaceDeps = (workspaces, workspaceNames) => {
|
|
|
4401
4401
|
return deps;
|
|
4402
4402
|
};
|
|
4403
4403
|
//#endregion
|
|
4404
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4404
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/JsoncNode.js
|
|
4405
4405
|
/**
|
|
4406
4406
|
* Discriminator values for JSONC AST node types: the JSON value types
|
|
4407
4407
|
* (`string`/`number`/`boolean`/`null`), the structural types
|
|
@@ -4576,7 +4576,7 @@ function evaluateNode(node, depth) {
|
|
|
4576
4576
|
}
|
|
4577
4577
|
}
|
|
4578
4578
|
//#endregion
|
|
4579
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4579
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/internal/scanner.js
|
|
4580
4580
|
const isWhitespace = (ch) => ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch === 65279;
|
|
4581
4581
|
const isLineBreak$1 = (ch) => ch === 10 || ch === 13 || ch === 8232 || ch === 8233;
|
|
4582
4582
|
const isDigit$1 = (ch) => ch >= 48 && ch <= 57;
|
|
@@ -4872,7 +4872,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
|
|
|
4872
4872
|
};
|
|
4873
4873
|
};
|
|
4874
4874
|
//#endregion
|
|
4875
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4875
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/internal/skip.js
|
|
4876
4876
|
/**
|
|
4877
4877
|
* Iteratively consume the value beginning at the cursor's current token and
|
|
4878
4878
|
* return its tight end offset (excludes trailing whitespace/comments).
|
|
@@ -4902,7 +4902,7 @@ const skipBalancedValue = (cursor) => {
|
|
|
4902
4902
|
return end;
|
|
4903
4903
|
};
|
|
4904
4904
|
//#endregion
|
|
4905
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4905
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/internal/parser.js
|
|
4906
4906
|
/**
|
|
4907
4907
|
* The public parse-error code vocabulary. The facade builds its `@public`
|
|
4908
4908
|
* `JsoncParseErrorCode` schema from this array; the parser produces these codes
|
|
@@ -5315,7 +5315,7 @@ const parseTree$2 = (text, flags) => {
|
|
|
5315
5315
|
};
|
|
5316
5316
|
};
|
|
5317
5317
|
//#endregion
|
|
5318
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
5318
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/Jsonc.js
|
|
5319
5319
|
/**
|
|
5320
5320
|
* The single public parse-error code vocabulary, appearing as the `code` field
|
|
5321
5321
|
* of {@link JsoncParseErrorDetail}.
|
|
@@ -5440,9 +5440,56 @@ const deepEqual = (a, b, depth = 0) => {
|
|
|
5440
5440
|
var Jsonc = class Jsonc {
|
|
5441
5441
|
constructor() {}
|
|
5442
5442
|
/**
|
|
5443
|
+
* Parse JSONC into a plain JavaScript value, synchronously, returning a
|
|
5444
|
+
* `Result` instead of an `Effect`. Same error-recovery semantics as
|
|
5445
|
+
* {@link Jsonc.parse}: every parse error is collected and the failure side
|
|
5446
|
+
* carries one aggregate {@link JsoncParseError}. Pure — parsing is
|
|
5447
|
+
* fundamentally synchronous, so non-Effect consumers (a plain config
|
|
5448
|
+
* loader, a build script) can call this directly instead of wrapping
|
|
5449
|
+
* `Effect.runSync(Effect.result(Jsonc.parse(text)))`.
|
|
5450
|
+
*
|
|
5451
|
+
* @remarks
|
|
5452
|
+
* {@link Jsonc.parse} is defined in terms of this function; the two never
|
|
5453
|
+
* diverge. Reach for the `Effect` variant inside Effect code — it carries
|
|
5454
|
+
* the `Jsonc.parse` tracing span — and for this one at synchronous
|
|
5455
|
+
* boundaries.
|
|
5456
|
+
*
|
|
5457
|
+
* @example
|
|
5458
|
+
* ```ts
|
|
5459
|
+
* import { Jsonc } from "@effected/jsonc";
|
|
5460
|
+
* import { Result } from "effect";
|
|
5461
|
+
*
|
|
5462
|
+
* const ok = Jsonc.parseResult('{ "port": 3000 // dev\n }');
|
|
5463
|
+
* if (Result.isSuccess(ok)) {
|
|
5464
|
+
* console.log(ok.success); // => { port: 3000 }
|
|
5465
|
+
* }
|
|
5466
|
+
*
|
|
5467
|
+
* const bad = Jsonc.parseResult("{ bad }");
|
|
5468
|
+
* if (Result.isFailure(bad)) {
|
|
5469
|
+
* console.log(bad.failure._tag); // => "JsoncParseError"
|
|
5470
|
+
* }
|
|
5471
|
+
* ```
|
|
5472
|
+
*
|
|
5473
|
+
* @param text - The JSONC source to parse.
|
|
5474
|
+
* @param options - Optional {@link JsoncParseOptions}; defaults apply for
|
|
5475
|
+
* omitted fields.
|
|
5476
|
+
* @returns A `Result` succeeding with the decoded value (`unknown`, never
|
|
5477
|
+
* `any`), or failing with the aggregate {@link JsoncParseError}.
|
|
5478
|
+
*/
|
|
5479
|
+
static parseResult(text, options) {
|
|
5480
|
+
const { value, errors } = parseValue(text, toFlags(options));
|
|
5481
|
+
if (errors.length > 0) return effect.Result.fail(new JsoncParseError({
|
|
5482
|
+
errors: toDetails(text, errors),
|
|
5483
|
+
input: text
|
|
5484
|
+
}));
|
|
5485
|
+
return effect.Result.succeed(value);
|
|
5486
|
+
}
|
|
5487
|
+
/**
|
|
5443
5488
|
* Parse JSONC into a plain JavaScript value. Error-recovery parsing:
|
|
5444
5489
|
* collects every parse error and fails once with the aggregate
|
|
5445
|
-
* {@link JsoncParseError}. Returns `unknown`, never `any`.
|
|
5490
|
+
* {@link JsoncParseError}. Returns `unknown`, never `any`. Defined in terms
|
|
5491
|
+
* of {@link Jsonc.parseResult} — synchronous callers can use that variant
|
|
5492
|
+
* directly.
|
|
5446
5493
|
*
|
|
5447
5494
|
* @param text - The JSONC source to parse.
|
|
5448
5495
|
* @param options - Optional {@link JsoncParseOptions}; defaults apply for
|
|
@@ -5450,14 +5497,7 @@ var Jsonc = class Jsonc {
|
|
|
5450
5497
|
* @returns An `Effect` that succeeds with the decoded value, or fails with
|
|
5451
5498
|
* the aggregate {@link JsoncParseError}.
|
|
5452
5499
|
*/
|
|
5453
|
-
static parse = effect.Effect.fn("Jsonc.parse")(
|
|
5454
|
-
const { value, errors } = parseValue(text, toFlags(options));
|
|
5455
|
-
if (errors.length > 0) return yield* new JsoncParseError({
|
|
5456
|
-
errors: toDetails(text, errors),
|
|
5457
|
-
input: text
|
|
5458
|
-
});
|
|
5459
|
-
return value;
|
|
5460
|
-
});
|
|
5500
|
+
static parse = effect.Effect.fn("Jsonc.parse")((text, options) => effect.Effect.fromResult(Jsonc.parseResult(text, options)));
|
|
5461
5501
|
/**
|
|
5462
5502
|
* Parse JSONC into an immutable {@link JsoncNode} AST. `Option.none()` for
|
|
5463
5503
|
* empty input (with `allowEmptyContent`); the aggregate
|
|
@@ -5656,7 +5696,7 @@ var JsoncEdit = class extends effect.Schema.Class("JsoncEdit")({
|
|
|
5656
5696
|
}
|
|
5657
5697
|
};
|
|
5658
5698
|
//#endregion
|
|
5659
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
5699
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/internal/navigate.js
|
|
5660
5700
|
/**
|
|
5661
5701
|
* Resolve `path` against `text`, returning where the target is (or where it
|
|
5662
5702
|
* would be inserted). `path` must be non-empty — the whole-document case is
|
|
@@ -5783,7 +5823,7 @@ function navigate(text, path) {
|
|
|
5783
5823
|
return { _tag: "NoOp" };
|
|
5784
5824
|
}
|
|
5785
5825
|
//#endregion
|
|
5786
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
5826
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.3.0_effect@4.0.0-beta.98/node_modules/@effected/jsonc/JsoncModifier.js
|
|
5787
5827
|
/**
|
|
5788
5828
|
* Raised when `JsoncModifier.modify` cannot navigate the requested path: the
|
|
5789
5829
|
* value at `depth` is not the container kind (`expected`) the next path segment
|
|
@@ -5911,7 +5951,7 @@ var JsoncModifier = class {
|
|
|
5911
5951
|
});
|
|
5912
5952
|
};
|
|
5913
5953
|
//#endregion
|
|
5914
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
5954
|
+
//#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/internal/bun.js
|
|
5915
5955
|
const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
5916
5956
|
const BunWorkspaceEntry = effect.Schema.Struct({
|
|
5917
5957
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -6004,7 +6044,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
|
|
|
6004
6044
|
};
|
|
6005
6045
|
});
|
|
6006
6046
|
//#endregion
|
|
6007
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
6047
|
+
//#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/internal/npm.js
|
|
6008
6048
|
const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
6009
6049
|
const NpmPackageEntry = effect.Schema.Struct({
|
|
6010
6050
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -6102,7 +6142,7 @@ const toFields$2 = (raw) => effect.Effect.gen(function* () {
|
|
|
6102
6142
|
};
|
|
6103
6143
|
});
|
|
6104
6144
|
//#endregion
|
|
6105
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
6145
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/YamlNode.js
|
|
6106
6146
|
/**
|
|
6107
6147
|
* YAML scalar presentation styles.
|
|
6108
6148
|
*
|
|
@@ -6494,7 +6534,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
|
|
|
6494
6534
|
return null;
|
|
6495
6535
|
}
|
|
6496
6536
|
//#endregion
|
|
6497
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
6537
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/diagnostics.js
|
|
6498
6538
|
/** Error codes emitted by the lexer stage. */
|
|
6499
6539
|
const YAML_LEX_ERROR_CODES = [
|
|
6500
6540
|
"UnexpectedCharacter",
|
|
@@ -6572,7 +6612,7 @@ function isFatalCode(code) {
|
|
|
6572
6612
|
return FATAL_CODES.has(code);
|
|
6573
6613
|
}
|
|
6574
6614
|
//#endregion
|
|
6575
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
6615
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/YamlDiagnostic.js
|
|
6576
6616
|
/**
|
|
6577
6617
|
* Error codes emitted by the lexer stage.
|
|
6578
6618
|
*
|
|
@@ -6693,7 +6733,7 @@ function lineChar(text, offset) {
|
|
|
6693
6733
|
};
|
|
6694
6734
|
}
|
|
6695
6735
|
//#endregion
|
|
6696
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
6736
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/anchors.js
|
|
6697
6737
|
/**
|
|
6698
6738
|
* Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
|
|
6699
6739
|
* Aliases represent references to existing anchored nodes and cannot have their own anchors.
|
|
@@ -6786,7 +6826,7 @@ function collectAnchors(node, anchors) {
|
|
|
6786
6826
|
}
|
|
6787
6827
|
}
|
|
6788
6828
|
//#endregion
|
|
6789
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
6829
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/lexer.js
|
|
6790
6830
|
/**
|
|
6791
6831
|
* Create a new YAML scanner for the given source text.
|
|
6792
6832
|
*
|
|
@@ -7743,7 +7783,7 @@ function lexAll(text) {
|
|
|
7743
7783
|
return tokens;
|
|
7744
7784
|
}
|
|
7745
7785
|
//#endregion
|
|
7746
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
7786
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/cst-parser.js
|
|
7747
7787
|
/**
|
|
7748
7788
|
* Hardening: cap CST nesting so hostile inputs cannot overflow the stack
|
|
7749
7789
|
* while the tree is being BUILT. Set slightly above the composer's
|
|
@@ -8455,7 +8495,7 @@ function parseCSTAll(text) {
|
|
|
8455
8495
|
return parseDocuments(lexAll(text), text);
|
|
8456
8496
|
}
|
|
8457
8497
|
//#endregion
|
|
8458
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
8498
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/state.js
|
|
8459
8499
|
let lineStartsText;
|
|
8460
8500
|
let lineStartsCache = [];
|
|
8461
8501
|
function getLineStarts(text) {
|
|
@@ -8561,7 +8601,7 @@ function exitNesting(state) {
|
|
|
8561
8601
|
state.depth--;
|
|
8562
8602
|
}
|
|
8563
8603
|
//#endregion
|
|
8564
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
8604
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/tags.js
|
|
8565
8605
|
/**
|
|
8566
8606
|
* Resolve a tag shorthand using the document's %TAG directives.
|
|
8567
8607
|
* For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
|
|
@@ -8647,7 +8687,7 @@ function validateTagHandlesInDocument(docCst, state) {
|
|
|
8647
8687
|
}
|
|
8648
8688
|
}
|
|
8649
8689
|
//#endregion
|
|
8650
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
8690
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/scalars.js
|
|
8651
8691
|
const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
|
|
8652
8692
|
const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
|
|
8653
8693
|
const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
|
|
@@ -9525,7 +9565,7 @@ function shouldPreserveRaw(rawValue, value) {
|
|
|
9525
9565
|
return false;
|
|
9526
9566
|
}
|
|
9527
9567
|
//#endregion
|
|
9528
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
9568
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/block.js
|
|
9529
9569
|
/**
|
|
9530
9570
|
* Compose a block map from its CST children, with an optional external first key.
|
|
9531
9571
|
*
|
|
@@ -10673,7 +10713,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
|
|
|
10673
10713
|
return map;
|
|
10674
10714
|
}
|
|
10675
10715
|
//#endregion
|
|
10676
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
10716
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/flow.js
|
|
10677
10717
|
/**
|
|
10678
10718
|
* Validate that flow collection entries are separated by commas.
|
|
10679
10719
|
*
|
|
@@ -11065,7 +11105,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
|
|
|
11065
11105
|
return seq;
|
|
11066
11106
|
}
|
|
11067
11107
|
//#endregion
|
|
11068
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
11108
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/composer/document.js
|
|
11069
11109
|
/** The flow-composer dispatch wired into every state this module creates. */
|
|
11070
11110
|
const FLOW = {
|
|
11071
11111
|
composeFlowMap,
|
|
@@ -11731,7 +11771,7 @@ function composeAllDocuments(text, options) {
|
|
|
11731
11771
|
};
|
|
11732
11772
|
}
|
|
11733
11773
|
//#endregion
|
|
11734
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
11774
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/fold.js
|
|
11735
11775
|
/**
|
|
11736
11776
|
* Column-based line folding for a single logical scalar line (YAML 1.2 flow
|
|
11737
11777
|
* folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
|
|
@@ -11967,7 +12007,7 @@ function renderBlockFolded(s, indent) {
|
|
|
11967
12007
|
return `>${indentIndicator}${chomp}\n${outputLines.join("\n")}`;
|
|
11968
12008
|
}
|
|
11969
12009
|
//#endregion
|
|
11970
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.
|
|
12010
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.3.1_effect@4.0.0-beta.98/node_modules/@effected/yaml/internal/stringifier.js
|
|
11971
12011
|
/**
|
|
11972
12012
|
* Thrown by the stringifier on its failure paths (circular references). The
|
|
11973
12013
|
* facade catches this and materializes the public stringify error.
|
|
@@ -12341,6 +12381,15 @@ effect.Schema.Class("YamlStringifyOptions")({
|
|
|
12341
12381
|
* Column at which to fold long scalars. Default `0` (and any value `<= 0`)
|
|
12342
12382
|
* never wraps; a positive value folds plain, double-quoted and block-folded
|
|
12343
12383
|
* (`>`) scalars at approximately that column, never block-literal (`|`).
|
|
12384
|
+
*
|
|
12385
|
+
* Takes effect only through {@link Yaml.stringify} and
|
|
12386
|
+
* {@link Yaml.stringifySync} — the two entry points that accept these
|
|
12387
|
+
* options on the value path. The schema factories ({@link Yaml.fromString},
|
|
12388
|
+
* {@link Yaml.schema}, {@link Yaml.YamlFromString}) encode with default
|
|
12389
|
+
* stringify options (`lineWidth` `0`), so their output never folds. The
|
|
12390
|
+
* document/node path — `YamlDocument#stringify` and the `YamlFormat`
|
|
12391
|
+
* helpers built on it — threads the field into its render context but
|
|
12392
|
+
* never reads it, so it is inert there.
|
|
12344
12393
|
*/
|
|
12345
12394
|
lineWidth: effect.Schema.optionalKey(effect.Schema.Number),
|
|
12346
12395
|
defaultScalarStyle: effect.Schema.optionalKey(ScalarStyle),
|
|
@@ -12447,7 +12496,7 @@ const stringifyDefectToError = (defect, value) => {
|
|
|
12447
12496
|
});
|
|
12448
12497
|
};
|
|
12449
12498
|
/**
|
|
12450
|
-
* Synchronous single-document parse returning a
|
|
12499
|
+
* Synchronous single-document parse returning a `Result`. The pure
|
|
12451
12500
|
* engine bypasses the Effect runtime entirely: the composer, the failure
|
|
12452
12501
|
* collection and the alias-expansion budget all run inline, and every failure
|
|
12453
12502
|
* mode (fatal diagnostics, duplicate keys, a "billion laughs" blow-up) yields
|
|
@@ -12469,7 +12518,7 @@ const parseSyncImpl = (text, options) => {
|
|
|
12469
12518
|
}
|
|
12470
12519
|
};
|
|
12471
12520
|
/**
|
|
12472
|
-
* Synchronous stringify returning a
|
|
12521
|
+
* Synchronous stringify returning a `Result`. Mirrors {@link Yaml.stringify}
|
|
12473
12522
|
* without the Effect wrapper: a circular reference or a value nested past the
|
|
12474
12523
|
* recursion budget yields a `Failure` carrying a typed {@link YamlStringifyError},
|
|
12475
12524
|
* never a thrown defect.
|
|
@@ -12599,7 +12648,7 @@ var Yaml = class Yaml {
|
|
|
12599
12648
|
return yield* stringifyOrFail(value, options);
|
|
12600
12649
|
});
|
|
12601
12650
|
/**
|
|
12602
|
-
* Synchronous single-document parse, returning a
|
|
12651
|
+
* Synchronous single-document parse, returning a `Result` instead of
|
|
12603
12652
|
* an `Effect`. A pure escape hatch for config-time callers that cannot
|
|
12604
12653
|
* `await` an Effect (a `vitest.config.ts` is the motivating case): it runs
|
|
12605
12654
|
* the same engine as {@link Yaml.parse} inline.
|
|
@@ -12628,7 +12677,7 @@ var Yaml = class Yaml {
|
|
|
12628
12677
|
return parseSyncImpl(text, options);
|
|
12629
12678
|
}
|
|
12630
12679
|
/**
|
|
12631
|
-
* Synchronous stringify, returning a
|
|
12680
|
+
* Synchronous stringify, returning a `Result` instead of an `Effect`.
|
|
12632
12681
|
* The pure counterpart to {@link Yaml.stringify} for config-time callers
|
|
12633
12682
|
* that cannot `await`.
|
|
12634
12683
|
*
|
|
@@ -12834,7 +12883,7 @@ function deepEqualValues(a, b) {
|
|
|
12834
12883
|
return false;
|
|
12835
12884
|
}
|
|
12836
12885
|
//#endregion
|
|
12837
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
12886
|
+
//#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/internal/documents.js
|
|
12838
12887
|
/**
|
|
12839
12888
|
* An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
|
|
12840
12889
|
* and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
|
|
@@ -12904,7 +12953,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
|
|
|
12904
12953
|
};
|
|
12905
12954
|
});
|
|
12906
12955
|
//#endregion
|
|
12907
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
12956
|
+
//#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/internal/pnpm.js
|
|
12908
12957
|
const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
|
|
12909
12958
|
specifier: effect.Schema.String,
|
|
12910
12959
|
version: effect.Schema.String
|
|
@@ -13030,7 +13079,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
|
|
|
13030
13079
|
};
|
|
13031
13080
|
});
|
|
13032
13081
|
//#endregion
|
|
13033
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13082
|
+
//#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/internal/yarn.js
|
|
13034
13083
|
const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
|
|
13035
13084
|
const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
13036
13085
|
const YarnEntry = effect.Schema.Struct({
|
|
@@ -13153,7 +13202,7 @@ const cleanYarnDeps = (deps) => {
|
|
|
13153
13202
|
return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
|
|
13154
13203
|
};
|
|
13155
13204
|
//#endregion
|
|
13156
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13205
|
+
//#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/Lockfile.js
|
|
13157
13206
|
const EMPTY_IMPORTERS = [];
|
|
13158
13207
|
/**
|
|
13159
13208
|
* Failure of `Lockfile.parse`: the given content is not a valid lockfile of
|
|
@@ -13397,7 +13446,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
|
|
|
13397
13446
|
}
|
|
13398
13447
|
};
|
|
13399
13448
|
//#endregion
|
|
13400
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13449
|
+
//#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/LockfileIntegrity.js
|
|
13401
13450
|
/**
|
|
13402
13451
|
* The minimal manifest shape {@link LockfileIntegrity.compare} checks a
|
|
13403
13452
|
* lockfile against: a package name plus the four optional dependency maps.
|
|
@@ -15353,7 +15402,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
|
|
|
15353
15402
|
}
|
|
15354
15403
|
};
|
|
15355
15404
|
//#endregion
|
|
15356
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
15405
|
+
//#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/WorkspacePackage.js
|
|
15357
15406
|
const EMPTY$1 = Object.freeze(Object.create(null));
|
|
15358
15407
|
const EMPTY_MANIFEST = Object.freeze(Object.create(null));
|
|
15359
15408
|
/**
|
|
@@ -15840,7 +15889,7 @@ const Walker$1 = {
|
|
|
15840
15889
|
findRoot: findRoot$1
|
|
15841
15890
|
};
|
|
15842
15891
|
//#endregion
|
|
15843
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
15892
|
+
//#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/WorkspaceRoot.js
|
|
15844
15893
|
/**
|
|
15845
15894
|
* The marker filenames {@link WorkspaceRoot} probes for, in priority order.
|
|
15846
15895
|
*
|
|
@@ -15925,7 +15974,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
|
|
|
15925
15974
|
static layer = effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.make);
|
|
15926
15975
|
};
|
|
15927
15976
|
//#endregion
|
|
15928
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
15977
|
+
//#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/internal/limits.js
|
|
15929
15978
|
/**
|
|
15930
15979
|
* Hard ceiling on directories the enumerator will visit for one pattern set.
|
|
15931
15980
|
* Guards the pathological case a depth cap alone does not: a wide, shallow
|
|
@@ -15943,7 +15992,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
|
|
|
15943
15992
|
*/
|
|
15944
15993
|
const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
15945
15994
|
//#endregion
|
|
15946
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
15995
|
+
//#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/internal/traverse.js
|
|
15947
15996
|
/** Directory names never descended into. */
|
|
15948
15997
|
const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
|
|
15949
15998
|
/** Join root-relative POSIX segments; `""` is the root itself. */
|
|
@@ -16033,7 +16082,7 @@ var Traversal = class {
|
|
|
16033
16082
|
}
|
|
16034
16083
|
};
|
|
16035
16084
|
//#endregion
|
|
16036
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16085
|
+
//#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/internal/enumerate.js
|
|
16037
16086
|
/** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
|
|
16038
16087
|
const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
|
|
16039
16088
|
/**
|
|
@@ -16103,7 +16152,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
|
|
|
16103
16152
|
return results;
|
|
16104
16153
|
});
|
|
16105
16154
|
//#endregion
|
|
16106
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16155
|
+
//#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/internal/patterns.js
|
|
16107
16156
|
const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
|
|
16108
16157
|
/** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
|
|
16109
16158
|
const pnpmPatternsOf = (document) => {
|
|
@@ -16160,7 +16209,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
|
|
|
16160
16209
|
return manifestPatternsOf(manifest);
|
|
16161
16210
|
});
|
|
16162
16211
|
//#endregion
|
|
16163
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16212
|
+
//#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/WorkspaceDiscovery.js
|
|
16164
16213
|
/**
|
|
16165
16214
|
* Raised when a workspace member's `package.json` cannot be read, parsed, or
|
|
16166
16215
|
* used — it is missing, malformed, or lacks a `name` or `version`.
|
|
@@ -16458,6 +16507,109 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
16458
16507
|
*/
|
|
16459
16508
|
static layer = (options) => effect.Layer.effect(WorkspaceDiscovery, WorkspaceDiscovery.make(options));
|
|
16460
16509
|
/**
|
|
16510
|
+
* An in-memory test double of the service shape, with every method
|
|
16511
|
+
* defaulted so a test stubs only what it exercises.
|
|
16512
|
+
*
|
|
16513
|
+
* @remarks
|
|
16514
|
+
* The defaults model an **empty workspace**, and the derived methods run
|
|
16515
|
+
* over the *effective* `listPackages` — the override when one is supplied —
|
|
16516
|
+
* so stubbing only `listPackages` yields a consistent double:
|
|
16517
|
+
*
|
|
16518
|
+
* - `listPackages` — succeeds with `[]`.
|
|
16519
|
+
* - `importerMap` — derived: the packages keyed by `relativePath`.
|
|
16520
|
+
* - `getPackage` — derived: a name lookup that fails with the service's own
|
|
16521
|
+
* typed {@link PackageNotFoundError} on a miss, exactly as the live
|
|
16522
|
+
* implementation does.
|
|
16523
|
+
* - `resolveFile` / `resolveFiles` — derived: longest-prefix ownership over
|
|
16524
|
+
* `pkg.path`, POSIX-terminated (`"/"`); supply a win32 double explicitly
|
|
16525
|
+
* if your fixture paths are win32.
|
|
16526
|
+
* - `refresh` — a no-op (`Effect.void`); there is nothing memoized to drop.
|
|
16527
|
+
* - `info` — **dies** with an explanatory defect. No honest default exists
|
|
16528
|
+
* (a fabricated root path would leak into consumer path logic), so an
|
|
16529
|
+
* unstubbed `info()` call is a test-wiring mistake and fails loudly as a
|
|
16530
|
+
* defect rather than succeeding with a lie or failing with a dishonest
|
|
16531
|
+
* typed error.
|
|
16532
|
+
*
|
|
16533
|
+
* @example
|
|
16534
|
+
* ```ts
|
|
16535
|
+
* import { WorkspaceDiscovery, WorkspacePackage } from "@effected/workspaces";
|
|
16536
|
+
* import { Effect } from "effect";
|
|
16537
|
+
*
|
|
16538
|
+
* const double = WorkspaceDiscovery.makeTest({
|
|
16539
|
+
* listPackages: () =>
|
|
16540
|
+
* Effect.succeed([
|
|
16541
|
+
* WorkspacePackage.make({
|
|
16542
|
+
* name: "@my-org/utils",
|
|
16543
|
+
* version: "1.0.0",
|
|
16544
|
+
* path: "/repo/packages/utils",
|
|
16545
|
+
* packageJsonPath: "/repo/packages/utils/package.json",
|
|
16546
|
+
* relativePath: "packages/utils",
|
|
16547
|
+
* }),
|
|
16548
|
+
* ]),
|
|
16549
|
+
* });
|
|
16550
|
+
* // `getPackage`, `importerMap`, `resolveFile(s)` now answer consistently.
|
|
16551
|
+
* ```
|
|
16552
|
+
*/
|
|
16553
|
+
static makeTest = (overrides = {}) => {
|
|
16554
|
+
const listPackages = overrides.listPackages ?? (() => effect.Effect.succeed([]));
|
|
16555
|
+
const ownerOf = (filePath, all) => {
|
|
16556
|
+
let best;
|
|
16557
|
+
let bestLength = 0;
|
|
16558
|
+
for (const pkg of all) {
|
|
16559
|
+
const prefix = pkg.path.endsWith("/") ? pkg.path : `${pkg.path}/`;
|
|
16560
|
+
if (filePath.startsWith(prefix) && prefix.length > bestLength) {
|
|
16561
|
+
best = pkg;
|
|
16562
|
+
bestLength = prefix.length;
|
|
16563
|
+
}
|
|
16564
|
+
}
|
|
16565
|
+
return effect.Option.fromUndefinedOr(best);
|
|
16566
|
+
};
|
|
16567
|
+
return {
|
|
16568
|
+
listPackages,
|
|
16569
|
+
info: () => effect.Effect.die(/* @__PURE__ */ new Error("WorkspaceDiscovery.makeTest: info() was called but not stubbed — no honest default WorkspaceInfo exists for a test double; pass an `info` override.")),
|
|
16570
|
+
importerMap: () => effect.Effect.map(listPackages(), (all) => new Map(all.map((pkg) => [pkg.relativePath, pkg]))),
|
|
16571
|
+
getPackage: (name) => effect.Effect.flatMap(listPackages(), (all) => {
|
|
16572
|
+
const found = all.find((pkg) => pkg.name === name);
|
|
16573
|
+
return found !== void 0 ? effect.Effect.succeed(found) : effect.Effect.fail(new PackageNotFoundError({
|
|
16574
|
+
name,
|
|
16575
|
+
available: all.map((pkg) => pkg.name)
|
|
16576
|
+
}));
|
|
16577
|
+
}),
|
|
16578
|
+
resolveFile: (filePath) => effect.Effect.map(listPackages(), (all) => ownerOf(filePath, all)),
|
|
16579
|
+
resolveFiles: (filePaths) => effect.Effect.map(listPackages(), (all) => {
|
|
16580
|
+
const seen = /* @__PURE__ */ new Map();
|
|
16581
|
+
for (const filePath of filePaths) {
|
|
16582
|
+
const owner = ownerOf(filePath, all);
|
|
16583
|
+
if (effect.Option.isSome(owner)) seen.set(owner.value.name, owner.value);
|
|
16584
|
+
}
|
|
16585
|
+
return [...seen.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
16586
|
+
}),
|
|
16587
|
+
refresh: () => effect.Effect.void,
|
|
16588
|
+
...overrides
|
|
16589
|
+
};
|
|
16590
|
+
};
|
|
16591
|
+
/**
|
|
16592
|
+
* The test layer: {@link WorkspaceDiscovery.makeTest} behind
|
|
16593
|
+
* `Layer.succeed`, so a suite provides only the methods it exercises.
|
|
16594
|
+
*
|
|
16595
|
+
* @remarks
|
|
16596
|
+
* A parameterized layer factory mints a **fresh reference per call**, and
|
|
16597
|
+
* layers memoize by reference — bind the result to a `const` and reuse it
|
|
16598
|
+
* rather than calling `layerTest(...)` at each composition site.
|
|
16599
|
+
*
|
|
16600
|
+
* @example
|
|
16601
|
+
* ```ts
|
|
16602
|
+
* import { WorkspaceDiscovery } from "@effected/workspaces";
|
|
16603
|
+
* import { Effect } from "effect";
|
|
16604
|
+
*
|
|
16605
|
+
* const TestDiscovery = WorkspaceDiscovery.layerTest({
|
|
16606
|
+
* listPackages: () => Effect.succeed([]),
|
|
16607
|
+
* });
|
|
16608
|
+
* // program.pipe(Effect.provide(TestDiscovery))
|
|
16609
|
+
* ```
|
|
16610
|
+
*/
|
|
16611
|
+
static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceDiscovery, WorkspaceDiscovery.makeTest(overrides));
|
|
16612
|
+
/**
|
|
16461
16613
|
* The real implementation of `@effected/npm`'s `WorkspaceResolver` contract
|
|
16462
16614
|
* — the one `@effected/package-json` declares but cannot fill.
|
|
16463
16615
|
*
|
|
@@ -16489,7 +16641,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
16489
16641
|
};
|
|
16490
16642
|
const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
|
|
16491
16643
|
//#endregion
|
|
16492
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16644
|
+
//#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/DependencyGraph.js
|
|
16493
16645
|
/**
|
|
16494
16646
|
* Raised when the workspace dependency graph cannot be topologically ordered
|
|
16495
16647
|
* because it contains a cycle.
|
|
@@ -18087,7 +18239,7 @@ var Git = class extends effect.Context.Service()("@effected/git/Git") {
|
|
|
18087
18239
|
}));
|
|
18088
18240
|
};
|
|
18089
18241
|
//#endregion
|
|
18090
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18242
|
+
//#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/ChangeDetector.js
|
|
18091
18243
|
/**
|
|
18092
18244
|
* Which git refs to compare, and whether to fold in the working tree.
|
|
18093
18245
|
*
|
|
@@ -18339,7 +18491,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
|
|
|
18339
18491
|
};
|
|
18340
18492
|
}
|
|
18341
18493
|
//#endregion
|
|
18342
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18494
|
+
//#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/internal/catalogs.js
|
|
18343
18495
|
/** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
|
|
18344
18496
|
const inlineCatalogs = (manifest) => {
|
|
18345
18497
|
if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
|
|
@@ -18403,7 +18555,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
|
|
|
18403
18555
|
});
|
|
18404
18556
|
};
|
|
18405
18557
|
//#endregion
|
|
18406
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18558
|
+
//#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/ConfigDependencyHooks.js
|
|
18407
18559
|
/** Whether `value` is a non-null, non-array object. */
|
|
18408
18560
|
const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18409
18561
|
/**
|
|
@@ -18548,7 +18700,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
18548
18700
|
}) });
|
|
18549
18701
|
};
|
|
18550
18702
|
//#endregion
|
|
18551
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18703
|
+
//#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/PackageManagerName.js
|
|
18552
18704
|
/**
|
|
18553
18705
|
* The four package managers this package understands.
|
|
18554
18706
|
*
|
|
@@ -18790,7 +18942,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
|
|
|
18790
18942
|
static layer = effect.Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
|
|
18791
18943
|
};
|
|
18792
18944
|
//#endregion
|
|
18793
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18945
|
+
//#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/LockfileReader.js
|
|
18794
18946
|
/**
|
|
18795
18947
|
* Raised when the workspace's lockfile cannot be read off disk.
|
|
18796
18948
|
*
|
|
@@ -18900,7 +19052,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
|
|
|
18900
19052
|
static layer = (options) => effect.Layer.effect(LockfileReader, LockfileReader.make(options));
|
|
18901
19053
|
};
|
|
18902
19054
|
//#endregion
|
|
18903
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19055
|
+
//#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/Publishability.js
|
|
18904
19056
|
/** The public npm registry, used when `publishConfig.registry` says nothing. */
|
|
18905
19057
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
18906
19058
|
/**
|
|
@@ -19000,7 +19152,7 @@ var PublishabilityDetector = class PublishabilityDetector extends effect.Context
|
|
|
19000
19152
|
}) });
|
|
19001
19153
|
};
|
|
19002
19154
|
//#endregion
|
|
19003
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19155
|
+
//#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/WorkspaceCatalogs.js
|
|
19004
19156
|
/**
|
|
19005
19157
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
19006
19158
|
* resolution semantic in the package.
|
|
@@ -19384,7 +19536,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
19384
19536
|
}));
|
|
19385
19537
|
};
|
|
19386
19538
|
//#endregion
|
|
19387
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19539
|
+
//#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/WorkspaceStateSnapshot.js
|
|
19388
19540
|
const EMPTY = Object.freeze(Object.create(null));
|
|
19389
19541
|
const DependencyMap = effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY)));
|
|
19390
19542
|
/**
|
|
@@ -19549,7 +19701,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
19549
19701
|
}
|
|
19550
19702
|
};
|
|
19551
19703
|
//#endregion
|
|
19552
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19704
|
+
//#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/WorkspaceSnapshots.js
|
|
19553
19705
|
/** Whether `value` is a non-null, non-array object. */
|
|
19554
19706
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19555
19707
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -19741,7 +19893,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
19741
19893
|
static layer = (options) => effect.Layer.effect(WorkspaceSnapshots, WorkspaceSnapshots.make(options));
|
|
19742
19894
|
};
|
|
19743
19895
|
//#endregion
|
|
19744
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19896
|
+
//#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/Workspaces.js
|
|
19745
19897
|
/**
|
|
19746
19898
|
* Every service that needs only a filesystem: root, package-manager detection,
|
|
19747
19899
|
* discovery, lockfile reading, catalogs and publishability.
|