Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ API Explorer preserves schema discovery, resource links, collection and action f

Visible product naming and package ownership use PastureStack. Historical API resource names, schema fields, enum values, response links, and compatibility CSS hooks remain unchanged where supplied by or coupled to the remote API.

Version `1.1.20` preserves the static archive layout, including `ui.min.js`,
Version `1.1.21` preserves the static archive layout, including `ui.min.js`,
`ui.min.css`, fonts, licenses and `version.json`, consumed by Server below
`/api-ui/`. Server pins its own reviewed component version; changing that pin
requires a coordinated embedded-server test.
Expand All @@ -22,3 +22,8 @@ compiler. Official CVE regressions, precompiled partials, escaped API text and
both locales are checked without changing remote field or error values.

Before release, validate read-only and mutating resources, actions, pagination, filters, authentication failures, HTML embedding, escaping, cross-origin behavior, and `en-US`/`zh-TW` selection against an isolated compatible server.

Request dialogs support narrow viewports down to 320 CSS pixels. Text, password,
reference, expanded text, map and array inputs remain inside their field. The
footer stays accessible when a long form scrolls. Resizing preserves request
preview, nullable controls, serialization and cancellation semantics.
31 changes: 11 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,16 @@ PastureStack is an independent community effort to preserve, audit, and moderniz

This maintained compatibility release is based on the latest reviewed upstream `master`, including current Node and dependency maintenance. Package metadata, visible branding, and repository links use PastureStack naming. Existing API schema fields and discovery behavior remain compatible.

