uiport 0.0.0-bootstrap.0 → 0.1.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 +7 -0
- package/README.md +5 -7
- package/README.pt-BR.md +5 -5
- package/bin/cli.mjs +10 -0
- package/package.json +1 -1
- package/skills/uiport/SKILL.md +1 -1
- package/uiport.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes are documented here. Versions follow Semantic Versioning.
|
|
4
4
|
|
|
5
|
+
## [0.1.1] — 2026-10-01
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Avoid Playwright's misleading project-dependency warning when installing Chromium through `npx uiport`; report successful browser installation explicitly.
|
|
9
|
+
- Keep browser installation working when Node defaults to ES modules through `NODE_OPTIONS`.
|
|
10
|
+
- Clarify that the `npx` workflow works in an empty directory without `package.json` or `npm install`.
|
|
11
|
+
|
|
5
12
|
## [0.1.0] — 2026-09-30
|
|
6
13
|
|
|
7
14
|
### Added
|
package/README.md
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
> Bootstrap package for configuring UIport trusted publishing. This is not the official release. The official version will be 0.1.0, published through GitHub Actions with provenance.
|
|
2
|
-
|
|
3
1
|
# UIport ↗
|
|
4
2
|
|
|
5
3
|
**Bring a web section into your next project.**
|
|
@@ -24,13 +22,13 @@ UIport keeps original CSS conservatively, including rules outside the selected s
|
|
|
24
22
|
|
|
25
23
|
Requires **Node.js 22.14+**; Node 24 LTS recommended. Chromium is installed explicitly, or UIport can use your installed Chrome/Edge. Your existing browser sessions are not imported.
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
Run these commands in any directory, including an empty one. `npx` fetches UIport automatically; you do not need a `package.json` or `npm install` in that directory. `browser install` prepares Chromium in Playwright's shared browser cache.
|
|
28
26
|
|
|
29
27
|
```sh
|
|
30
|
-
npx uiport@0.1.
|
|
31
|
-
npx uiport@0.1.
|
|
32
|
-
npx uiport@0.1.
|
|
33
|
-
npx uiport@0.1.
|
|
28
|
+
npx uiport@0.1.1 browser install
|
|
29
|
+
npx uiport@0.1.1 capture --url "https://your-site.example" --selector "#hero" --out ./my-section
|
|
30
|
+
npx uiport@0.1.1 serve --dir ./my-section
|
|
31
|
+
npx uiport@0.1.1 validate --url "https://your-site.example" --selector "#hero" --dir ./my-section
|
|
34
32
|
```
|
|
35
33
|
|
|
36
34
|
Choose the selector using your browser's **Inspect element** tool. It must match exactly one container, such as `main`, `section` or a `div`. Use `body` to capture the whole visible page, or `html` to include original head scripts as well. This captures one page, not a multi-page crawl.
|
package/README.pt-BR.md
CHANGED
|
@@ -22,13 +22,13 @@ O CSS é preservado de forma conservadora, incluindo regras fora da seção esco
|
|
|
22
22
|
|
|
23
23
|
Requer **Node.js 22.14+**; recomendamos Node 24 LTS. O Chromium é instalado explicitamente, ou a ferramenta usa Chrome/Edge já disponível. Sessões pessoais do navegador não são importadas.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Execute os comandos em uma pasta de sua escolha, que pode estar vazia. O `npx` obtém o UIport automaticamente; não é necessário criar um `package.json` nem rodar `npm install` nessa pasta. `browser install` prepara o Chromium no cache compartilhado do Playwright.
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
|
-
npx uiport@0.1.
|
|
29
|
-
npx uiport@0.1.
|
|
30
|
-
npx uiport@0.1.
|
|
31
|
-
npx uiport@0.1.
|
|
28
|
+
npx uiport@0.1.1 browser install
|
|
29
|
+
npx uiport@0.1.1 capture --url "https://seu-site.example" --selector "#hero" --out ./minha-secao
|
|
30
|
+
npx uiport@0.1.1 serve --dir ./minha-secao
|
|
31
|
+
npx uiport@0.1.1 validate --url "https://seu-site.example" --selector "#hero" --dir ./minha-secao
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Para escolher o seletor, use **Inspecionar elemento** no navegador. Ele precisa encontrar exatamente um container, como `main`, `section` ou `div`. Use `body` para capturar a página visível completa ou `html` para incluir também scripts originais do head. Isso captura uma página, sem percorrer automaticamente outras URLs do site.
|
package/bin/cli.mjs
CHANGED
|
@@ -63,6 +63,12 @@ try {
|
|
|
63
63
|
const child = spawn(
|
|
64
64
|
process.execPath,
|
|
65
65
|
[
|
|
66
|
+
"--input-type=commonjs",
|
|
67
|
+
"--eval",
|
|
68
|
+
// This is UIport's bundled installer, not a bare npx Playwright
|
|
69
|
+
// invocation. Give the CLI our command name so its _npx path
|
|
70
|
+
// heuristic does not tell users to create a local npm project.
|
|
71
|
+
'const cli = process.argv[1]; process.argv[1] = "uiport"; require(cli);',
|
|
66
72
|
path.join(
|
|
67
73
|
path.dirname(require.resolve("playwright-core/package.json")),
|
|
68
74
|
"cli.js",
|
|
@@ -89,6 +95,10 @@ try {
|
|
|
89
95
|
status: code === 0 ? "complete" : "failed",
|
|
90
96
|
}),
|
|
91
97
|
);
|
|
98
|
+
else if (code === 0)
|
|
99
|
+
console.log(
|
|
100
|
+
"UIport: Chromium installation complete. Ready to capture.",
|
|
101
|
+
);
|
|
92
102
|
process.exitCode = Number(code);
|
|
93
103
|
} else {
|
|
94
104
|
const options = optionsFor(command, args);
|
package/package.json
CHANGED
package/skills/uiport/SKILL.md
CHANGED
|
@@ -8,7 +8,7 @@ description: Capture a rendered web section as editable HTML, original CSS and l
|
|
|
8
8
|
Use for a request to extract an existing web section into local files. Use pages the user owns or has permission to reuse. Do not redesign or invent replacement effects.
|
|
9
9
|
|
|
10
10
|
1. Inspect the requested URL and choose one CSS selector matching a section container, or body/html for a full page. Include wrappers/decorations that belong to it; html also includes original head scripts.
|
|
11
|
-
2. Use the installed CLI or source checkout.
|
|
11
|
+
2. Use the installed CLI or source checkout. `npx uiport@0.1.1` is the pinned form. When testing an unpublished version, use `node bin/cli.mjs` from its checkout.
|
|
12
12
|
3. If needed, install the matching browser with `uiport browser install`. No browser download is hidden inside capture.
|
|
13
13
|
4. Run `uiport capture --url "URL" --selector "SELECTOR" --out "NEW_DIRECTORY" --json`. The default locale is pt-BR. Match locale/color scheme/viewports to the requested source. Never overwrite an existing nonempty directory.
|
|
14
14
|
5. Read the result. Exit 0 means no known reported limitations, not universal fidelity. Exit 2 means a partial artifact exists; inspect every limitation. Exit 1 means failure. Stdout is JSON, progress is stderr.
|
package/uiport.md
CHANGED
|
@@ -90,7 +90,7 @@ node bin/cli.mjs capture --url "<URL>" --selector "<SELETOR>" --out "./extractio
|
|
|
90
90
|
|
|
91
91
|
Ajuste `--locale`, `--color-scheme` e `--viewports` conforme a origem e use os mesmos valores na validação. A captura não sobrescreve uma pasta existente com conteúdo. `UIPORT_BROWSER_PATH` permite escolher o executável do navegador; a instalação do Chromium é explícita.
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
Os mesmos subcomandos podem ser executados com `npx uiport@0.1.1` no lugar de `node bin/cli.mjs`. Ao testar uma versão ainda não publicada, use o checkout local. Consulte os [comandos e opções](README.pt-BR.md) ou execute `node bin/cli.mjs --help`.
|
|
94
94
|
|
|
95
95
|
Leia o diagnóstico antes de entregar:
|
|
96
96
|
|