diff options
author | 2023-06-09 19:21:49 -0700 | |
---|---|---|
committer | 2023-06-09 19:21:49 -0700 | |
commit | 7c9352392d950aec66309cdcd566eab5e17d429e (patch) | |
tree | 213ea39bc8afabdfc78db48c214bd6c36bc1e8c8 /packages/bun-devtools | |
parent | fef9853d5ae2818e71038dde3a5a82fe68cb97ef (diff) | |
download | bun-debugger-dev.tar.gz bun-debugger-dev.tar.zst bun-debugger-dev.zip |
Update readme and regendebugger-dev
Diffstat (limited to 'packages/bun-devtools')
-rw-r--r-- | packages/bun-devtools/.gitignore | 169 | ||||
-rw-r--r-- | packages/bun-devtools/README.md | 3 | ||||
-rwxr-xr-x | packages/bun-devtools/bun.lockb | bin | 0 -> 1281 bytes | |||
-rw-r--r-- | packages/bun-devtools/package.json | 18 | ||||
-rw-r--r-- | packages/bun-devtools/protocol/jsc.d.ts | 13 | ||||
-rw-r--r-- | packages/bun-devtools/protocol/v8.d.ts | 56 | ||||
-rw-r--r-- | packages/bun-devtools/tsconfig.json | 18 |
7 files changed, 262 insertions, 15 deletions
diff --git a/packages/bun-devtools/.gitignore b/packages/bun-devtools/.gitignore new file mode 100644 index 000000000..f81d56eaa --- /dev/null +++ b/packages/bun-devtools/.gitignore @@ -0,0 +1,169 @@ +# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore + +# Logs + +logs +_.log +npm-debug.log_ +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) + +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# Runtime data + +pids +_.pid +_.seed +\*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover + +lib-cov + +# Coverage directory used by tools like istanbul + +coverage +\*.lcov + +# nyc test coverage + +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) + +.grunt + +# Bower dependency directory (https://bower.io/) + +bower_components + +# node-waf configuration + +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) + +build/Release + +# Dependency directories + +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) + +web_modules/ + +# TypeScript cache + +\*.tsbuildinfo + +# Optional npm cache directory + +.npm + +# Optional eslint cache + +.eslintcache + +# Optional stylelint cache + +.stylelintcache + +# Microbundle cache + +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history + +.node_repl_history + +# Output of 'npm pack' + +\*.tgz + +# Yarn Integrity file + +.yarn-integrity + +# dotenv environment variable files + +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) + +.cache +.parcel-cache + +# Next.js build output + +.next +out + +# Nuxt.js build / generate output + +.nuxt +dist + +# Gatsby files + +.cache/ + +# Comment in the public line in if your project uses Gatsby and not Next.js + +# https://nextjs.org/blog/next-9-1#public-directory-support + +# public + +# vuepress build output + +.vuepress/dist + +# vuepress v2.x temp and cache directory + +.temp +.cache + +# Docusaurus cache and generated files + +.docusaurus + +# Serverless directories + +.serverless/ + +# FuseBox cache + +.fusebox/ + +# DynamoDB Local files + +.dynamodb/ + +# TernJS port file + +.tern-port + +# Stores VSCode versions used for testing VSCode extensions + +.vscode-test + +# yarn v2 + +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.\* diff --git a/packages/bun-devtools/README.md b/packages/bun-devtools/README.md new file mode 100644 index 000000000..e3a6a78e3 --- /dev/null +++ b/packages/bun-devtools/README.md @@ -0,0 +1,3 @@ +# bun-devtools + +A set of auto-generated TypeScript types for the WebKit debugger protocol. diff --git a/packages/bun-devtools/bun.lockb b/packages/bun-devtools/bun.lockb Binary files differnew file mode 100755 index 000000000..3dbfb9349 --- /dev/null +++ b/packages/bun-devtools/bun.lockb diff --git a/packages/bun-devtools/package.json b/packages/bun-devtools/package.json index b3c63da38..7fbd009d7 100644 --- a/packages/bun-devtools/package.json +++ b/packages/bun-devtools/package.json @@ -1,8 +1,24 @@ { "name": "bun-devtools", - "private": true, "module": "./index.ts", + "version": "0.0.2", + "type": "module", + "exports": { + ".": { + "import": "./index.ts", + "require": "./index.ts" + } + }, "scripts": { "generate-protocol": "bun run scripts/generate-protocol.ts" + }, + "files": [ + "index.ts", + "package.json", + "tsconfig.json", + "protocol" + ], + "peerDependencies": { + "typescript": "^5.0.0" } } diff --git a/packages/bun-devtools/protocol/jsc.d.ts b/packages/bun-devtools/protocol/jsc.d.ts index fa665ee0b..ecf28ec02 100644 --- a/packages/bun-devtools/protocol/jsc.d.ts +++ b/packages/bun-devtools/protocol/jsc.d.ts @@ -1211,7 +1211,8 @@ export namespace JSC { | "weakset" | "iterator" | "class" - | "proxy"; + | "proxy" + | "weakref"; /** Object class (constructor) name. Specified for <code>object</code> type values only. */ className?: string; /** Remote object value (in case of primitive values or JSON values if it was requested). */ @@ -1245,7 +1246,8 @@ export namespace JSC { | "weakset" | "iterator" | "class" - | "proxy"; + | "proxy" + | "weakref"; /** String representation of the object. */ description?: string; /** Determines whether preview is lossless (contains all information of the original object). */ @@ -1278,11 +1280,14 @@ export namespace JSC { | "weakset" | "iterator" | "class" - | "proxy"; + | "proxy" + | "weakref"; /** User-friendly property value string. */ value?: string; /** Nested value preview. */ valuePreview?: ObjectPreview; + /** True if this is a private field. */ + isPrivate?: boolean; /** True if this is an internal property. */ internal?: boolean; }; @@ -1320,6 +1325,8 @@ export namespace JSC { isOwn?: boolean; /** Property symbol object, if the property is a symbol. */ symbol?: Runtime.RemoteObject; + /** True if the property is a private field. */ + isPrivate?: boolean; /** True if the property value came from a native getter. */ nativeGetter?: boolean; }; diff --git a/packages/bun-devtools/protocol/v8.d.ts b/packages/bun-devtools/protocol/v8.d.ts index cd7185917..bae0e4841 100644 --- a/packages/bun-devtools/protocol/v8.d.ts +++ b/packages/bun-devtools/protocol/v8.d.ts @@ -208,7 +208,7 @@ variables as its properties. */ executionContextId: Runtime.ExecutionContextId; /** Content hash of the script, SHA-256. */ hash: string; - /** Embedder-specific auxiliary data. */ + /** Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} */ executionContextAuxData?: Record<string, unknown>; /** URL of source map associated with script (if any). */ sourceMapURL?: string; @@ -245,7 +245,7 @@ variables as its properties. */ executionContextId: Runtime.ExecutionContextId; /** Content hash of the script, SHA-256. */ hash: string; - /** Embedder-specific auxiliary data. */ + /** Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} */ executionContextAuxData?: Record<string, unknown>; /** True, if this script is generated as a result of the live edit operation. */ isLiveEdit?: boolean; @@ -912,6 +912,8 @@ milliseconds relatively to this requestTime. */ pushStart: number; /** Time the server finished pushing request. */ pushEnd: number; + /** Started receiving response headers. */ + receiveHeadersStart: number; /** Finished receiving response headers. */ receiveHeadersEnd: number; }; @@ -1474,9 +1476,16 @@ the same request (but not for redirected requests). */ reportingEndpoint?: string; reportOnlyReportingEndpoint?: string; }; + export type ContentSecurityPolicySource = "HTTP" | "Meta"; + export type ContentSecurityPolicyStatus = { + effectiveDirectives: string; + isEnforced: boolean; + source: unknown; + }; export type SecurityIsolationStatus = { coop?: CrossOriginOpenerPolicyStatus; coep?: CrossOriginEmbedderPolicyStatus; + csp?: Array<unknown>; }; /** The status of a Reporting API report. */ export type ReportStatus = "Queued" | "Pending" | "MarkedForRemoval" | "Success"; @@ -1817,6 +1826,7 @@ preemptively (e.g. a cache hit). */ status: | "Ok" | "InvalidArgument" + | "MissingIssuerKeys" | "FailedPrecondition" | "ResourceExhausted" | "AlreadyExists" @@ -2380,9 +2390,15 @@ profile startTime. */ export namespace Runtime { /** Unique script identifier. */ export type ScriptId = string; - /** Represents the value serialiazed by the WebDriver BiDi specification -https://w3c.github.io/webdriver-bidi. */ - export type WebDriverValue = { + /** Represents options for serialization. Overrides `generatePreview`, `returnByValue` and +`generateWebDriverValue`. */ + export type SerializationOptions = { + serialization: "deep" | "json" | "idOnly"; + /** Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode. */ + maxDepth?: number; + }; + /** Represents deep serialized value. */ + export type DeepSerializedValue = { type: | "undefined" | "null" @@ -2409,6 +2425,10 @@ https://w3c.github.io/webdriver-bidi. */ | "window"; value?: any; objectId?: string; + /** Set if value reference met more then once during serialization. In such +case, value is provided only to one of the serialized values. Unique +per value in the scope of one CDP call. */ + weakLocalObjectReference?: number; }; /** Unique object identifier. */ export type RemoteObjectId = string; @@ -2451,8 +2471,10 @@ property. */ unserializableValue?: UnserializableValue; /** String representation of the object. */ description?: string; - /** WebDriver BiDi representation of the value. */ - webDriverValue?: WebDriverValue; + /** Deprecated. Use `deepSerializedValue` instead. WebDriver BiDi representation of the value. */ + webDriverValue?: DeepSerializedValue; + /** Deep serialized value. */ + deepSerializedValue?: DeepSerializedValue; /** Unique object identifier (for non-primitive values). */ objectId?: RemoteObjectId; /** Preview containing abbreviated property values. Specified for `object` type values only. */ @@ -2611,7 +2633,7 @@ script evaluation should be performed. */ multiple processes, so can be reliably used to identify specific context while backend performs a cross-process navigation. */ uniqueId: string; - /** Embedder-specific auxiliary data. */ + /** Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} */ auxData?: Record<string, unknown>; }; /** Detailed information about exception (or error) that was thrown during script compilation or @@ -2784,7 +2806,8 @@ object. */ /** In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state. */ silent?: boolean; - /** Whether the result is expected to be a JSON object which should be sent by value. */ + /** Whether the result is expected to be a JSON object which should be sent by value. +Can be overriden by `serializationOptions`. */ returnByValue?: boolean; /** Whether preview should be generated for the result. */ generatePreview?: boolean; @@ -2808,10 +2831,14 @@ in context different than intended (e.g. as a result of navigation across proces boundaries). This is mutually exclusive with `executionContextId`. */ uniqueContextId?: string; - /** Whether the result should contain `webDriverValue`, serialized according to + /** Deprecated. Use `serializationOptions: {serialization:"deep"}` instead. +Whether the result should contain `webDriverValue`, serialized according to https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but resulting `objectId` is still provided. */ generateWebDriverValue?: boolean; + /** Specifies the result serialization. If provided, overrides +`generatePreview`, `returnByValue` and `generateWebDriverValue`. */ + serializationOptions?: SerializationOptions; }; /** `Runtime.callFunctionOn` */ export type CallFunctionOnResponse = { @@ -2900,8 +2927,15 @@ in context different than intended (e.g. as a result of navigation across proces boundaries). This is mutually exclusive with `contextId`. */ uniqueContextId?: string; - /** Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi. */ + /** Deprecated. Use `serializationOptions: {serialization:"deep"}` instead. +Whether the result should contain `webDriverValue`, serialized +according to +https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but +resulting `objectId` is still provided. */ generateWebDriverValue?: boolean; + /** Specifies the result serialization. If provided, overrides +`generatePreview`, `returnByValue` and `generateWebDriverValue`. */ + serializationOptions?: SerializationOptions; }; /** `Runtime.evaluate` */ export type EvaluateResponse = { diff --git a/packages/bun-devtools/tsconfig.json b/packages/bun-devtools/tsconfig.json new file mode 100644 index 000000000..6bdbae75c --- /dev/null +++ b/packages/bun-devtools/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "lib": ["ESNext"], + "module": "esnext", + "target": "esnext", + "moduleResolution": "bundler", + "moduleDetection": "force", + "allowImportingTsExtensions": true, + "strict": true, + "downlevelIteration": true, + "skipLibCheck": true, + "jsx": "preserve", + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "allowJs": true, + "noEmit": true + } +} |