@savvy-web/silk 3.7.6 → 3.7.8
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 +407 -190
- package/changesets-changelog.d.cts +23 -5
- package/changesets-changelog.d.ts +23 -5
- package/changesets-changelog.js +408 -191
- package/changesets-markdownlint.cjs +407 -190
- package/changesets-markdownlint.d.cts +23 -5
- package/changesets-markdownlint.d.ts +23 -5
- package/changesets-markdownlint.js +408 -191
- package/package.json +9 -9
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
package/changesets-changelog.cjs
CHANGED
|
@@ -2335,7 +2335,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
|
|
|
2335
2335
|
}
|
|
2336
2336
|
};
|
|
2337
2337
|
//#endregion
|
|
2338
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
2338
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/BunExtension.js
|
|
2339
2339
|
/**
|
|
2340
2340
|
* Extension data specific to bun lockfiles, attached to `Lockfile.extension`
|
|
2341
2341
|
* when the format is `"bun"`.
|
|
@@ -5469,7 +5469,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
|
|
|
5469
5469
|
}
|
|
5470
5470
|
};
|
|
5471
5471
|
//#endregion
|
|
5472
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
5472
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/ImporterDependency.js
|
|
5473
5473
|
/**
|
|
5474
5474
|
* One declared dependency of one workspace importer, as the lockfile records it.
|
|
5475
5475
|
*
|
|
@@ -5507,7 +5507,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
|
|
|
5507
5507
|
depType: DependencyField
|
|
5508
5508
|
}) {};
|
|
5509
5509
|
//#endregion
|
|
5510
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
5510
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/LockfileImporter.js
|
|
5511
5511
|
/**
|
|
5512
5512
|
* One workspace importer's declared dependencies, as the lockfile records them.
|
|
5513
5513
|
*
|
|
@@ -5531,7 +5531,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
|
|
|
5531
5531
|
dependencies: effect.Schema.Array(ImporterDependency)
|
|
5532
5532
|
}) {};
|
|
5533
5533
|
//#endregion
|
|
5534
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
5534
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/ResolvedPackage.js
|
|
5535
5535
|
const EMPTY_DEPENDENCIES = {};
|
|
5536
5536
|
/**
|
|
5537
5537
|
* A package resolved from a lockfile.
|
|
@@ -5566,7 +5566,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
|
|
|
5566
5566
|
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)))
|
|
5567
5567
|
}) {};
|
|
5568
5568
|
//#endregion
|
|
5569
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
5569
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/WorkspaceDependency.js
|
|
5570
5570
|
/**
|
|
5571
5571
|
* A directed dependency edge between two workspace packages as recorded in
|
|
5572
5572
|
* the lockfile.
|
|
@@ -5588,7 +5588,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
|
|
|
5588
5588
|
constraint: effect.Schema.String
|
|
5589
5589
|
}) {};
|
|
5590
5590
|
//#endregion
|
|
5591
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
5591
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/PnpmExtension.js
|
|
5592
5592
|
/**
|
|
5593
5593
|
* Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
|
|
5594
5594
|
* when the format is `"pnpm"`.
|
|
@@ -5613,7 +5613,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
|
|
|
5613
5613
|
}))
|
|
5614
5614
|
}) {};
|
|
5615
5615
|
//#endregion
|
|
5616
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
5616
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/LockfileFormat.js
|
|
5617
5617
|
/**
|
|
5618
5618
|
* The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
|
|
5619
5619
|
* `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
|
|
@@ -5651,7 +5651,7 @@ const FILENAMES = {
|
|
|
5651
5651
|
*/
|
|
5652
5652
|
const filenameFor = (format) => FILENAMES[format][0];
|
|
5653
5653
|
//#endregion
|
|
5654
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
5654
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/shared.js
|
|
5655
5655
|
/**
|
|
5656
5656
|
* The four dependency sections of a manifest, in a stable order — the shared
|
|
5657
5657
|
* dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
|
|
@@ -7580,7 +7580,7 @@ var JsoncModifier = class {
|
|
|
7580
7580
|
});
|
|
7581
7581
|
};
|
|
7582
7582
|
//#endregion
|
|
7583
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
7583
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/bun.js
|
|
7584
7584
|
const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
7585
7585
|
const BunWorkspaceEntry = effect.Schema.Struct({
|
|
7586
7586
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -7673,7 +7673,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
|
|
|
7673
7673
|
};
|
|
7674
7674
|
});
|
|
7675
7675
|
//#endregion
|
|
7676
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
7676
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/npm.js
|
|
7677
7677
|
const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
7678
7678
|
const NpmPackageEntry = effect.Schema.Struct({
|
|
7679
7679
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -7771,7 +7771,7 @@ const toFields$2 = (raw) => effect.Effect.gen(function* () {
|
|
|
7771
7771
|
};
|
|
7772
7772
|
});
|
|
7773
7773
|
//#endregion
|
|
7774
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
7774
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/YamlNode.js
|
|
7775
7775
|
/**
|
|
7776
7776
|
* YAML scalar presentation styles.
|
|
7777
7777
|
*
|
|
@@ -7891,12 +7891,19 @@ var YamlScalar = class extends effect.Schema.TaggedClass()("YamlScalar", {
|
|
|
7891
7891
|
* A YAML alias AST node, referencing a previously defined anchor by name
|
|
7892
7892
|
* (without the leading `*`).
|
|
7893
7893
|
*
|
|
7894
|
+
* Carries the same comment triple as every other node class — see
|
|
7895
|
+
* {@link YamlScalar} for the field semantics. An alias is a node like any
|
|
7896
|
+
* other and a comment can legally sit above or after one.
|
|
7897
|
+
*
|
|
7894
7898
|
* @public
|
|
7895
7899
|
*/
|
|
7896
7900
|
var YamlAlias = class extends effect.Schema.TaggedClass()("YamlAlias", {
|
|
7897
7901
|
name: effect.Schema.String,
|
|
7898
7902
|
offset: effect.Schema.Number,
|
|
7899
|
-
length: effect.Schema.Number
|
|
7903
|
+
length: effect.Schema.Number,
|
|
7904
|
+
commentBefore: effect.Schema.optionalKey(effect.Schema.String),
|
|
7905
|
+
comment: effect.Schema.optionalKey(effect.Schema.String),
|
|
7906
|
+
spaceBefore: effect.Schema.optionalKey(effect.Schema.Boolean)
|
|
7900
7907
|
}) {
|
|
7901
7908
|
/** See `YamlScalar.find`. Pure. */
|
|
7902
7909
|
find(path) {
|
|
@@ -7939,20 +7946,18 @@ const YamlNode = effect.Schema.suspend(() => effect.Schema.Union([
|
|
|
7939
7946
|
* A YAML key-value pair AST node, representing one entry within a mapping.
|
|
7940
7947
|
* `value` is `null` when absent (e.g. `key:` with no value).
|
|
7941
7948
|
*
|
|
7942
|
-
*
|
|
7943
|
-
*
|
|
7944
|
-
*
|
|
7945
|
-
*
|
|
7946
|
-
*
|
|
7949
|
+
* A pair carries **no comment fields**. Comments belong to the pair's `key`
|
|
7950
|
+
* and `value` nodes, which have one comment slot each: an own-line comment
|
|
7951
|
+
* above the entry leads the `key`, and a trailing comment on the entry's line
|
|
7952
|
+
* follows the `value`. Two slots rather than one is what lets `a: # kc` keep
|
|
7953
|
+
* its comment where the author wrote it instead of relocating it onto the
|
|
7954
|
+
* value's line.
|
|
7947
7955
|
*
|
|
7948
7956
|
* @public
|
|
7949
7957
|
*/
|
|
7950
7958
|
var YamlPair = class extends effect.Schema.TaggedClass()("YamlPair", {
|
|
7951
7959
|
key: effect.Schema.suspend(() => YamlNode),
|
|
7952
|
-
value: effect.Schema.NullOr(effect.Schema.suspend(() => YamlNode))
|
|
7953
|
-
commentBefore: effect.Schema.optionalKey(effect.Schema.String),
|
|
7954
|
-
comment: effect.Schema.optionalKey(effect.Schema.String),
|
|
7955
|
-
spaceBefore: effect.Schema.optionalKey(effect.Schema.Boolean)
|
|
7960
|
+
value: effect.Schema.NullOr(effect.Schema.suspend(() => YamlNode))
|
|
7956
7961
|
}) {};
|
|
7957
7962
|
/**
|
|
7958
7963
|
* A YAML mapping AST node, representing a collection of {@link YamlPair}
|
|
@@ -8207,7 +8212,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
|
|
|
8207
8212
|
return null;
|
|
8208
8213
|
}
|
|
8209
8214
|
//#endregion
|
|
8210
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8215
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/diagnostics.js
|
|
8211
8216
|
/** Error codes emitted by the lexer stage. */
|
|
8212
8217
|
const YAML_LEX_ERROR_CODES = [
|
|
8213
8218
|
"UnexpectedCharacter",
|
|
@@ -8294,7 +8299,7 @@ function isFatalCode(code) {
|
|
|
8294
8299
|
return FATAL_CODES.has(code);
|
|
8295
8300
|
}
|
|
8296
8301
|
//#endregion
|
|
8297
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8302
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/YamlDiagnostic.js
|
|
8298
8303
|
/**
|
|
8299
8304
|
* Error codes emitted by the lexer stage.
|
|
8300
8305
|
*
|
|
@@ -8415,7 +8420,7 @@ function lineChar(text, offset) {
|
|
|
8415
8420
|
};
|
|
8416
8421
|
}
|
|
8417
8422
|
//#endregion
|
|
8418
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8423
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/lexer.js
|
|
8419
8424
|
/**
|
|
8420
8425
|
* Create a new YAML scanner for the given source text.
|
|
8421
8426
|
*
|
|
@@ -9378,7 +9383,7 @@ function lexAll(text) {
|
|
|
9378
9383
|
return tokens;
|
|
9379
9384
|
}
|
|
9380
9385
|
//#endregion
|
|
9381
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
9386
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/cst-parser.js
|
|
9382
9387
|
/**
|
|
9383
9388
|
* Hardening: cap CST nesting so hostile inputs cannot overflow the stack
|
|
9384
9389
|
* while the tree is being BUILT. Set slightly above the composer's
|
|
@@ -10099,7 +10104,7 @@ function parseCSTAll(text) {
|
|
|
10099
10104
|
return parseDocuments(lexAll(text), text);
|
|
10100
10105
|
}
|
|
10101
10106
|
//#endregion
|
|
10102
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
10107
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/anchors.js
|
|
10103
10108
|
/**
|
|
10104
10109
|
* Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
|
|
10105
10110
|
* Aliases represent references to existing anchored nodes and cannot have their own anchors.
|
|
@@ -10167,7 +10172,7 @@ function scanName(text, start) {
|
|
|
10167
10172
|
return text.slice(start, end);
|
|
10168
10173
|
}
|
|
10169
10174
|
//#endregion
|
|
10170
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
10175
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/comments.js
|
|
10171
10176
|
/** True when there is no line break between `start` and `end` in `text`. */
|
|
10172
10177
|
function sameLineSpan(text, start, end) {
|
|
10173
10178
|
if (start < 0) return false;
|
|
@@ -10191,6 +10196,31 @@ function isOwnLineAt(text, offset) {
|
|
|
10191
10196
|
return true;
|
|
10192
10197
|
}
|
|
10193
10198
|
/**
|
|
10199
|
+
* True when the only thing before `offset` on its line is a block indicator —
|
|
10200
|
+
* `?`, `:` or `-` — plus whitespace. Such a comment sits on an indicator line
|
|
10201
|
+
* with its node BELOW, so it leads that node rather than trailing whatever
|
|
10202
|
+
* came before (`? # c` / ` - seq1`). Without this, the `? ` prefix makes the
|
|
10203
|
+
* comment look like a trailing comment on the previous entry.
|
|
10204
|
+
*/
|
|
10205
|
+
function isAfterIndicatorOnly(text, offset) {
|
|
10206
|
+
let i = offset - 1;
|
|
10207
|
+
let sawIndicator = false;
|
|
10208
|
+
while (i >= 0) {
|
|
10209
|
+
const ch = text[i];
|
|
10210
|
+
if (ch === " " || ch === " ") {
|
|
10211
|
+
i--;
|
|
10212
|
+
continue;
|
|
10213
|
+
}
|
|
10214
|
+
if (!sawIndicator && (ch === "?" || ch === "-" || ch === ":")) {
|
|
10215
|
+
sawIndicator = true;
|
|
10216
|
+
i--;
|
|
10217
|
+
continue;
|
|
10218
|
+
}
|
|
10219
|
+
return sawIndicator && (ch === "\n" || ch === "\r");
|
|
10220
|
+
}
|
|
10221
|
+
return sawIndicator;
|
|
10222
|
+
}
|
|
10223
|
+
/**
|
|
10194
10224
|
* True when the line immediately above the line containing `offset` is blank
|
|
10195
10225
|
* (empty or horizontal whitespace only). Purely local — see
|
|
10196
10226
|
* {@link isOwnLineAt} for why span-based gap checks are not used.
|
|
@@ -10300,8 +10330,8 @@ function columnAt(text, offset) {
|
|
|
10300
10330
|
/**
|
|
10301
10331
|
* Rebuild `node` with the given comment fields merged in (existing fields are
|
|
10302
10332
|
* kept unless overridden; `commentBefore`/`comment` join with a newline when
|
|
10303
|
-
* both sides are present).
|
|
10304
|
-
*
|
|
10333
|
+
* both sides are present). Every node class carries the triple, aliases
|
|
10334
|
+
* included.
|
|
10305
10335
|
*/
|
|
10306
10336
|
function withCommentFields(node, fields) {
|
|
10307
10337
|
if (node instanceof YamlScalar) return new YamlScalar({
|
|
@@ -10337,7 +10367,12 @@ function withCommentFields(node, fields) {
|
|
|
10337
10367
|
offset: node.offset,
|
|
10338
10368
|
length: node.length
|
|
10339
10369
|
});
|
|
10340
|
-
return
|
|
10370
|
+
return new YamlAlias({
|
|
10371
|
+
name: node.name,
|
|
10372
|
+
...mergedCommentFields(node, fields),
|
|
10373
|
+
offset: node.offset,
|
|
10374
|
+
length: node.length
|
|
10375
|
+
});
|
|
10341
10376
|
}
|
|
10342
10377
|
function mergedCommentFields(existing, incoming) {
|
|
10343
10378
|
const commentBefore = incoming.commentBefore !== void 0 ? existing.commentBefore !== void 0 ? `${existing.commentBefore}\n${incoming.commentBefore}` : incoming.commentBefore : existing.commentBefore;
|
|
@@ -10350,7 +10385,7 @@ function mergedCommentFields(existing, incoming) {
|
|
|
10350
10385
|
};
|
|
10351
10386
|
}
|
|
10352
10387
|
//#endregion
|
|
10353
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
10388
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/state.js
|
|
10354
10389
|
let lineStartsText;
|
|
10355
10390
|
let lineStartsCache = [];
|
|
10356
10391
|
function getLineStarts(text) {
|
|
@@ -10470,7 +10505,7 @@ function exitNesting(state) {
|
|
|
10470
10505
|
state.depth--;
|
|
10471
10506
|
}
|
|
10472
10507
|
//#endregion
|
|
10473
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
10508
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/tags.js
|
|
10474
10509
|
/**
|
|
10475
10510
|
* Resolve a tag shorthand using the document's %TAG directives.
|
|
10476
10511
|
* For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
|
|
@@ -10556,7 +10591,7 @@ function validateTagHandlesInDocument(docCst, state) {
|
|
|
10556
10591
|
}
|
|
10557
10592
|
}
|
|
10558
10593
|
//#endregion
|
|
10559
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
10594
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/scalars.js
|
|
10560
10595
|
const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
|
|
10561
10596
|
const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
|
|
10562
10597
|
const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
|
|
@@ -11482,7 +11517,7 @@ function shouldPreserveRaw(rawValue, value) {
|
|
|
11482
11517
|
return false;
|
|
11483
11518
|
}
|
|
11484
11519
|
//#endregion
|
|
11485
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
11520
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/block.js
|
|
11486
11521
|
/**
|
|
11487
11522
|
* Compose a block map from its CST children, with an optional external first key.
|
|
11488
11523
|
*
|
|
@@ -11979,6 +12014,29 @@ function buildPairs(items, pairs, text, escaped) {
|
|
|
11979
12014
|
let lastNode;
|
|
11980
12015
|
let contentColumn = -1;
|
|
11981
12016
|
const nodeEnd = (n) => n.offset + n.length;
|
|
12017
|
+
/**
|
|
12018
|
+
* Rebuild `pair` with `text` appended to the trailing comment of whichever
|
|
12019
|
+
* node owns the pair's last line: the value when present, otherwise the key.
|
|
12020
|
+
*/
|
|
12021
|
+
const withTrailingComment = (pair, text, onKey = false) => pair.value !== null && !onKey ? new YamlPair({
|
|
12022
|
+
key: pair.key,
|
|
12023
|
+
value: withCommentFields(pair.value, { comment: text })
|
|
12024
|
+
}) : new YamlPair({
|
|
12025
|
+
key: withCommentFields(pair.key, { comment: text }),
|
|
12026
|
+
value: pair.value
|
|
12027
|
+
});
|
|
12028
|
+
/**
|
|
12029
|
+
* Finish a pair: the pending leading fields go to its KEY node, the entry's
|
|
12030
|
+
* trailing comment to whichever node owns the last line. The one place the
|
|
12031
|
+
* node-level split is applied, so no construction site has to know it.
|
|
12032
|
+
*/
|
|
12033
|
+
const pushPair = (pair, leading, trailing, trailingOnKey = false) => {
|
|
12034
|
+
const withLeading = Object.keys(leading).length === 0 ? pair : new YamlPair({
|
|
12035
|
+
key: withCommentFields(pair.key, leading),
|
|
12036
|
+
value: pair.value
|
|
12037
|
+
});
|
|
12038
|
+
return trailing === void 0 ? withLeading : withTrailingComment(withLeading, trailing, trailingOnKey);
|
|
12039
|
+
};
|
|
11982
12040
|
const noteContentColumn = (offset) => {
|
|
11983
12041
|
if (contentColumn < 0 && offset >= 0) contentColumn = columnAt(text, offset);
|
|
11984
12042
|
};
|
|
@@ -12016,15 +12074,9 @@ function buildPairs(items, pairs, text, escaped) {
|
|
|
12016
12074
|
if (item.kind === "comment") {
|
|
12017
12075
|
const cOff = item.offset ?? -1;
|
|
12018
12076
|
const cText = item.comment ?? "";
|
|
12019
|
-
if (!(cOff < 0 ? true : isOwnLineAt(text, cOff)) && pairs.length > 0) {
|
|
12077
|
+
if (!(cOff < 0 ? true : isOwnLineAt(text, cOff) || isAfterIndicatorOnly(text, cOff)) && pairs.length > 0) {
|
|
12020
12078
|
const last = pairs[pairs.length - 1];
|
|
12021
|
-
if (last) pairs[pairs.length - 1] =
|
|
12022
|
-
key: last.key,
|
|
12023
|
-
value: last.value,
|
|
12024
|
-
...last.commentBefore !== void 0 ? { commentBefore: last.commentBefore } : {},
|
|
12025
|
-
comment: last.comment !== void 0 ? `${last.comment}\n${cText}` : cText,
|
|
12026
|
-
...last.spaceBefore !== void 0 ? { spaceBefore: last.spaceBefore } : {}
|
|
12027
|
-
});
|
|
12079
|
+
if (last) pairs[pairs.length - 1] = withTrailingComment(last, cText);
|
|
12028
12080
|
} else {
|
|
12029
12081
|
const blankAbove = cOff >= 0 && hasBlankLineAbove(text, cOff) && !blankAboveIsKeepChompContent(text, cOff, lastNode);
|
|
12030
12082
|
if (blankAbove && pending.length === 0 && lastEnd >= 0) pendingSpace = true;
|
|
@@ -12050,20 +12102,18 @@ function buildPairs(items, pairs, text, escaped) {
|
|
|
12050
12102
|
length: 0
|
|
12051
12103
|
});
|
|
12052
12104
|
if (valueNode) {
|
|
12053
|
-
pairs.push(new YamlPair({
|
|
12105
|
+
pairs.push(pushPair(new YamlPair({
|
|
12054
12106
|
key: nullKey,
|
|
12055
|
-
value: valueNode.node ?? null
|
|
12056
|
-
|
|
12057
|
-
}));
|
|
12107
|
+
value: valueNode.node ?? null
|
|
12108
|
+
}), pendingFields, void 0));
|
|
12058
12109
|
i = valueNode.nextIdx;
|
|
12059
12110
|
lastEnd = valueNode.node ? nodeEnd(valueNode.node) : valueSepOffset + 1;
|
|
12060
12111
|
lastNode = valueNode.node ?? void 0;
|
|
12061
12112
|
} else {
|
|
12062
|
-
pairs.push(new YamlPair({
|
|
12113
|
+
pairs.push(pushPair(new YamlPair({
|
|
12063
12114
|
key: nullKey,
|
|
12064
|
-
value: null
|
|
12065
|
-
|
|
12066
|
-
}));
|
|
12115
|
+
value: null
|
|
12116
|
+
}), pendingFields, void 0));
|
|
12067
12117
|
lastEnd = valueSepOffset + 1;
|
|
12068
12118
|
lastNode = void 0;
|
|
12069
12119
|
}
|
|
@@ -12101,32 +12151,26 @@ function buildPairs(items, pairs, text, escaped) {
|
|
|
12101
12151
|
for (const c of valueResult.sameLineComments) pairTrailing = joinComments(pairTrailing, c);
|
|
12102
12152
|
let valNode = valueResult.node;
|
|
12103
12153
|
if (valNode !== null && valueResult.leadingComments.length > 0) valNode = withCommentFields(valNode, { commentBefore: valueResult.leadingComments.join("\n") });
|
|
12104
|
-
pairs.push(new YamlPair({
|
|
12154
|
+
pairs.push(pushPair(new YamlPair({
|
|
12105
12155
|
key: keyOrNull(),
|
|
12106
|
-
value: valNode
|
|
12107
|
-
|
|
12108
|
-
...pairTrailing !== void 0 ? { comment: pairTrailing } : {}
|
|
12109
|
-
}));
|
|
12156
|
+
value: valNode
|
|
12157
|
+
}), pendingFields, pairTrailing, keyIsSimple(keyNode) && (valNode === null || !sameLineSpan(text, sepOffset, valNode.offset))));
|
|
12110
12158
|
i = valueResult.nextIdx;
|
|
12111
12159
|
lastEnd = valNode ? nodeEnd(valNode) : sepOffset + 1;
|
|
12112
12160
|
lastNode = valNode ?? void 0;
|
|
12113
12161
|
} else {
|
|
12114
|
-
pairs.push(new YamlPair({
|
|
12162
|
+
pairs.push(pushPair(new YamlPair({
|
|
12115
12163
|
key: keyOrNull(),
|
|
12116
|
-
value: null
|
|
12117
|
-
|
|
12118
|
-
...pairTrailing !== void 0 ? { comment: pairTrailing } : {}
|
|
12119
|
-
}));
|
|
12164
|
+
value: null
|
|
12165
|
+
}), pendingFields, pairTrailing));
|
|
12120
12166
|
lastEnd = sepOffset + 1;
|
|
12121
12167
|
lastNode = void 0;
|
|
12122
12168
|
}
|
|
12123
12169
|
} else {
|
|
12124
|
-
pairs.push(new YamlPair({
|
|
12170
|
+
pairs.push(pushPair(new YamlPair({
|
|
12125
12171
|
key: keyOrNull(),
|
|
12126
|
-
value: null
|
|
12127
|
-
|
|
12128
|
-
...pairTrailing !== void 0 ? { comment: pairTrailing } : {}
|
|
12129
|
-
}));
|
|
12172
|
+
value: null
|
|
12173
|
+
}), pendingFields, pairTrailing));
|
|
12130
12174
|
lastEnd = keyNode ? nodeEnd(keyNode) : lastEnd;
|
|
12131
12175
|
if (keyNode) lastNode = keyNode;
|
|
12132
12176
|
}
|
|
@@ -12151,6 +12195,17 @@ function buildPairs(items, pairs, text, escaped) {
|
|
|
12151
12195
|
}
|
|
12152
12196
|
return withLeadingBlank(pending);
|
|
12153
12197
|
}
|
|
12198
|
+
/**
|
|
12199
|
+
* True when a key renders in implicit `key: value` form, so the `:` sits on
|
|
12200
|
+
* the key's own line. A multi-line or block-scalar key forces the explicit
|
|
12201
|
+
* `? key` / `: value` spelling, where the `:` gets a line of its own.
|
|
12202
|
+
*/
|
|
12203
|
+
function keyIsSimple(keyNode) {
|
|
12204
|
+
if (keyNode instanceof YamlAlias) return true;
|
|
12205
|
+
if (!(keyNode instanceof YamlScalar)) return false;
|
|
12206
|
+
if (typeof keyNode.value === "string" && keyNode.value.includes("\n")) return false;
|
|
12207
|
+
return keyNode.style !== "block-literal" && keyNode.style !== "block-folded";
|
|
12208
|
+
}
|
|
12154
12209
|
function consumeValueNode(items, startIdx, text, sepOffset) {
|
|
12155
12210
|
let peek = startIdx;
|
|
12156
12211
|
while (peek < items.length && items[peek]?.kind === "comment") peek++;
|
|
@@ -12159,13 +12214,17 @@ function consumeValueNode(items, startIdx, text, sepOffset) {
|
|
|
12159
12214
|
let i = startIdx;
|
|
12160
12215
|
const sameLineComments = [];
|
|
12161
12216
|
const leadingComments = [];
|
|
12217
|
+
let firstOwnLineIdx = -1;
|
|
12162
12218
|
while (i < items.length) {
|
|
12163
12219
|
const item = items[i];
|
|
12164
12220
|
if (!item) break;
|
|
12165
12221
|
if (item.kind === "comment") {
|
|
12166
12222
|
const cText = item.comment ?? "";
|
|
12167
12223
|
if (item.offset !== void 0 && sameLineSpan(text, sepOffset, item.offset)) sameLineComments.push(cText);
|
|
12168
|
-
else
|
|
12224
|
+
else {
|
|
12225
|
+
if (firstOwnLineIdx < 0) firstOwnLineIdx = i;
|
|
12226
|
+
leadingComments.push(cText);
|
|
12227
|
+
}
|
|
12169
12228
|
i++;
|
|
12170
12229
|
continue;
|
|
12171
12230
|
}
|
|
@@ -12177,6 +12236,12 @@ function consumeValueNode(items, startIdx, text, sepOffset) {
|
|
|
12177
12236
|
};
|
|
12178
12237
|
break;
|
|
12179
12238
|
}
|
|
12239
|
+
if (firstOwnLineIdx >= 0) return {
|
|
12240
|
+
node: null,
|
|
12241
|
+
nextIdx: firstOwnLineIdx,
|
|
12242
|
+
sameLineComments,
|
|
12243
|
+
leadingComments: []
|
|
12244
|
+
};
|
|
12180
12245
|
return i > startIdx ? {
|
|
12181
12246
|
node: null,
|
|
12182
12247
|
nextIdx: i,
|
|
@@ -12195,10 +12260,12 @@ function consumeValueNode(items, startIdx, text, sepOffset) {
|
|
|
12195
12260
|
*/
|
|
12196
12261
|
function consumeValueNodeForNullKey(items, startIdx, text, valueSepOffset) {
|
|
12197
12262
|
let i = startIdx;
|
|
12263
|
+
let firstOwnLineIdx = -1;
|
|
12198
12264
|
while (i < items.length) {
|
|
12199
12265
|
const item = items[i];
|
|
12200
12266
|
if (!item) break;
|
|
12201
12267
|
if (item.kind === "comment") {
|
|
12268
|
+
if (firstOwnLineIdx < 0 && item.offset !== void 0 && !sameLineSpan(text, valueSepOffset, item.offset)) firstOwnLineIdx = i;
|
|
12202
12269
|
i++;
|
|
12203
12270
|
continue;
|
|
12204
12271
|
}
|
|
@@ -12214,6 +12281,10 @@ function consumeValueNodeForNullKey(items, startIdx, text, valueSepOffset) {
|
|
|
12214
12281
|
}
|
|
12215
12282
|
break;
|
|
12216
12283
|
}
|
|
12284
|
+
if (firstOwnLineIdx >= 0) return {
|
|
12285
|
+
node: null,
|
|
12286
|
+
nextIdx: firstOwnLineIdx
|
|
12287
|
+
};
|
|
12217
12288
|
return i > startIdx ? {
|
|
12218
12289
|
node: null,
|
|
12219
12290
|
nextIdx: i
|
|
@@ -12819,7 +12890,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
|
|
|
12819
12890
|
return map;
|
|
12820
12891
|
}
|
|
12821
12892
|
//#endregion
|
|
12822
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
12893
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/flow.js
|
|
12823
12894
|
/**
|
|
12824
12895
|
* Validate that flow collection entries are separated by commas.
|
|
12825
12896
|
*
|
|
@@ -12891,7 +12962,7 @@ function validateFlowContentIndent(cst, state, parentBlockColumn) {
|
|
|
12891
12962
|
i++;
|
|
12892
12963
|
continue;
|
|
12893
12964
|
}
|
|
12894
|
-
if (i - lineStart <= parentBlockColumn) {
|
|
12965
|
+
if (i - lineStart <= parentBlockColumn && !isClosersOnly(text, i, end)) {
|
|
12895
12966
|
state.errors.push({
|
|
12896
12967
|
code: "InvalidIndentation",
|
|
12897
12968
|
message: "Flow content continuation line must be indented past the parent block",
|
|
@@ -12905,6 +12976,26 @@ function validateFlowContentIndent(cst, state, parentBlockColumn) {
|
|
|
12905
12976
|
i++;
|
|
12906
12977
|
}
|
|
12907
12978
|
}
|
|
12979
|
+
/**
|
|
12980
|
+
* True when everything from `start` to the end of that line (bounded by `end`)
|
|
12981
|
+
* is flow closing punctuation — `}`, `]`, separating commas and whitespace.
|
|
12982
|
+
* Such a line closes the collection rather than carrying content, so the
|
|
12983
|
+
* continuation-indent floor does not apply to it.
|
|
12984
|
+
*/
|
|
12985
|
+
function isClosersOnly(text, start, end) {
|
|
12986
|
+
let sawCloser = false;
|
|
12987
|
+
for (let i = start; i < end && i < text.length; i++) {
|
|
12988
|
+
const ch = text[i];
|
|
12989
|
+
if (ch === "\n") break;
|
|
12990
|
+
if (ch === "}" || ch === "]") {
|
|
12991
|
+
sawCloser = true;
|
|
12992
|
+
continue;
|
|
12993
|
+
}
|
|
12994
|
+
if (ch === "," || ch === " " || ch === " " || ch === "\r") continue;
|
|
12995
|
+
return false;
|
|
12996
|
+
}
|
|
12997
|
+
return sawCloser;
|
|
12998
|
+
}
|
|
12908
12999
|
function composeFlowMap(cst, state, meta, parentBlockColumn) {
|
|
12909
13000
|
if (!enterNesting(state, cst)) return new YamlMap({
|
|
12910
13001
|
items: [],
|
|
@@ -13283,7 +13374,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
|
|
|
13283
13374
|
return seq;
|
|
13284
13375
|
}
|
|
13285
13376
|
//#endregion
|
|
13286
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
13377
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/composer/document.js
|
|
13287
13378
|
/** The flow-composer dispatch wired into every state this module creates. */
|
|
13288
13379
|
const FLOW = {
|
|
13289
13380
|
composeFlowMap,
|
|
@@ -13409,7 +13500,10 @@ function composeDocument(cst, state, hasSubsequentDocuments = false, nextDocCst)
|
|
|
13409
13500
|
let documentComment;
|
|
13410
13501
|
let documentCommentAfter;
|
|
13411
13502
|
let lastLeadingCommentOffset = -1;
|
|
13503
|
+
let lastAfterMarkerCommentOffset = -1;
|
|
13412
13504
|
let sawDocEndMarker = false;
|
|
13505
|
+
let sawDocStartMarker = false;
|
|
13506
|
+
let afterMarkerComment;
|
|
13413
13507
|
const hasDocStart = children.some((c) => c.type === "whitespace" && c.source === "---");
|
|
13414
13508
|
let i = 0;
|
|
13415
13509
|
const meta = {};
|
|
@@ -13446,6 +13540,7 @@ function composeDocument(cst, state, hasSubsequentDocuments = false, nextDocCst)
|
|
|
13446
13540
|
if (child.type === "newline" && hasMeta(meta)) sawNewlineSinceMeta = true;
|
|
13447
13541
|
if (child.type === "whitespace" || child.type === "newline") {
|
|
13448
13542
|
if (child.type === "whitespace" && child.source === "...") sawDocEndMarker = true;
|
|
13543
|
+
if (child.type === "whitespace" && child.source === "---") sawDocStartMarker = true;
|
|
13449
13544
|
if (child.type === "whitespace" && (child.source === "]" || child.source === "}")) state.errors.push({
|
|
13450
13545
|
code: "MalformedFlowCollection",
|
|
13451
13546
|
message: `Unexpected flow indicator '${child.source}' at document level`,
|
|
@@ -13457,9 +13552,15 @@ function composeDocument(cst, state, hasSubsequentDocuments = false, nextDocCst)
|
|
|
13457
13552
|
}
|
|
13458
13553
|
if (child.type === "comment" && contents === null && !sawDocEndMarker) {
|
|
13459
13554
|
const text = rawCommentText(child.source);
|
|
13460
|
-
if (
|
|
13461
|
-
|
|
13462
|
-
|
|
13555
|
+
if (sawDocStartMarker) {
|
|
13556
|
+
if (afterMarkerComment !== void 0 && hasBlankLineAbove(state.text, child.offset)) afterMarkerComment = `${afterMarkerComment}\n`;
|
|
13557
|
+
afterMarkerComment = afterMarkerComment === void 0 ? text : `${afterMarkerComment}\n${text}`;
|
|
13558
|
+
lastAfterMarkerCommentOffset = child.offset;
|
|
13559
|
+
} else {
|
|
13560
|
+
if (documentComment !== void 0 && hasBlankLineAbove(state.text, child.offset)) documentComment = `${documentComment}\n`;
|
|
13561
|
+
documentComment = documentComment === void 0 ? text : `${documentComment}\n${text}`;
|
|
13562
|
+
lastLeadingCommentOffset = child.offset;
|
|
13563
|
+
}
|
|
13463
13564
|
i++;
|
|
13464
13565
|
continue;
|
|
13465
13566
|
}
|
|
@@ -13686,17 +13787,32 @@ function composeDocument(cst, state, hasSubsequentDocuments = false, nextDocCst)
|
|
|
13686
13787
|
}
|
|
13687
13788
|
}
|
|
13688
13789
|
if (documentComment !== void 0 && contents !== null && hasBlankLineBelow(state.text, lastLeadingCommentOffset)) documentComment = `${documentComment}\n`;
|
|
13790
|
+
if (afterMarkerComment !== void 0 && contents !== null && hasBlankLineBelow(state.text, lastAfterMarkerCommentOffset)) afterMarkerComment = `${afterMarkerComment}\n`;
|
|
13689
13791
|
state.escapedComments.length = 0;
|
|
13792
|
+
if (documentCommentAfter === void 0 && contents !== null && contents.comment !== void 0) {
|
|
13793
|
+
if ((contents instanceof YamlMap || contents instanceof YamlSeq) && contents.style !== "flow") {
|
|
13794
|
+
documentCommentAfter = contents.comment;
|
|
13795
|
+
contents = stripOwnComment(contents);
|
|
13796
|
+
}
|
|
13797
|
+
}
|
|
13798
|
+
let headerForDocument;
|
|
13799
|
+
let decorated = contents;
|
|
13800
|
+
if (documentComment !== void 0) {
|
|
13801
|
+
if (hasDocStart || contents === null) headerForDocument = documentComment;
|
|
13802
|
+
else decorated = attachHeaderToFirstEntry(contents, documentComment);
|
|
13803
|
+
}
|
|
13804
|
+
if (afterMarkerComment !== void 0 && decorated !== null) decorated = withCommentFields(decorated, { commentBefore: afterMarkerComment });
|
|
13805
|
+
else if (afterMarkerComment !== void 0) headerForDocument = headerForDocument === void 0 ? afterMarkerComment : `${headerForDocument}\n${afterMarkerComment}`;
|
|
13690
13806
|
return {
|
|
13691
|
-
contents,
|
|
13807
|
+
contents: decorated,
|
|
13692
13808
|
errors: [...state.errors],
|
|
13693
13809
|
warnings: [...state.warnings],
|
|
13694
13810
|
directives,
|
|
13695
13811
|
hasDocumentStart: hasDocStart,
|
|
13696
13812
|
hasDocumentEnd: hasDocEnd,
|
|
13697
13813
|
hasDocumentStartTab: hasDocStartTab,
|
|
13698
|
-
...
|
|
13699
|
-
...documentCommentAfter !== void 0 ? {
|
|
13814
|
+
...headerForDocument !== void 0 ? { commentBefore: headerForDocument } : {},
|
|
13815
|
+
...documentCommentAfter !== void 0 ? { comment: documentCommentAfter } : {}
|
|
13700
13816
|
};
|
|
13701
13817
|
}
|
|
13702
13818
|
/**
|
|
@@ -13873,8 +13989,7 @@ function decorateSourceMultiline(node, text) {
|
|
|
13873
13989
|
if (node instanceof YamlMap) {
|
|
13874
13990
|
const newItems = node.items.map((pair) => new YamlPair({
|
|
13875
13991
|
key: decorateSourceMultiline(pair.key, text) ?? pair.key,
|
|
13876
|
-
value: pair.value === null ? null : decorateSourceMultiline(pair.value, text)
|
|
13877
|
-
...commentProps(pair)
|
|
13992
|
+
value: pair.value === null ? null : decorateSourceMultiline(pair.value, text)
|
|
13878
13993
|
}));
|
|
13879
13994
|
const multiline = isSourceMultiline(text, node.offset, node.length);
|
|
13880
13995
|
return new YamlMap({
|
|
@@ -13912,8 +14027,8 @@ function decorateDocumentSourceMultiline(doc, text) {
|
|
|
13912
14027
|
errors: doc.errors,
|
|
13913
14028
|
warnings: doc.warnings,
|
|
13914
14029
|
directives: doc.directives,
|
|
14030
|
+
...doc.commentBefore !== void 0 ? { commentBefore: doc.commentBefore } : {},
|
|
13915
14031
|
...doc.comment !== void 0 ? { comment: doc.comment } : {},
|
|
13916
|
-
...doc.commentAfter !== void 0 ? { commentAfter: doc.commentAfter } : {},
|
|
13917
14032
|
hasDocumentStart: doc.hasDocumentStart,
|
|
13918
14033
|
hasDocumentEnd: doc.hasDocumentEnd,
|
|
13919
14034
|
hasDocumentStartTab: doc.hasDocumentStartTab
|
|
@@ -13984,8 +14099,74 @@ function composeAllDocuments(text, options) {
|
|
|
13984
14099
|
streamErrors: crossDocState.errors
|
|
13985
14100
|
};
|
|
13986
14101
|
}
|
|
14102
|
+
/**
|
|
14103
|
+
* Attach a marker-less document header to the FIRST entry of the content — the
|
|
14104
|
+
* first pair's key for a mapping, the first item for a sequence, the node
|
|
14105
|
+
* itself for a scalar. Without a `---` boundary the header is just the first
|
|
14106
|
+
* own-line comment in the document's item stream, so it forward-attributes
|
|
14107
|
+
* like any other.
|
|
14108
|
+
*/
|
|
14109
|
+
function attachHeaderToFirstEntry(contents, header) {
|
|
14110
|
+
if (contents instanceof YamlMap && contents.items.length > 0) {
|
|
14111
|
+
const first = contents.items[0];
|
|
14112
|
+
const items = [...contents.items];
|
|
14113
|
+
items[0] = new YamlPair({
|
|
14114
|
+
key: withCommentFields(first.key, { commentBefore: header }),
|
|
14115
|
+
value: first.value
|
|
14116
|
+
});
|
|
14117
|
+
return new YamlMap({
|
|
14118
|
+
items,
|
|
14119
|
+
style: contents.style,
|
|
14120
|
+
...contents.tag !== void 0 ? { tag: contents.tag } : {},
|
|
14121
|
+
...contents.anchor !== void 0 ? { anchor: contents.anchor } : {},
|
|
14122
|
+
...contents.commentBefore !== void 0 ? { commentBefore: contents.commentBefore } : {},
|
|
14123
|
+
...contents.comment !== void 0 ? { comment: contents.comment } : {},
|
|
14124
|
+
...contents.spaceBefore !== void 0 ? { spaceBefore: contents.spaceBefore } : {},
|
|
14125
|
+
...contents.sourceMultiline !== void 0 ? { sourceMultiline: contents.sourceMultiline } : {},
|
|
14126
|
+
offset: contents.offset,
|
|
14127
|
+
length: contents.length
|
|
14128
|
+
});
|
|
14129
|
+
}
|
|
14130
|
+
if (contents instanceof YamlSeq && contents.items.length > 0) {
|
|
14131
|
+
const items = [...contents.items];
|
|
14132
|
+
items[0] = withCommentFields(items[0], { commentBefore: header });
|
|
14133
|
+
return new YamlSeq({
|
|
14134
|
+
items,
|
|
14135
|
+
style: contents.style,
|
|
14136
|
+
...contents.tag !== void 0 ? { tag: contents.tag } : {},
|
|
14137
|
+
...contents.anchor !== void 0 ? { anchor: contents.anchor } : {},
|
|
14138
|
+
...contents.commentBefore !== void 0 ? { commentBefore: contents.commentBefore } : {},
|
|
14139
|
+
...contents.comment !== void 0 ? { comment: contents.comment } : {},
|
|
14140
|
+
...contents.spaceBefore !== void 0 ? { spaceBefore: contents.spaceBefore } : {},
|
|
14141
|
+
...contents.sourceMultiline !== void 0 ? { sourceMultiline: contents.sourceMultiline } : {},
|
|
14142
|
+
offset: contents.offset,
|
|
14143
|
+
length: contents.length
|
|
14144
|
+
});
|
|
14145
|
+
}
|
|
14146
|
+
return withCommentFields(contents, { commentBefore: header });
|
|
14147
|
+
}
|
|
14148
|
+
/** Rebuild a collection without its own trailing `comment`. */
|
|
14149
|
+
function stripOwnComment(node) {
|
|
14150
|
+
const shared = {
|
|
14151
|
+
style: node.style,
|
|
14152
|
+
...node.tag !== void 0 ? { tag: node.tag } : {},
|
|
14153
|
+
...node.anchor !== void 0 ? { anchor: node.anchor } : {},
|
|
14154
|
+
...node.commentBefore !== void 0 ? { commentBefore: node.commentBefore } : {},
|
|
14155
|
+
...node.spaceBefore !== void 0 ? { spaceBefore: node.spaceBefore } : {},
|
|
14156
|
+
...node.sourceMultiline !== void 0 ? { sourceMultiline: node.sourceMultiline } : {},
|
|
14157
|
+
offset: node.offset,
|
|
14158
|
+
length: node.length
|
|
14159
|
+
};
|
|
14160
|
+
return node instanceof YamlMap ? new YamlMap({
|
|
14161
|
+
items: node.items,
|
|
14162
|
+
...shared
|
|
14163
|
+
}) : new YamlSeq({
|
|
14164
|
+
items: node.items,
|
|
14165
|
+
...shared
|
|
14166
|
+
});
|
|
14167
|
+
}
|
|
13987
14168
|
//#endregion
|
|
13988
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
14169
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/fold.js
|
|
13989
14170
|
/**
|
|
13990
14171
|
* Column-based line folding for a single logical scalar line (YAML 1.2 flow
|
|
13991
14172
|
* folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
|
|
@@ -14233,7 +14414,7 @@ function renderBlockFolded(s, indent, explicitChomp, explicitIndent) {
|
|
|
14233
14414
|
return `>${indentIndicator}${chomp}\n${outputLines.join("\n")}`;
|
|
14234
14415
|
}
|
|
14235
14416
|
//#endregion
|
|
14236
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
14417
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.9.0_effect@4.0.0-beta.107/node_modules/@effected/yaml/internal/stringifier.js
|
|
14237
14418
|
/**
|
|
14238
14419
|
* Thrown by the stringifier on its failure paths (circular references). The
|
|
14239
14420
|
* facade catches this and materializes the public stringify error.
|
|
@@ -15269,7 +15450,7 @@ function deepEqualValues(a, b) {
|
|
|
15269
15450
|
return false;
|
|
15270
15451
|
}
|
|
15271
15452
|
//#endregion
|
|
15272
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
15453
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/documents.js
|
|
15273
15454
|
/**
|
|
15274
15455
|
* An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
|
|
15275
15456
|
* and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
|
|
@@ -15339,7 +15520,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
|
|
|
15339
15520
|
};
|
|
15340
15521
|
});
|
|
15341
15522
|
//#endregion
|
|
15342
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
15523
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/pnpm.js
|
|
15343
15524
|
const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
|
|
15344
15525
|
specifier: effect.Schema.String,
|
|
15345
15526
|
version: effect.Schema.String
|
|
@@ -15464,7 +15645,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
|
|
|
15464
15645
|
};
|
|
15465
15646
|
});
|
|
15466
15647
|
//#endregion
|
|
15467
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
15648
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/internal/yarn.js
|
|
15468
15649
|
const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
|
|
15469
15650
|
const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
15470
15651
|
const YarnEntry = effect.Schema.Struct({
|
|
@@ -15587,7 +15768,7 @@ const cleanYarnDeps = (deps) => {
|
|
|
15587
15768
|
return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
|
|
15588
15769
|
};
|
|
15589
15770
|
//#endregion
|
|
15590
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
15771
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/Lockfile.js
|
|
15591
15772
|
const EMPTY_IMPORTERS = [];
|
|
15592
15773
|
/**
|
|
15593
15774
|
* Failure of `Lockfile.parse`: the given content is not a valid lockfile of
|
|
@@ -15831,7 +16012,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
|
|
|
15831
16012
|
}
|
|
15832
16013
|
};
|
|
15833
16014
|
//#endregion
|
|
15834
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.
|
|
16015
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.2_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._ed7d42fde2c58956d6dad4ab1717694c/node_modules/@effected/lockfiles/LockfileIntegrity.js
|
|
15835
16016
|
/**
|
|
15836
16017
|
* The minimal manifest shape {@link LockfileIntegrity.compare} checks a
|
|
15837
16018
|
* lockfile against: a package name plus the four optional dependency maps.
|
|
@@ -18644,7 +18825,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
|
|
|
18644
18825
|
}
|
|
18645
18826
|
};
|
|
18646
18827
|
//#endregion
|
|
18647
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
18828
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspacePackage.js
|
|
18648
18829
|
const EMPTY$1 = Object.freeze(Object.create(null));
|
|
18649
18830
|
const EMPTY_MANIFEST = Object.freeze(Object.create(null));
|
|
18650
18831
|
/**
|
|
@@ -19242,7 +19423,7 @@ var Walker$1 = class {
|
|
|
19242
19423
|
static findRoot = findRoot$1;
|
|
19243
19424
|
};
|
|
19244
19425
|
//#endregion
|
|
19245
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
19426
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceRoot.js
|
|
19246
19427
|
/**
|
|
19247
19428
|
* The marker filenames {@link WorkspaceRoot} probes for, in priority order.
|
|
19248
19429
|
*
|
|
@@ -19429,7 +19610,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
|
|
|
19429
19610
|
static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
|
|
19430
19611
|
};
|
|
19431
19612
|
//#endregion
|
|
19432
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
19613
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/limits.js
|
|
19433
19614
|
/**
|
|
19434
19615
|
* Hard ceiling on directories the enumerator will visit for one pattern set.
|
|
19435
19616
|
* Guards the pathological case a depth cap alone does not: a wide, shallow
|
|
@@ -19447,7 +19628,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
|
|
|
19447
19628
|
*/
|
|
19448
19629
|
const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
19449
19630
|
//#endregion
|
|
19450
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
19631
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/traverse.js
|
|
19451
19632
|
/** Directory names never descended into. */
|
|
19452
19633
|
const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
|
|
19453
19634
|
/** Join root-relative POSIX segments; `""` is the root itself. */
|
|
@@ -19537,7 +19718,7 @@ var Traversal = class {
|
|
|
19537
19718
|
}
|
|
19538
19719
|
};
|
|
19539
19720
|
//#endregion
|
|
19540
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
19721
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/enumerate.js
|
|
19541
19722
|
/** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
|
|
19542
19723
|
const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
|
|
19543
19724
|
/**
|
|
@@ -19607,7 +19788,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
|
|
|
19607
19788
|
return results;
|
|
19608
19789
|
});
|
|
19609
19790
|
//#endregion
|
|
19610
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
19791
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/patterns.js
|
|
19611
19792
|
const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
|
|
19612
19793
|
/** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
|
|
19613
19794
|
const pnpmPatternsOf = (document) => {
|
|
@@ -19664,7 +19845,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
|
|
|
19664
19845
|
return manifestPatternsOf(manifest);
|
|
19665
19846
|
});
|
|
19666
19847
|
//#endregion
|
|
19667
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
19848
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceDiscovery.js
|
|
19668
19849
|
/**
|
|
19669
19850
|
* Raised when a workspace member's `package.json` cannot be read, parsed, or
|
|
19670
19851
|
* used — it is missing, malformed, or lacks a `name` or `version`.
|
|
@@ -20120,7 +20301,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
20120
20301
|
};
|
|
20121
20302
|
const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
|
|
20122
20303
|
//#endregion
|
|
20123
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
20304
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/DependencyGraph.js
|
|
20124
20305
|
/**
|
|
20125
20306
|
* Raised when the workspace dependency graph cannot be topologically ordered
|
|
20126
20307
|
* because it contains a cycle.
|
|
@@ -23816,7 +23997,7 @@ var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
|
|
|
23816
23997
|
static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
|
|
23817
23998
|
};
|
|
23818
23999
|
//#endregion
|
|
23819
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
24000
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/ChangeDetector.js
|
|
23820
24001
|
/**
|
|
23821
24002
|
* Which git refs to compare, and whether to fold in the working tree.
|
|
23822
24003
|
*
|
|
@@ -23950,7 +24131,7 @@ Object.freeze({
|
|
|
23950
24131
|
npmjs: "https://registry.npmjs.org/"
|
|
23951
24132
|
});
|
|
23952
24133
|
//#endregion
|
|
23953
|
-
//#region ../../node_modules/.pnpm/@pnpm+error@1100.1.
|
|
24134
|
+
//#region ../../node_modules/.pnpm/@pnpm+error@1100.1.2/node_modules/@pnpm/error/lib/index.js
|
|
23954
24135
|
var PnpmError = class extends Error {
|
|
23955
24136
|
code;
|
|
23956
24137
|
hint;
|
|
@@ -23965,7 +24146,7 @@ var PnpmError = class extends Error {
|
|
|
23965
24146
|
}
|
|
23966
24147
|
};
|
|
23967
24148
|
//#endregion
|
|
23968
|
-
//#region ../../node_modules/.pnpm/@pnpm+catalogs.config@1100.0.
|
|
24149
|
+
//#region ../../node_modules/.pnpm/@pnpm+catalogs.config@1100.0.5/node_modules/@pnpm/catalogs.config/lib/getCatalogsFromWorkspaceManifest.js
|
|
23969
24150
|
function getCatalogsFromWorkspaceManifest(workspaceManifest) {
|
|
23970
24151
|
if (workspaceManifest == null) return {};
|
|
23971
24152
|
checkDefaultCatalogIsDefinedOnce(workspaceManifest);
|
|
@@ -23978,7 +24159,7 @@ function checkDefaultCatalogIsDefinedOnce(manifest) {
|
|
|
23978
24159
|
if (manifest.catalog != null && manifest.catalogs?.default != null) throw new PnpmError("INVALID_CATALOGS_CONFIGURATION", "The 'default' catalog was defined multiple times. Use the 'catalog' field or 'catalogs.default', but not both.");
|
|
23979
24160
|
}
|
|
23980
24161
|
//#endregion
|
|
23981
|
-
//#region ../../node_modules/.pnpm/@pnpm+catalogs.config@1100.0.
|
|
24162
|
+
//#region ../../node_modules/.pnpm/@pnpm+catalogs.config@1100.0.5/node_modules/@pnpm/catalogs.config/lib/mergeCatalogs.js
|
|
23982
24163
|
/**
|
|
23983
24164
|
* Deep-merges catalog definitions, later arguments taking precedence over
|
|
23984
24165
|
* earlier ones at the individual entry level. Use it to fold the catalog
|
|
@@ -24072,7 +24253,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
|
|
|
24072
24253
|
};
|
|
24073
24254
|
}
|
|
24074
24255
|
//#endregion
|
|
24075
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
24256
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/catalogs.js
|
|
24076
24257
|
/** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
|
|
24077
24258
|
const inlineCatalogs = (manifest) => {
|
|
24078
24259
|
if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
|
|
@@ -24136,7 +24317,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
|
|
|
24136
24317
|
});
|
|
24137
24318
|
};
|
|
24138
24319
|
//#endregion
|
|
24139
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
24320
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/ConfigDependencyHooks.js
|
|
24140
24321
|
/** Whether `value` is a non-null, non-array object. */
|
|
24141
24322
|
const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
24142
24323
|
/**
|
|
@@ -24550,7 +24731,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
24550
24731
|
}));
|
|
24551
24732
|
};
|
|
24552
24733
|
//#endregion
|
|
24553
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
24734
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/PackageManagerName.js
|
|
24554
24735
|
/**
|
|
24555
24736
|
* The four package managers this package understands.
|
|
24556
24737
|
*
|
|
@@ -24925,7 +25106,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
|
|
|
24925
25106
|
static layerTest = (overrides = {}) => effect.Layer.succeed(PackageManagerDetector, PackageManagerDetector.makeTest(overrides));
|
|
24926
25107
|
};
|
|
24927
25108
|
//#endregion
|
|
24928
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
25109
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/LockfileReader.js
|
|
24929
25110
|
/**
|
|
24930
25111
|
* Raised when the workspace's lockfile cannot be read off disk.
|
|
24931
25112
|
*
|
|
@@ -25105,7 +25286,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
|
|
|
25105
25286
|
static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
|
|
25106
25287
|
};
|
|
25107
25288
|
//#endregion
|
|
25108
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
25289
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/Publishability.js
|
|
25109
25290
|
/** The public npm registry, used when `publishConfig.registry` says nothing. */
|
|
25110
25291
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
25111
25292
|
/**
|
|
@@ -25264,7 +25445,7 @@ var PublishabilityDetector = class extends effect.Context.Service()("@effected/w
|
|
|
25264
25445
|
static layerNone = effect.Layer.succeed(this, this.none);
|
|
25265
25446
|
};
|
|
25266
25447
|
//#endregion
|
|
25267
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
25448
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/internal/importerVersions.js
|
|
25268
25449
|
/**
|
|
25269
25450
|
* Strip pnpm's peer-disambiguation suffix from a recorded importer version.
|
|
25270
25451
|
*
|
|
@@ -25350,7 +25531,7 @@ const unanimousVersionOf = (index, dependency) => {
|
|
|
25350
25531
|
return agreed;
|
|
25351
25532
|
};
|
|
25352
25533
|
//#endregion
|
|
25353
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
25534
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceCatalogs.js
|
|
25354
25535
|
/**
|
|
25355
25536
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
25356
25537
|
* resolution semantic in the package.
|
|
@@ -25877,7 +26058,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
25877
26058
|
}));
|
|
25878
26059
|
};
|
|
25879
26060
|
//#endregion
|
|
25880
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
26061
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
|
|
25881
26062
|
const EMPTY = Object.freeze(Object.create(null));
|
|
25882
26063
|
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)));
|
|
25883
26064
|
/**
|
|
@@ -26100,7 +26281,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
26100
26281
|
}
|
|
26101
26282
|
};
|
|
26102
26283
|
//#endregion
|
|
26103
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
26284
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/WorkspaceSnapshots.js
|
|
26104
26285
|
/** Whether `value` is a non-null, non-array object. */
|
|
26105
26286
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26106
26287
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -26377,7 +26558,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
26377
26558
|
static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
|
|
26378
26559
|
};
|
|
26379
26560
|
//#endregion
|
|
26380
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.
|
|
26561
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.13.1_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/workspaces/Workspaces.js
|
|
26381
26562
|
const compose = (options, catalogsFactory) => {
|
|
26382
26563
|
const roots = WorkspaceRoot.layer;
|
|
26383
26564
|
const detector = PackageManagerDetector.layer;
|
|
@@ -52982,34 +53163,32 @@ var VersionFiles = class VersionFiles {
|
|
|
52982
53163
|
* @returns Array of workspace packages with versions
|
|
52983
53164
|
*/
|
|
52984
53165
|
static discoverVersions(cwd, packages) {
|
|
52985
|
-
|
|
52986
|
-
|
|
52987
|
-
|
|
52988
|
-
|
|
52989
|
-
|
|
52990
|
-
|
|
52991
|
-
|
|
52992
|
-
name: pkg.name,
|
|
52993
|
-
path: pkg.path,
|
|
52994
|
-
version: pkg.version
|
|
52995
|
-
});
|
|
52996
|
-
}
|
|
52997
|
-
if (!seen.has(resolvedCwd)) {
|
|
52998
|
-
const version = readPackageVersion(resolvedCwd);
|
|
52999
|
-
if (version) {
|
|
53000
|
-
let rootName = "root";
|
|
53001
|
-
try {
|
|
53002
|
-
const pkg = JSON.parse((0, node_fs.readFileSync)((0, node_path.join)(resolvedCwd, "package.json"), "utf-8"));
|
|
53003
|
-
if (pkg.name) rootName = pkg.name;
|
|
53004
|
-
} catch {}
|
|
53166
|
+
return effect.Effect.gen(function* () {
|
|
53167
|
+
const resolvedCwd = (0, node_path.resolve)(cwd);
|
|
53168
|
+
const results = [];
|
|
53169
|
+
const seen = /* @__PURE__ */ new Set();
|
|
53170
|
+
for (const pkg of packages) {
|
|
53171
|
+
if (seen.has(pkg.path) || !pkg.version) continue;
|
|
53172
|
+
seen.add(pkg.path);
|
|
53005
53173
|
results.push({
|
|
53006
|
-
name:
|
|
53007
|
-
path:
|
|
53008
|
-
version
|
|
53174
|
+
name: pkg.name,
|
|
53175
|
+
path: pkg.path,
|
|
53176
|
+
version: pkg.version
|
|
53009
53177
|
});
|
|
53010
53178
|
}
|
|
53011
|
-
|
|
53012
|
-
|
|
53179
|
+
if (!seen.has(resolvedCwd)) {
|
|
53180
|
+
const version = yield* readPackageVersion(resolvedCwd);
|
|
53181
|
+
if (version) {
|
|
53182
|
+
const rootName = yield* readPackageName(resolvedCwd);
|
|
53183
|
+
results.push({
|
|
53184
|
+
name: rootName,
|
|
53185
|
+
path: resolvedCwd,
|
|
53186
|
+
version
|
|
53187
|
+
});
|
|
53188
|
+
}
|
|
53189
|
+
}
|
|
53190
|
+
return results;
|
|
53191
|
+
});
|
|
53013
53192
|
}
|
|
53014
53193
|
/**
|
|
53015
53194
|
* Determine which workspace version applies to a given file path
|
|
@@ -53104,16 +53283,19 @@ var VersionFiles = class VersionFiles {
|
|
|
53104
53283
|
* @see {@link VersionFiles.applyVersionEdit} for the per-path edit
|
|
53105
53284
|
*/
|
|
53106
53285
|
static updateFile(filePath, jsonPaths, version) {
|
|
53107
|
-
|
|
53108
|
-
|
|
53109
|
-
|
|
53110
|
-
|
|
53111
|
-
|
|
53112
|
-
filePath,
|
|
53113
|
-
|
|
53114
|
-
|
|
53115
|
-
|
|
53116
|
-
|
|
53286
|
+
return effect.Effect.gen(function* () {
|
|
53287
|
+
const fs = yield* effect.FileSystem.FileSystem;
|
|
53288
|
+
const original = yield* fs.readFileString(filePath);
|
|
53289
|
+
const { content, previousValues, totalChanged } = VersionFiles.computeUpdate(original, jsonPaths, version);
|
|
53290
|
+
if (totalChanged === 0) return;
|
|
53291
|
+
yield* fs.writeFileString(filePath, content);
|
|
53292
|
+
return {
|
|
53293
|
+
filePath,
|
|
53294
|
+
jsonPaths,
|
|
53295
|
+
version,
|
|
53296
|
+
previousValues
|
|
53297
|
+
};
|
|
53298
|
+
});
|
|
53117
53299
|
}
|
|
53118
53300
|
/**
|
|
53119
53301
|
* Compute the full update for a document without touching the filesystem:
|
|
@@ -53210,30 +53392,15 @@ var VersionFiles = class VersionFiles {
|
|
|
53210
53392
|
*/
|
|
53211
53393
|
static processVersionFiles(cwd, configs, dryRun = false, packages = []) {
|
|
53212
53394
|
return effect.Effect.gen(function* () {
|
|
53213
|
-
const workspaces = VersionFiles.discoverVersions(cwd, packages);
|
|
53395
|
+
const workspaces = yield* VersionFiles.discoverVersions(cwd, packages);
|
|
53214
53396
|
const rootVersion = workspaces.find((ws) => ws.path === (0, node_path.resolve)(cwd))?.version ?? "0.0.0";
|
|
53215
53397
|
const resolved = yield* VersionFiles.resolveGlobs(configs, cwd);
|
|
53216
53398
|
const updates = [];
|
|
53217
53399
|
for (const [filePath, config] of resolved) {
|
|
53218
53400
|
const jsonPaths = config.paths ?? ["$.version"];
|
|
53219
53401
|
const version = config.package ? workspaces.find((ws) => ws.name === config.package)?.version ?? rootVersion : VersionFiles.resolveVersion(filePath, workspaces, rootVersion);
|
|
53220
|
-
|
|
53221
|
-
|
|
53222
|
-
const content = (0, node_fs.readFileSync)(filePath, "utf-8");
|
|
53223
|
-
const { previousValues, totalChanged } = VersionFiles.computeUpdate(content, jsonPaths, version);
|
|
53224
|
-
if (totalChanged > 0) updates.push({
|
|
53225
|
-
filePath,
|
|
53226
|
-
jsonPaths,
|
|
53227
|
-
version,
|
|
53228
|
-
previousValues
|
|
53229
|
-
});
|
|
53230
|
-
} else {
|
|
53231
|
-
const result = VersionFiles.updateFile(filePath, jsonPaths, version);
|
|
53232
|
-
if (result) updates.push(result);
|
|
53233
|
-
}
|
|
53234
|
-
} catch (error) {
|
|
53235
|
-
throw new Error(`Failed to update ${filePath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
53236
|
-
}
|
|
53402
|
+
const result = yield* VersionFiles.applyOne(filePath, jsonPaths, version, dryRun).pipe(effect.Effect.orDie);
|
|
53403
|
+
if (result) updates.push(result);
|
|
53237
53404
|
}
|
|
53238
53405
|
return updates;
|
|
53239
53406
|
});
|
|
@@ -53260,28 +53427,61 @@ var VersionFiles = class VersionFiles {
|
|
|
53260
53427
|
* @internal
|
|
53261
53428
|
*/
|
|
53262
53429
|
static processResolvedVersionFiles(scopes, dryRun = false) {
|
|
53263
|
-
|
|
53264
|
-
|
|
53265
|
-
const
|
|
53266
|
-
|
|
53267
|
-
|
|
53268
|
-
const
|
|
53269
|
-
const { previousValues, totalChanged } = VersionFiles.computeUpdate(content, jsonPaths, scope.version);
|
|
53270
|
-
if (totalChanged > 0) updates.push({
|
|
53271
|
-
filePath,
|
|
53272
|
-
jsonPaths,
|
|
53273
|
-
version: scope.version,
|
|
53274
|
-
previousValues
|
|
53275
|
-
});
|
|
53276
|
-
} else {
|
|
53277
|
-
const result = VersionFiles.updateFile(filePath, jsonPaths, scope.version);
|
|
53430
|
+
return effect.Effect.gen(function* () {
|
|
53431
|
+
const updates = [];
|
|
53432
|
+
for (const scope of scopes) for (const vf of scope.versionFiles) {
|
|
53433
|
+
const jsonPaths = vf.paths.length > 0 ? vf.paths : ["$.version"];
|
|
53434
|
+
for (const filePath of vf.matchedFiles) {
|
|
53435
|
+
const result = yield* VersionFiles.applyOne(filePath, jsonPaths, scope.version, dryRun);
|
|
53278
53436
|
if (result) updates.push(result);
|
|
53279
53437
|
}
|
|
53280
|
-
} catch (error) {
|
|
53281
|
-
throw new Error(`Failed to update ${filePath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
53282
53438
|
}
|
|
53439
|
+
return updates;
|
|
53440
|
+
});
|
|
53441
|
+
}
|
|
53442
|
+
/**
|
|
53443
|
+
* Apply one version file's update, shared by both process entry points.
|
|
53444
|
+
*
|
|
53445
|
+
* @remarks
|
|
53446
|
+
* Fails TYPED with `VersionFileError`, carrying the offending `filePath`. The two callers then
|
|
53447
|
+
* choose their own posture, which is not the same and must not be unified:
|
|
53448
|
+
* {@link VersionFiles.processVersionFiles} (legacy) turns it into a DEFECT,
|
|
53449
|
+
* matching the synchronous throw it had under `node:fs`, while
|
|
53450
|
+
* {@link VersionFiles.processResolvedVersionFiles} leaves it typed because
|
|
53451
|
+
* `ReleasePlanner.apply` converts it to a `ReleasePlanError` — a defect there
|
|
53452
|
+
* would bypass the inspector's catch and crash `apply()`.
|
|
53453
|
+
*
|
|
53454
|
+
* @internal
|
|
53455
|
+
*/
|
|
53456
|
+
static applyOne(filePath, jsonPaths, version, dryRun) {
|
|
53457
|
+
return effect.Effect.gen(function* () {
|
|
53458
|
+
if (dryRun) {
|
|
53459
|
+
const content = yield* (yield* effect.FileSystem.FileSystem).readFileString(filePath);
|
|
53460
|
+
const { previousValues, totalChanged } = VersionFiles.computeUpdate(content, jsonPaths, version);
|
|
53461
|
+
return totalChanged > 0 ? {
|
|
53462
|
+
filePath,
|
|
53463
|
+
jsonPaths,
|
|
53464
|
+
version,
|
|
53465
|
+
previousValues
|
|
53466
|
+
} : void 0;
|
|
53467
|
+
}
|
|
53468
|
+
return yield* VersionFiles.updateFile(filePath, jsonPaths, version);
|
|
53469
|
+
}).pipe(effect.Effect.mapError((error) => new VersionFileError({
|
|
53470
|
+
filePath,
|
|
53471
|
+
reason: VersionFiles.describeFailure(error)
|
|
53472
|
+
})), effect.Effect.catchDefect((defect) => effect.Effect.fail(new VersionFileError({
|
|
53473
|
+
filePath,
|
|
53474
|
+
reason: VersionFiles.describeFailure(defect)
|
|
53475
|
+
}))));
|
|
53476
|
+
}
|
|
53477
|
+
/** Render a `PlatformError` the way the old `node:fs` catch rendered an `Error`. */
|
|
53478
|
+
static describeFailure(error) {
|
|
53479
|
+
if (typeof error === "object" && error !== null) {
|
|
53480
|
+
const e = error;
|
|
53481
|
+
if (typeof e.message === "string") return e.message;
|
|
53482
|
+
if (typeof e.reason === "string") return e.reason;
|
|
53283
53483
|
}
|
|
53284
|
-
return
|
|
53484
|
+
return String(error);
|
|
53285
53485
|
}
|
|
53286
53486
|
};
|
|
53287
53487
|
/**
|
|
@@ -53330,12 +53530,32 @@ function expandGlob(source, cwd) {
|
|
|
53330
53530
|
*
|
|
53331
53531
|
* @internal
|
|
53332
53532
|
*/
|
|
53533
|
+
/**
|
|
53534
|
+
* Read the `name` field from a `package.json` in the given directory, falling
|
|
53535
|
+
* back to `"root"` when it is absent, unreadable, or malformed.
|
|
53536
|
+
*
|
|
53537
|
+
* @param dir - Absolute path to the directory containing `package.json`
|
|
53538
|
+
* @returns The package name, or `"root"`
|
|
53539
|
+
*
|
|
53540
|
+
* @internal
|
|
53541
|
+
*/
|
|
53542
|
+
function readPackageName(dir) {
|
|
53543
|
+
return effect.Effect.gen(function* () {
|
|
53544
|
+
const raw = yield* (yield* effect.FileSystem.FileSystem).readFileString((0, node_path.join)(dir, "package.json"));
|
|
53545
|
+
return yield* effect.Effect.try({
|
|
53546
|
+
try: () => JSON.parse(raw).name,
|
|
53547
|
+
catch: (e) => e
|
|
53548
|
+
});
|
|
53549
|
+
}).pipe(effect.Effect.map((name) => name ?? "root"), effect.Effect.orElseSucceed(() => "root"));
|
|
53550
|
+
}
|
|
53333
53551
|
function readPackageVersion(dir) {
|
|
53334
|
-
|
|
53335
|
-
|
|
53336
|
-
|
|
53337
|
-
|
|
53338
|
-
|
|
53552
|
+
return effect.Effect.gen(function* () {
|
|
53553
|
+
const raw = yield* (yield* effect.FileSystem.FileSystem).readFileString((0, node_path.join)(dir, "package.json"));
|
|
53554
|
+
return yield* effect.Effect.try({
|
|
53555
|
+
try: () => JSON.parse(raw).version,
|
|
53556
|
+
catch: (e) => e
|
|
53557
|
+
});
|
|
53558
|
+
}).pipe(effect.Effect.orElseSucceed(() => void 0));
|
|
53339
53559
|
}
|
|
53340
53560
|
//#endregion
|
|
53341
53561
|
//#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.5/node_modules/fdir/dist/index.mjs
|
|
@@ -70074,13 +70294,10 @@ function applyEffect(root, dryRun, changelogModules, inspector, fs) {
|
|
|
70074
70294
|
version: fresh
|
|
70075
70295
|
} : p;
|
|
70076
70296
|
});
|
|
70077
|
-
versionFileUpdates = yield* effect.Effect.
|
|
70078
|
-
|
|
70079
|
-
|
|
70080
|
-
|
|
70081
|
-
reason: errMsg(e)
|
|
70082
|
-
})
|
|
70083
|
-
});
|
|
70297
|
+
versionFileUpdates = scopes.length > 0 ? yield* VersionFiles.processResolvedVersionFiles(scopes, dryRun).pipe(effect.Effect.provideService(effect.FileSystem.FileSystem, fs), effect.Effect.mapError((e) => new ReleasePlanError({
|
|
70298
|
+
phase: "apply",
|
|
70299
|
+
reason: errMsg(e)
|
|
70300
|
+
}))) : [];
|
|
70084
70301
|
}
|
|
70085
70302
|
return {
|
|
70086
70303
|
dryRun,
|