@visulima/vis 4.2.0 → 4.3.1
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/CHANGELOG.md +26 -0
- package/LICENSE.md +55 -129
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/config/index.d.ts +96 -0
- package/dist/packem_chunks/CONFIG_FILES.js +3 -3
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/cargo-plan.js +3 -0
- package/dist/packem_chunks/catalog.js +51 -48
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +164 -164
- package/dist/packem_chunks/composer-projects.js +2 -0
- package/dist/packem_chunks/dart-plan.js +1 -0
- package/dist/packem_chunks/dart-projects.js +1 -0
- package/dist/packem_chunks/dispatch.js +1 -1
- package/dist/packem_chunks/fix.js +8 -8
- package/dist/packem_chunks/gem-plan.js +2 -0
- package/dist/packem_chunks/gem-projects.js +1 -0
- package/dist/packem_chunks/git.js +5 -5
- package/dist/packem_chunks/go-plan.js +1 -0
- package/dist/packem_chunks/go-projects.js +2 -0
- package/dist/packem_chunks/gradle-plan.js +1 -0
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +3 -3
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +2 -2
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +2 -2
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +1 -1
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler39.js +6 -6
- package/dist/packem_chunks/handler4.js +3 -3
- package/dist/packem_chunks/handler5.js +2 -2
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler53.js +1 -1
- package/dist/packem_chunks/handler54.js +2 -2
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler58.js +2 -2
- package/dist/packem_chunks/handler59.js +1 -1
- package/dist/packem_chunks/handler6.js +7 -7
- package/dist/packem_chunks/handler60.js +8 -8
- package/dist/packem_chunks/handler61.js +1 -1
- package/dist/packem_chunks/handler62.js +16 -16
- package/dist/packem_chunks/handler63.js +2 -2
- package/dist/packem_chunks/handler64.js +1 -1
- package/dist/packem_chunks/handler65.js +3 -3
- package/dist/packem_chunks/handler66.js +2 -2
- package/dist/packem_chunks/handler67.js +3 -3
- package/dist/packem_chunks/handler68.js +4 -4
- package/dist/packem_chunks/handler69.js +3 -3
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +5 -5
- package/dist/packem_chunks/handler71.js +5 -5
- package/dist/packem_chunks/handler72.js +2 -2
- package/dist/packem_chunks/handler73.js +87 -86
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/handler75.js +23 -23
- package/dist/packem_chunks/handler76.js +6 -6
- package/dist/packem_chunks/handler77.js +2 -2
- package/dist/packem_chunks/handler78.js +19 -19
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +7 -7
- package/dist/packem_chunks/hex-plan.js +3 -0
- package/dist/packem_chunks/hex-projects.js +1 -0
- package/dist/packem_chunks/index2.js +52 -42
- package/dist/packem_chunks/index4.js +58 -802
- package/dist/packem_chunks/index5.js +802 -7
- package/dist/packem_chunks/index6.js +7 -58
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/lean.js +1 -1
- package/dist/packem_chunks/list.js +2 -2
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/maven-plan.js +1 -0
- package/dist/packem_chunks/maven-projects.js +1 -0
- package/dist/packem_chunks/nuget-plan.js +1 -0
- package/dist/packem_chunks/nuget-projects.js +1 -0
- package/dist/packem_chunks/orchestrator.js +33 -33
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/python-plan.js +3 -0
- package/dist/packem_chunks/python-projects.js +1 -0
- package/dist/packem_chunks/run.js +1 -1
- package/dist/packem_chunks/security.js +1 -1
- package/dist/packem_chunks/snapshot.js +2 -2
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/swift-projects.js +1 -0
- package/dist/packem_chunks/sync.js +3 -2
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +2 -2
- package/dist/packem_chunks/ts-loader.js +5 -5
- package/dist/packem_chunks/verify-lockfile.js +2 -2
- package/dist/packem_chunks/version-resolver.js +3 -3
- package/dist/packem_chunks/zig-plan.js +1 -0
- package/dist/packem_chunks/zig-projects.js +1 -0
- package/dist/packem_shared/{affected-selection-M7riOi5-.js → affected-selection-D4giBK2X.js} +1 -1
- package/dist/packem_shared/{affected-shas-CAwpSPmP.js → affected-shas-B2V84O0g.js} +1 -1
- package/dist/packem_shared/{ai-analysis-DSQQDFU9.js → ai-analysis-pldoS_N4.js} +2 -2
- package/dist/packem_shared/{ai-fix-BTm1Z5og.js → ai-fix-BC6aIRJT.js} +4 -4
- package/dist/packem_shared/{augment-CBv1hwMR.js → augment-B9kSZuvW.js} +1 -1
- package/dist/packem_shared/{bin-Cbs_ix6l.js → bin-C1XKj-O-.js} +1 -1
- package/dist/packem_shared/build-scripts-CEDx_nJp.js +1 -0
- package/dist/packem_shared/{command-runtime-BD-4UmPB.js → command-runtime-p4IXiIf6.js} +1 -1
- package/dist/packem_shared/composer-DR3D-Psb.js +1 -0
- package/dist/packem_shared/dart-pubspec-BK_cK2EP.js +2 -0
- package/dist/packem_shared/dependency-scan-B8jroa1D.js +1 -0
- package/dist/packem_shared/{docker-1jgKW5Wd.js → docker-DXqV-07f.js} +3 -3
- package/dist/packem_shared/ecosystem-gate-ddru_hOg.js +6 -0
- package/dist/packem_shared/failure-log-D2x5BT8S.js +2 -0
- package/dist/packem_shared/formatBytes-BHAzNIrn-CrusHOew.js +4 -0
- package/dist/packem_shared/gemspec-K7N05xxc.js +3 -0
- package/dist/packem_shared/go-modules-BsVqtyeC.js +1 -0
- package/dist/packem_shared/gradle-build-CHZDHyjI.js +8 -0
- package/dist/packem_shared/index-BzhrR_iC.js +22 -0
- package/dist/packem_shared/index-Chje3u9v.js +1 -0
- package/dist/packem_shared/{index-Cq-J2MdB.js → index-DQ2GJzmy.js} +1 -1
- package/dist/packem_shared/{isAccessibleSync-DYKTrrvc-K2xhg6sV.js → isAccessibleSync-DYKTrrvc-C-_5cgwu.js} +1 -1
- package/dist/packem_shared/lifecycle-D6PMPor-.js +2 -0
- package/dist/packem_shared/lockfile-CiUtEbnt.js +1 -0
- package/dist/packem_shared/manifests-Du4yKlf_.js +1 -0
- package/dist/packem_shared/maven-pom-B0KG9kJQ.js +1 -0
- package/dist/packem_shared/{min-release-age-Da4V046o.js → min-release-age-JViyQuBM.js} +7 -7
- package/dist/packem_shared/missing-package-json-Cu5YVAot.js +1 -0
- package/dist/packem_shared/mix-project-RYvdZp3_.js +2 -0
- package/dist/packem_shared/multi-eco-lockfiles-B2X3yhyo.js +1 -0
- package/dist/packem_shared/{native-config-sync-CEB0rWlk.js → native-config-sync-TdTWjVgI.js} +1 -1
- package/dist/packem_shared/nuget-project-RApYSW_y.js +4 -0
- package/dist/packem_shared/{osv-bloom-BRacgzs7.js → osv-bloom-BCAX5ARR.js} +1 -1
- package/dist/packem_shared/package-version-Dxirp-UO.js +4 -0
- package/dist/packem_shared/packument-BQv4je9m.js +1 -0
- package/dist/packem_shared/pm-runner-CMSml1Bj.js +1 -0
- package/dist/packem_shared/{project-name-filter-zrdrEQbu.js → project-name-filter-D6tXD8gd.js} +1 -1
- package/dist/packem_shared/{provenance-CFPT_FQA.js → provenance-DNyVMxNv.js} +1 -1
- package/dist/packem_shared/readJsonSync-CbryXYxN-EWl7_7KX.js +1 -0
- package/dist/packem_shared/registry-keys-DwB3ZXS_.js +1 -0
- package/dist/packem_shared/{resolve-explicit-opfIkxoY.js → resolve-explicit-BPsdmuty.js} +1 -1
- package/dist/packem_shared/resolve-runtime-CNiHcVtx.js +1 -0
- package/dist/packem_shared/run-file-UBukWaha.js +1 -0
- package/dist/packem_shared/runtime-check-1U8HrQd9.js +1 -0
- package/dist/packem_shared/s1ngularity-QD2LD1sO.js +1 -0
- package/dist/packem_shared/{scan-progress-BGB9hIrD.js → scan-progress-CkumcBG-.js} +2 -2
- package/dist/packem_shared/{selectors-CjIZ3gy2.js → selectors-edwcgNl3.js} +1 -1
- package/dist/packem_shared/{signatures-DpqZVmmU.js → signatures-t8LbOaqr.js} +1 -1
- package/dist/packem_shared/spinner-ukDEdGvp.js +1 -0
- package/dist/packem_shared/swift-package-B6X5kzQE.js +1 -0
- package/dist/packem_shared/tabs--uxJGL8N.js +1 -0
- package/dist/packem_shared/{target-merge-hsawesT4.js → target-merge-DVJl-7Qz.js} +1 -1
- package/dist/packem_shared/target-options-DsHFmRZH.js +1 -0
- package/dist/packem_shared/toolchain-BRdpaAC4.js +5 -0
- package/dist/packem_shared/typosquats-8u0drCqQ.js +1 -0
- package/dist/packem_shared/use-measured-height-DUZyyias.js +1 -0
- package/dist/packem_shared/verify-B_MblU_Q.js +1 -0
- package/dist/packem_shared/{vis-update-app-D9KWJ9Ir.js → vis-update-app-BCIccZfA.js} +1 -1
- package/dist/packem_shared/{vis-user-error-Bdg9NRuJ.js → vis-user-error-75VtCwMv.js} +15 -15
- package/dist/packem_shared/watch-CcTketln.js +1 -0
- package/dist/packem_shared/watch-loop-qRn0IHPG.js +11 -0
- package/dist/packem_shared/{writeFileSync-DJoHk3Ks-O9zOKqeM.js → writeFileSync-DJoHk3Ks-BPRoepNw.js} +1 -1
- package/dist/packem_shared/zig-manifest-P7ydLEOa.js +7 -0
- package/dist/release/plugin-sdk.d.ts +1 -1
- package/dist/release/types.d.ts +133 -7
- package/dist/runtime/preload.js +1 -1
- package/index.d.ts +204 -204
- package/index.js +52 -52
- package/package.json +11 -11
- package/schemas/vis-config.schema.json +265 -5
- package/schemas/vis-release-config.schema.json +132 -5
- package/dist/packem_shared/advisories-BSpzRIXP.js +0 -1
- package/dist/packem_shared/build-scripts-BIgkWVgY.js +0 -1
- package/dist/packem_shared/cyclonedx-CT1rtKxV.js +0 -4
- package/dist/packem_shared/dependency-scan-W9b2X0a1.js +0 -1
- package/dist/packem_shared/failure-log-B91LvYWw.js +0 -2
- package/dist/packem_shared/formatBytes-BHAzNIrn-CLYsxlUj.js +0 -4
- package/dist/packem_shared/index-CVBR-Kit.js +0 -22
- package/dist/packem_shared/index-onibYJkv.js +0 -1
- package/dist/packem_shared/lifecycle-DDJzp-4H.js +0 -2
- package/dist/packem_shared/lockfile-Bi1mw9jJ.js +0 -1
- package/dist/packem_shared/manifests-D671Sb1T.js +0 -1
- package/dist/packem_shared/missing-package-json-CMoHdvmj.js +0 -1
- package/dist/packem_shared/package-version-C5EPMgRw.js +0 -4
- package/dist/packem_shared/packument-DuEV-qSE.js +0 -1
- package/dist/packem_shared/path-CxEa27Rz-pjheKk6v.js +0 -1
- package/dist/packem_shared/pm-runner-9L6ocnu2.js +0 -1
- package/dist/packem_shared/readJsonSync-CbryXYxN-BxKjDZnF.js +0 -1
- package/dist/packem_shared/registry-keys-C3EsP_s4.js +0 -1
- package/dist/packem_shared/resolve-runtime-lJ5L9gU4.js +0 -1
- package/dist/packem_shared/run-file-DZff6GqY.js +0 -1
- package/dist/packem_shared/runtime-check-DAbveBr_.js +0 -1
- package/dist/packem_shared/s1ngularity-DTvrfWIM.js +0 -1
- package/dist/packem_shared/spinner-BVCEMm3G.js +0 -1
- package/dist/packem_shared/tabs-Dz6xVpfX.js +0 -1
- package/dist/packem_shared/target-options-Bxb0Y5qa.js +0 -1
- package/dist/packem_shared/toolchain-887JoquG.js +0 -5
- package/dist/packem_shared/typosquats-Xv6dN4sr.js +0 -1
- package/dist/packem_shared/use-measured-height-BPQg2q_p.js +0 -1
- package/dist/packem_shared/verify-BLoaI7En.js +0 -1
- package/dist/packem_shared/watch-BTZw2Y8Q.js +0 -1
- package/dist/packem_shared/watch-loop-Cjh2wlUl.js +0 -11
|
@@ -84,6 +84,16 @@
|
|
|
84
84
|
"type": "boolean",
|
|
85
85
|
"description": "Companion to `bumpMinorPreMajor` — also demote `minor` bumps to `patch` for pre-1.0 versions. Maps to release-please's `bump-patch-for-minor-pre-major`. No-op without `bumpMinorPreMajor`. Default `false`."
|
|
86
86
|
},
|
|
87
|
+
"cargo": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"discover": {
|
|
91
|
+
"type": "boolean"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"description": "Cargo crates as release packages. Off by default: a repo with Rust crates sees no change until `discover` is set. When on, every crate in the root `Cargo.toml`'s `[workspace].members` (minus `exclude`) is a release package, unless a JS package already claims its manifest."
|
|
96
|
+
},
|
|
87
97
|
"changedFilePatterns": {
|
|
88
98
|
"type": "array",
|
|
89
99
|
"items": {
|
|
@@ -128,6 +138,16 @@
|
|
|
128
138
|
},
|
|
129
139
|
"description": "Per-channel routing config (semantic-release-style)."
|
|
130
140
|
},
|
|
141
|
+
"composer": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {
|
|
144
|
+
"discover": {
|
|
145
|
+
"type": "boolean"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"additionalProperties": false,
|
|
149
|
+
"description": "Composer packages as release packages. Off by default. When on, the root `composer.json` with a `name` is a release package. The version is the highest `vX.Y.Z` git tag, and the release creates the next tag. Nested packages and a `\"version\"` key are refused."
|
|
150
|
+
},
|
|
131
151
|
"currentVersionResolver": {
|
|
132
152
|
"type": "string",
|
|
133
153
|
"enum": [
|
|
@@ -137,6 +157,16 @@
|
|
|
137
157
|
],
|
|
138
158
|
"description": "Source of truth for \"what is the current version of this package?\", controlling how `oldVersion` is resolved when building the release plan.\n\n `\"disk\"` (default) — read `package.json#version` (or the equivalent manifest field for non-npm versionActions). Preserves vis's historical behaviour and is the right choice when the manifest on disk is the canonical source. `\"registry\"` — query the package registry via the package's `versionActions.readPublishedVersion()`. Useful when the manifest drifts between repo and registry (e.g. teams that publish out-of-band) and you want the registry to win. `\"git-tag\"` — find the highest `releaseTagPattern`-matching tag in the current commit's ancestry and parse the version out of it. Matches nx's `git-tag` resolver and release-please's tag-based lookup.\n\n`\"registry\"` and `\"git-tag\"` fall back to the manifest version when their primary source cannot produce a valid semver (e.g. registry 404 on a freshly-added package, no matching tag yet, etc.) and surface a plan warning so the operator sees what happened.\n\nOverridable per-package via `packages.<name>.currentVersionResolver`.\n\nThe `--first-release` CLI flag is the bootstrap shortcut for this setting — it forces `\"disk\"` regardless of config and additionally skips remote-tag collision checks, so the very first run on a greenfield monorepo can't trip over missing tags or registry 404s."
|
|
139
159
|
},
|
|
160
|
+
"dart": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"properties": {
|
|
163
|
+
"discover": {
|
|
164
|
+
"type": "boolean"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"additionalProperties": false,
|
|
168
|
+
"description": "Dart packages as release packages. Off by default. When on, the root `pubspec.yaml` (when it sets a version) and each member of its `workspace:` list is a release package named by its `name:`. The version must be a `version:` literal in that pubspec. Publishes to pub.dev with `dart pub publish`."
|
|
169
|
+
},
|
|
140
170
|
"defaultManaged": {
|
|
141
171
|
"type": "boolean",
|
|
142
172
|
"description": "Default `release.managed` for unconfigured packages. Default: `false`."
|
|
@@ -164,6 +194,16 @@
|
|
|
164
194
|
"type": "boolean",
|
|
165
195
|
"description": "Run the project's Prettier over the files the version step writes (package.json bumps + CHANGELOG.md entries) before committing them (RFC §14 step 7). Scoped to the changed files only — never the whole tree. Resolves the project's own Prettier from the workspace root; soft-fails if Prettier isn't installed.\n\nDefault: `false` (opt-in — a project that doesn't use Prettier, or whose Prettier config conflicts with how vis writes JSON, leaves this off)."
|
|
166
196
|
},
|
|
197
|
+
"gem": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"properties": {
|
|
200
|
+
"discover": {
|
|
201
|
+
"type": "boolean"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"additionalProperties": false,
|
|
205
|
+
"description": "Gems as release packages. Off by default. Every `*.gemspec` under the root (skipping `vendor`, `node_modules` and `.bundle`) is a release package named by its `spec.name` literal. The version is `spec.version = \"…\"`, or `Name::VERSION` with `VERSION = \"…\"` in `lib/<name>/version.rb`. Publish runs `gem build` and `gem push` (POSIX only)."
|
|
206
|
+
},
|
|
167
207
|
"githubHost": {
|
|
168
208
|
"type": "string",
|
|
169
209
|
"description": "Self-hosted GitHub Enterprise host (e.g. `\"github.acme.com\"` — no scheme). Translates to the `GH_HOST` env var that the `gh` CLI consumes natively, so all adapter calls land on the right instance. Operators can also export `GH_HOST` directly; this config knob is the typed, vis.config.ts-discoverable equivalent. Ignored when `provider` resolves to anything other than `github`."
|
|
@@ -180,6 +220,26 @@
|
|
|
180
220
|
"$ref": "#/$defs/GitUserConfig",
|
|
181
221
|
"description": "Git committer identity used by CI workflows."
|
|
182
222
|
},
|
|
223
|
+
"go": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"properties": {
|
|
226
|
+
"discover": {
|
|
227
|
+
"type": "boolean"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"additionalProperties": false,
|
|
231
|
+
"description": "Go modules as release packages. Off by default. When on, every `use` entry of `go.work` (or the root `go.mod` without one) is a release package named by its module path. The version is the highest git tag for the module, and the release creates the next tag. A `/vN` major needs a matching module path."
|
|
232
|
+
},
|
|
233
|
+
"gradle": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"properties": {
|
|
236
|
+
"discover": {
|
|
237
|
+
"type": "boolean"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"additionalProperties": false,
|
|
241
|
+
"description": "Gradle modules as release packages. Off by default. When on, the root build and every module in `settings.gradle(.kts)` is a release package named `group:artifact`. The version must be a string literal in the module's script or the root script's allprojects / subprojects block; a group or version the release cannot read fails it."
|
|
242
|
+
},
|
|
183
243
|
"groupPreVersionCommands": {
|
|
184
244
|
"type": "object",
|
|
185
245
|
"additionalProperties": {
|
|
@@ -187,6 +247,16 @@
|
|
|
187
247
|
},
|
|
188
248
|
"description": "Group-scoped preVersion command. Runs once before any package in the group is versioned. `groupName` matches a `fixed`/`linked` array's index (group-0, group-1, …) or a named entry (future)."
|
|
189
249
|
},
|
|
250
|
+
"hex": {
|
|
251
|
+
"type": "object",
|
|
252
|
+
"properties": {
|
|
253
|
+
"discover": {
|
|
254
|
+
"type": "boolean"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"additionalProperties": false,
|
|
258
|
+
"description": "Hex packages as release packages. Off by default. The root `mix.exs` is a package, and so is each `<apps_path>/*` app of an umbrella. The name is the `package: [name: \"…\"]` string, or the `app:` atom. The version is a `version: \"…\"` literal, or `version: \\@version` with a literal `\\@version \"…\"` attribute; a `mix.exs` with no `version:` key is an aggregate and is skipped. Publish runs `mix hex.publish --yes` (POSIX only), with the key in `HEX_API_KEY`."
|
|
259
|
+
},
|
|
190
260
|
"httpProxy": {
|
|
191
261
|
"type": "string",
|
|
192
262
|
"description": "HTTPS proxy URL (e.g. `\"http://proxy.acme.com:8080\"`) for enterprise networks that route outbound HTTPS through a proxy.\n\nWired through to two surfaces:\n\n 1. `gh` / `glab` CLI subprocesses get `HTTPS_PROXY` and `HTTP_PROXY` set on their env so they tunnel through the proxy exactly as if the operator had exported the vars manually.\n\n 2. Every internal `fetch()` call (registry probes in version-actions/{cargo,python,maven,container}.ts and the shared `safeFetchVersionMetadata` helper) attaches an undici `ProxyAgent` via the `dispatcher` option, so Node's built-in fetch routes through the proxy as well.\n\nNode 22's bundled undici handles the proxy plumbing — no `https-proxy-agent` dep needed."
|
|
@@ -230,13 +300,33 @@
|
|
|
230
300
|
},
|
|
231
301
|
"description": "Linked groups: members share bump levels but only changed members publish. Accepts the same dual-shape format as `fixed` — see the `ReleaseGroupConfig` doc comment for details."
|
|
232
302
|
},
|
|
303
|
+
"maven": {
|
|
304
|
+
"type": "object",
|
|
305
|
+
"properties": {
|
|
306
|
+
"discover": {
|
|
307
|
+
"type": "boolean"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"additionalProperties": false,
|
|
311
|
+
"description": "Maven modules as release packages. Off by default. When on, the root `pom.xml` and every module reachable through `<modules>` is a release package named `groupId:artifactId`. A version the release cannot rewrite (no literal, no resolvable parent or property) fails the release."
|
|
312
|
+
},
|
|
233
313
|
"notifications": {
|
|
234
314
|
"$ref": "#/$defs/NotificationsConfig",
|
|
235
315
|
"description": "Notifications — post-release fan-out to chat / webhook destinations. See {@link NotificationsConfig } . Each channel runs in parallel; per-channel failures log a warning but do NOT fail the publish."
|
|
236
316
|
},
|
|
317
|
+
"nuget": {
|
|
318
|
+
"type": "object",
|
|
319
|
+
"properties": {
|
|
320
|
+
"discover": {
|
|
321
|
+
"type": "boolean"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"additionalProperties": false,
|
|
325
|
+
"description": "NuGet projects as release packages. Off by default. Every `*.csproj` / `*.fsproj` under the root (skipping `bin`, `obj`, `node_modules` and claimed JS directories) is a release package named by its lowercased package id. The version is a plain `<Version>` literal in the project file, or in the nearest `Directory.Build.props`, which releases its inheriting projects in lockstep. Publish runs `dotnet pack` and `dotnet nuget push` (POSIX only)."
|
|
326
|
+
},
|
|
237
327
|
"oneCommitPerPackage": {
|
|
238
328
|
"type": "boolean",
|
|
239
|
-
"description": "Emit one release commit per package (a `release(channel): pkg
|
|
329
|
+
"description": "Emit one release commit per package (a `release(channel): pkg\\@version [skip ci]` message) instead of a single aggregate commit for the whole wave (RFC §19.5). Mirrors the per-package commit history that multi-semantic-release produced — useful for projects migrating off it that want to preserve `git log` shape. Only honoured when `aggregateRelease` is falsy. Shared artifacts (lockfile + consumed change-file deletions) ride along in the final package's commit.\n\nDefault: `false` (one aggregate commit per wave)."
|
|
240
330
|
},
|
|
241
331
|
"packages": {
|
|
242
332
|
"type": "object",
|
|
@@ -250,7 +340,7 @@
|
|
|
250
340
|
"items": {
|
|
251
341
|
"$ref": "#/$defs/ReleasePlugin"
|
|
252
342
|
},
|
|
253
|
-
"description": "Lifecycle plugins (
|
|
343
|
+
"description": "Lifecycle plugins (hooks: `applyDraft` / `willPublish` / `afterPublish` / `afterPublishAll`)."
|
|
254
344
|
},
|
|
255
345
|
"postPublishCommand": {
|
|
256
346
|
"type": "string",
|
|
@@ -298,6 +388,16 @@
|
|
|
298
388
|
"$ref": "#/$defs/PublishConfig",
|
|
299
389
|
"description": "Publish-related config."
|
|
300
390
|
},
|
|
391
|
+
"python": {
|
|
392
|
+
"type": "object",
|
|
393
|
+
"properties": {
|
|
394
|
+
"discover": {
|
|
395
|
+
"type": "boolean"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"additionalProperties": false,
|
|
399
|
+
"description": "Python projects as release packages. Off by default. When on, the root `pyproject.toml` (with `[project]`) and every `[tool.uv.workspace].members` entry (minus `exclude`) is a release package. A dynamic or missing version fails the release instead of being skipped."
|
|
400
|
+
},
|
|
301
401
|
"releaseNoteTemplate": {
|
|
302
402
|
"type": "object",
|
|
303
403
|
"properties": {
|
|
@@ -344,6 +444,16 @@
|
|
|
344
444
|
"$ref": "#/$defs/SuccessWalkConfig",
|
|
345
445
|
"description": "Post-release notification walk. Configures the \"🎉 This is included in version X.Y.Z\" comment + `released` label pass that runs after a successful publish wave.\n\n**Default OFF.** Leave undefined and the walk never runs — vis will not touch third-party PRs referenced in changelog bodies. Set to `{}` to opt in with defaults, or pass an object to override the comment template / labels / prerelease behaviour."
|
|
346
446
|
},
|
|
447
|
+
"swift": {
|
|
448
|
+
"type": "object",
|
|
449
|
+
"properties": {
|
|
450
|
+
"discover": {
|
|
451
|
+
"type": "boolean"
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
"additionalProperties": false,
|
|
455
|
+
"description": "Swift packages as release packages. Off by default. Every directory under the root with a `Package.swift` is a release package named by its `Package(name: \"…\")` literal. The version comes from Git tags, and the release creates the tag."
|
|
456
|
+
},
|
|
347
457
|
"updateInternalDependencies": {
|
|
348
458
|
"$ref": "#/$defs/UpdateInternalDependenciesMode",
|
|
349
459
|
"description": "Dep-propagation mode. Default: `\"out-of-range\"`."
|
|
@@ -372,6 +482,16 @@
|
|
|
372
482
|
}
|
|
373
483
|
],
|
|
374
484
|
"description": "Workspace-level changelog config (RFC §6.1 / nx parity). When set, renders one CHANGELOG.md at the workspace root in addition to per-package files."
|
|
485
|
+
},
|
|
486
|
+
"zig": {
|
|
487
|
+
"type": "object",
|
|
488
|
+
"properties": {
|
|
489
|
+
"discover": {
|
|
490
|
+
"type": "boolean"
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
"additionalProperties": false,
|
|
494
|
+
"description": "Zig packages as release packages. Off by default. When on, the workspace root's `build.zig.zon` and each in-workspace `.path` dependency that has one is a release package named by its `.name`. The version must be a `.version` string literal; a package with no `.version` is an aggregate and is skipped. Release is a git tag: Zig has no registry, so nothing is uploaded."
|
|
375
495
|
}
|
|
376
496
|
},
|
|
377
497
|
"additionalProperties": false,
|
|
@@ -524,7 +644,7 @@
|
|
|
524
644
|
},
|
|
525
645
|
"syncGitTag": {
|
|
526
646
|
"type": "boolean",
|
|
527
|
-
"description": "Emit a single shared git tag (and one aggregate GitHub/GitLab release) for the whole group instead of one tag + release per member
|
|
647
|
+
"description": "Emit a single shared git tag (and one aggregate GitHub/GitLab release) for the whole group instead of one tag + release per member. Default `false`."
|
|
528
648
|
},
|
|
529
649
|
"tagPattern": {
|
|
530
650
|
"type": "string",
|
|
@@ -930,6 +1050,13 @@
|
|
|
930
1050
|
"versionActions": {
|
|
931
1051
|
"type": "string",
|
|
932
1052
|
"description": "Built-in id (`\"npm\"`, `\"native-addon\"`, `\"private\"`, `\"shell\"`, `\"cargo\"`, `\"python\"`, `\"maven\"`, `\"container\"`, `\"jsr\"`) or a path to a custom implementation module."
|
|
1053
|
+
},
|
|
1054
|
+
"versionFiles": {
|
|
1055
|
+
"type": "array",
|
|
1056
|
+
"items": {
|
|
1057
|
+
"type": "string"
|
|
1058
|
+
},
|
|
1059
|
+
"description": "Non-JS version manifests to bump alongside `package.json`, relative to the package directory. Supported basenames: `Cargo.toml` (`[package]` and `[workspace.package]`) and `tauri.conf.json` (Tauri v1 `package.version` and v2 top-level `version`). Unlike `extraFiles` no regex is needed, and an unsupported basename fails the release instead of being skipped."
|
|
933
1060
|
}
|
|
934
1061
|
},
|
|
935
1062
|
"additionalProperties": false
|
|
@@ -1017,7 +1144,7 @@
|
|
|
1017
1144
|
"name"
|
|
1018
1145
|
],
|
|
1019
1146
|
"additionalProperties": true,
|
|
1020
|
-
"description": "A release lifecycle plugin
|
|
1147
|
+
"description": "A release lifecycle plugin. Unlike the single-purpose `defineVersionActions` / `defineChangelogFormatter` / `defineNotificationChannel` extension points, a plugin can hook arbitrary points of the version/publish lifecycle — e.g. run a build in `willPublish`, push docs in `afterPublishAll`.\n\nError semantics: `applyDraft` and `willPublish` throw-propagate (they gate the release — fail fast). `afterPublish` / `afterPublishAll` are post-effect: a throw is logged and swallowed so a side-effect hiccup can't \"unpublish\"."
|
|
1021
1148
|
},
|
|
1022
1149
|
"PublishConfig": {
|
|
1023
1150
|
"type": "object",
|
|
@@ -1070,7 +1197,7 @@
|
|
|
1070
1197
|
},
|
|
1071
1198
|
"lockInGit": {
|
|
1072
1199
|
"type": "boolean",
|
|
1073
|
-
"description": "Persist in-progress publish state to a git-TRACKED `<changesDir>/publish-lock.json` instead of the gitignored `.state.json`. Default `false`.\n\nThe tracked lock is committed (and pushed by the publish flow) so a partially-failed publish can be resumed from a *fresh checkout on a different runner* — the ephemeral-CI case where `.state.json` (untracked) never survives the clone. On full success the lock is removed and the removal committed.
|
|
1200
|
+
"description": "Persist in-progress publish state to a git-TRACKED `<changesDir>/publish-lock.json` instead of the gitignored `.state.json`. Default `false`.\n\nThe tracked lock is committed (and pushed by the publish flow) so a partially-failed publish can be resumed from a *fresh checkout on a different runner* — the ephemeral-CI case where `.state.json` (untracked) never survives the clone. On full success the lock is removed and the removal committed."
|
|
1074
1201
|
},
|
|
1075
1202
|
"noRelease": {
|
|
1076
1203
|
"type": "boolean",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as D}from"node:module";import{L as q}from"./target-merge-hsawesT4.js";import{advisoriesQuery as C,advisoriesIngest as M,advisoriesStatus as S,NATIVE_BINDING_VERSION as w}from"#native";let I;const R=e=>(I??=D(import.meta.url))(e),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=e=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[t,s]=u.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return u.getBuiltinModule(e)}return R(e)},{randomUUID:T}=l("node:crypto"),{existsSync:O,createWriteStream:L}=l("node:fs"),{mkdir:$,unlink:U,stat:x}=l("node:fs/promises"),{join:g,dirname:P}=l("node:path"),{Readable:k}=l("node:stream"),{pipeline:B}=l("node:stream/promises"),p=6;if(w!==p)throw new Error(`vis native binding ABI mismatch in advisories: expected ${p}, got ${w}. Rebuild via \`pnpm --filter @visulima/vis run build:native\` or reinstall the platform binding package.`);const X="https://osv-vulnerabilities.storage.googleapis.com",W=new Set(["osv-vulnerabilities.storage.googleapis.com"]);class j extends Error{cause="DB_NOT_FOUND";constructor(t){super(`No local advisory DB at ${t}. Run 'vis advisories sync' first.`),this.name="AdvisoryDbNotFoundError"}}class y extends Error{cause="SOURCE_NOT_ALLOWED";constructor(t){super(`Advisory source host '${t}' is not in the built-in allowlist. Add it to \`security.audit.advisories.allowedHosts\` if intentional.`),this.name="AdvisorySourceNotAllowedError"}}class _ extends Error{cause="SYNC_NETWORK";constructor(t,s){super(`Advisory sync failed for ${t}: ${s}. Check connectivity, proxy env vars, or --source.`),this.name="AdvisorySyncNetworkError"}}const v=e=>{const s=q("vis",{create:!0,cwd:e})??g(e,"node_modules",".cache","vis");return g(s,"advisories","db.sqlite")},V=(e,t)=>{let s;try{s=new URL(e)}catch{throw new y(e)}if(s.protocol!=="https:")throw new y(`${s.protocol}//${s.host}`);if(!new Set([...W,...t??[]]).has(s.host))throw new y(s.host);return s},J=async e=>{const t=e.dbPath??v(e.workspaceRoot);await $(P(t),{recursive:!0});const s=V(e.source,e.allowedHosts),n=new URL(`${e.ecosystem}/all.zip`,G(s.toString())),a=await H(t,e.ecosystem);let o=null;if(!e.force){const i=await E(n,{method:"HEAD"});if(i.ok&&(o=i.headers.get("etag"),o&&a&&o===a))return{advisoriesIngested:0,dbPath:t,durationMs:0,upToDate:!0}}const c=`${t}.${e.ecosystem}.${process.pid}.${T()}.zip.tmp`,r=await E(n,{method:"GET"});if(!r.ok||!r.body)throw new _(n.toString(),r.status);o||(o=r.headers.get("etag"));const m=r.headers.get("content-length"),d=m?Number.parseInt(m,10):null;let h=0;const b=L(c),f=k.fromWeb(r.body);e.onProgress&&d&&f.on("data",i=>{h+=i.byteLength,e.onProgress?.(h,d,"download")}),await B(f,b);try{const i=await M({dbPath:t,ecosystem:e.ecosystem,manifestEtag:o??void 0,zipPath:c},(A,N)=>e.onProgress?.(A,N,"ingest"));return{advisoriesIngested:i.advisoriesIngested,dbPath:t,durationMs:i.durationMs,upToDate:!1}}finally{await U(c).catch(()=>{})}},Z=(e,t)=>{if(e.length===0)return new Map;const s=t.dbPath??v(t.workspaceRoot),n=t.ecosystem??"npm";if(!O(s))throw new j(s);const a=e.map(r=>({ecosystem:n,name:r.name,version:r.version})),o=C(s,a),c=new Map;for(const[r,m]of e.entries()){const d=o[r];!d||d.vulnerabilities.length===0||c.set(m.name,d.vulnerabilities.map(h=>z(h)))}return c},ee=async(e,t)=>{const s=t??v(e);return S(s)},H=async(e,t)=>{try{await x(e)}catch{return null}return S(e).ecosystems.find(a=>a.name===t)?.manifestEtag??null},z=e=>({aliases:e.aliases.length>0?e.aliases:void 0,cvssScore:e.cvssScore??void 0,fixedVersions:e.fixedVersions,id:e.id,severity:F(e.severity),summary:e.summary}),F=e=>{const t=e.toUpperCase();return t==="CRITICAL"||t==="HIGH"||t==="MODERATE"||t==="LOW"?t:"UNKNOWN"},G=e=>e.endsWith("/")?e:`${e}/`,E=async(e,t)=>{try{return await fetch(e,t)}catch(s){throw new _(e.toString(),s instanceof Error?s.message:String(s))}};export{j as A,X as D,ee as g,Z as q,v as r,J as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as W}from"node:module";import"./index-CVBR-Kit.js";import{e as h}from"./path-CxEa27Rz-pjheKk6v.js";import{y as g}from"./isAccessibleSync-DYKTrrvc-K2xhg6sV.js";import{p as O}from"./readJsonSync-CbryXYxN-BxKjDZnF.js";let S;const B=e=>(S??=W(import.meta.url))(e),_=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=e=>{if(typeof _<"u"&&_.versions&&_.versions.node){const[s,n]=_.versions.node.split(".").map(Number);if(s>22||s===22&&n>=3||s===20&&n>=16)return _.getBuiltinModule(e)}return B(e)},{readdirSync:y,statSync:M}=w("node:fs"),P=["preinstall","install","postinstall","prepare"],$=e=>{const s=h(e,"node_modules");if(!g(s))return[];const n=new Map,o=(p,f="")=>{let l;try{l=y(p)}catch{return}for(const r of l){const i=h(p,r);if(r.startsWith("@")){o(i,`${r}/`);continue}if(r===".pnpm"&&f===""){let u;try{u=y(i)}catch{continue}for(const a of u){const c=h(i,a,"node_modules");g(c)&&o(c)}continue}if(r.startsWith("."))continue;const m=f+r,t=h(i,"package.json");try{if(!M(i).isDirectory()||!g(t))continue;const u=O(t),a=u.scripts??{},c=P.filter(v=>a[v]);!a.preinstall&&!a.install&&!a.postinstall&&g(h(i,"binding.gyp"))&&c.push("install (binding.gyp)"),c.length>0&&!n.has(m)&&n.set(m,{directory:i,hooks:c,name:m,version:typeof u.version=="string"?u.version:void 0});const d=h(i,"node_modules");g(d)&&o(d)}catch{}}};return o(s),[...n.values()]},b=e=>{const s=e.startsWith("@"),n=e.indexOf("@",s?1:0);return n===-1?{name:e}:{name:e.slice(0,n),version:e.slice(n+1)}},k=(e,s,n)=>{for(const[o,p]of Object.entries(s)){if(!p)continue;if(o.endsWith("@*")){if(o.slice(0,-2)===e.name)return!0;continue}if(o.endsWith("*")){if(e.name.startsWith(o.slice(0,-1)))return!0;continue}const{name:f,version:l}=b(o);if(f===e.name&&(!n||l===void 0||e.version===l))return!0}return!1},q=(e,s,n={})=>{const o=n.pinVersions===!0,p=$(e),f=[],l=[],r=new Map(p.map(t=>[t.name,t]));for(const t of p)k(t,s,o)?l.push(t):f.push(t);const i=[],m=[];for(const[t,u]of Object.entries(s)){if(!u)continue;if(t.endsWith("@*")){const v=t.slice(0,-2);r.has(v)||i.push(t);continue}if(t.endsWith("*")){const v=t.slice(0,-1);[...r.keys()].some(j=>j.startsWith(v))||i.push(t);continue}const{name:a,version:c}=b(t),d=r.get(a);if(!d){i.push(t);continue}o&&c!==void 0&&c!=="*"&&d.version&&d.version!==c&&m.push({from:t,to:`${a}@${d.version}`})}return{excess:i,installed:l,unapproved:f,versionDrift:m}},A=(e,s)=>q(e,s).unapproved.map(n=>`${n.name} (${n.hooks.join(", ")})`);export{q as a,A as s};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as ie}from"node:module";import{z as ue}from"./index-CVBR-Kit.js";import{e as I}from"./path-CxEa27Rz-pjheKk6v.js";import{r as fe}from"./docker-1jgKW5Wd.js";import{p as oe}from"./readJsonSync-CbryXYxN-BxKjDZnF.js";import{e as me}from"./license-DvlYdo6T.js";import{S as he}from"./lockfile-DhHAaHN5.js";import{a as _e}from"./index-B4AjSxHU.js";let ae;const pe=e=>(ae??=ie(import.meta.url))(e),J=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,se=e=>{if(typeof J<"u"&&J.versions&&J.versions.node){const[t,n]=J.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return J.getBuiltinModule(e)}return pe(e)},{randomUUID:le}=se("node:crypto"),{readdirSync:de}=se("node:fs"),H=e=>e.replaceAll(/[^\w.~-]/g,t=>`%${(t.codePointAt(0)??0).toString(16).toUpperCase().padStart(2,"0")}`),j=(e,t)=>{const n=e.toLowerCase();if(n.startsWith("@")){const s=n.indexOf("/");if(s>0){const c=n.slice(0,s),p=n.slice(s+1);return`pkg:npm/${H(c)}/${H(p)}@${H(t)}`}}return`pkg:npm/${H(n)}@${H(t)}`},d={ARRAY:"array",BOOLEAN:"boolean",DATE:"date",FUNCTION:"function",JSTOXML_OBJECT:"jstoxml-object",NULL:"null",NUMBER:"number",OBJECT:"object",STRING:"string"},ge=[d.STRING,d.NUMBER,d.BOOLEAN],ye='<?xml version="1.0" encoding="UTF-8"?>',ee=["_selfCloseTag","_attrs"],Oe=(e="",t=0)=>e.repeat(t),W=e=>Array.isArray(e)&&d.ARRAY||typeof e===d.OBJECT&&e!==null&&e._name&&d.JSTOXML_OBJECT||e instanceof Date&&d.DATE||e===null&&d.NULL||typeof e,re=e=>e.startsWith("<![CDATA["),ce=(e="",t={},n)=>{let s=e;if(typeof e===d.STRING){if(re(e))return e;const c=new RegExp(`(${Object.keys(t).join("|")})(?!(\\w|#)*;)`,"g");s=String(e).replace(c,(p,m)=>t[m]||"")}return typeof n=="function"?n(s):s},Se=(e={},t,n,s)=>(Array.isArray(e)?e:Object.entries(e).map(([p,m])=>({[p]:m}))).reduce((p,m)=>{const _=Object.keys(m)[0],O=m[_];if(typeof n===d.FUNCTION&&n(_,O))return p;const S=t?ce(O,t):O,v=!s&&S===!0?"":`="${S}"`;return p.push(`${_}${v}`),p},[]),Ce=(e={},t,n,s)=>{const c=Se(e,t,n,s);return c.length===0?"":` ${c.join(" ")}`},Ae=(e={})=>Object.keys(e).map(t=>({_name:t,_content:e[t]})),ve=e=>ge.includes(W(e)),Te=e=>!e.match("<"),Re=({header:e,isOutputStart:t})=>e&&t?typeof e===d.BOOLEAN?ye:e:"",te={"<":"<",">":">","&":"&",'"':"""},B=(e={},t={})=>{const{depth:n=0,indent:s,_isFirstItem:c,_isOutputStart:p=!0,header:m,attributeReplacements:_={},attributeFilter:O,attributeExplicitTrue:S=!1,contentReplacements:v={},contentMap:x,selfCloseTags:L=!0}=t,Y=typeof _=="boolean"&&!_?{}:{...te,..._},k=typeof v=="boolean"&&!v?{}:{...te,...v},U=typeof s=="string",D=Oe(s,n),G=W(e),w=Re({header:m,isOutputStart:p}),b=p&&!w&&c&&n===0,X=U&&!b?`
|
|
2
|
-
`:"";let C="";switch(G){case d.JSTOXML_OBJECT:{const{_name:h,_content:g}=e;if(g===null&&typeof x!="function"){C=`${X}${D}${h}`;break}if(Array.isArray(g)&&g.every(ve))return g.map(F=>B({_name:h,_content:F},{...t,depth:n,_isOutputStart:!1})).join("");if(ee.includes(h))break;const y=B(g,{...t,depth:n+1,_isOutputStart:b}),M=W(y),R=Te(y),r=re(y),o=`${X}${D}`;if(h==="_comment"){C+=`${o}<!-- ${g} -->`;break}const i=M==="undefined"||y==="",a=L,l=e._selfCloseTag,f=typeof l===d.BOOLEAN?i&&l:i&&a,E=f?"/":"",$=Ce(e._attrs,Y,O,S),T=`<${h}${$}${E}>`,A=U&&!R&&!r?`
|
|
3
|
-
${D}`:"",N=f?"":`${y}${A}</${h}>`;C+=`${o}${T}${N}`;break}case d.OBJECT:{const h=Object.keys(e);C=h.map((u,y)=>{const M={...t,_isFirstItem:y===0,_isLastItem:y+1===h.length,_isOutputStart:b},R={_name:u};if(W(e[u])===d.OBJECT&&(ee.forEach(i=>{const a=e[u][i];typeof a<"u"&&(R[i]=a,delete e[u][i])}),typeof e[u]._content<"u"&&Object.keys(e[u]).length>1)){const i=Object.assign({},e[u]);delete i._content,R._content=[...Ae(i),e[u]._content]}return typeof R._content>"u"&&(R._content=e[u]),B(R,M)},t).join("");break}case d.FUNCTION:{const h=e(t);C=B(h,t);break}case d.ARRAY:{C=e.map((g,u)=>{const y={...t,_isFirstItem:u===0,_isLastItem:u+1===e.length,_isOutputStart:b};return B(g,y)}).join("");break}default:{C=ce(e,k,x);break}}return`${w}${C}`},Q=e=>{try{return oe(e)}catch{return}},Ee=e=>{if(e.length===0||e.includes("..")||e.startsWith(".")||e.includes("\0")||e.includes("\\"))return!1;if(e.startsWith("@")){const t=e.indexOf("/");return t>1&&!e.includes("/",t+1)}return!e.includes("/")},$e=e=>e.length>0&&!e.includes("/")&&!e.includes("\\")&&!e.includes("..")&&!e.includes("\0"),be=(e,t,n)=>{const c=`${t.replaceAll("/","+")}@${n}`,p=I(e,"node_modules",".pnpm"),m=Q(I(p,c,"node_modules",t,"package.json"));if(m)return m;let _;try{_=de(p)}catch{return}const O=`${c}_`;for(const S of _){if(!S.startsWith(O))continue;const v=Q(I(p,S,"node_modules",t,"package.json"));if(v)return v}},Ne=(e,t,n)=>{const s=Q(I(e,"node_modules",t,"package.json"));return s?.version===n?s:void 0},xe=(e,t,n)=>{if(!(!Ee(t)||!$e(n)))return be(e,t,n)??Ne(e,t,n)},ke={sha256:"SHA-256",sha384:"SHA-384",sha512:"SHA-512"},De={sha256:64,sha384:96,sha512:128},we=e=>{const t={name:e.name,version:e.version},{integrity:n}=e;return n&&n.hex.length===De[n.algorithm]&&(t.hash={alg:ke[n.algorithm],content:n.hex}),e.dependencies&&(t.dependencies=e.dependencies),e.peerDependencies&&(t.peerDependencies=e.peerDependencies),e.optionalDependencies&&(t.optionalDependencies=e.optionalDependencies),t},je=[{file:"pnpm-lock.yaml",type:"pnpm"},{file:"npm-shrinkwrap.json",type:"npm"},{file:"package-lock.json",type:"npm"},{file:"yarn.lock",type:"yarn"},{file:"bun.lock",type:"bun"}],Ie=e=>{for(const{file:t,type:n}of je){let s;try{s=ue(I(e,t))}catch{continue}const c=new Map;for(const p of he(s,n))c.set(`${p.name}@${p.version}`,we(p));return{packages:c,type:n}}},Le=e=>{const t=e.indexOf(":");return t<=0?e:e.slice(0,t)==="npm"?e.slice(t+1):e},z=(e,t,n)=>{const s=n.get(e);if(!s||s.size===0)return;if(s.has(t))return t;const c=Le(t);if(c!==t&&s.has(c))return c;const p=[...s],m=_e.maxSatisfying(p,c,{includePrerelease:!0});return m||p[0]},Me="1.7",Pe="CycloneDX",Be="http://cyclonedx.org/schema/bom-1.7.schema.json",Ve="@visulima/vis",ne=e=>{try{return oe(e)}catch{return}},Ue=e=>{if(e){if(typeof e=="string")return e;if(typeof e=="object"&&e.name)return e.email?`${e.name} <${e.email}>`:e.name}},Xe=e=>{if(e)return typeof e=="string"?e:e.url},Fe=e=>{if(e)return typeof e=="string"?e:e.url},Je=e=>{const t=[];e.homepage&&t.push({type:"website",url:e.homepage});const n=Xe(e.repository);n&&t.push({type:"vcs",url:n});const s=Fe(e.bugs);return s&&t.push({type:"issue-tracker",url:s}),t.length>0?t:void 0},He=e=>e==="application"||e==="service"||e==="tool"?"application":"library",K=(e,t)=>{if(!t)return;t.description&&(e.description=t.description);const n=Ue(t.author);n&&(e.author=n);const s=me(t);s&&(e.licenses=s);const c=Je(t);c&&(e.externalReferences=c)},st=e=>{const{focus:t,generatorVersion:n,includeDev:s=!1,now:c=new Date,projectGraph:p,serialNumber:m,workspace:_,workspaceRoot:O}=e,S=t&&t.length>0?[...fe(t,p)].sort():Object.keys(_.projects).sort(),v=new Set(S),x=new Map;for(const r of S){const o=_.projects[r];o&&x.set(r,ne(I(O,o.root,"package.json")))}const L=[],q=new Map;for(const r of S){const o=_.projects[r];if(!o)continue;const i=x.get(r);if(!i)continue;const a=i.version??"0.0.0",l=j(r,a);q.set(r,l);const f={"bom-ref":l,name:r,purl:l,type:He(o.projectType),version:a};K(f,i),L.push(f)}const Y=Ie(O),V=new Map,k=new Map;if(Y)for(const r of Y.packages.values()){V.set(`${r.name}@${r.version}`,r);let o=k.get(r.name);o||(o=new Set,k.set(r.name,o)),o.add(r.version)}const U=[],D=[],G=new Map;for(const r of S){const o=x.get(r);if(!o)continue;const i=[o.dependencies,o.peerDependencies];s&&i.push(o.devDependencies);const a=new Set,l=(f,E)=>{if(E)for(const[$,T]of Object.entries(E)){if(v.has($)){const N=q.get($);N&&a.add(N);continue}const A=z($,T,k);A&&(a.add(j($,A)),f.push(`${$}@${A}`))}};for(const f of i)l(U,f);l(D,o.optionalDependencies),G.set(r,a)}const w=new Map,b=new Map,X=(r,o)=>{const i=[...r];for(;i.length>0;){const a=i.pop(),l=w.get(a);if(l==="required"||l==="optional"&&o==="optional")continue;w.set(a,o);const f=V.get(a);if(!f)continue;const E=b.get(a)??new Set,$=[f.dependencies,f.peerDependencies];for(const T of $)if(T)for(const[A,N]of Object.entries(T))for(const P of N){const F=z(A,P,k);F&&(E.add(j(A,F)),i.push(`${A}@${F}`))}if(f.optionalDependencies)for(const[T,A]of Object.entries(f.optionalDependencies))for(const N of A){const P=z(T,N,k);P&&(E.add(j(T,P)),D.push(`${T}@${P}`))}E.size>0&&b.set(a,E)}};X(U,"required"),X(D,"optional");const C=[],h=[...w.keys()].sort();for(const r of h){const o=V.get(r);if(!o)continue;const i=j(o.name,o.version),a={"bom-ref":i,name:o.name,purl:i,scope:w.get(r)??"required",type:"library",version:o.version};o.hash&&(a.hashes=[o.hash]),K(a,xe(O,o.name,o.version)),C.push(a)}const g=[];for(const[r,o]of G){const i=q.get(r);if(!i)continue;const a=[...o].sort();g.push(a.length>0?{dependsOn:a,ref:i}:{ref:i})}for(const r of h){const o=V.get(r);if(!o)continue;const i=j(o.name,o.version),a=b.get(r),l=a?[...a].sort():[];g.push(l.length>0?{dependsOn:l,ref:i}:{ref:i})}g.sort((r,o)=>r.ref.localeCompare(o.ref));const u=ne(I(O,"package.json")),y=(()=>{if(t?.length===1){const l=L.find(f=>f.name===t[0]);if(l)return{"bom-ref":l["bom-ref"],name:l.name,purl:l.purl,type:l.type,version:l.version}}const r=u?.name??"workspace",o=u?.version??"0.0.0",i=j(r,o),a={"bom-ref":i,name:r,purl:i,type:"application",version:o};return K(a,u),a})(),M=y["bom-ref"],R=M?L.filter(r=>r["bom-ref"]!==M):L;return{$schema:Be,bomFormat:Pe,components:[...R,...C],dependencies:g,metadata:{component:y,lifecycles:[{phase:"build"}],timestamp:c.toISOString(),tools:{components:[{name:Ve,type:"application",...n?{version:n}:{}}]}},serialNumber:m??`urn:uuid:${le()}`,specVersion:Me,version:1}},ot=e=>{const t={version:e.version??1,xmlns:"http://cyclonedx.org/schema/bom/1.7"};e.serialNumber&&(t.serialNumber=e.serialNumber);const n=[];return e.metadata&&n.push(qe(e.metadata)),e.components&&e.components.length>0&&n.push({_content:e.components.map(c=>Z(c)),_name:"components"}),e.dependencies&&e.dependencies.length>0&&n.push({_content:e.dependencies.map(c=>Ge(c)),_name:"dependencies"}),`${B({_attrs:t,_content:n,_name:"bom"},{header:!0,indent:" ",selfCloseTags:!0})}
|
|
4
|
-
`},qe=e=>{const t=[];return e.timestamp&&t.push({timestamp:e.timestamp}),e.lifecycles&&e.lifecycles.length>0&&t.push({_content:e.lifecycles.map(n=>{const s=[];return n.phase&&s.push({phase:n.phase}),n.name&&s.push({name:n.name}),n.description&&s.push({description:n.description}),{_content:s,_name:"lifecycle"}}),_name:"lifecycles"}),e.tools?.components&&t.push({_content:[{_content:e.tools.components.map(n=>Z(n)),_name:"components"}],_name:"tools"}),e.component&&t.push(Z(e.component)),{_content:t,_name:"metadata"}},Z=e=>{const t={type:e.type};e["bom-ref"]&&(t["bom-ref"]=e["bom-ref"]);const n=[];e.group&&n.push({group:e.group}),n.push({name:e.name}),e.version&&n.push({version:e.version}),e.description&&n.push({description:e.description}),e.author&&n.push({author:e.author}),e.hashes&&e.hashes.length>0&&n.push({_content:e.hashes.map(c=>({_attrs:{alg:c.alg},_content:c.content,_name:"hash"})),_name:"hashes"});const s=Ye(e.licenses);return s&&n.push(s),e.purl&&n.push({purl:e.purl}),e.scope&&n.push({scope:e.scope}),e.externalReferences&&e.externalReferences.length>0&&n.push({_content:e.externalReferences.map(c=>({_attrs:{type:c.type},_content:[{url:c.url}],_name:"reference"})),_name:"externalReferences"}),{_attrs:t,_content:n,_name:"component"}},Ye=e=>{if(!e||e.length===0)return;const t=[];for(const n of e){if("expression"in n){t.push({expression:n.expression});continue}const s=[];"id"in n.license&&n.license.id?s.push({id:n.license.id}):"name"in n.license&&n.license.name&&s.push({name:n.license.name}),t.push({_content:s,_name:"license"})}return{_content:t,_name:"licenses"}},Ge=e=>e.dependsOn&&e.dependsOn.length>0?{_attrs:{ref:e.ref},_content:e.dependsOn.map(t=>({_attrs:{ref:t},_name:"dependency"})),_name:"dependency"}:{_attrs:{ref:e.ref},_name:"dependency"};export{st as b,ot as s,j as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as d}from"./index-CVBR-Kit.js";import{S as m}from"./lockfile-DhHAaHN5.js";import{e as l}from"./path-CxEa27Rz-pjheKk6v.js";import{i as v,j as g}from"../packem_chunks/catalog.js";import{y as D}from"./isAccessibleSync-DYKTrrvc-K2xhg6sV.js";const b={bun:{file:"bun.lock",type:"bun"},npm:{aliases:["npm-shrinkwrap.json"],file:"package-lock.json",type:"npm"},pnpm:{file:"pnpm-lock.yaml",type:"pnpm"},yarn:{file:"yarn.lock",type:"yarn"}},j=t=>{const o=b[t];return o?[...o.aliases??[],o.file].map(e=>({file:e,type:o.type})):[]},h=(t,o)=>{const e=j(o);if(e.length!==0)return e.find(r=>D(l(t,r.file)))??e[e.length-1]},k=t=>{try{return JSON.parse(d(t))}catch{return}},y=t=>{const o=[],e=k(l(t,"package.json"));e&&o.push(e);const r=v(t);let c;if(r?c=r:e?.workspaces&&(Array.isArray(e.workspaces)?c=e.workspaces:e.workspaces.packages&&(c=e.workspaces.packages)),!c)return o;const i=g(t,c);for(const s of i){const n=k(l(t,s,"package.json"));n&&o.push(n)}return o},P=(t,o)=>{const e=new Set,r=[],c=new Map;for(const s of o){const n=c.get(s.name);n?n.push(s):c.set(s.name,[s])}const i=s=>{if(s)for(const n of Object.keys(s))e.has(n)||(e.add(n),r.push(n))};for(const s of y(t))i(s.dependencies),i(s.peerDependencies),i(s.optionalDependencies);for(;r.length>0;){const s=r.shift(),n=c.get(s);if(n){for(const a of n)for(const p of[a.dependencies,a.peerDependencies,a.optionalDependencies])if(p)for(const f of Object.keys(p))e.has(f)||(e.add(f),r.push(f))}}return e},I=(t,o,e={})=>{const r=h(t,o);if(!r)return[];let c;try{c=d(l(t,r.file))}catch{return[]}const i=m(c,r.type);if(i.length===0)return[];const n=e.includeDev??!0?void 0:P(t,i),a=new Set,p=[];for(const f of i){if(n&&!n.has(f.name))continue;const u=`${f.name}@${f.version}`;a.has(u)||(a.add(u),p.push({isDev:!1,name:f.name,version:f.version}))}return p},M=(t,o)=>{const e=h(t,o);if(!e)return[];let r;try{r=d(l(t,e.file))}catch{return[]}const c=m(r,e.type);if(c.length===0)return[];const i=new Map;for(const n of c)i.has(n.name)||i.set(n.name,new Set),i.get(n.name).add(n.version);const s=[];for(const[n,a]of i)a.size<=1||s.push({name:n,versions:[...a]});return s.sort((n,a)=>n.name.localeCompare(a.name))},N=(t,o)=>{const e=h(t,o);if(!e)return;let r;try{r=d(l(t,e.file))}catch{return}const c=m(r,e.type);if(c.length===0)return;const i=[],s=new Set;for(const n of y(t))for(const a of[n.dependencies,n.devDependencies,n.peerDependencies,n.optionalDependencies])if(a)for(const[p,f]of Object.entries(a)){const u=`${p}@${f}`;s.has(u)||(s.add(u),i.push({name:p,version:f}))}return{entries:c,roots:i}};export{b as L,N as a,M as f,I as l,h as r};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire as p}from"node:module";import{e as j}from"./path-CxEa27Rz-pjheKk6v.js";import{a as F}from"./formatBytes-BHAzNIrn-CLYsxlUj.js";let h;const m=t=>(h??=p(import.meta.url))(t),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=t=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[e,r]=s.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return s.getBuiltinModule(t)}return m(t)},{mkdirSync:f,writeFileSync:y,readdirSync:g}=c("node:fs"),{readFile:_}=c("node:fs/promises"),i=t=>F(t),a=(t,e)=>j(i(t),`${encodeURIComponent(e)}.json`);class R{#e;#t;constructor(e,r){this.#e=e,this.#t=r}printTaskTerminalOutput(e,r,o){if(r!=="failure")return;const n=i(this.#e);try{f(n,{recursive:!0})}catch{return}const u=e.overrides.command,d=e.projectRoot,l={command:u,cwd:d,exitCode:void 0,hash:e.hash,runId:this.#t,status:r,taskId:e.id,terminalOutput:o,timestamp:new Date().toISOString()};try{y(a(this.#e,e.id),`${JSON.stringify(l,void 0,2)}
|
|
2
|
-
`,"utf8")}catch{}}}const S=async(t,e)=>{const r=a(t,e);try{const o=await _(r,"utf8");return JSON.parse(o)}catch{return}},w=t=>{const e=i(t);let r;try{r=g(e)}catch{return[]}const o=[];for(const n of r)if(n.endsWith(".json"))try{o.push(decodeURIComponent(n.slice(0,-5)))}catch{}return o};export{R as F,S as a,w as l};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as st}from"node:module";import"./index-CVBR-Kit.js";import{e as f}from"./path-CxEa27Rz-pjheKk6v.js";import{y as G}from"./isAccessibleSync-DYKTrrvc-K2xhg6sV.js";import{p as ht}from"./readJsonSync-CbryXYxN-BxKjDZnF.js";import{h as dt}from"./writeFileSync-DJoHk3Ks-O9zOKqeM.js";let nt;const ot=t=>(nt??=st(import.meta.url))(t),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,R=t=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[s,e]=x.versions.node.split(".").map(Number);if(s>22||s===22&&e>=3||s===20&&e>=16)return x.getBuiltinModule(t)}return ot(t)},{existsSync:it,readdirSync:z,statSync:rt,rmSync:Y,writeFileSync:at}=R("node:fs"),{spawn:F}=R("node:child_process"),{createHash:ct}=R("node:crypto"),{homedir:lt,platform:ut}=R("node:os"),pt=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],ft=12288,gt=65510,mt=[12288,12288,65281,65376,65504,65510],wt=8361,bt=65518,yt=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],St=32,Et=10630,xt=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],$t=4352,Mt=262141,V=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],$=(t,s)=>{let e=0,n=Math.floor(t.length/2)-1;for(;e<=n;){const r=Math.floor((e+n)/2),c=r*2;if(s<t[c])n=r-1;else if(s>t[c+1])e=r+1;else return!0}return!1},D=19968,[Bt,kt]=vt(V);function vt(t){let s=t[0],e=t[1];for(let n=0;n<t.length;n+=2){const r=t[n],c=t[n+1];if(D>=r&&D<=c)return[r,c];c-r>e-s&&(s=r,e=c)}return[s,e]}const Tt=t=>t<161||t>1114109?!1:$(pt,t),It=t=>t<ft||t>gt?!1:$(mt,t),Rt=t=>t<wt||t>bt?!1:$(yt,t),Wt=t=>t<St||t>Et?!1:$(xt,t),_t=t=>t>=Bt&&t<=kt?!0:t<$t||t>Mt?!1:$(V,t);function Ct(t){return Tt(t)?"ambiguous":It(t)?"fullwidth":Rt(t)?"halfwidth":Wt(t)?"narrow":_t(t)?"wide":"neutral"}function Nt(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function Z(t){return Nt(t),Ct(t)}const H=String.raw,j=H`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,At=()=>new RegExp(H`\p{RI}{2}|(?)${j}(?:\u200D${j})*`,"gu"),de=new Set(["\x1B",""]),pe="\x07",fe="]8;;",ge=/[\u200B\uFEFF\u2060-\u2064]/g,U=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\)|\][^\u0007\u001B]{0,1000}(?:\u0007|\u001B\\))/g,me=/\u001B\[[\d;]*m[^\u001B]*(?:\u001B\[[\d;]*m|$)/g,we=/\u001B\]8;[^\u0007\u001B]*(?:\u0007|\u001B\\)[^\u001B]*\u001B\]8;;(?:\u0007|\u001B\\)/g,v=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,q=At(),be=/[-_./\s]+/g,ye=/(\u001B\[[0-9;]*[a-z])/i,Se=new RegExp("\\p{Script=Arabic}","u"),Ee=new RegExp("\\p{Script=Bengali}","u"),xe=new RegExp("\\p{Script=Cyrillic}","u"),$e=new RegExp("\\p{Script=Devanagari}","u"),Me=new RegExp("\\p{Script=Ethiopic}","u"),Be=new RegExp("\\p{Script=Greek}","u"),ke=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),ve=new RegExp("\\p{Script=Gujarati}","u"),Te=new RegExp("\\p{Script=Gurmukhi}","u"),Ie=new RegExp("\\p{Script=Hangul}","u"),Re=new RegExp("\\p{Script=Hebrew}","u"),We=new RegExp("\\p{Script=Hiragana}","u"),_e=new RegExp("\\p{Script=Han}","u"),Ce=new RegExp("\\p{Script=Kannada}","u"),Ne=new RegExp("\\p{Script=Katakana}","u"),Ae=new RegExp("\\p{Script=Khmer}","u"),Fe=new RegExp("\\p{Script=Lao}","u"),De=new RegExp("\\p{Script=Latin}","u"),je=new RegExp("\\p{Script=Malayalam}","u"),Oe=new RegExp("\\p{Script=Myanmar}","u"),Pe=new RegExp("\\p{Script=Oriya}","u"),Ke=new RegExp("\\p{Script=Sinhala}","u"),Le=new RegExp("\\p{Script=Tamil}","u"),ze=new RegExp("\\p{Script=Telugu}","u"),Ye=new RegExp("\\p{Script=Thai}","u"),Ge=new RegExp("\\p{Script=Tibetan}","u"),Ve=/[\u02BB\u02BC\u0027]/u,Ze=t=>t.replace(q,""),O=new Map,Ft=t=>[t.ambiguousIsNarrow?1:0,t.control,t.fullWidth,t.regular,t.wide].join("|"),Dt=t=>{const s=Ft(t.width);let e=O.get(s);return e||(e=new Map,O.set(s,e)),e},T=new RegExp(U.source,"y"),_=new RegExp(q.source,"uy"),I=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,J=t=>t>=32&&t<=126?"latin":t===8203||t===8204||t===8205||t===8288?"zero":t<=31||t>=127&&t<=159?"control":t>=160&&t<=255||t>=9472&&t<=9599?"latin":t>=4352&&t<=4607||t>=11904&&t<=40959||t>=44032&&t<=55215||t>=63744&&t<=64255||t>=65280&&t<=65519&&!(t>=65377&&t<=65439)||t>=12352&&t<=12543?"wide":t===8230?"latin":"other",jt=(t,s)=>{const e=Dt(s),n=Math.floor(t/65536),r=t%65536;let c=e.get(n);if(c||(c=new Map,e.set(n,c)),c.has(r))return c.get(r);let o;switch(J(t)){case"control":{o=s.width.control;break}case"latin":{o=s.width.regular;break}case"wide":{o=s.width.wide;break}case"zero":{o=0;break}default:switch(Z(t)){case"ambiguous":{o=s.width.ambiguousIsNarrow?s.width.regular:s.width.wide;break}case"fullwidth":{o=s.width.fullWidth;break}case"wide":{o=s.width.wide;break}default:o=s.width.regular}}return c.set(r,o),o},Ot=t=>t>=768&&t<=879||t>=6832&&t<=6911||t>=7616&&t<=7679||t>=8400&&t<=8447||t>=65056&&t<=65071||t>=917760&&t<=917999||t>=65024&&t<=65039||t>=3633&&t<=3642||t>=3655&&t<=3662||t>=3761&&t<=3769||t>=3771&&t<=3772||t>=3784&&t<=3789||t>=2304&&t<=2307||t>=2362&&t<=2383||t>=2385&&t<=2391||t>=2402&&t<=2403||t>=2433&&t<=2435||t>=2492&&t<=2500||t>=2509&&t<=2509||t>=2561&&t<=2563||t>=2620&&t<=2637||t>=1611&&t<=1631||t>=1648&&t<=1648||t>=1750&&t<=1773||t>=2276&&t<=2302||t>=1425&&t<=1469||t>=1471&&t<=1471||t>=1473&&t<=1474||t>=1476&&t<=1477||t>=1479&&t<=1479||t>=3893&&t<=3893||t>=3895&&t<=3895||t>=3897&&t<=3897||t>=3953&&t<=3966||t>=3968&&t<=3972||t>=3974&&t<=3975?!0:t>=768&&t<=777||t>=803&&t<=803,C=(t,s={})=>{if(!t||t.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const e={truncation:{countAnsiEscapeCodes:s.countAnsiEscapeCodes??!1,ellipsis:s.ellipsis??"",ellipsisWidth:s.ellipsisWidth??(s.ellipsis?C(s.ellipsis,{...s,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:s.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:s.ambiguousIsNarrow??!1,ansi:s.ansiWidth??0,control:s.controlWidth??0,emoji:s.emojiWidth??2,fullWidth:s.fullWidth??2,halfWidth:s.halfWidth??1,regular:s.regularWidth??1,tab:s.tabWidth??8,wide:s.wideWidth??2}},n=Math.max(0,e.truncation.limit-e.truncation.ellipsisWidth),{length:r}=t,c=r>1e4;let o=0,i=0,a=r,l=!1;const p=t.includes("\x1B")||t.includes("");for(;o<r;){if(p&&(t[o]==="\x1B"||t[o]==="")){if(t.startsWith("\x1B]8;;",o)){const d="\x1B]8;;\x07",w=d.length,y=t.indexOf("\x07",o+5);if(y!==-1){const S=t.indexOf(d,y+1);if(S!==-1){const B=S+w,W=t.slice(y+1,S).replace(U,""),k=C(W,{ambiguousIsNarrow:e.width.ambiguousIsNarrow,ansiWidth:e.width.ansi,controlWidth:e.width.control,countAnsiEscapeCodes:!1,ellipsis:e.truncation.ellipsis,ellipsisWidth:e.truncation.ellipsisWidth,emojiWidth:e.width.emoji,fullWidth:e.width.fullWidth,halfWidth:e.width.halfWidth,limit:Math.max(0,n-i),regularWidth:e.width.regular,tabWidth:e.width.tab,wideWidth:e.width.wide}),E=k.width;if(k.truncated)l=!0,a=Math.min(a,o);else if(i+E>n&&(a=Math.min(a,o),l=!0,i+E>e.truncation.limit))break;if(i+=E,o=B,l&&i>=e.truncation.limit)break;continue}}}if(T.lastIndex=o,T.test(t)){const d=T.lastIndex-o,w=e.truncation.countAnsiEscapeCodes?d:e.width.ansi;if(i+w>n&&(a=Math.min(a,o),i+w>e.truncation.limit)){l=!0;break}i+=w,o=T.lastIndex;continue}}const u=t.codePointAt(o);if(u===8203||u===65279||u>=8288&&u<=8292){o+=1;continue}if(u===9){if(i+e.width.tab>n&&(a=Math.min(a,o),i+e.width.tab>e.truncation.limit)){l=!0;break}i+=e.width.tab,o+=1;continue}if(I.lastIndex=o,I.test(t)){const d=(I.lastIndex-o)*e.width.regular;if(i+d>n){const w=e.width.regular>0?Math.floor((n-i)/e.width.regular):0;if(a=Math.min(a,o+w),i+d>e.truncation.limit){l=!0;break}}i+=d,o=I.lastIndex;continue}if((u<=31||u>=127&&u<=159)&&(v.lastIndex=o,v.test(t))){const d=(v.lastIndex-o)*e.width.control;if(i+d>n){const w=e.width.control>0?Math.floor((n-i)/e.width.control):0;if(a=Math.min(a,o+w),i+d>e.truncation.limit){l=!0;break}}i+=d,o=v.lastIndex;continue}if(_.lastIndex=o,_.test(t)){if(i+e.width.emoji>n&&(a=Math.min(a,o),i+e.width.emoji>e.truncation.limit)){l=!0;break}i+=e.width.emoji,o=_.lastIndex;continue}const m=t.codePointAt(o)??0;if(Ot(m)){o+=m>65535?2:1;continue}let h;if(c)h=jt(m,e);else switch(J(m)){case"control":{h=e.width.control;break}case"latin":{h=e.width.regular;break}case"wide":{h=e.width.wide;break}case"zero":{h=0;break}default:switch(Z(m)){case"ambiguous":{h=e.width.ambiguousIsNarrow?e.width.regular:e.width.wide;break}case"fullwidth":{h=e.width.fullWidth;break}case"wide":{h=e.width.wide;break}default:h=e.width.regular}}if(i+h>n&&(a=Math.min(a,o),i+h>e.truncation.limit)){l=!0;break}i+=h,o+=m>65535?2:1}let g=i,b=!1;return l&&e.truncation.limit>=e.truncation.ellipsisWidth&&(g=e.truncation.limit,b=!0),{ellipsed:b,index:l?a:r,truncated:l,width:g}},He=(t,s={})=>C(t,{...s,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,N=()=>f(lt(),".vis"),Pt=()=>f(N(),"cache"),Ue=()=>f(N(),"state"),Kt=t=>ct("sha256").update(t).digest("hex").slice(0,12),qe=t=>f(N(),"workspaces",Kt(t)),Lt=".vis",A=t=>f(t,Lt),Je="node_modules/.cache/vis",Xe=t=>f(A(t),"runs"),Qe=t=>f(A(t),"last-summary.json"),ts=t=>f(A(t),"last-failures"),es=t=>{const s=ut()==="win32";for(const e of[".task-runner",".task-runner-cache"]){const n=f(t,e);if(it(n))try{const r=s?F("cmd.exe",["/c","rmdir","/s","/q",n],{detached:!0,stdio:"ignore"}):F("rm",["-rf",n],{detached:!0,stdio:"ignore"});r.on("error",()=>{}),r.unref()}catch{}}},zt="https://api.socket.dev/v0/purl?alerts=true",M=()=>f(Pt(),"socket-security"),Yt=3600*1e3,X=.4,P=100,Gt=t=>typeof t=="object"&&t!==null&&"id"in t&&"type"in t&&"name"in t&&"version"in t&&"alerts"in t&&"score"in t&&t.type==="npm",Vt=()=>{dt(M())},Q=(t,s)=>`${encodeURIComponent(t)}@${encodeURIComponent(s)}`,Zt=(t,s)=>{const e=Q(t,s),n=f(M(),`${e}.json`);try{const r=ht(n);if(Date.now()-r.createdAt>r.ttlMs){Y(n,{force:!0});return}return r.report}catch{return}},Ht=(t,s,e,n)=>{const r=Q(t,s),c={createdAt:Date.now(),report:e,ttlMs:n};at(f(M(),`${r}.json`),JSON.stringify(c),"utf8")},Ut=t=>{const s=[t.license,t.maintenance,t.quality,t.supplyChain,t.vulnerability];return Number((s.reduce((e,n)=>e+n,0)/s.length).toFixed(2))},qt=async(t,s={})=>{const{apiToken:e,cacheTtlMs:n=Yt,timeoutMs:r=15e3}=s,c=new Map;if(t.length===0||!e)return c;const o=[];for(const l of t){const p=Zt(l.name,l.version);p?c.set(`${l.name}@${l.version}`,p):o.push(l)}if(o.length===0)return c;const i=`Basic ${Buffer.from(`${e}:`).toString("base64")}`;Vt();const a=[];for(let l=0;l<o.length;l+=P)a.push(o.slice(l,l+P));for(const l of a){const p=l.map(u=>({purl:`pkg:npm/${u.name}@${u.version}`})),g=new AbortController,b=setTimeout(()=>{g.abort()},r);try{const u=await fetch(zt,{body:JSON.stringify({components:p}),headers:{Authorization:i,"Content-Type":"application/json","User-Agent":"@visulima/vis"},method:"POST",signal:g.signal});if(!u.ok)continue;const m=await u.text();Jt(m,l,c,n)}catch{}finally{clearTimeout(b)}}return c},Jt=(t,s,e,n)=>{const r=new Map;for(const o of s)r.set(`${o.name}@${o.version}`,o);const c=t.split(`}
|
|
2
|
-
`);for(const o of c){const i=o.trim();if(i)try{const a=JSON.parse(i.endsWith("}")?i:`${i}}`),p=`${a.namespace?`${a.namespace}/`:""}${a.name}`,g=`${p}@${a.version}`;if(!r.has(g))continue;const b=a.score.overall??Ut(a.score),u={alerts:a.alerts,author:a.author,id:a.id,license:a.license,name:a.name,score:{...a.score,overall:b},size:a.size,type:"npm",version:a.version};a.namespace&&(u.namespace=a.namespace),Gt(u)&&(e.set(g,u),Ht(p,a.version,u,n))}catch{}}},Xt=t=>t.namespace?`${t.namespace}/${t.name}`:t.name,ss=t=>t>=.8?"excellent":t>=.6?"good":t>=.4?"fair":t>=.2?"poor":"critical",ns=t=>t>=.6?"green":t>=.4?"yellow":"red",os=t=>{const s=Xt(t),e=`score: ${String(Math.round(t.score.overall*100))}%`,n=t.alerts.length,r=n>0?`${String(n)} alert${n===1?"":"s"}`:"no alerts";return`${s}@${t.version} (${e}, ${r})`},is=(t,s=X)=>{if(t.size===0)return"";let e=0,n=0,r=0,c=0,o=0,i=0;for(const l of t.values()){for(const p of l.alerts)switch(e++,p.severity){case"critical":{n++;break}case"high":{r++;break}case"medium":{c++;break}default:o++}l.score.overall<s&&i++}const a=[`Socket.dev: scanned ${String(t.size)} package${t.size===1?"":"s"}`];if(e>0){const l=[];n>0&&l.push(`${String(n)} critical`),r>0&&l.push(`${String(r)} high`),c>0&&l.push(`${String(c)} medium`),o>0&&l.push(`${String(o)} low`),a.push(` Alerts: ${String(e)} total (${l.join(", ")})`)}else a.push(" No security alerts found.");if(i>0){const l=Math.round(s*100);a.push(` ${String(i)} package${i===1?"":"s"} with low security score (<${String(l)}%)`)}return a.join(`
|
|
3
|
-
`)},Qt=()=>{const t=M();if(!G(t))return 0;const s=z(t).filter(e=>e.endsWith(".json"));for(const e of s)Y(f(t,e),{force:!0});return s.length},te=()=>{const t=M();if(!G(t))return{entries:0,newestEntry:void 0,oldestEntry:void 0,totalSizeBytes:0};const s=z(t).filter(c=>c.endsWith(".json"));let e=0,n,r;for(const c of s){const o=rt(f(t,c));e+=o.size;const{mtimeMs:i}=o;(n===void 0||i<n)&&(n=i),(r===void 0||i>r)&&(r=i)}return{entries:s.length,newestEntry:r,oldestEntry:n,totalSizeBytes:e}},ee=(t,s)=>t?.enabled?{apiToken:t.apiToken??process.env.VIS_SOCKET_TOKEN,cacheTtlMs:t.cacheTtlMs,minimumScore:s??X,timeoutMs:t.timeoutMs}:void 0,rs=(t,s,e,n)=>{if(!e)return;const r=Date.now(),c=i=>{if(i.expiresAt){const a=Date.parse(i.expiresAt);if(!Number.isNaN(a)&&a<r)return!1}return!(n&&i.policies&&!i.policies.includes(n))},o=`${t}@${s}`;if(e[o]&&c(e[o]))return e[o];if(e[t]&&c(e[t]))return e[t];for(const[i,a]of Object.entries(e))if(i.endsWith("*")&&t.startsWith(i.slice(0,-1))&&c(a))return a},as=(t,s,e,n)=>[" // Add to security.acceptedRisks in vis.config.ts:",` ${`"${t}"`}: {`,` reason: "${n}",`,` acceptedAt: "${new Date().toISOString()}",`,` acceptedScore: ${String(e)},`,' policies: ["score"],'," },"].join(`
|
|
4
|
-
`),cs=(t,s={})=>{const e=ee(t,s.minimumScore);if(e)return{clearCache:Qt,displayName:"Socket.dev",fetchReports:n=>qt(n,e),getCacheStats:te,id:"socket"}},ls=t=>{if(t===void 0)return!1;const s=t.trim().toLowerCase();return s!==""&&s!=="0"&&s!=="false"&&s!=="no"},tt={iec:[{long:"Bytes",short:"B"},{long:"Kibibytes",short:"KiB"},{long:"Mebibytes",short:"MiB"},{long:"Gibibytes",short:"GiB"},{long:"Tebibytes",short:"TiB"},{long:"Pebibytes",short:"PiB"},{long:"Exbibytes",short:"EiB"},{long:"Zebibytes",short:"ZiB"},{long:"Yobibytes",short:"YiB"}],iec_octet:[{long:"Octets",short:"o"},{long:"Kibioctets",short:"Kio"},{long:"Mebioctets",short:"Mio"},{long:"Gibioctets",short:"Gio"},{long:"Tebioctets",short:"Tio"},{long:"Pebioctets",short:"Pio"},{long:"Exbioctets",short:"Eio"},{long:"Zebioctets",short:"Zio"},{long:"Yobioctets",short:"Yio"}],metric:[{long:"Bytes",short:"Bytes"},{long:"Kilobytes",short:"KB"},{long:"Megabytes",short:"MB"},{long:"Gigabytes",short:"GB"},{long:"Terabytes",short:"TB"},{long:"Petabytes",short:"PB"},{long:"Exabytes",short:"EB"},{long:"Zettabytes",short:"ZB"},{long:"Yottabytes",short:"YB"}],metric_octet:[{long:"Octets",short:"o"},{long:"Kilo-octets",short:"ko"},{long:"Mega-octets",short:"Mo"},{long:"Giga-octets",short:"Go"},{long:"Tera-octets",short:"To"},{long:"Peta-octets",short:"Po"},{long:"Exa-octets",short:"Eo"},{long:"Zetta-octets",short:"Zo"},{long:"Yotta-octets",short:"Yo"}]},se=[{long:"bits",short:"bit"},{long:"Kilobits",short:"kbit"},{long:"Megabits",short:"Mbit"},{long:"Gigabits",short:"Gbit"},{long:"Terabits",short:"Tbit"},{long:"Petabits",short:"Pbit"},{long:"Exabits",short:"Ebit"},{long:"Zettabits",short:"Zbit"},{long:"Yottabits",short:"Ybit"}],K=new Map,L=(t,s)=>{const e=`${t}\0${JSON.stringify(s)}`;let n=K.get(e);return n===void 0&&(n=new Intl.NumberFormat(t,s),K.set(e,n)),n},ne=t=>{switch(t){case 2:return 1024;case 10:return 1e3;default:throw new Error("Unsupported base.")}},oe=(t,s,e)=>({maximumFractionDigits:t,minimumFractionDigits:t,...s,...e}),ie=(t,s,e,n)=>{if(t===void 0)return-1;const r=s.findIndex(c=>c.short===t);return r===-1&&n?tt[e].findIndex(c=>c.short===t):r},us=(t,s)=>{if(typeof t!="number"||!Number.isFinite(t))throw new TypeError("Bytesize is not a number.");const{base:e,bits:n,decimals:r,locale:c,long:o,signed:i,unit:a,units:l,...p}={base:2,bits:!1,decimals:0,locale:"en-US",long:!1,signed:!1,units:"metric",...s},g=ne(e),b=n?t*8:t,u=Math.abs(b),m=s?.space??!0?" ":"",h=n?se:tt[l],d=ie(a,h,l,n),w=r<0?void 0:r,y=i?{signDisplay:"exceptZero"}:{};if(b===0){const E=d===-1?0:Math.min(d,h.length-1),et=h[E][o?"long":"short"];return L(c,{...y,...p}).format(0)+m+et}const S=Math.max(0,Math.min(Math.floor(Math.log(u)/Math.log(g)),h.length-1)),B=d===-1?S:d,W=h[B][o?"long":"short"],k=b/g**B;return L(c,oe(w,y,p)).format(k)+m+W};export{us as $,Fe as A,xe as B,Te as C,X as D,Oe as E,Ie as F,Me as G,$e as H,Ae as I,Ye as J,ke as K,be as L,ve as M,Pe as N,Be as O,Ce as P,es as Q,q as R,me as S,ye as T,De as U,Ge as V,Ne as W,we as X,je as Y,Ve as Z,U as _,ts as a,C as a0,It as a1,_t as a2,ge as a3,de as a4,fe as a5,pe as a6,cs as a7,is as a8,Je as a9,te as aa,Qt as ab,Qe as ac,N as b,A as c,Xe as d,Xt as e,rs as f,Pt as g,os as h,ss as i,as as j,ls as k,Ue as l,Ut as m,qt as n,He as o,qe as p,Ze as q,_e as r,ns as s,We as t,Re as u,Le as v,Ee as w,Se as x,ze as y,Ke as z};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{createRequire as wu}from"node:module";import{L as Fu}from"./index-BisalDCf.js";let xu;const vu=u=>(xu??=wu(import.meta.url))(u),V=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$u=u=>{if(typeof V<"u"&&V.versions&&V.versions.node){const[D,e]=V.versions.node.split(".").map(Number);if(D>22||D===22&&e>=3||D===20&&e>=16)return V.getBuiltinModule(u)}return vu(u)},{createRequire:Y}=$u("node:module"),T0=0,L0=4,Su=Symbol("findUpStop"),M0=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g,Nu=/^[A-Z]:\//i,I=(u="")=>u&&u.replaceAll("\\","/").replace(Nu,D=>D.toUpperCase()),ku=/^[/\\]{2}/,Pu=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,iu=/^[A-Z]:$/i,Cu=/^\/([A-Z]:)?$/i,Au=/^([A-Z]:)\/$/i,ju=/[^/](\.[^./]+)$/,Ou=/^[/\\]|^[a-z]:[/\\]/i,zu=/\/$/,_u=()=>{if(typeof process.cwd=="function")try{const u=process.cwd();if(typeof u=="string")return I(u)}catch{}return"/"},mu=(u,D)=>{let e="",r=0,n=-1,i=0,a;for(let A=0;A<=u.length;++A){if(A<u.length)a=u[A];else{if(a==="/")break;a="/"}if(a==="/"){if(!(n===A-1||i===1))if(i===2){if(e.length<2||r!==2||!e.endsWith(".")||e.at(-2)!=="."){if(e.length>2){const p=e.lastIndexOf("/");p===-1?(e="",r=0):(e=e.slice(0,p),r=e.length-1-e.lastIndexOf("/")),n=A,i=0;continue}else if(e.length>0){e="",r=0,n=A,i=0;continue}}D&&(e+=e.length>0?"/..":"..",r=2)}else e.length>0?e+=`/${u.slice(n+1,A)}`:e=u.slice(n+1,A),r=A-n-1;n=A,i=0}else a==="."&&i!==-1?++i:i=-1}return e},M=u=>Pu.test(u),Iu=function(u){if(u.length===0)return".";u=I(u);const D=ku.exec(u),e=M(u),r=u.at(-1)==="/";return u=mu(u,!e),u.length===0?e?"/":r?"./":".":(r&&(u+="/"),iu.test(u)&&(u+="/"),D?e?`//${u}`:`//./${u}`:e&&!M(u)?`/${u}`:u)},V0=(...u)=>{let D="";for(const e of u)if(e)if(D.length>0){const r=D.at(-1)==="/",n=e[0]==="/";r&&n?D+=e.slice(1):D+=r||n?e:`/${e}`}else D+=e;return Iu(D)},H=function(...u){u=u.map(r=>I(r));let D="",e=!1;for(let r=u.length-1;r>=-1&&!e;r--){const n=r>=0?u[r]:_u();!n||n.length===0||(D=`${n}/${D}`,e=M(n))}return D=mu(D,!e),iu.test(D)?`${D}/`:e&&!M(D)?`/${D}`:D.length>0?D:"."},J0=function(u){return I(u)},Tu=function(u){return ju.exec(I(u))?.[1]??""},R0=function(u,D){const e=H(u).replace(Cu,"$1").replace(Au,"$1").split("/"),r=H(D).replace(Cu,"$1").replace(Au,"$1").split("/");if(r[0][1]===":"&&e[0][1]===":"&&e[0]!==r[0])return r.join("/");const n=Math.min(e.length,r.length);let i=0;for(;i<n&&e[i]===r[i];)i+=1;const a=e.length-i;return[...Array.from({length:a}).fill(".."),...r.slice(i)].join("/")},gu=u=>{const D=I(u).replace(zu,""),e=D.lastIndexOf("/");if(e===-1)return M(u)?"/":".";const r=D.slice(0,e);return iu.test(r)?`${r}/`:r||(M(u)?"/":".")},Lu=(u,D)=>{const e=I(u),r=e.slice(e.lastIndexOf("/")+1);if(D&&r.endsWith(D)){if(D===e)return"";const n=r.slice(0,-D.length);if(n.length>0)return n}return r},Mu=function(u){const D=Ou.exec(u)?.[0]?.replaceAll("\\","/")??"",e=Lu(u),r=Tu(e);return{base:e,dir:gu(u),ext:r,name:e.slice(0,e.length-r.length),root:D}};let Vu;const Ju=u=>(Vu??=Y(import.meta.url))(u),J=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ru=u=>{if(typeof J<"u"&&J.versions&&J.versions.node){const[D,e]=J.versions.node.split(".").map(Number);if(D>22||D===22&&e>=3||D===20&&e>=16)return J.getBuiltinModule(u)}return Ju(u)},{fileURLToPath:qu}=Ru("node:url");function Wu(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var au,cu;function Uu(){return cu||(cu=1,au=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),au}var Hu=Uu();const Zu=Wu(Hu);new Set(Zu);const Gu=/^(?:\.?\.[/\\]|\.\.\B)/,q0=u=>Gu.test(u)||u==="..",K=u=>I(u instanceof URL?qu(u):u),Ku=u=>{if(!u||!(u instanceof URL)&&typeof u!="string")throw new TypeError("Path must be a non-empty string or URL.")};let Qu;const Xu=u=>(Qu??=Y(import.meta.url))(u),R=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yu=u=>{if(typeof R<"u"&&R.versions&&R.versions.node){const[D,e]=R.versions.node.split(".").map(Number);if(D>22||D===22&&e>=3||D===20&&e>=16)return R.getBuiltinModule(u)}return Xu(u)},{statSync:u0,lstatSync:D0}=Yu("node:fs"),W0=(u,D={})=>{if(typeof u!="string"&&!Array.isArray(u)&&typeof u!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const e=D.cwd?K(D.cwd):process.cwd();let r=H(e);const{root:n}=Mu(r),i=K(D.stopAt??n),a=H(r,i),A=D.type??"file",p=function(c){return typeof u=="function"?[u(c)]:typeof u=="string"?[u]:Array.isArray(u)?u:[u]};D.allowSymlinks??=!0;const v=D.allowSymlinks?u0:D0;for(;r;){for(let c of p(r)){if(c===Su)return;if(c===void 0)continue;Buffer.isBuffer(c)?c=c.toString():c instanceof URL&&(c=K(c));const B=M(c)?c:H(r,c);try{const h=v(B);if(A==="file"&&h.isFile()||A==="directory"&&h.isDirectory())return B}catch{}}if(r===a||r===n)break;r=gu(r)}};let e0=class extends Error{constructor(D){super(`ENOENT: ${D}`)}get code(){return"ENOENT"}set code(D){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(D){throw new Error("Cannot overwrite name of NotFoundError")}};class t0 extends Error{constructor(D){super(`EPERM: Operation not permitted, ${D}`)}get code(){return"EPERM"}set code(D){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(D){throw new Error("Cannot overwrite name of PermissionError")}}const r0=(u,D)=>{const e=u?.code;return e==="ENOENT"?new e0(`no such file or directory, open '${D}'`):e==="EACCES"||e==="EPERM"?new t0(`unable to read the non-readable file: ${D}`):u};let n0;const i0=u=>(n0??=Y(import.meta.url))(u),q=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,du=u=>{if(typeof q<"u"&&q.versions&&q.versions.node){const[D,e]=q.versions.node.split(".").map(Number);if(D>22||D===22&&e>=3||D===20&&e>=16)return q.getBuiltinModule(u)}return i0(u)},{readFileSync:s0}=du("node:fs"),{unzipSync:o0,brotliDecompressSync:F0}=du("node:zlib"),C0={brotli:F0,gzip:o0,none:u=>u},A0=(u,D)=>{Ku(u),u=K(u);const{buffer:e,compression:r,encoding:n,flag:i}=D??{};let a;try{a=s0(u,i?{flag:i}:{})}catch(v){throw r0(v,u)}const A=C0[r??"none"],p=A(a);return e?p:p.toString(n??"utf8")},a0=globalThis.process??Object.create(null),Eu={versions:{}},lu=new Proxy(a0,{get(u,D){if(D in u)return u[D];if(D in Eu)return Eu[D]}}),c0=u=>u.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
-
`),E0=(u,D,e,r)=>{const n={column:0,line:-1,...u.start},i={...n,...u.end},a=n.line,A=n.column,p=i.line,v=i.column;let c=Math.max(a-(e+1),0),B=Math.min(D.length,p+r);a===-1&&(c=0),p===-1&&(B=D.length);const h=p-a,m={};if(h)for(let l=0;l<=h;l++){const o=l+a;if(!A)m[o]=!0;else if(l===0){const f=D[o-1]?.length;m[o]=[A,(f??0)-A+1]}else if(l===h)m[o]=[0,v];else{const f=D[o-l]?.length;m[o]=[0,f]}}else A===v?m[a]=A?[A,0]:!0:m[a]=[A,(v??0)-(A??0)];return{end:B,markerLines:m,start:c}},l0=lu.platform==="win32"&&!lu.env?.WT_SESSION?">":"❯",H0=(u,D,e)=>{const r={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...e,color:{gutter:l=>l,marker:l=>l,message:l=>l,...e?.color}},n=typeof D.start.column=="number";let i=(u.includes("\r")?c0(u):u).split(`
|
|
3
|
-
`);typeof r.tabWidth=="number"&&u.includes(" ")&&(i=i.map(l=>l.replaceAll(" "," ".repeat(r.tabWidth))));const{end:a,markerLines:A,start:p}=E0(D,i,r.linesAbove,r.linesBelow),v=String(a).length,{gutter:c,marker:B,message:h}=r.color;let m=i.slice(p,a).map((l,o)=>{const f=p+1+o,s=A[f],w=String(f).padStart(v),$=!A[f+1],y=` ${w}${r.showGutter?" |":""}`;if(s){let x="";if(Array.isArray(s)){const z=l.replaceAll(/[^\t]/g," ").slice(0,Math.max(s[0]-1,0)),bu=s[1]||1;x=[`
|
|
4
|
-
`,r.prefix+c(y.replaceAll(/\d/g," "))," ",z,B("^").repeat(bu)].join(""),$&&r.message&&(x+=` ${h(r.message)}`)}return[r.prefix+B(l0),c(y),l.length>0?` ${l}`:"",x].join("")}return`${r.prefix} ${c(y)}${l.length>0?` ${l}`:""}`}).join(`
|
|
5
|
-
`);return r.message&&!n&&(m=`${r.prefix+" ".repeat(v+1)+r.message}
|
|
6
|
-
${m}`),m},fu=(u,D)=>{let e=0,r=D.length-2;for(;e<r;){const n=e+(r-e>>1);if(u<D[n])r=n-1;else if(u>=D[n+1])e=n+1;else{e=n;break}}return e},f0=/\n|\r(?!\n)/,B0=u=>u.split(f0).reduce((D,e)=>(D.push(D.at(-1)+e.length+1),D),[0]),Z0=(u,D,e)=>{if(!Array.isArray(u)&&typeof u!="string"||(typeof u=="string"||Array.isArray(u))&&u.length===0)return{column:0,line:0};if(typeof D!="number"||typeof u=="string"&&D>=u.length||Array.isArray(u)&&D+1>=u.at(-1))return{column:0,line:0};if(typeof u=="string"){const n=B0(u),i=fu(D,n);return{column:D-n[i]+1,line:i+1}}const r=fu(D,u);return{column:D-u[r]+1,line:r+1}};class G0 extends Error{fileName;codeFrame;name="JSONError";#u;constructor(D){super(),this.#u=D}get message(){return`${this.#u}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
|
|
7
|
-
|
|
8
|
-
${this.codeFrame}
|
|
9
|
-
`:""}`}set message(D){this.#u=D}}let p0;const m0=u=>(p0??=Y(import.meta.url))(u),W=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,su=u=>{if(typeof W<"u"&&W.versions&&W.versions.node){const[D,e]=W.versions.node.split(".").map(Number);if(D>22||D===22&&e>=3||D===20&&e>=16)return W.getBuiltinModule(u)}return m0(u)},g0=su("fs"),d0=su("os"),h0=su("path");var uu={},Bu;function y0(){if(Bu)return uu;Bu=1;var u=Object.defineProperty,D=(c,B)=>u(c,"name",{value:B,configurable:!0}),e=g0,r=d0,n=h0;const i=D(c=>{let B="";for(let h=0;h<c.length;h+=1){const m=c[h],l=m.toUpperCase();B+=m===l?m.toLowerCase():l}return B},"invertCase"),a=new Map,A=D((c,B)=>{const h=n.join(c,`.is-fs-case-sensitive-test-${process.pid}`);try{return B.writeFileSync(h,""),!B.existsSync(i(h))}finally{try{B.unlinkSync(h)}catch{}}},"checkDirectoryCaseWithWrite"),p=D((c,B,h)=>{try{return A(c,h)}catch(m){if(B===void 0)return A(r.tmpdir(),h);throw m}},"checkDirectoryCaseWithFallback"),v=D((c,B=e,h=!0)=>{const m=c??process.cwd();if(h&&a.has(m))return a.get(m);let l;const o=i(m);return o!==m&&B.existsSync(m)?l=!B.existsSync(o):l=p(m,c,B),h&&a.set(m,l),l},"isFsCaseSensitive");return uu.isFsCaseSensitive=v,uu}var b0=y0();const K0=b0.isFsCaseSensitive;function Q0(u,D,e){const r={},{buffer:n,compression:i,encoding:a="utf8",flag:A,...p}=r,v=A0(u,{buffer:n,compression:i,encoding:a,flag:A});return typeof D=="function"?Fu(v,D,p):Fu(v,p)}var w0=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,x0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,v0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Du={Space_Separator:w0,ID_Start:x0,ID_Continue:v0},b={isSpaceSeparator(u){return typeof u=="string"&&Du.Space_Separator.test(u)},isIdStartChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||Du.ID_Start.test(u))},isIdContinueChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u===""||u===""||Du.ID_Continue.test(u))},isDigit(u){return typeof u=="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u=="string"&&/[0-9A-Fa-f]/.test(u)}};let tu,N,j,Q,_,k,S,ou,Z;var $0=function(D,e){tu=String(D),N="start",j=[],Q=0,_=1,k=0,S=void 0,ou=void 0,Z=void 0;do S=S0(),P0[N]();while(S.type!=="eof");return typeof e=="function"?ru({"":Z},"",e):Z};function ru(u,D,e){const r=u[D];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let n=0;n<r.length;n++){const i=String(n),a=ru(r,i,e);a===void 0?delete r[i]:Object.defineProperty(r,i,{value:a,writable:!0,enumerable:!0,configurable:!0})}else for(const n in r){const i=ru(r,n,e);i===void 0?delete r[n]:Object.defineProperty(r,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}return e.call(u,D,r)}let C,F,U,P,E;function S0(){for(C="default",F="",U=!1,P=1;;){E=O();const u=hu[C]();if(u)return u}}function O(){if(tu[Q])return String.fromCodePoint(tu.codePointAt(Q))}function t(){const u=O();return u===`
|
|
10
|
-
`?(_++,k=0):u?k+=u.length:k++,u&&(Q+=u.length),u}const hu={default(){switch(E){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
|
11
|
-
`:case"\r":case"\u2028":case"\u2029":t();return;case"/":t(),C="comment";return;case void 0:return t(),g("eof")}if(b.isSpaceSeparator(E)){t();return}return hu[N]()},comment(){switch(E){case"*":t(),C="multiLineComment";return;case"/":t(),C="singleLineComment";return}throw d(t())},multiLineComment(){switch(E){case"*":t(),C="multiLineCommentAsterisk";return;case void 0:throw d(t())}t()},multiLineCommentAsterisk(){switch(E){case"*":t();return;case"/":t(),C="default";return;case void 0:throw d(t())}t(),C="multiLineComment"},singleLineComment(){switch(E){case`
|
|
12
|
-
`:case"\r":case"\u2028":case"\u2029":t(),C="default";return;case void 0:return t(),g("eof")}t()},value(){switch(E){case"{":case"[":return g("punctuator",t());case"n":return t(),T("ull"),g("null",null);case"t":return t(),T("rue"),g("boolean",!0);case"f":return t(),T("alse"),g("boolean",!1);case"-":case"+":t()==="-"&&(P=-1),C="sign";return;case".":F=t(),C="decimalPointLeading";return;case"0":F=t(),C="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":F=t(),C="decimalInteger";return;case"I":return t(),T("nfinity"),g("numeric",1/0);case"N":return t(),T("aN"),g("numeric",NaN);case'"':case"'":U=t()==='"',F="",C="string";return}throw d(t())},identifierNameStartEscape(){if(E!=="u")throw d(t());t();const u=nu();switch(u){case"$":case"_":break;default:if(!b.isIdStartChar(u))throw pu();break}F+=u,C="identifierName"},identifierName(){switch(E){case"$":case"_":case"":case"":F+=t();return;case"\\":t(),C="identifierNameEscape";return}if(b.isIdContinueChar(E)){F+=t();return}return g("identifier",F)},identifierNameEscape(){if(E!=="u")throw d(t());t();const u=nu();switch(u){case"$":case"_":case"":case"":break;default:if(!b.isIdContinueChar(u))throw pu();break}F+=u,C="identifierName"},sign(){switch(E){case".":F=t(),C="decimalPointLeading";return;case"0":F=t(),C="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":F=t(),C="decimalInteger";return;case"I":return t(),T("nfinity"),g("numeric",P*(1/0));case"N":return t(),T("aN"),g("numeric",NaN)}throw d(t())},zero(){switch(E){case".":F+=t(),C="decimalPoint";return;case"e":case"E":F+=t(),C="decimalExponent";return;case"x":case"X":F+=t(),C="hexadecimal";return}return g("numeric",P*0)},decimalInteger(){switch(E){case".":F+=t(),C="decimalPoint";return;case"e":case"E":F+=t(),C="decimalExponent";return}if(b.isDigit(E)){F+=t();return}return g("numeric",P*Number(F))},decimalPointLeading(){if(b.isDigit(E)){F+=t(),C="decimalFraction";return}throw d(t())},decimalPoint(){switch(E){case"e":case"E":F+=t(),C="decimalExponent";return}if(b.isDigit(E)){F+=t(),C="decimalFraction";return}return g("numeric",P*Number(F))},decimalFraction(){switch(E){case"e":case"E":F+=t(),C="decimalExponent";return}if(b.isDigit(E)){F+=t();return}return g("numeric",P*Number(F))},decimalExponent(){switch(E){case"+":case"-":F+=t(),C="decimalExponentSign";return}if(b.isDigit(E)){F+=t(),C="decimalExponentInteger";return}throw d(t())},decimalExponentSign(){if(b.isDigit(E)){F+=t(),C="decimalExponentInteger";return}throw d(t())},decimalExponentInteger(){if(b.isDigit(E)){F+=t();return}return g("numeric",P*Number(F))},hexadecimal(){if(b.isHexDigit(E)){F+=t(),C="hexadecimalInteger";return}throw d(t())},hexadecimalInteger(){if(b.isHexDigit(E)){F+=t();return}return g("numeric",P*Number(F))},string(){switch(E){case"\\":t(),F+=N0();return;case'"':if(U)return t(),g("string",F);F+=t();return;case"'":if(!U)return t(),g("string",F);F+=t();return;case`
|
|
13
|
-
`:case"\r":throw d(t());case"\u2028":case"\u2029":j0(E);break;case void 0:throw d(t())}F+=t()},start(){switch(E){case"{":case"[":return g("punctuator",t())}C="value"},beforePropertyName(){switch(E){case"$":case"_":F=t(),C="identifierName";return;case"\\":t(),C="identifierNameStartEscape";return;case"}":return g("punctuator",t());case'"':case"'":U=t()==='"',C="string";return}if(b.isIdStartChar(E)){F+=t(),C="identifierName";return}throw d(t())},afterPropertyName(){if(E===":")return g("punctuator",t());throw d(t())},beforePropertyValue(){C="value"},afterPropertyValue(){switch(E){case",":case"}":return g("punctuator",t())}throw d(t())},beforeArrayValue(){if(E==="]")return g("punctuator",t());C="value"},afterArrayValue(){switch(E){case",":case"]":return g("punctuator",t())}throw d(t())},end(){throw d(t())}};function g(u,D){return{type:u,value:D,line:_,column:k}}function T(u){for(const D of u){if(O()!==D)throw d(t());t()}}function N0(){switch(O()){case"b":return t(),"\b";case"f":return t(),"\f";case"n":return t(),`
|
|
14
|
-
`;case"r":return t(),"\r";case"t":return t()," ";case"v":return t(),"\v";case"0":if(t(),b.isDigit(O()))throw d(t());return"\0";case"x":return t(),k0();case"u":return t(),nu();case`
|
|
15
|
-
`:case"\u2028":case"\u2029":return t(),"";case"\r":return t(),O()===`
|
|
16
|
-
`&&t(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw d(t());case void 0:throw d(t())}return t()}function k0(){let u="",D=O();if(!b.isHexDigit(D)||(u+=t(),D=O(),!b.isHexDigit(D)))throw d(t());return u+=t(),String.fromCodePoint(parseInt(u,16))}function nu(){let u="",D=4;for(;D-- >0;){const e=O();if(!b.isHexDigit(e))throw d(t());u+=t()}return String.fromCodePoint(parseInt(u,16))}const P0={start(){if(S.type==="eof")throw L();eu()},beforePropertyName(){switch(S.type){case"identifier":case"string":ou=S.value,N="afterPropertyName";return;case"punctuator":G();return;case"eof":throw L()}},afterPropertyName(){if(S.type==="eof")throw L();N="beforePropertyValue"},beforePropertyValue(){if(S.type==="eof")throw L();eu()},beforeArrayValue(){if(S.type==="eof")throw L();if(S.type==="punctuator"&&S.value==="]"){G();return}eu()},afterPropertyValue(){if(S.type==="eof")throw L();switch(S.value){case",":N="beforePropertyName";return;case"}":G()}},afterArrayValue(){if(S.type==="eof")throw L();switch(S.value){case",":N="beforeArrayValue";return;case"]":G()}},end(){}};function eu(){let u;switch(S.type){case"punctuator":switch(S.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=S.value;break}if(Z===void 0)Z=u;else{const D=j[j.length-1];Array.isArray(D)?D.push(u):Object.defineProperty(D,ou,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(u!==null&&typeof u=="object")j.push(u),Array.isArray(u)?N="beforeArrayValue":N="beforePropertyName";else{const D=j[j.length-1];D==null?N="end":Array.isArray(D)?N="afterArrayValue":N="afterPropertyValue"}}function G(){j.pop();const u=j[j.length-1];u==null?N="end":Array.isArray(u)?N="afterArrayValue":N="afterPropertyValue"}function d(u){return X(u===void 0?`JSON5: invalid end of input at ${_}:${k}`:`JSON5: invalid character '${yu(u)}' at ${_}:${k}`)}function L(){return X(`JSON5: invalid end of input at ${_}:${k}`)}function pu(){return k-=5,X(`JSON5: invalid identifier character at ${_}:${k}`)}function j0(u){console.warn(`JSON5: '${yu(u)}' in strings is not valid ECMAScript; consider escaping`)}function yu(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}function X(u){const D=new SyntaxError(u);return D.lineNumber=_,D.columnNumber=k,D}var O0=function(D,e,r){const n=[];let i="",a,A,p="",v;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(r=e.space,v=e.quote,e=e.replacer),typeof e=="function")A=e;else if(Array.isArray(e)){a=[];for(const o of e){let f;typeof o=="string"?f=o:(typeof o=="number"||o instanceof String||o instanceof Number)&&(f=String(o)),f!==void 0&&a.indexOf(f)<0&&a.push(f)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>0&&(r=Math.min(10,Math.floor(r)),p=" ".substr(0,r)):typeof r=="string"&&(p=r.substr(0,10)),c("",{"":D});function c(o,f){let s=f[o];switch(s!=null&&(typeof s.toJSON5=="function"?s=s.toJSON5(o):typeof s.toJSON=="function"&&(s=s.toJSON(o))),A&&(s=A.call(f,o,s)),s instanceof Number?s=Number(s):s instanceof String?s=String(s):s instanceof Boolean&&(s=s.valueOf()),s){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof s=="string")return B(s);if(typeof s=="number")return String(s);if(typeof s=="object")return Array.isArray(s)?l(s):h(s)}function B(o){const f={"'":.1,'"':.2},s={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let w="";for(let y=0;y<o.length;y++){const x=o[y];switch(x){case"'":case'"':f[x]++,w+=x;continue;case"\0":if(b.isDigit(o[y+1])){w+="\\x00";continue}}if(s[x]){w+=s[x];continue}if(x<" "){let z=x.charCodeAt(0).toString(16);w+="\\x"+("00"+z).substring(z.length);continue}w+=x}const $=v||Object.keys(f).reduce((y,x)=>f[y]<f[x]?y:x);return w=w.replace(new RegExp($,"g"),s[$]),$+w+$}function h(o){if(n.indexOf(o)>=0)throw TypeError("Converting circular structure to JSON5");n.push(o);let f=i;i=i+p;let s=a||Object.keys(o),w=[];for(const y of s){const x=c(y,o);if(x!==void 0){let z=m(y)+":";p!==""&&(z+=" "),z+=x,w.push(z)}}let $;if(w.length===0)$="{}";else{let y;if(p==="")y=w.join(","),$="{"+y+"}";else{let x=`,
|
|
17
|
-
`+i;y=w.join(x),$=`{
|
|
18
|
-
`+i+y+`,
|
|
19
|
-
`+f+"}"}}return n.pop(),i=f,$}function m(o){if(o.length===0)return B(o);const f=String.fromCodePoint(o.codePointAt(0));if(!b.isIdStartChar(f))return B(o);for(let s=f.length;s<o.length;s++)if(!b.isIdContinueChar(String.fromCodePoint(o.codePointAt(s))))return B(o);return o}function l(o){if(n.indexOf(o)>=0)throw TypeError("Converting circular structure to JSON5");n.push(o);let f=i;i=i+p;let s=[];for(let $=0;$<o.length;$++){const y=c(String($),o);s.push(y!==void 0?y:"null")}let w;if(s.length===0)w="[]";else if(p==="")w="["+s.join(",")+"]";else{let $=`,
|
|
20
|
-
`+i,y=s.join($);w=`[
|
|
21
|
-
`+i+y+`,
|
|
22
|
-
`+f+"]"}return n.pop(),i=f,w}};const z0={parse:$0,stringify:O0};var X0=z0;export{gu as $,K as C,q0 as L,H0 as T,H as U,L0 as _,Z0 as a,X0 as b,R0 as c,r0 as d,V0 as e,e0 as f,M as g,Iu as h,M0 as i,W0 as k,Q0 as l,Lu as m,Ku as n,T0 as o,K0 as q,G0 as r,J0 as t,A0 as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as k,D as S,f as L}from"./provenance-CFPT_FQA.js";import{g as $}from"./packument-DuEV-qSE.js";import{f}from"./formatBytes-BHAzNIrn-CLYsxlUj.js";import{a as E}from"./build-scripts-BIgkWVgY.js";import{n as h}from"./license-DvlYdo6T.js";import{z as A}from"./index-CVBR-Kit.js";import{S as P}from"./lockfile-DhHAaHN5.js";import{v as x,U as O}from"./path-CxEa27Rz-pjheKk6v.js";import{L as b}from"./dependency-scan-W9b2X0a1.js";const C=2,m=4,y={CRITICAL:0,HIGH:1,LOW:3,MODERATE:C,UNKNOWN:m},ce=(s,e)=>{const n=y[(s.vulnerability.severity??"UNKNOWN").toUpperCase()]??m,t=y[(e.vulnerability.severity??"UNKNOWN").toUpperCase()]??m;return n-t||s.packageName.localeCompare(e.packageName)||s.packageVersion.localeCompare(e.packageVersion)},M=(s,e)=>{const n=y[e.toUpperCase()]??C;return(y[s.toUpperCase()]??m)<=n},R=["firstSeen","installScripts","license","malware","publisherChange","score","unexpectedDeps","vulnerability"],w=6e4,D=(s,e,n)=>{for(const t of n)if(t===s||t===`${s}@${e}`||t.endsWith("*")&&s.startsWith(t.slice(0,-1)))return!0;return!1},W=async(s,e)=>{const n=e.security?.policies?.firstSeen;if(n?.minutes===void 0||n.minutes<=0)return[];const{minutes:t}=n,r=n.exclude??[],a=e.security?.acceptedRisks,c=t*w,o=Date.now();return(await k(s.packages,S,async l=>{if(D(l.name,l.version,r))return;const p=await $(l.name,{workspaceRoot:s.workspaceRoot});if(p===void 0)return;const u=p.time?.[l.version];if(u===void 0)return;const d=Date.parse(u);if(Number.isNaN(d))return;const v=o-d;if(v>=c)return;const g=Math.max(0,Math.floor(v/w));return{acceptedRisk:f(l.name,l.version,a,"firstSeen"),data:{ageMinutes:g,minimumMinutes:t,publishedAt:u},packageName:l.name,policy:"firstSeen",reason:`${l.name}@${l.version} was published ${String(g)} min ago — below the ${String(t)} min firstSeen cooldown.`,severity:"block",version:l.version}})).filter(l=>l!==void 0)},U=(s,e)=>{const n=e.security?.policies?.installScripts;if(!n)return[];const t=n.allow??{},r=n.strict===!0;if(!r&&Object.keys(t).length===0)return[];const a=E(s.workspaceRoot,t,{pinVersions:e.security?.pinVersions===!0});if(a.unapproved.length===0)return[];const c=e.security?.acceptedRisks,o=r?"block":"warn";return a.unapproved.map(i=>({acceptedRisk:f(i.name,i.version??"*",c,"installScripts"),data:{hooks:i.hooks},packageName:i.name,policy:"installScripts",reason:`${i.name}${i.version?`@${i.version}`:""} declares unapproved build script(s): ${i.hooks.join(", ")}`,severity:o,version:i.version??"*"}))},_=new Set(["AND","OR"]),I=s=>{const e=s.replaceAll("("," ").replaceAll(")"," ").split(/\s+/).map(r=>r.trim()).filter(r=>r.length>0),n=[];let t=!1;for(const r of e){const a=r.toUpperCase();if(t){t=!1;continue}if(a==="WITH"){t=!0;continue}if(_.has(a))continue;const c=r.endsWith("+"),o=c?r.slice(0,-1):r,i=h(o)??o;n.push(i),c&&n.push(`${i}-or-later`)}return n},T=s=>{if(typeof s.license=="string"){const e=s.license.trim();return e.length>0?e:void 0}if(s.license&&typeof s.license=="object"&&typeof s.license.type=="string"){const e=s.license.type.trim();if(e.length>0)return e}if(Array.isArray(s.licenses)&&s.licenses.length>0){const e=s.licenses.map(n=>n&&typeof n.type=="string"?n.type.trim():"").filter(n=>n.length>0);if(e.length>0)return e.length===1?e[0]:`(${e.join(" OR ")})`}},V=(s,e)=>{if(e.length===0)return;const n=new Set(e.map(t=>h(t)??t).map(t=>t.toLowerCase()));for(const t of s)if(n.has(t.toLowerCase()))return t},F=(s,e)=>{if(e.length===0)return;const n=new Set(e.map(t=>h(t)??t).map(t=>t.toLowerCase()));for(const t of s)if(!n.has(t.toLowerCase()))return t},j=(s,e)=>{const n=e.security?.policies?.license;if(!n)return[];const t=n.allow??[],r=n.deny??[];if(t.length===0&&r.length===0)return[];const a=e.security?.acceptedRisks,c=[];for(const o of s.packages){const i=s.manifestData?.get(`${o.name}@${o.version}`),l=i?T(i):void 0;if(!l){t.length>0&&c.push({acceptedRisk:f(o.name,o.version,a,"license"),data:{declaredLicense:null},packageName:o.name,policy:"license",reason:`${o.name}@${o.version} declares no license; allow-list mode requires one of: ${t.join(", ")}`,severity:"block",version:o.version});continue}const p=I(l),u=V(p,r);if(u){c.push({acceptedRisk:f(o.name,o.version,a,"license"),data:{declaredLicense:l,deniedLicense:u},packageName:o.name,policy:"license",reason:`${o.name}@${o.version} uses denied license '${u}' (declared: ${l})`,severity:"block",version:o.version});continue}const d=F(p,t);d&&c.push({acceptedRisk:f(o.name,o.version,a,"license"),data:{allowList:t,declaredLicense:l,unallowedLicense:d},packageName:o.name,policy:"license",reason:`${o.name}@${o.version} uses license '${d}' which is not on the allow-list (declared: ${l})`,severity:"block",version:o.version})}return c},K=6e4,z=(s,e,n)=>{for(const t of n)if(t===s||t===`${s}@${e}`||t.endsWith("*")&&s.startsWith(t.slice(0,-1)))return!0;return!1},B=async(s,e)=>{const n=e.security?.policies?.publisherChange;if(n?.mode!=="no-downgrade")return[];const t=n.exclude??[],r=typeof n.ignoreAfter=="number"?n.ignoreAfter*K:void 0,a=e.security?.acceptedRisks,c=Date.now();return(await k(s.packages,S,async i=>{if(z(i.name,i.version,t))return;const l=await $(i.name,{workspaceRoot:s.workspaceRoot});if(l===void 0)return;if(r!==void 0){const d=l.time?.[i.version],v=d===void 0?Number.NaN:Date.parse(d);if(!Number.isNaN(v)&&c-v>r)return}if(l.versions[i.version]?.dist?.attestations?.provenance!==void 0)return;const u=L(l,i.version);if(u!==void 0)return{acceptedRisk:f(i.name,i.version,a,"publisherChange"),data:{priorVersionWithProvenance:u},packageName:i.name,policy:"publisherChange",reason:`${i.name}@${i.version} dropped the provenance attestation that ${i.name}@${u} carried — publisher trust downgrade.`,severity:"block",version:i.version}})).filter(i=>i!==void 0)},Y=s=>{for(const e of Object.values(b))for(const n of[e.file,...e.aliases??[]])if(s===n||s.endsWith(`/${n}`)||s.endsWith(`.${n}`))return e.type},H=(s,e,n)=>{const t=x(e)?e:O(s,e);let r;try{r=A(t)}catch{return}const a=Y(t)??b[n]?.type;if(!a)return;const c=P(r,a);if(c.length===0)return;const o=new Set;for(const i of c)o.add(`${i.name}@${i.version}`);return o},q=(s,e)=>{for(const n of e)if(n===s||n.endsWith("*")&&s.startsWith(n.slice(0,-1)))return!0;return!1},G=(s,e)=>{const n=e.security?.policies?.unexpectedDeps;if(!n)return[];const t=n.allow??[],r=n.baselineLockfile;if(t.length===0&&!r)return[];const a=r?H(s.workspaceRoot,r,s.packageManager):void 0,c=e.security?.acceptedRisks,o=[];for(const i of s.packages){const l=t.length===0||q(i.name,t),p=a?a.has(`${i.name}@${i.version}`):!0;if(l&&p)continue;const u=[],d={};l||(u.push(`not on allow-list (${t.length} entr${t.length===1?"y":"ies"})`),d.allowList=t),!p&&a&&(u.push(`not present in baseline lockfile (${r})`),d.baselineLockfile=r),o.push({acceptedRisk:f(i.name,i.version,c,"unexpectedDeps"),data:d,packageName:i.name,policy:"unexpectedDeps",reason:`${i.name}@${i.version} is unexpected: ${u.join("; ")}`,severity:"block",version:i.version})}return o},X=(s,e)=>{if(!s.osvFindings||s.osvFindings.size===0)return[];const t=e.security?.policies?.vulnerability?.failOn,r=e.security?.acceptedRisks,a=[];for(const c of s.packages){const o=s.osvFindings.get(c.name);if(!(!o||o.length===0))for(const i of o){const l=t?M(i.severity,t)?"block":"warn":"info";a.push({acceptedRisk:f(c.name,c.version,r,"vulnerability"),data:{advisoryId:i.id,aliases:i.aliases??[],cvssScore:i.cvssScore,fixedVersions:i.fixedVersions,severity:i.severity,summary:i.summary},packageName:c.name,policy:"vulnerability",reason:`${i.severity} ${i.id} affects ${c.name}@${c.version}: ${i.summary}`,severity:l,version:c.version})}}return a},N=[{evaluate:X,isConfigured:s=>s.security?.policies?.vulnerability!==void 0,name:"vulnerability",offlineSupported:!0,surfaces:["audit","doctor"]},{evaluate:j,isConfigured:s=>{const e=s.security?.policies?.license;return!!(e&&(e.allow&&e.allow.length>0||e.deny&&e.deny.length>0))},name:"license",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:U,isConfigured:s=>{const e=s.security?.policies?.installScripts;return!!(e&&(e.allow&&Object.keys(e.allow).length>0||e.strict===!0))},name:"installScripts",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:G,isConfigured:s=>{const e=s.security?.policies?.unexpectedDeps;return!!(e&&(e.allow&&e.allow.length>0||typeof e.baselineLockfile=="string"))},name:"unexpectedDeps",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:W,isConfigured:s=>{const e=s.security?.policies?.firstSeen?.minutes;return typeof e=="number"&&e>0},name:"firstSeen",offlineSupported:!1,surfaces:["audit","doctor","install"]},{evaluate:B,isConfigured:s=>s.security?.policies?.publisherChange?.mode==="no-downgrade",name:"publisherChange",offlineSupported:!1,surfaces:["audit","doctor","install"]}],J=(s,e,n)=>N.filter(t=>t.surfaces.includes(s)?n!==void 0?n.has(t.name):t.isConfigured(e):!1),le=async(s,e,n)=>{const t=J(e,n.visConfig,n.enabledPolicies),r=[];for(const a of t){if(s.offline&&!a.offlineSupported){r.push({packageName:"*",policy:a.name,reason:`policy.${a.name} skipped: requires network (--offline)`,severity:"info",version:"*"});continue}try{const c=await a.evaluate(s,n.visConfig);r.push(...c)}catch(c){const o=c instanceof Error?c.message:String(c);r.push({packageName:"*",policy:a.name,reason:`policy.${a.name} failed: ${o}`,severity:"info",version:"*"})}}return r},Q=(()=>{const s=new Map;for(const e of R)s.set(e.toLowerCase(),e);return s})(),ue=()=>N.map(s=>s.name),de=(s,e)=>{if(s===void 0)return;const n=s.trim().toLowerCase();if(n===""||n==="none")return new Set;if(n==="all")return new Set(R);const t=new Set;for(const r of s.split(",").map(a=>a.trim()).filter(a=>a.length>0)){const a=r.replace(/^_+/,"").replaceAll(/_+([a-z])/g,(o,i)=>i.toUpperCase()),c=Q.get(a.toLowerCase());c===void 0?e?.(r):t.add(c)}return t};export{ce as c,le as e,ue as g,de as p,M as s};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire as K}from"node:module";import{e as h}from"./path-CxEa27Rz-pjheKk6v.js";import{n as E,o as ot,C as S,d as st}from"./index-CVBR-Kit.js";import{p as rt}from"./formatBytes-BHAzNIrn-CLYsxlUj.js";import{N as it}from"./readJsonSync-CbryXYxN-BxKjDZnF.js";import{r as D}from"./writeFileSync-DJoHk3Ks-O9zOKqeM.js";import{withEnhancedPath as lt}from"@visulima/task-runner";let V;const U=t=>(V??=K(import.meta.url))(t),f=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=t=>{if(typeof f<"u"&&f.versions&&f.versions.node){const[e,o]=f.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return f.getBuiltinModule(t)}return U(t)},{Socket:z}=l("node:net"),{randomBytes:X}=l("node:crypto"),{readdir:Y,rm:b,unlink:$,open:J,readFile:Q,stat:Z,writeFile:tt,rename:et}=l("node:fs/promises"),{createRequire:M}=l("node:module"),{spawn:nt}=l("node:child_process"),{openSync:ct,closeSync:at}=l("node:fs");let ht;const dt=t=>(ht??=M(import.meta.url))(t),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ft=t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,o]=u.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return u.getBuiltinModule(t)}return dt(t)},{lstat:A,mkdir:ut}=ft("node:fs/promises"),pt=async t=>{E(t);try{const e=await A(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(D(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await ut(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const o=await A(t);if(!o.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(D(o))}'`,{cause:e})}};let wt;const yt=t=>(wt??=M(import.meta.url))(t),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kt=t=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[e,o]=p.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return p.getBuiltinModule(t)}return yt(t)},{access:mt}=kt("node:fs/promises");async function _t(t,e=ot){E(t),t=S(t);try{return await mt(t,e),!0}catch{return!1}}let gt;const vt=t=>(gt??=M(import.meta.url))(t),w=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,x=t=>{if(typeof w<"u"&&w.versions&&w.versions.node){const[e,o]=w.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return w.getBuiltinModule(t)}return vt(t)},{readFile:bt}=x("node:fs/promises"),{unzip:Tt,brotliDecompress:Et}=x("node:zlib"),St={brotli:Et,gzip:Tt,none:(t,e)=>{e(null,t)}},Mt=async(t,e)=>{E(t),t=S(t);const{buffer:o,compression:s,encoding:r,flag:i}=e??{};let n;try{n=await bt(t,i?{flag:i}:{})}catch(c){throw st(c,t)}return await new Promise((c,g)=>{St[s??"none"](n,(k,m)=>{k?g(k):c(o?m:m.toString(r??"utf8"))})})};async function C(t,e,o){const s=await Mt(t,{buffer:!0,encoding:void 0});let r=new TextDecoder().decode(s);const{beforeParse:i,color:n}={};return typeof i=="function"&&(r=i(r)),it(r,e,S(t),{color:n})}const Ht=3e4,N=100;class Rt extends Error{constructor(e,o){super(e),this.elapsedMs=o,this.name="ServiceReadinessError"}elapsedMs}const Pt=async t=>{const e=t.host??"127.0.0.1",{port:o}=t,s=t.timeoutMs??Ht,r=Date.now();for(;Date.now()-r<s;){if(await $t(e,o))return;await Dt(N)}throw new Rt(`Timed out waiting for ${e}:${String(o)} to accept TCP connections (${String(s)}ms)`,Date.now()-r)},$t=(t,e)=>new Promise(o=>{const s=new z,r=i=>{s.removeAllListeners(),s.destroy(),o(i)};s.once("connect",()=>{r(!0)}),s.once("error",()=>{r(!1)}),s.setTimeout(N,()=>{r(!1)});try{s.connect(e,t)}catch{r(!1)}}),Dt=t=>new Promise(e=>{setTimeout(e,t)}),At=async(t,e)=>{const o=t.readiness??(t.port===void 0?void 0:{tcp:{port:t.port}});o&&await Pt({host:o.tcp.host,port:o.tcp.port,timeoutMs:e?.timeoutMs??o.tcp.timeoutMs})},H=384,L=5e3,Lt=50,Ot=3e4,d=async t=>{const e=h(rt(t),"services");try{await pt(e)}catch(o){throw o.code==="ENOTDIR"?new Error(`Service registry path ${e} exists but is not a directory. Remove it or move the conflicting file before running \`vis service\`.`,{cause:o}):o}return e},R=t=>t.replaceAll("/","_").replaceAll(":","__"),P=(t,e)=>h(t,`${R(e)}.json`),It=(t,e)=>h(t,`${R(e)}.lock`),_=async(t,e)=>{const o=await d(t),s=P(o,e);if(await _t(s))try{return await C(s)}catch{return}},xt=async t=>{const e=await d(t);let o;try{o=await Y(e)}catch{return[]}const s=[];for(const r of o)if(r.endsWith(".json"))try{const i=await C(h(e,r));s.push(i)}catch{}return s},Ct=async(t,e)=>{const o=await d(t),s=P(o,e.id),r=h(o,`.${X(8).toString("hex")}.tmp`);await tt(r,`${JSON.stringify(e,void 0,2)}
|
|
2
|
-
`,{mode:H});try{await Wt(r,s)}catch(i){throw await b(r,{force:!0}).catch(()=>{}),i}},Nt=new Set(["EACCES","EBUSY","EPERM"]),Ft=8,jt=20,Wt=async(t,e)=>{let o=0;for(;;)try{await et(t,e);return}catch(s){const{code:r}=s;if(!(r!==void 0&&Nt.has(r))||o>=Ft)throw s;const n=jt*2**o;await new Promise(c=>{setTimeout(c,n)}),o+=1}},y=async(t,e,o)=>{const s=await d(t),r=o??await _(t,e);await b(P(s,e),{force:!0}),r&&await b(r.logFile,{force:!0}).catch(()=>{})},a=t=>{try{return process.kill(t,0),!0}catch{return!1}},re=async t=>{const e=await xt(t),o=[],s=[];for(const r of e){if(a(r.pid)){s.push(r);continue}const i=await _(t,r.id);if(i&&i.pid!==r.pid){s.push(i);continue}await y(t,r.id,r).catch(()=>{}),o.push(r.id)}return{pruned:o,surviving:s}},Bt=t=>new Promise(e=>{setTimeout(e,t)}),Gt=async t=>{try{const e=await J(t,"wx",H);try{await e.writeFile(String(process.pid))}finally{await e.close().catch(()=>{})}return!0}catch(e){if(e.code==="EEXIST")return!1;throw e}},qt=async t=>{let e;try{const o=await Q(t,"utf8"),s=Number.parseInt(o.trim(),10);e=Number.isFinite(s)?s:void 0}catch{return!0}if(e!==void 0&&!a(e))return!0;try{const o=await Z(t);return Date.now()-o.mtimeMs>Ot}catch{return!0}},F=async(t,e,o)=>{const s=await d(t),r=It(s,e),i=Date.now();for(;!await Gt(r);){if(await qt(r)){await $(r).catch(()=>{});continue}if(Date.now()-i>=L)throw new Error(`Could not acquire service lock for ${e} within ${String(L)}ms — another \`vis service\` invocation appears to be holding it.`);await Bt(Lt)}try{return await o()}finally{await $(r).catch(()=>{})}};function T(t,e={},o){for(const s in t){const r=t[s],i=o?`${o}:${s}`:s;typeof r=="object"&&r!==null?T(r,e,i):typeof r=="function"&&(e[i]=r)}return e}const j=(()=>{if(console.createTask)return console.createTask;const t={run:e=>e()};return()=>t})();function W(t,e,o,s){for(let r=o;r<t.length;r+=1)try{const i=s?s.run(()=>t[r](...e)):t[r](...e);if(i&&typeof i.then=="function")return Promise.resolve(i).then(()=>W(t,e,r+1,s))}catch(i){return Promise.reject(i)}}function Kt(t,e,o){if(t.length>0)return W(t,e,0,j(o))}function Vt(t,e,o){if(t.length>0){const s=j(o);return Promise.all(t.map(r=>s.run(()=>r(...e))))}}function v(t,e){for(const o of[...t])o(e)}var Ut=class{_hooks;_before;_after;_deprecatedHooks;_deprecatedMessages;constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,e,o={}){if(!t||typeof e!="function")return()=>{};const s=t;let r;for(;this._deprecatedHooks[t];)r=this._deprecatedHooks[t],t=r.to;if(r&&!o.allowDeprecated){let i=r.message;i||(i=`${s} hook has been deprecated`+(r.to?`, please use ${r.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!e.name)try{Object.defineProperty(e,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(e),()=>{e&&(this.removeHook(t,e),e=void 0)}}hookOnce(t,e){let o,s=(...r)=>(typeof o=="function"&&o(),o=void 0,s=void 0,e(...r));return o=this.hook(t,s),o}removeHook(t,e){const o=this._hooks[t];if(o){const s=o.indexOf(e);s!==-1&&o.splice(s,1),o.length===0&&(this._hooks[t]=void 0)}}clearHook(t){this._hooks[t]=void 0}deprecateHook(t,e){this._deprecatedHooks[t]=typeof e=="string"?{to:e}:e;const o=this._hooks[t]||[];this._hooks[t]=void 0;for(const s of o)this.hook(t,s)}deprecateHooks(t){for(const e in t)this.deprecateHook(e,t[e])}addHooks(t){const e=T(t),o=Object.keys(e).map(s=>this.hook(s,e[s]));return()=>{for(const s of o)s();o.length=0}}removeHooks(t){const e=T(t);for(const o in e)this.removeHook(o,e[o])}removeAllHooks(){this._hooks={}}callHook(t,...e){return this.callHookWith(Kt,t,e)}callHookParallel(t,...e){return this.callHookWith(Vt,t,e)}callHookWith(t,e,o){const s=this._before||this._after?{name:e,args:o,context:{}}:void 0;this._before&&v(this._before,s);const r=t(this._hooks[e]?[...this._hooks[e]]:[],o,e);return r instanceof Promise?r.finally(()=>{this._after&&s&&v(this._after,s)}):(this._after&&s&&v(this._after,s),r)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const e=this._before.indexOf(t);e!==-1&&this._before.splice(e,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const e=this._after.indexOf(t);e!==-1&&this._after.splice(e,1)}}}};function zt(){return new Ut}const ie=()=>zt(),ne=async(t,e)=>{if(!(!e||e.length===0))for(const o of e){if(o.hooks)for(const[s,r]of Object.entries(o.hooks)){const i=Array.isArray(r)?r:[r];for(const n of i)t.hook(s,n)}o.setup&&await o.setup(t)}};class ce{#o;#e;#s=new Map;constructor(e,o){this.#o=e,this.#e=o}startTasks(e){for(const o of e)this.#s.set(o.id,o),this.#t("task:before",o)}endTasks(e){for(const o of e)this.#s.delete(o.task.id),this.#t("task:after",o.task,o),o.status==="failure"?this.#t("task:failure",o.task,o):Xt(o.status)&&this.#t("task:cacheHit",o.task,o)}printCacheMiss(e,o){this.#t("task:cacheMiss",e,o)}onTaskStdout(e,o){this.#t("task:stdout",e,o)}onTaskStderr(e,o){this.#t("task:stderr",e,o)}#t(e,...o){Promise.resolve(this.#o.callHook(e,...o)).catch(s=>{if(this.#e)try{this.#e(e,s)}catch{}})}}const Xt=t=>t==="local-cache"||t==="local-cache-kept-existing"||t==="remote-cache",O=process.platform==="win32",Yt=async t=>{const{command:e,cwd:o,env:s,logFile:r}=t,i=ct(r,"a",H);let n;const c=O?"cmd":"/bin/sh",g=O?["/d","/s","/c",e]:["-c",e];try{n=nt(c,g,{cwd:o,detached:!0,env:lt({...process.env,...s},o),stdio:["ignore",i,i],windowsHide:!0})}finally{at(i)}if(n.pid===void 0&&await new Promise((k,m)=>{n.once("spawn",()=>{k()}),n.once("error",q=>{m(q)})}),n.pid===void 0)throw new Error(`Failed to spawn detached process for command: ${e}`);return n.unref(),{pid:n.pid}},B=5e3,ae=async t=>F(t.workspaceRoot,t.id,async()=>{const e=await _(t.workspaceRoot,t.id);if(e&&a(e.pid))throw new Error(`Service ${t.id} is already running (pid ${String(e.pid)})`);e&&await y(t.workspaceRoot,t.id,e);const o=await d(t.workspaceRoot),s=R(t.id),r=h(o,`${s}.log`),{pid:i}=await Yt({command:t.command,cwd:t.cwd,env:t.env,logFile:r}),n={command:t.command,config:t.config,cwd:t.cwd,env:t.config.env??{},id:t.id,logFile:r,pid:i,slug:s,startedAt:new Date().toISOString(),visVersion:process.env.VIS_VERSION??"0.0.0"};if(await Ct(t.workspaceRoot,n),t.skipReadiness!==!0)try{await At(t.config,{timeoutMs:t.readinessTimeoutMs})}catch(c){throw await G(i,t.config.killGracePeriodMs??B).catch(()=>{}),await y(t.workspaceRoot,t.id,n).catch(()=>{}),c}return{entry:n}}),le=async t=>F(t.workspaceRoot,t.id,async()=>{const e=await _(t.workspaceRoot,t.id);if(!e)return{stopped:!1};if(!a(e.pid))return await y(t.workspaceRoot,t.id,e),{stopped:!1};const o=t.graceMs??e.config.killGracePeriodMs??B;return await G(e.pid,o),await y(t.workspaceRoot,t.id,e),{stopped:!0}}),G=async(t,e)=>{I(t,"SIGTERM");const o=Date.now();for(;Date.now()-o<e;){if(!a(t))return;await new Promise(s=>{setTimeout(s,100)})}a(t)&&I(t,"SIGKILL")},I=(t,e)=>{try{process.platform==="win32"?process.kill(t,e):process.kill(-t,e)}catch(o){if(o.code==="ESRCH")return;throw o}};export{ce as H,Rt as S,ae as a,At as b,xt as c,ie as d,ne as e,y as f,_t as g,a as i,re as p,_ as r,le as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as p}from"node:module";import{e as a}from"./path-CxEa27Rz-pjheKk6v.js";let k;const _=e=>(k??=p(import.meta.url))(e),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[o,t]=i.versions.node.split(".").map(Number);if(o>22||o===22&&t>=3||o===20&&t>=16)return i.getBuiltinModule(e)}return _(e)},{statSync:u,existsSync:m,readFileSync:f}=y("node:fs"),h={aube:["aube-lock.yaml"],bun:["bun.lock","bun.lockb"],npm:["npm-shrinkwrap.json","package-lock.json"],pnpm:["pnpm-lock.yaml"],yarn:["yarn.lock"]},b={aube:["node_modules/.aube-state","node_modules/.modules.yaml"],bun:["node_modules/.bun-tag"],npm:["node_modules/.package-lock.json"],pnpm:["node_modules/.modules.yaml","node_modules/.pnpm/lock.yaml"],yarn:["node_modules/.yarn-integrity","node_modules/.yarn-state.yml",".yarn/install-state.gz"]},g={pnpm:"node_modules/.pnpm/lock.yaml"},M={ci:{aube:"aube ci",bun:"bun install --frozen-lockfile",npm:"npm ci",pnpm:"pnpm install --frozen-lockfile",yarn:"yarn install --immutable"},tty:{aube:"aube install",bun:"bun install",npm:"npm install",pnpm:"pnpm install",yarn:"yarn install"}},L=1e3,S=e=>{for(const[o,t]of Object.entries(h))for(const s of t)if(m(a(e,s)))return{lockfileFile:s,manager:o}},j=(e,o,t)=>{const s=g[t];if(!s)return;const n=a(e,s);if(!m(n))return;const r=a(e,o);try{return u(r).size!==u(n).size?!1:f(r).equals(f(n))}catch{return}},v=(e,o)=>{let t;for(const s of b[o]){const n=a(e,s);if(!m(n))continue;const{mtimeMs:r}=u(n);(!t||r>t.mtimeMs)&&(t={mtimeMs:r,path:s})}return t},C=(e,o={})=>{const t=S(e);if(!t)return{checked:!1};const{lockfileFile:s,manager:n}=t,r=u(a(e,s)).mtimeMs,l=v(e,n),d=M[o.inCi?"ci":"tty"][n],c={comparedBy:"mtime",installMarkerMtimeMs:l?.mtimeMs,lockfileMtimeMs:r,lockfilePath:s,marker:l?.path,packageManager:n};return l?j(e,s,n)===!0?{checked:!0,detail:{...c,comparedBy:"content"}}:r>l.mtimeMs+L?{checked:!0,detail:c,failure:"stale-install",message:`${s} is newer than node_modules (${l.path}) — run \`${d}\` to sync.`}:{checked:!0,detail:c}:{checked:!0,detail:c,failure:"missing-install",message:`lockfile detected but node_modules looks uninitialised — run \`${d}\` before \`vis run\`.`}},E=(e,o,t,s={})=>{if(s.skip)return{checked:!1,shouldContinue:!0};const n=C(e,{inCi:o});if(!n.failure)return{...n,shouldContinue:!0};const r=`preflight: ${n.message??"lockfile drift detected"}`;return o&&!s.ciAsWarning?{...n,formattedMessage:r,shouldContinue:!1}:(t.warn(r),{...n,formattedMessage:r,shouldContinue:!0})};export{S as d,E as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as j}from"node:module";import"./index-CVBR-Kit.js";import{e as d}from"./path-CxEa27Rz-pjheKk6v.js";import{y}from"./isAccessibleSync-DYKTrrvc-K2xhg6sV.js";import{p as P}from"./readJsonSync-CbryXYxN-BxKjDZnF.js";let M;const b=o=>(M??=j(import.meta.url))(o),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,N=o=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[e,t]=l.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return l.getBuiltinModule(o)}return b(o)},{readdirSync:g,lstatSync:S}=N("node:fs"),R=/^([^<(]+?)?(?:<([^>]+)>)?\s*(?:\(([^)]+)\))?\s*$/u,T=o=>{const e=o.match(R);if(!e)return;const t=e[1]?.trim(),n=e[2]?.trim(),r=e[3]?.trim();if(!(!t&&!n&&!r))return{email:n||void 0,name:t||void 0,url:r||void 0}},k=o=>{if(!Array.isArray(o)||o.length===0)return;const e=[];for(const t of o)if(typeof t=="string"){const n=T(t);n&&e.push(n)}else if(t&&typeof t=="object"){const n=t,r=typeof n.name=="string"?n.name:void 0,i=typeof n.email=="string"?n.email:void 0,u=typeof n.url=="string"?n.url:void 0;(r||i||u)&&e.push({email:i,name:r,url:u})}return e.length>0?e:void 0},w=o=>{const e=d(o,"node_modules");if(!y(e))return new Map;const t=new Map,n=new Set,r=(i,u="")=>{if(n.has(i))return;n.add(i);let h;try{h=g(i)}catch{return}for(const a of h){const c=d(i,a);let m;try{m=S(c)}catch{continue}if(m.isSymbolicLink())continue;if(a.startsWith("@")){m.isDirectory()&&r(c,`${a}/`);continue}if(a===".pnpm"&&u===""){let s;try{s=g(c)}catch{continue}for(const p of s){const f=d(c,p,"node_modules");y(f)&&r(f)}continue}if(a.startsWith(".")||!m.isDirectory())continue;const v=u+a,_=d(c,"package.json");try{if(!y(_))continue;const s=P(_);if(typeof s.version!="string")continue;const p=`${v}@${s.version}`;t.has(p)||t.set(p,{directory:c,license:s.license,licenses:Array.isArray(s.licenses)?s.licenses:void 0,maintainers:k(s.maintainers),name:v,scripts:s.scripts&&typeof s.scripts=="object"?s.scripts:void 0,version:s.version});const f=d(c,"node_modules");y(f)&&r(f)}catch{}}};return r(e),t};export{k as n,w as r};
|