The current release is [`v1.1.20`](https://github.com/PastureStack/api-explorer/releases/tag/v1.1.20),
built with the official Node.js `24.22.1`
security release. The browser dependency graph and embedded API contract
remain unchanged. CI verification uses Python `3.14.9`, the internal pip
`26.2.2+pasturestack.1` rebuild with patched urllib3 `2.8.0`, and certifi
`2026.10.19`. The frozen upstream-vendoring helper verifies all input and wheel
hashes and runs streaming/TLS regressions in an isolated CI environment.
This CI-only correction does not replace the existing release artifact.
The original CI archive has SHA-256
`c989ee12a518f6d9d2b23b1f17f48d781aacf6ec31fb65291dd7de9b1661badb`
and its public download reports signed producer `a586f0d` in `version.json`.
[Exact-producer validation](https://github.com/PastureStack/api-explorer/actions/runs/39949986302)
passed product/security tests, npm audit, two deterministic builds, SBOM, and
source/product scans with zero Critical/High findings in their scanned scope.
The explorer is supported only as a Server-embedded compatibility interface;
this repository does not publish a standalone CDN or npm package. Use the
[Server release documentation](https://github.com/PastureStack/server#readme)
for the current installation and its pinned component artifacts. Dependency
maintenance on `main` does not replace an existing immutable release.
The current public release is [`v1.1.20`](https://github.com/PastureStack/api-explorer/releases/tag/v1.1.20).
Version `1.1.21` is the responsive request-form candidate on this branch.
Inputs follow the available column width, narrow dialogs stack values below
their labels, and long forms scroll inside the dialog while actions remain
reachable. Password fields preserve their exact values and remain masked.

The explorer is supported as a Server-embedded compatibility interface. Use the
[Server installation documentation](https://github.com/PastureStack/server#readme)
for the released Server and its exact component pins. Source changes do not
replace an existing immutable release.

## Build locally

Expand All @@ -39,7 +30,7 @@ npm ci --no-audit --no-fund
npm run ci
```

The tracked npm lockfile is the executable dependency contract. The CI command runs security and product tests and compares two complete builds byte for byte. The build emits a deterministic `dist/1.1.20.tar.gz`: file order, modes, ownership, timestamps, and the gzip header are normalized from the source commit. Source maps are excluded from the embedded release artifact. The security release gate retains the tested archive, SBOM, scans and SHA256SUMS for publication without rebuilding.
The tracked npm lockfile is the executable dependency contract. The CI command runs security and product tests and compares two complete builds byte for byte. The build emits a deterministic `dist/1.1.21.tar.gz`: file order, modes, ownership, timestamps, and the gzip header are normalized from the source commit. Source maps are excluded from the embedded release artifact. The security release gate retains the tested archive, SBOM, scans and SHA256SUMS for publication without rebuilding.

Handlebars 4.7.10 supplies the official fixes for CVE-2026-106444,
CVE-2026-106445 and CVE-2026-106446. Templates and partials are compiled from
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pasturestack/api-explorer",
"version": "1.1.20",
"version": "1.1.21",
"private": true,
"description": "Embedded PastureStack explorer for compatible API services",
"author": "Original contributors and PastureStack maintainers",
Expand Down
2 changes: 1 addition & 1 deletion partials/field.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{/ifEqual}}

{{#ifInList type 'password,masked'}}
<input type="password" class="form-control" name="{{formFieldName}}" value="{{value}} placeholder="{{placeholder}}" />
<input type="password" class="form-control" name="{{formFieldName}}" value="{{value}}" placeholder="{{placeholder}}" />
{{/ifInList}}

{{#ifInList type 'number,int,float'}}
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for (const section of ['dependencies', 'optionalDependencies']) {
}
}
}
if (pkg.version !== '1.1.20') {
if (pkg.version !== '1.1.21') {
fail('PACKAGE_RELEASE_VERSION_UNEXPECTED', `actual=${pkg.version}`);
}
if (!pkg.engines || pkg.engines.node !== '24.22.3') {
Expand Down
6 changes: 4 additions & 2 deletions src/HTMLApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ HTMLApi.prototype.showModal = function(body,opt,cb)
var modalHtml = Handlebars.templates['modal.hbs'](opt);
var modal = $(modalHtml);
this._reqModal = modal;
$('.modal-dialog',modal).css('width',opt.width||'750px');
if ( opt.width ) {
$('.modal-dialog',modal).css('max-width',opt.width);
}
this.setModalActions(opt.actions);
modal.on('keydown', this.onKeys);
if ( cb )
Expand Down Expand Up @@ -1863,7 +1865,7 @@ HTMLApi.prototype.switchToTextarea = function(button)

var val = $input.val();

var $textarea = $('<textarea>', {name: $input.attr('name') }).addClass('expandedTextarea');
var $textarea = $('<textarea>', {name: $input.attr('name') }).addClass('form-control expandedTextarea');
$input.replaceWith($textarea);
$textarea.val(val);
$textarea.on('keydown', function(e) { if ( e.keyCode == 13 ) { e.stopPropagation(); return true; } });
Expand Down
125 changes: 107 additions & 18 deletions styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -224,32 +224,43 @@ text-align: left;

#request-input TD {
border: 1px solid #f8f8f8;
word-wrap: break-word;
overflow-wrap: anywhere;
padding: 8px;
vertical-align: top;
}

#request-input .field-name,
#request-input .field-type {
width: 24%;
}

#request-input .field-value {
width: 52%;
}

#request-input INPUT,
#request-input TEXTAREA {
display: inline-block;
}

#request-input INPUT[type="text"],
#request-input INPUT[type="number"],
#request-input INPUT[type="password"] {
width: 250px;
}

#request-input .dualValue INPUT[type="text"],
#request-input .dualValue INPUT[type="number"],
#request-input .dualValue INPUT[type="password"] {
width: 180px;
#request-input .form-control:not([type="checkbox"]),
#request-input .form-select {
box-sizing: border-box;
width: 100%;
max-width: 100%;
min-width: 0;
}

#request-input .dualValue INPUT.key {
width: 100px;
#request-input INPUT[type="checkbox"] {
width: auto;
padding: 0;
appearance: auto;
}

#request-input SELECT {
max-width: 250px;
#request-input .dualValue {
margin-bottom: 8px;
max-width: 100%;
min-width: 0;
}

#request-input LABEL {
Expand All @@ -262,13 +273,91 @@ text-align: left;
}

#request-input TEXTAREA {
width: 250px;
height: 100px;
resize: vertical;
vertical-align: top;
}

#request-input .dualValue TEXTAREA {
width: 150px;
.api-request-modal {
position: fixed;
}

.api-request-modal .modal-dialog {
width: calc(100% - 32px);
max-width: 900px;
margin: 24px auto;
}

.api-request-modal .modal-content {
max-height: calc(100vh - 48px);
}

.api-request-modal .modal-header,
.api-request-modal .modal-footer {
flex-shrink: 0;
}

.api-request-modal .modal-title {
min-width: 0;
overflow-wrap: anywhere;
}

.api-request-modal .btn-close {
flex-shrink: 0;
}

.api-request-modal .modal-body {
min-height: 0;
overflow-y: auto;
}

.api-request-modal #request-output {
overflow-wrap: anywhere;
min-width: 0;
}

@media (max-width: 575px) {
.api-request-modal .modal-dialog {
width: calc(100% - 16px);
margin: 8px auto;
}

.api-request-modal .modal-content {
max-height: calc(100vh - 16px);
}

.api-request-modal #request-input TABLE,
.api-request-modal #request-input TBODY {
display: block;
}

.api-request-modal #request-input TR {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
margin-bottom: 8px;
}

.api-request-modal #request-input TR:has(TH) {
display: none;
}

.api-request-modal #request-input TD {
width: auto;
min-width: 0;
}

.api-request-modal #request-input .field-name {
font-weight: bold;
}

.api-request-modal #request-input .field-type {
text-align: end;
}

.api-request-modal #request-input .field-value,
.api-request-modal #request-input TD[colspan] {
grid-column: 1 / -1;
}
}

#curl,
Expand Down
19 changes: 10 additions & 9 deletions templates/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
{{/if}}
<table class="fixed" width="100%">
<tr>
<th>{{t "fieldName"}}</th>
<th>{{t "type"}}</th>
<th width="50%">{{t "value"}}</th>
<th scope="col" class="field-name">{{t "fieldName"}}</th>
<th scope="col" class="field-type">{{t "type"}}</th>
<th scope="col" class="field-value">{{t "value"}}</th>
</tr>
{{#if typeField}}
{{#with typeField}}
<tr>
<td>
<td class="field-name">
{{#if required}}<span class="required">*</span>{{/if}}
{{name}}:
</td>
<td>
<td class="field-type">
<span class="inactive">{{t "schemaName"}}</span>
</td>
<td>
<td class="field-value">
{{>field.hbs}}
</td>
</tr>
Expand All @@ -28,17 +28,17 @@
{{#if hasFields}}
{{#each fields}}
<tr>
<td>
<td class="field-name">
{{#if required}}<span class="required">*</span>{{/if}}
{{name}}
{{#if description}}
<span class="tip" title="{{description}}"><i class="bi bi-info-circle"></i></span>
{{/if}}
</td>
<td>
<td class="field-type">
<span class="inactive">{{{displayType}}}</span>
</td>
<td>
<td class="field-value">
{{#if writable}}
{{>field.hbs}}
{{else}}
Expand All @@ -48,6 +48,7 @@
{{else}}
&ndash;
{{/if}}
</span>
{{/if}}
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion templates/modal.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="modal fade" tabindex="-1" role="dialog">
<div class="modal fade api-request-modal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
Expand Down
Loading