@coboot/headless 0.2.2-rc.1 → 0.2.2-rc.11
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/README.md +188 -31
- package/browser-runtime/playwright-core/LICENSE +202 -0
- package/browser-runtime/playwright-core/NOTICE +5 -0
- package/browser-runtime/playwright-core/README.md +3 -0
- package/browser-runtime/playwright-core/ThirdPartyNotices.txt +4076 -0
- package/browser-runtime/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/browser-runtime/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/browser-runtime/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/browser-runtime/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/browser-runtime/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/browser-runtime/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/browser-runtime/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/browser-runtime/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/browser-runtime/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/browser-runtime/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/browser-runtime/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/browser-runtime/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/browser-runtime/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/browser-runtime/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/browser-runtime/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/browser-runtime/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/browser-runtime/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/browser-runtime/playwright-core/browsers.json +79 -0
- package/browser-runtime/playwright-core/cli.js +18 -0
- package/browser-runtime/playwright-core/index.js +32 -0
- package/browser-runtime/playwright-core/index.mjs +28 -0
- package/browser-runtime/playwright-core/lib/androidServerImpl.js +65 -0
- package/browser-runtime/playwright-core/lib/browserServerImpl.js +120 -0
- package/browser-runtime/playwright-core/lib/cli/driver.js +97 -0
- package/browser-runtime/playwright-core/lib/cli/program.js +589 -0
- package/browser-runtime/playwright-core/lib/cli/programWithTestStub.js +74 -0
- package/browser-runtime/playwright-core/lib/client/android.js +361 -0
- package/browser-runtime/playwright-core/lib/client/api.js +137 -0
- package/browser-runtime/playwright-core/lib/client/artifact.js +79 -0
- package/browser-runtime/playwright-core/lib/client/browser.js +161 -0
- package/browser-runtime/playwright-core/lib/client/browserContext.js +582 -0
- package/browser-runtime/playwright-core/lib/client/browserType.js +185 -0
- package/browser-runtime/playwright-core/lib/client/cdpSession.js +51 -0
- package/browser-runtime/playwright-core/lib/client/channelOwner.js +194 -0
- package/browser-runtime/playwright-core/lib/client/clientHelper.js +64 -0
- package/browser-runtime/playwright-core/lib/client/clientInstrumentation.js +55 -0
- package/browser-runtime/playwright-core/lib/client/clientStackTrace.js +69 -0
- package/browser-runtime/playwright-core/lib/client/clock.js +68 -0
- package/browser-runtime/playwright-core/lib/client/connection.js +318 -0
- package/browser-runtime/playwright-core/lib/client/consoleMessage.js +58 -0
- package/browser-runtime/playwright-core/lib/client/coverage.js +44 -0
- package/browser-runtime/playwright-core/lib/client/dialog.js +56 -0
- package/browser-runtime/playwright-core/lib/client/download.js +62 -0
- package/browser-runtime/playwright-core/lib/client/electron.js +138 -0
- package/browser-runtime/playwright-core/lib/client/elementHandle.js +284 -0
- package/browser-runtime/playwright-core/lib/client/errors.js +77 -0
- package/browser-runtime/playwright-core/lib/client/eventEmitter.js +314 -0
- package/browser-runtime/playwright-core/lib/client/events.js +103 -0
- package/browser-runtime/playwright-core/lib/client/fetch.js +368 -0
- package/browser-runtime/playwright-core/lib/client/fileChooser.js +46 -0
- package/browser-runtime/playwright-core/lib/client/fileUtils.js +34 -0
- package/browser-runtime/playwright-core/lib/client/frame.js +409 -0
- package/browser-runtime/playwright-core/lib/client/harRouter.js +87 -0
- package/browser-runtime/playwright-core/lib/client/input.js +84 -0
- package/browser-runtime/playwright-core/lib/client/jsHandle.js +109 -0
- package/browser-runtime/playwright-core/lib/client/jsonPipe.js +39 -0
- package/browser-runtime/playwright-core/lib/client/localUtils.js +60 -0
- package/browser-runtime/playwright-core/lib/client/locator.js +369 -0
- package/browser-runtime/playwright-core/lib/client/network.js +747 -0
- package/browser-runtime/playwright-core/lib/client/page.js +745 -0
- package/browser-runtime/playwright-core/lib/client/pageAgent.js +64 -0
- package/browser-runtime/playwright-core/lib/client/platform.js +77 -0
- package/browser-runtime/playwright-core/lib/client/playwright.js +71 -0
- package/browser-runtime/playwright-core/lib/client/selectors.js +55 -0
- package/browser-runtime/playwright-core/lib/client/stream.js +39 -0
- package/browser-runtime/playwright-core/lib/client/timeoutSettings.js +79 -0
- package/browser-runtime/playwright-core/lib/client/tracing.js +119 -0
- package/browser-runtime/playwright-core/lib/client/types.js +28 -0
- package/browser-runtime/playwright-core/lib/client/video.js +59 -0
- package/browser-runtime/playwright-core/lib/client/waiter.js +142 -0
- package/browser-runtime/playwright-core/lib/client/webError.js +39 -0
- package/browser-runtime/playwright-core/lib/client/webSocket.js +93 -0
- package/browser-runtime/playwright-core/lib/client/worker.js +85 -0
- package/browser-runtime/playwright-core/lib/client/writableStream.js +39 -0
- package/browser-runtime/playwright-core/lib/generated/bindingsControllerSource.js +28 -0
- package/browser-runtime/playwright-core/lib/generated/clockSource.js +28 -0
- package/browser-runtime/playwright-core/lib/generated/injectedScriptSource.js +28 -0
- package/browser-runtime/playwright-core/lib/generated/pollingRecorderSource.js +28 -0
- package/browser-runtime/playwright-core/lib/generated/storageScriptSource.js +28 -0
- package/browser-runtime/playwright-core/lib/generated/utilityScriptSource.js +28 -0
- package/browser-runtime/playwright-core/lib/generated/webSocketMockSource.js +336 -0
- package/browser-runtime/playwright-core/lib/inProcessFactory.js +60 -0
- package/browser-runtime/playwright-core/lib/inprocess.js +3 -0
- package/browser-runtime/playwright-core/lib/mcpBundle.js +84 -0
- package/browser-runtime/playwright-core/lib/mcpBundleImpl/index.js +147 -0
- package/browser-runtime/playwright-core/lib/outofprocess.js +76 -0
- package/browser-runtime/playwright-core/lib/protocol/serializers.js +197 -0
- package/browser-runtime/playwright-core/lib/protocol/validator.js +2969 -0
- package/browser-runtime/playwright-core/lib/protocol/validatorPrimitives.js +193 -0
- package/browser-runtime/playwright-core/lib/remote/playwrightConnection.js +129 -0
- package/browser-runtime/playwright-core/lib/remote/playwrightServer.js +334 -0
- package/browser-runtime/playwright-core/lib/server/agent/actionRunner.js +335 -0
- package/browser-runtime/playwright-core/lib/server/agent/actions.js +128 -0
- package/browser-runtime/playwright-core/lib/server/agent/codegen.js +111 -0
- package/browser-runtime/playwright-core/lib/server/agent/context.js +150 -0
- package/browser-runtime/playwright-core/lib/server/agent/expectTools.js +156 -0
- package/browser-runtime/playwright-core/lib/server/agent/pageAgent.js +204 -0
- package/browser-runtime/playwright-core/lib/server/agent/performTools.js +262 -0
- package/browser-runtime/playwright-core/lib/server/agent/tool.js +109 -0
- package/browser-runtime/playwright-core/lib/server/android/android.js +465 -0
- package/browser-runtime/playwright-core/lib/server/android/backendAdb.js +177 -0
- package/browser-runtime/playwright-core/lib/server/artifact.js +127 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiBrowser.js +549 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiChromium.js +149 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiConnection.js +213 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiDeserializer.js +116 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiExecutionContext.js +267 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiFirefox.js +128 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiInput.js +146 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiNetworkManager.js +383 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiOverCdp.js +102 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiPage.js +583 -0
- package/browser-runtime/playwright-core/lib/server/bidi/bidiPdf.js +106 -0
- package/browser-runtime/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/browser-runtime/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
- package/browser-runtime/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +24 -0
- package/browser-runtime/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +180 -0
- package/browser-runtime/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/browser-runtime/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +148 -0
- package/browser-runtime/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +259 -0
- package/browser-runtime/playwright-core/lib/server/browser.js +149 -0
- package/browser-runtime/playwright-core/lib/server/browserContext.js +702 -0
- package/browser-runtime/playwright-core/lib/server/browserType.js +336 -0
- package/browser-runtime/playwright-core/lib/server/callLog.js +82 -0
- package/browser-runtime/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/browser-runtime/playwright-core/lib/server/chromium/chromium.js +397 -0
- package/browser-runtime/playwright-core/lib/server/chromium/chromiumSwitches.js +104 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crBrowser.js +520 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crConnection.js +197 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crCoverage.js +235 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crDevTools.js +111 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crDragDrop.js +131 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crExecutionContext.js +146 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crInput.js +187 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crNetworkManager.js +707 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crPage.js +1001 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crPdf.js +121 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crProtocolHelper.js +145 -0
- package/browser-runtime/playwright-core/lib/server/chromium/crServiceWorker.js +136 -0
- package/browser-runtime/playwright-core/lib/server/chromium/defaultFontFamilies.js +162 -0
- package/browser-runtime/playwright-core/lib/server/chromium/protocol.d.js +16 -0
- package/browser-runtime/playwright-core/lib/server/clock.js +149 -0
- package/browser-runtime/playwright-core/lib/server/codegen/csharp.js +327 -0
- package/browser-runtime/playwright-core/lib/server/codegen/java.js +274 -0
- package/browser-runtime/playwright-core/lib/server/codegen/javascript.js +247 -0
- package/browser-runtime/playwright-core/lib/server/codegen/jsonl.js +52 -0
- package/browser-runtime/playwright-core/lib/server/codegen/language.js +132 -0
- package/browser-runtime/playwright-core/lib/server/codegen/languages.js +68 -0
- package/browser-runtime/playwright-core/lib/server/codegen/python.js +279 -0
- package/browser-runtime/playwright-core/lib/server/codegen/types.js +16 -0
- package/browser-runtime/playwright-core/lib/server/console.js +57 -0
- package/browser-runtime/playwright-core/lib/server/cookieStore.js +206 -0
- package/browser-runtime/playwright-core/lib/server/debugController.js +191 -0
- package/browser-runtime/playwright-core/lib/server/debugger.js +119 -0
- package/browser-runtime/playwright-core/lib/server/deviceDescriptors.js +39 -0
- package/browser-runtime/playwright-core/lib/server/deviceDescriptorsSource.json +1779 -0
- package/browser-runtime/playwright-core/lib/server/dialog.js +116 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/androidDispatcher.js +325 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +384 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/browserDispatcher.js +118 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +64 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +44 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/dialogDispatcher.js +47 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/dispatcher.js +364 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/electronDispatcher.js +89 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/frameDispatcher.js +227 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +149 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/networkDispatchers.js +213 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/pageAgentDispatcher.js +96 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/pageDispatcher.js +393 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +108 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/streamDispatcher.js +67 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/tracingDispatcher.js +68 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +165 -0
- package/browser-runtime/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
- package/browser-runtime/playwright-core/lib/server/dom.js +815 -0
- package/browser-runtime/playwright-core/lib/server/download.js +70 -0
- package/browser-runtime/playwright-core/lib/server/electron/electron.js +273 -0
- package/browser-runtime/playwright-core/lib/server/electron/loader.js +29 -0
- package/browser-runtime/playwright-core/lib/server/errors.js +69 -0
- package/browser-runtime/playwright-core/lib/server/fetch.js +621 -0
- package/browser-runtime/playwright-core/lib/server/fileChooser.js +43 -0
- package/browser-runtime/playwright-core/lib/server/fileUploadUtils.js +84 -0
- package/browser-runtime/playwright-core/lib/server/firefox/ffBrowser.js +418 -0
- package/browser-runtime/playwright-core/lib/server/firefox/ffConnection.js +142 -0
- package/browser-runtime/playwright-core/lib/server/firefox/ffExecutionContext.js +150 -0
- package/browser-runtime/playwright-core/lib/server/firefox/ffInput.js +159 -0
- package/browser-runtime/playwright-core/lib/server/firefox/ffNetworkManager.js +256 -0
- package/browser-runtime/playwright-core/lib/server/firefox/ffPage.js +497 -0
- package/browser-runtime/playwright-core/lib/server/firefox/firefox.js +114 -0
- package/browser-runtime/playwright-core/lib/server/firefox/protocol.d.js +16 -0
- package/browser-runtime/playwright-core/lib/server/formData.js +147 -0
- package/browser-runtime/playwright-core/lib/server/frameSelectors.js +160 -0
- package/browser-runtime/playwright-core/lib/server/frames.js +1471 -0
- package/browser-runtime/playwright-core/lib/server/har/harRecorder.js +147 -0
- package/browser-runtime/playwright-core/lib/server/har/harTracer.js +607 -0
- package/browser-runtime/playwright-core/lib/server/harBackend.js +157 -0
- package/browser-runtime/playwright-core/lib/server/helper.js +96 -0
- package/browser-runtime/playwright-core/lib/server/index.js +58 -0
- package/browser-runtime/playwright-core/lib/server/input.js +277 -0
- package/browser-runtime/playwright-core/lib/server/instrumentation.js +72 -0
- package/browser-runtime/playwright-core/lib/server/javascript.js +291 -0
- package/browser-runtime/playwright-core/lib/server/launchApp.js +128 -0
- package/browser-runtime/playwright-core/lib/server/localUtils.js +214 -0
- package/browser-runtime/playwright-core/lib/server/macEditingCommands.js +143 -0
- package/browser-runtime/playwright-core/lib/server/network.js +667 -0
- package/browser-runtime/playwright-core/lib/server/page.js +830 -0
- package/browser-runtime/playwright-core/lib/server/pipeTransport.js +89 -0
- package/browser-runtime/playwright-core/lib/server/playwright.js +69 -0
- package/browser-runtime/playwright-core/lib/server/progress.js +132 -0
- package/browser-runtime/playwright-core/lib/server/protocolError.js +52 -0
- package/browser-runtime/playwright-core/lib/server/recorder/chat.js +161 -0
- package/browser-runtime/playwright-core/lib/server/recorder/recorderApp.js +366 -0
- package/browser-runtime/playwright-core/lib/server/recorder/recorderRunner.js +138 -0
- package/browser-runtime/playwright-core/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/browser-runtime/playwright-core/lib/server/recorder/recorderUtils.js +157 -0
- package/browser-runtime/playwright-core/lib/server/recorder/throttledFile.js +57 -0
- package/browser-runtime/playwright-core/lib/server/recorder.js +499 -0
- package/browser-runtime/playwright-core/lib/server/registry/browserFetcher.js +177 -0
- package/browser-runtime/playwright-core/lib/server/registry/dependencies.js +371 -0
- package/browser-runtime/playwright-core/lib/server/registry/index.js +1422 -0
- package/browser-runtime/playwright-core/lib/server/registry/nativeDeps.js +1280 -0
- package/browser-runtime/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +127 -0
- package/browser-runtime/playwright-core/lib/server/screencast.js +190 -0
- package/browser-runtime/playwright-core/lib/server/screenshotter.js +333 -0
- package/browser-runtime/playwright-core/lib/server/selectors.js +112 -0
- package/browser-runtime/playwright-core/lib/server/socksClientCertificatesInterceptor.js +383 -0
- package/browser-runtime/playwright-core/lib/server/socksInterceptor.js +95 -0
- package/browser-runtime/playwright-core/lib/server/trace/recorder/snapshotter.js +147 -0
- package/browser-runtime/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +561 -0
- package/browser-runtime/playwright-core/lib/server/trace/recorder/tracing.js +604 -0
- package/browser-runtime/playwright-core/lib/server/trace/viewer/traceParser.js +72 -0
- package/browser-runtime/playwright-core/lib/server/trace/viewer/traceViewer.js +245 -0
- package/browser-runtime/playwright-core/lib/server/transport.js +181 -0
- package/browser-runtime/playwright-core/lib/server/types.js +28 -0
- package/browser-runtime/playwright-core/lib/server/usKeyboardLayout.js +145 -0
- package/browser-runtime/playwright-core/lib/server/utils/ascii.js +44 -0
- package/browser-runtime/playwright-core/lib/server/utils/comparators.js +139 -0
- package/browser-runtime/playwright-core/lib/server/utils/crypto.js +216 -0
- package/browser-runtime/playwright-core/lib/server/utils/debug.js +42 -0
- package/browser-runtime/playwright-core/lib/server/utils/debugLogger.js +122 -0
- package/browser-runtime/playwright-core/lib/server/utils/env.js +73 -0
- package/browser-runtime/playwright-core/lib/server/utils/eventsHelper.js +39 -0
- package/browser-runtime/playwright-core/lib/server/utils/expectUtils.js +123 -0
- package/browser-runtime/playwright-core/lib/server/utils/fileUtils.js +191 -0
- package/browser-runtime/playwright-core/lib/server/utils/happyEyeballs.js +207 -0
- package/browser-runtime/playwright-core/lib/server/utils/hostPlatform.js +138 -0
- package/browser-runtime/playwright-core/lib/server/utils/httpServer.js +203 -0
- package/browser-runtime/playwright-core/lib/server/utils/imageUtils.js +141 -0
- package/browser-runtime/playwright-core/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/browser-runtime/playwright-core/lib/server/utils/image_tools/compare.js +109 -0
- package/browser-runtime/playwright-core/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/browser-runtime/playwright-core/lib/server/utils/image_tools/stats.js +102 -0
- package/browser-runtime/playwright-core/lib/server/utils/linuxUtils.js +71 -0
- package/browser-runtime/playwright-core/lib/server/utils/network.js +242 -0
- package/browser-runtime/playwright-core/lib/server/utils/nodePlatform.js +154 -0
- package/browser-runtime/playwright-core/lib/server/utils/pipeTransport.js +84 -0
- package/browser-runtime/playwright-core/lib/server/utils/processLauncher.js +241 -0
- package/browser-runtime/playwright-core/lib/server/utils/profiler.js +65 -0
- package/browser-runtime/playwright-core/lib/server/utils/socksProxy.js +511 -0
- package/browser-runtime/playwright-core/lib/server/utils/spawnAsync.js +41 -0
- package/browser-runtime/playwright-core/lib/server/utils/task.js +51 -0
- package/browser-runtime/playwright-core/lib/server/utils/userAgent.js +98 -0
- package/browser-runtime/playwright-core/lib/server/utils/wsServer.js +121 -0
- package/browser-runtime/playwright-core/lib/server/utils/zipFile.js +74 -0
- package/browser-runtime/playwright-core/lib/server/utils/zones.js +57 -0
- package/browser-runtime/playwright-core/lib/server/videoRecorder.js +124 -0
- package/browser-runtime/playwright-core/lib/server/webkit/protocol.d.js +16 -0
- package/browser-runtime/playwright-core/lib/server/webkit/webkit.js +108 -0
- package/browser-runtime/playwright-core/lib/server/webkit/wkBrowser.js +335 -0
- package/browser-runtime/playwright-core/lib/server/webkit/wkConnection.js +144 -0
- package/browser-runtime/playwright-core/lib/server/webkit/wkExecutionContext.js +154 -0
- package/browser-runtime/playwright-core/lib/server/webkit/wkInput.js +181 -0
- package/browser-runtime/playwright-core/lib/server/webkit/wkInterceptableRequest.js +197 -0
- package/browser-runtime/playwright-core/lib/server/webkit/wkPage.js +1159 -0
- package/browser-runtime/playwright-core/lib/server/webkit/wkProvisionalPage.js +83 -0
- package/browser-runtime/playwright-core/lib/server/webkit/wkWorkers.js +105 -0
- package/browser-runtime/playwright-core/lib/third_party/pixelmatch.js +255 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +455 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/assert.js +31 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/colors.js +72 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/cssParser.js +245 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/cssTokenizer.js +1051 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/headers.js +53 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/locatorGenerators.js +689 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/locatorParser.js +176 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/locatorUtils.js +81 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/lruCache.js +51 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/manualPromise.js +114 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/mimeType.js +459 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/multimap.js +80 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/protocolFormatter.js +81 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +330 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/rtti.js +43 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/selectorParser.js +386 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/semaphore.js +54 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/stackTrace.js +158 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/stringUtils.js +204 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/time.js +49 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/timeoutRunner.js +66 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/entries.js +16 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/snapshotRenderer.js +499 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/snapshotServer.js +120 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/snapshotStorage.js +89 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/traceLoader.js +131 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/traceModel.js +365 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/traceModernizer.js +400 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/versions/traceV3.js +16 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/versions/traceV4.js +16 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/versions/traceV5.js +16 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/versions/traceV6.js +16 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/versions/traceV7.js +16 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/trace/versions/traceV8.js +16 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/traceUtils.js +58 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/types.js +16 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/urlMatch.js +190 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
- package/browser-runtime/playwright-core/lib/utils/isomorphic/yaml.js +84 -0
- package/browser-runtime/playwright-core/lib/utils.js +111 -0
- package/browser-runtime/playwright-core/lib/utilsBundle.js +109 -0
- package/browser-runtime/playwright-core/lib/utilsBundleImpl/index.js +218 -0
- package/browser-runtime/playwright-core/lib/utilsBundleImpl/xdg-open +1066 -0
- package/browser-runtime/playwright-core/lib/zipBundle.js +34 -0
- package/browser-runtime/playwright-core/lib/zipBundleImpl.js +5 -0
- package/browser-runtime/playwright-core/node_modules/.bin/playwright-core +21 -0
- package/browser-runtime/playwright-core/package.json +43 -0
- package/cli.mjs +33 -4
- package/daemon.mjs +21 -2
- package/entry.mjs +655 -354
- package/launcher.mjs +22 -0
- package/package.json +7 -6
- package/updater.mjs +6 -0
package/README.md
CHANGED
|
@@ -1,30 +1,165 @@
|
|
|
1
1
|
# Coboot Headless
|
|
2
2
|
|
|
3
|
-
Node.js
|
|
3
|
+
Node.js 18+ 的无 GUI 后台运行包。本包不携带浏览器二进制,也不会自动下载浏览器。
|
|
4
|
+
Headless 业务运行时要求 Node.js 20+;当入口检测到 Node.js 18/19 时,会通过 `npx` 临时下载并使用
|
|
5
|
+
隔离的 Node.js 22 LTS,不修改系统 Node.js。Node.js 20+ 环境直接使用当前 Node,不产生额外下载。
|
|
6
|
+
首次启动只需一次性设备 token:
|
|
4
7
|
|
|
5
8
|
```bash
|
|
6
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
9
|
+
npx -y @coboot/headless@0.2.2-rc.11 '<device-token>'
|
|
7
10
|
```
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
Siboot 和 Coboot 都继承入口进程的运行身份:入口是 root 就以 root 运行,入口是普通用户就以该用户运行。
|
|
13
|
+
不会根据 `ANY_USERNAME`、`COBOOT_RUN_UID`、`HEADLESS_RUN_AS_USER` 或 sudo 来源自动切换身份、
|
|
14
|
+
改写 HOME、复制到普通用户缓存或移交数据目录属主。
|
|
15
|
+
后续 start/restart/update/status/stop 应保持相同运行用户和 XDG/HOME;切换账号不会自动
|
|
16
|
+
查找另一用户的安装或凭据。
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
新用户默认数据目录为 `${XDG_DATA_HOME:-$HOME/.local/share}/coboot-headless`,由当前普通用户创建,无需 sudo,不要求机器存在 `/data`。
|
|
21
|
+
以 root 启动时仍以 root 创建和使用数据目录,默认使用该入口的 XDG/HOME(通常为
|
|
22
|
+
`/root/.local/share/coboot-headless`);不查找登录用户、不自动 chown 已有目录。
|
|
23
|
+
需要普通用户运行时,应先切换到该用户再执行命令,不要使用 `sudo npx`。
|
|
24
|
+
日常安装、设备注册、启动、管理和更新都不需要 sudo;Node LTS 引导、包内 Linux sandbox 和
|
|
25
|
+
浏览器下载使用用户可写目录,不安装全局 npm 包、不修改系统配置。
|
|
26
|
+
普通命令与 sudo 命令不要混用:sudo 保持 root,HOME/XDG 由 sudo 的环境策略决定,可能操作
|
|
27
|
+
另一份安装或留下 root 属主的文件。只有补浏览器系统动态库等管理员操作时才考虑 sudo。
|
|
28
|
+
凭证、程序版本和日志位于数据根下的 `.coboot/`;不检测、迁移或兼容旧目录。
|
|
29
|
+
目录不可写时明确失败;请指定可写的应用数据目录,不要将项目目录用作应用数据目录。
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
命令会把运行时安装到 `${XDG_DATA_HOME:-$HOME/.local/share}/coboot-headless` 下的私有运行目录,在客户端鉴权和运行时初始化完成后启动
|
|
33
|
+
detached daemon 并退出。不需要设置 `BACKEND_URL`、`CLIENT_UID`。终端、文件等非浏览器能力不要求
|
|
34
|
+
目标机安装 Chromium。
|
|
35
|
+
|
|
36
|
+
同一数据目录已经运行 Headless 时,再次执行上述命令并传入新 token,会先停止旧 daemon 和 client,
|
|
37
|
+
再事务式切换到新设备身份。新凭证和新 client 都就绪后才删除旧凭证;注册或启动失败时会恢复旧凭证
|
|
38
|
+
并重新启动旧 client,不会让两个 Headless 进程争抢同一台物理机的 Driver 锁。
|
|
39
|
+
|
|
40
|
+
同一条命令成功后可以再次执行:安装器记录 token 的 SHA-256 指纹,并绑定本次注册生成的设备身份,
|
|
41
|
+
不会重复消费同一个一次性 token;仍会安装本次传入的包并重启,包含同版本重新构建的新代码。
|
|
42
|
+
传入不同 token 会替换旧身份;旧 token 不能切回已被替换的身份。指纹记录不包含 token 明文,
|
|
43
|
+
与凭证一起备份和回滚。此机制不改变服务端的一次性注册约束。
|
|
44
|
+
旧版安装没有该记录,无法仅凭现有凭证判断当时使用的 token;首次使用此修复替换身份时应生成新 token。
|
|
45
|
+
普通 `update`、`start`、`restart` 继续使用现有身份,无需 token。
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx -y @coboot/headless@0.2.2-rc.11 status
|
|
49
|
+
npx -y @coboot/headless@0.2.2-rc.11 logs
|
|
50
|
+
npx -y @coboot/headless@0.2.2-rc.11 restart
|
|
51
|
+
npx -y @coboot/headless@0.2.2-rc.11 stop
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
更新到 npm `latest` 并重启:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx -y @coboot/headless@latest update
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`update` 会先完成 Node.js 版本、设备凭证和新包完整性预检,再停止旧进程并切换版本;新版本启动失败时
|
|
61
|
+
会自动恢复并重启旧版本。`restart` 只重启已经安装的版本,不再隐式替换运行时。
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
页面下发更新时,端侧 updater 使用显式包名和可执行文件调用:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx -y --package=@coboot/headless@<target-version> coboot-headless update
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
这样不会把 Node.js 18/19 引导遗留的 `npm_config_package=node@22` 当成更新包,避免出现
|
|
71
|
+
`sh: @coboot/headless@<version>: No such file or directory`(退出码 127)。更新失败且仍在旧版本时,
|
|
72
|
+
只有本次调用日志明确记录 `runtime_replace phase=rolled_back` 才上报已回滚;安装前失败上报失败,
|
|
73
|
+
当天历史日志中的回滚记录不作为本次回滚证据。
|
|
74
|
+
|
|
75
|
+
该修复需要重新发布 npm 包;仅合入源码不会修复已安装的 updater。旧版本应先使用上面的显式命令
|
|
76
|
+
安装包含修复的新版本,再验收后续页面更新。测试环境继续传入匹配的 endpoint 覆盖变量,
|
|
77
|
+
并保持同一运行账号、数据根和工作目录。验收时核对 `.coboot/current/manifest.json` 的版本、
|
|
78
|
+
`run/status.json` 的 `client_ready` 与 `client_version`,以及 `run/runtime-update-state.json`
|
|
79
|
+
的 `phase` 和 `actual_version`;日志位于 `.coboot/logs/update/`。
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
一般不需要修改数据目录。确需放到其他位置时,用 `COBOOT_DATA_ROOT` 指定一个当前用户可写的绝对路径。
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
Coboot 将安装位置写入用户默认应用目录的 `installation.json`(不含凭据),后续 `status`、`logs`、
|
|
87
|
+
`start`、`restart`、`update`、`stop` 无需重复传变量。
|
|
88
|
+
首次安装指定 `COBOOT_DATA_ROOT=/自定义应用目录` 即可保存该位置。
|
|
89
|
+
记录损坏时需要先修复记录;已经登记的安装不允许用一个参数静默切换到另一数据根。
|
|
90
|
+
停止和查看状态不写记录,项目目录已删除时仍可停止进程。
|
|
91
|
+
|
|
92
|
+
Agent 默认工作目录可在首次绑定或重启时单独指定,必须是已存在的绝对目录:
|
|
11
93
|
|
|
12
94
|
```bash
|
|
13
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
14
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
15
|
-
npx -y @coboot/headless@0.2.2-rc.1 restart
|
|
16
|
-
npx -y @coboot/headless@0.2.2-rc.1 stop
|
|
95
|
+
npx -y @coboot/headless@0.2.2-rc.11 '<device-token>' --workspace-dir /home/demo/project
|
|
96
|
+
npx -y @coboot/headless@0.2.2-rc.11 restart --workspace-dir /home/demo/another-project
|
|
17
97
|
```
|
|
18
98
|
|
|
19
|
-
|
|
99
|
+
该设置会保存;任务明确选中的本机目录优先于安装默认值。Bash cwd 和相对文件路径使用同一默认值,
|
|
100
|
+
仍受既有文件权限与沙箱策略限制。凭据、日志和后台进程 cwd 留在应用目录,不写入项目。
|
|
101
|
+
显式 `$COBOOT_WORKSPACE` 和托管会话产物目录仍使用原有布局,不被此参数重定位。
|
|
102
|
+
项目不可访问时启动/更新预检失败,不先停止正在运行的实例。`status` 可查看数据根和默认工作目录。
|
|
103
|
+
|
|
20
104
|
|
|
21
|
-
|
|
105
|
+
|
|
106
|
+
## Coboot 浏览器
|
|
107
|
+
|
|
108
|
+
Coboot daemon 默认禁用 updater 和浏览器预热,第一次调用 `browser_*` 时才解析系统浏览器。
|
|
109
|
+
没有可用浏览器时,浏览器工具会提醒 Agent 让用户手工安装;daemon、设备注册以及终端、文件等
|
|
110
|
+
非浏览器能力继续正常工作。浏览器不在常见系统路径时,应在启动或重启 daemon 时显式指定:
|
|
22
111
|
|
|
23
112
|
```bash
|
|
24
|
-
|
|
113
|
+
HEADLESS_BROWSER_EXECUTABLE=/absolute/path/to/chrome \
|
|
114
|
+
npx -y @coboot/headless@0.2.2-rc.11 '<device-token>'
|
|
25
115
|
```
|
|
26
116
|
|
|
27
|
-
|
|
117
|
+
需要安装浏览器时,由用户执行:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npx -y @coboot/headless@0.2.2-rc.11 install-browser
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
该命令不需要设备 token,也不要求 root。它会先检查现有浏览器并执行启动验证;浏览器已经可用时
|
|
124
|
+
不做任何安装。需要安装时:
|
|
125
|
+
|
|
126
|
+
- **root**:先用系统包管理器把 Chromium 或 Chrome 及其系统依赖装到标准路径,对该机器上所有用户
|
|
127
|
+
生效。镜像没有可用包管理器、源里没有 Chromium 或机器离线时,自动回退到下面的下载安装。
|
|
128
|
+
- **非 root**:直接下载安装,不需要 sudo。
|
|
129
|
+
|
|
130
|
+
下载安装用包内 `playwright-core` 把 Chromium 取到 `${XDG_DATA_HOME:-$HOME/.local/share}/coboot-headless` 下的私有浏览器目录,需要访问
|
|
131
|
+
`cdn.playwright.dev`。浏览器缓存不直接使用 `~/.cache`,同一安装的 daemon 会指向同一个路径,
|
|
132
|
+
无需另设环境变量;不同账号不会自动共享安装记录或凭据。用 `PLAYWRIGHT_BROWSERS_PATH` 可以改写该路径,
|
|
133
|
+
但改写后启动或重启 daemon 必须带上同一个值。
|
|
134
|
+
|
|
135
|
+
两条路径最后都会用包内 `playwright-core` 按 daemon 的真实启动参数做一次启动检查,因此可以安全
|
|
136
|
+
重复执行。如果检查报告缺少系统动态库(`libnss3.so`、`libgbm.so.1` 等),补齐系统依赖必须有 root
|
|
137
|
+
权限,此时才需要用 `sudo` 重新执行同一条命令。
|
|
138
|
+
|
|
139
|
+
如果执行时 daemon 正以另一个账号运行,命令会打印告警:下载目录归当前用户所有,daemon 可能无权
|
|
140
|
+
读取。此时改用 daemon 所属账号重跑,或用 root 执行让浏览器落到系统路径。
|
|
141
|
+
|
|
142
|
+
标准路径安装完成后可直接重试 `browser_*`,无需重启 daemon。如果通过
|
|
143
|
+
`HEADLESS_BROWSER_EXECUTABLE` 指定非标准路径,则必须带该环境变量启动或重启 daemon。运行时会把
|
|
144
|
+
浏览器缺失、可执行文件不存在以及各类系统动态库缺失转换为要求 Agent 提醒用户手工执行安装命令的
|
|
145
|
+
指引,不允许 Agent 自动修改系统软件包。
|
|
146
|
+
|
|
147
|
+
包名在各发行版并不统一,因此 root 路径按顺序尝试多个候选,任一成功即停止:Debian/Ubuntu 依次
|
|
148
|
+
尝试 `chromium`、`chromium-browser`,x86_64 最后回退到 Google 官方 `google-chrome-stable`
|
|
149
|
+
deb(Ubuntu 归档没有 `chromium` deb,只有指向 snap 的 `chromium-browser`,容器内不可用);
|
|
150
|
+
dnf/yum 先试仓库中的 `chromium`,x86_64 回退到官方 RPM 并关闭 weak dependencies;Alpine 使用
|
|
151
|
+
仓库中的 `chromium`,必要时补 community 源。`apt-get update` 失败不会中断安装,本地 deb 回退
|
|
152
|
+
仍会执行。目标网络需要能够访问对应发行版仓库或 `dl.google.com`。
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
自动化或排障需要显式表达重新注册时,也可以使用:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
npx -y @coboot/headless@0.2.2-rc.11 --force-enroll '<device-token>'
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
该命令始终尝试重新注册,必须使用未消费的新 token;普通 positional token 安装会识别已经成功的同 token 重试。
|
|
162
|
+
|
|
28
163
|
|
|
29
164
|
## Linux 沙箱
|
|
30
165
|
|
|
@@ -33,21 +168,22 @@ bubblewrap、musl loader 和 libcap,不要求目标机器额外安装 `bwrap`
|
|
|
33
168
|
包内运行时,失败后再探测系统 `$PATH` 中的 `bwrap`;两者都不可用或内核禁止 user/mount
|
|
34
169
|
namespace 时,会记录原因并按兼容策略使用普通 Node 进程。
|
|
35
170
|
|
|
36
|
-
日志中的 `source=bundled` 表示已经选择包内运行时。Linux Headless
|
|
37
|
-
`COBOOT_WORKSPACE/.home` 作为
|
|
38
|
-
|
|
171
|
+
日志中的 `source=bundled` 表示已经选择包内运行时。Coboot Linux Headless 仅在当前命令已经解析出
|
|
172
|
+
session 级 `COBOOT_WORKSPACE` 时,将 `COBOOT_WORKSPACE/.home` 作为 Bash 的 `HOME`;如果没有
|
|
173
|
+
session workspace,则删除继承的 `HOME`。两种情况都会清理 `BASH_ENV` / `ENV`,不会读取宿主
|
|
174
|
+
账号的 shell 启动脚本。
|
|
39
175
|
|
|
40
|
-
Coboot Linux Headless 会把整个 `
|
|
41
|
-
|
|
176
|
+
Coboot Linux Headless 会把整个 `COBOOT_DATA_ROOT`(默认 `${XDG_DATA_HOME:-$HOME/.local/share}/coboot-headless`)作为可写根,其中
|
|
177
|
+
私有运行目录仍由 hard deny 遮蔽。这同时允许访问同机其他 team/agent/session 的数据,
|
|
42
178
|
只适用于部署侧接受该权限边界的独占目标机;结构化文件工具仍继续执行自身的 ACL。
|
|
43
179
|
|
|
180
|
+
|
|
44
181
|
## 运行环境
|
|
45
182
|
|
|
46
183
|
- Edition:`coboot`,在构建期写入,启动时不能切换。
|
|
47
184
|
- 默认 HTTP 服务:`https://www.coboot.com`。
|
|
48
185
|
- 默认 WebSocket 服务:`wss://www.coboot.com/wsschat`。
|
|
49
|
-
-
|
|
50
|
-
- 包不携带浏览器、Chromium、`playwright-core` 或 updater,不能用于浏览器工具。
|
|
186
|
+
- 默认数据根目录:`${XDG_DATA_HOME:-$HOME/.local/share}/coboot-headless`。
|
|
51
187
|
|
|
52
188
|
npm CLI 默认清理父进程遗留的 endpoint 环境变量。仅本地联调或自建环境可显式开启覆盖,且
|
|
53
189
|
HTTP 与 WebSocket 必须同域并与设备 token 匹配:
|
|
@@ -56,10 +192,11 @@ HTTP 与 WebSocket 必须同域并与设备 token 匹配:
|
|
|
56
192
|
HEADLESS_ALLOW_ENDPOINT_OVERRIDE=1 \
|
|
57
193
|
BACKEND_URL=https://example.com \
|
|
58
194
|
WS_URL=wss://example.com/wsschat \
|
|
59
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
195
|
+
npx -y @coboot/headless@0.2.2-rc.11 '<device-token>'
|
|
60
196
|
```
|
|
61
197
|
|
|
62
198
|
WebSocket 覆盖变量名是 `WS_URL`,不是 `WSS_URL`。
|
|
199
|
+
endpoint 覆盖同样不会写入配置;后续执行 `restart` 时必须再次传入完整的覆盖变量。
|
|
63
200
|
|
|
64
201
|
## 维护者构建与发布
|
|
65
202
|
|
|
@@ -69,26 +206,46 @@ WebSocket 覆盖变量名是 `WS_URL`,不是 `WSS_URL`。
|
|
|
69
206
|
CU_EDITION=coboot \
|
|
70
207
|
PKG_NAME=@coboot/headless \
|
|
71
208
|
PKG_BIN_NAME=coboot-headless \
|
|
72
|
-
PKG_VERSION=0.2.2-rc.
|
|
209
|
+
PKG_VERSION=0.2.2-rc.11 \
|
|
73
210
|
pnpm build:headless:npm
|
|
74
211
|
```
|
|
75
212
|
|
|
76
|
-
|
|
213
|
+
构建完成后核对包内清单、元数据和哈希:
|
|
77
214
|
|
|
78
215
|
```bash
|
|
79
216
|
npm pack --dry-run --json ./dist-headless
|
|
80
|
-
tar -xOf dist-headless/coboot-headless-0.2.2-rc.
|
|
81
|
-
sha256sum dist-headless/coboot-headless-0.2.2-rc.
|
|
217
|
+
tar -xOf dist-headless/coboot-headless-0.2.2-rc.11.tgz package/package.json
|
|
218
|
+
sha256sum dist-headless/coboot-headless-0.2.2-rc.11.tgz
|
|
82
219
|
```
|
|
83
220
|
|
|
84
|
-
|
|
221
|
+
|
|
222
|
+
Coboot 公网包通过仓库内发布脚本构建、扫描并发布。先执行 dry-run:
|
|
85
223
|
|
|
86
224
|
```bash
|
|
87
|
-
|
|
88
|
-
--
|
|
89
|
-
--
|
|
90
|
-
--
|
|
225
|
+
pnpm release:headless:npm:coboot -- \
|
|
226
|
+
--version <new-version> \
|
|
227
|
+
--tag next \
|
|
228
|
+
--dry-run
|
|
91
229
|
```
|
|
92
230
|
|
|
93
|
-
|
|
94
|
-
|
|
231
|
+
确认 dry-run 的包清单、哈希和 `npm publish --dry-run` 均通过后,去掉 `--dry-run` 重新执行。
|
|
232
|
+
脚本会再次构建和检查产物,并要求输入完整版本号后才进行真实发布。稳定版本应使用 `latest` tag。
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
注意:
|
|
236
|
+
|
|
237
|
+
- `package.json` 里的 `headlessBackendUrl` / `headlessWsUrl` 只是可核对的冗余标记;运行时
|
|
238
|
+
取值来自 `entry.mjs` 的编译期常量,改这两个字段不会改变客户端连接的服务端。
|
|
239
|
+
- npm CLI 默认清理父进程遗留的 endpoint 环境变量,正式包始终使用 edition 对应地址。
|
|
240
|
+
本地联调或自建环境必须同时设置 `HEADLESS_ALLOW_ENDPOINT_OVERRIDE=1` 和匹配的
|
|
241
|
+
`BACKEND_URL` / `WS_URL`;HTTP 与 WebSocket 必须同域,否则 Access Token 会被
|
|
242
|
+
`isTrustedHeadlessAuthTarget` 拒绝。WebSocket 变量名是 `WS_URL`,不是 `WSS_URL`。
|
|
243
|
+
- 切换 pre / test 环境需要重新构建或显式覆盖 `BACKEND_URL` / `WS_URL`;无论哪种方式都必须
|
|
244
|
+
确认 token 与地址匹配。
|
|
245
|
+
- 同版本重新构建会复用文件名。分发前必须用 SHA-256 区分新旧包;安装流程会停止旧 daemon,
|
|
246
|
+
将预检通过的新包切换到 `releases/<version>-<内容哈希>` 后重新启动。旧 release 保留供失败回滚,
|
|
247
|
+
不覆盖运行中的文件;相同内容使用同一个 release,不会因重复安装不断新增副本。
|
|
248
|
+
- `.tgz` 属于本地构建产物,不提交 Git;只从干净的 `dist-headless` 目录发布已经完成上述核对
|
|
249
|
+
的 tarball。
|
|
250
|
+
- `device-token` 是 Coboot 生成的一次性设备注册 token,不是 npm token,也不要发送
|
|
251
|
+
给其他人。
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Portions Copyright (c) Microsoft Corporation.
|
|
190
|
+
Portions Copyright 2017 Google Inc.
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|