@bleedingdev/tanstack-redact 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/dist/cloudflare/index.d.ts +6 -0
- package/dist/cloudflare/index.js +39 -0
- package/dist/cloudflare/index.js.map +7 -0
- package/dist/core/attributes.d.ts +4 -0
- package/dist/core/attributes.js +30 -0
- package/dist/core/attributes.js.map +7 -0
- package/dist/core/browser.d.ts +9 -0
- package/dist/core/browser.js +32 -0
- package/dist/core/browser.js.map +7 -0
- package/dist/core/class-props.d.ts +1 -0
- package/dist/core/class-props.js +15 -0
- package/dist/core/class-props.js.map +7 -0
- package/dist/core/devtools.d.ts +26 -0
- package/dist/core/devtools.js +70 -0
- package/dist/core/devtools.js.map +7 -0
- package/dist/core/functions.d.ts +6 -0
- package/dist/core/functions.js +14 -0
- package/dist/core/functions.js.map +7 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +7 -0
- package/dist/core/internal.d.ts +103 -0
- package/dist/core/internal.js +43 -0
- package/dist/core/internal.js.map +7 -0
- package/dist/core/resource-hints.d.ts +7 -0
- package/dist/core/resource-hints.js +20 -0
- package/dist/core/resource-hints.js.map +7 -0
- package/dist/core/types.d.ts +23 -0
- package/dist/core/types.js +8 -0
- package/dist/core/types.js.map +7 -0
- package/dist/core/unitless-style.d.ts +1 -0
- package/dist/core/unitless-style.js +5 -0
- package/dist/core/unitless-style.js.map +7 -0
- package/dist/dom/_all.d.ts +27 -0
- package/dist/dom/_all.js +51 -0
- package/dist/dom/_all.js.map +7 -0
- package/dist/dom/client.d.ts +9 -0
- package/dist/dom/client.js +13 -0
- package/dist/dom/client.js.map +7 -0
- package/dist/dom/commit.d.ts +27 -0
- package/dist/dom/commit.js +237 -0
- package/dist/dom/commit.js.map +7 -0
- package/dist/dom/devtools-effects.d.ts +8 -0
- package/dist/dom/devtools-effects.js +80 -0
- package/dist/dom/devtools-effects.js.map +7 -0
- package/dist/dom/devtools.d.ts +33 -0
- package/dist/dom/devtools.js +635 -0
- package/dist/dom/devtools.js.map +7 -0
- package/dist/dom/dispatcher.d.ts +4 -0
- package/dist/dom/dispatcher.js +437 -0
- package/dist/dom/dispatcher.js.map +7 -0
- package/dist/dom/document-metadata.d.ts +7 -0
- package/dist/dom/document-metadata.js +44 -0
- package/dist/dom/document-metadata.js.map +7 -0
- package/dist/dom/dom.d.ts +11 -0
- package/dist/dom/dom.js +165 -0
- package/dist/dom/dom.js.map +7 -0
- package/dist/dom/error-info.d.ts +2 -0
- package/dist/dom/error-info.js +19 -0
- package/dist/dom/error-info.js.map +7 -0
- package/dist/dom/event-replay.d.ts +13 -0
- package/dist/dom/event-replay.js +24 -0
- package/dist/dom/event-replay.js.map +7 -0
- package/dist/dom/features/activity/full.d.ts +1 -0
- package/dist/dom/features/activity/full.js +140 -0
- package/dist/dom/features/activity/full.js.map +7 -0
- package/dist/dom/features/activity/index.d.ts +1 -0
- package/dist/dom/features/activity/index.js +2 -0
- package/dist/dom/features/activity/index.js.map +7 -0
- package/dist/dom/features/activity/stub.d.ts +1 -0
- package/dist/dom/features/activity/stub.js +10 -0
- package/dist/dom/features/activity/stub.js.map +7 -0
- package/dist/dom/features/class/full.d.ts +1 -0
- package/dist/dom/features/class/full.js +208 -0
- package/dist/dom/features/class/full.js.map +7 -0
- package/dist/dom/features/class/index.d.ts +1 -0
- package/dist/dom/features/class/index.js +2 -0
- package/dist/dom/features/class/index.js.map +7 -0
- package/dist/dom/features/class/stub.d.ts +1 -0
- package/dist/dom/features/class/stub.js +46 -0
- package/dist/dom/features/class/stub.js.map +7 -0
- package/dist/dom/features/context/full.d.ts +4 -0
- package/dist/dom/features/context/full.js +103 -0
- package/dist/dom/features/context/full.js.map +7 -0
- package/dist/dom/features/context/index.d.ts +1 -0
- package/dist/dom/features/context/index.js +2 -0
- package/dist/dom/features/context/index.js.map +7 -0
- package/dist/dom/features/context/stub.d.ts +4 -0
- package/dist/dom/features/context/stub.js +21 -0
- package/dist/dom/features/context/stub.js.map +7 -0
- package/dist/dom/features/forward-ref/full.d.ts +1 -0
- package/dist/dom/features/forward-ref/full.js +9 -0
- package/dist/dom/features/forward-ref/full.js.map +7 -0
- package/dist/dom/features/forward-ref/index.d.ts +1 -0
- package/dist/dom/features/forward-ref/index.js +2 -0
- package/dist/dom/features/forward-ref/index.js.map +7 -0
- package/dist/dom/features/forward-ref/stub.d.ts +1 -0
- package/dist/dom/features/forward-ref/stub.js +9 -0
- package/dist/dom/features/forward-ref/stub.js.map +7 -0
- package/dist/dom/features/fragment-refs/index.d.ts +1 -0
- package/dist/dom/features/fragment-refs/index.js +9 -0
- package/dist/dom/features/fragment-refs/index.js.map +7 -0
- package/dist/dom/features/fragment-refs/stub.d.ts +5 -0
- package/dist/dom/features/fragment-refs/stub.js +17 -0
- package/dist/dom/features/fragment-refs/stub.js.map +7 -0
- package/dist/dom/features/hydration/full.d.ts +68 -0
- package/dist/dom/features/hydration/full.js +493 -0
- package/dist/dom/features/hydration/full.js.map +7 -0
- package/dist/dom/features/hydration/index.d.ts +1 -0
- package/dist/dom/features/hydration/index.js +2 -0
- package/dist/dom/features/hydration/index.js.map +7 -0
- package/dist/dom/features/hydration/stub.d.ts +36 -0
- package/dist/dom/features/hydration/stub.js +80 -0
- package/dist/dom/features/hydration/stub.js.map +7 -0
- package/dist/dom/features/index.d.ts +8 -0
- package/dist/dom/features/index.js +9 -0
- package/dist/dom/features/index.js.map +7 -0
- package/dist/dom/features/lazy/full.d.ts +1 -0
- package/dist/dom/features/lazy/full.js +23 -0
- package/dist/dom/features/lazy/full.js.map +7 -0
- package/dist/dom/features/lazy/index.d.ts +1 -0
- package/dist/dom/features/lazy/index.js +2 -0
- package/dist/dom/features/lazy/index.js.map +7 -0
- package/dist/dom/features/lazy/stub.d.ts +1 -0
- package/dist/dom/features/lazy/stub.js +19 -0
- package/dist/dom/features/lazy/stub.js.map +7 -0
- package/dist/dom/features/memo/full.d.ts +1 -0
- package/dist/dom/features/memo/full.js +34 -0
- package/dist/dom/features/memo/full.js.map +7 -0
- package/dist/dom/features/memo/index.d.ts +1 -0
- package/dist/dom/features/memo/index.js +2 -0
- package/dist/dom/features/memo/index.js.map +7 -0
- package/dist/dom/features/memo/stub.d.ts +1 -0
- package/dist/dom/features/memo/stub.js +9 -0
- package/dist/dom/features/memo/stub.js.map +7 -0
- package/dist/dom/features/portal/full.d.ts +1 -0
- package/dist/dom/features/portal/full.js +11 -0
- package/dist/dom/features/portal/full.js.map +7 -0
- package/dist/dom/features/portal/index.d.ts +1 -0
- package/dist/dom/features/portal/index.js +2 -0
- package/dist/dom/features/portal/index.js.map +7 -0
- package/dist/dom/features/portal/stub.d.ts +1 -0
- package/dist/dom/features/portal/stub.js +5 -0
- package/dist/dom/features/portal/stub.js.map +7 -0
- package/dist/dom/features/suspense/full.d.ts +1 -0
- package/dist/dom/features/suspense/full.js +389 -0
- package/dist/dom/features/suspense/full.js.map +7 -0
- package/dist/dom/features/suspense/index.d.ts +1 -0
- package/dist/dom/features/suspense/index.js +2 -0
- package/dist/dom/features/suspense/index.js.map +7 -0
- package/dist/dom/features/suspense/stub.d.ts +1 -0
- package/dist/dom/features/suspense/stub.js +4 -0
- package/dist/dom/features/suspense/stub.js.map +7 -0
- package/dist/dom/features/suspense-runtime/index.d.ts +1 -0
- package/dist/dom/features/suspense-runtime/index.js +2 -0
- package/dist/dom/features/suspense-runtime/index.js.map +7 -0
- package/dist/dom/features/suspense-runtime/stub.d.ts +1 -0
- package/dist/dom/features/suspense-runtime/stub.js +11 -0
- package/dist/dom/features/suspense-runtime/stub.js.map +7 -0
- package/dist/dom/features/view-transition/full.d.ts +7 -0
- package/dist/dom/features/view-transition/full.js +324 -0
- package/dist/dom/features/view-transition/full.js.map +7 -0
- package/dist/dom/features/view-transition/index.d.ts +1 -0
- package/dist/dom/features/view-transition/index.js +2 -0
- package/dist/dom/features/view-transition/index.js.map +7 -0
- package/dist/dom/features/view-transition/resources.d.ts +11 -0
- package/dist/dom/features/view-transition/resources.js +117 -0
- package/dist/dom/features/view-transition/resources.js.map +7 -0
- package/dist/dom/features/view-transition/stub.d.ts +7 -0
- package/dist/dom/features/view-transition/stub.js +21 -0
- package/dist/dom/features/view-transition/stub.js.map +7 -0
- package/dist/dom/features/view-transition/visual.d.ts +14 -0
- package/dist/dom/features/view-transition/visual.js +404 -0
- package/dist/dom/features/view-transition/visual.js.map +7 -0
- package/dist/dom/form-actions.d.ts +4 -0
- package/dist/dom/form-actions.js +74 -0
- package/dist/dom/form-actions.js.map +7 -0
- package/dist/dom/form-controls.d.ts +3 -0
- package/dist/dom/form-controls.js +91 -0
- package/dist/dom/form-controls.js.map +7 -0
- package/dist/dom/fragment-instance.d.ts +33 -0
- package/dist/dom/fragment-instance.js +449 -0
- package/dist/dom/fragment-instance.js.map +7 -0
- package/dist/dom/index.d.ts +61 -0
- package/dist/dom/index.js +71 -0
- package/dist/dom/index.js.map +7 -0
- package/dist/dom/portal.d.ts +2 -0
- package/dist/dom/portal.js +14 -0
- package/dist/dom/portal.js.map +7 -0
- package/dist/dom/react-ids.d.ts +6 -0
- package/dist/dom/react-ids.js +38 -0
- package/dist/dom/react-ids.js.map +7 -0
- package/dist/dom/reconcile.d.ts +86 -0
- package/dist/dom/reconcile.js +1305 -0
- package/dist/dom/reconcile.js.map +7 -0
- package/dist/dom/refresh.d.ts +12 -0
- package/dist/dom/refresh.js +174 -0
- package/dist/dom/refresh.js.map +7 -0
- package/dist/dom/resource-hints.d.ts +6 -0
- package/dist/dom/resource-hints.js +107 -0
- package/dist/dom/resource-hints.js.map +7 -0
- package/dist/dom/resource-store.d.ts +13 -0
- package/dist/dom/resource-store.js +47 -0
- package/dist/dom/resource-store.js.map +7 -0
- package/dist/dom/resources.d.ts +1 -0
- package/dist/dom/resources.js +46 -0
- package/dist/dom/resources.js.map +7 -0
- package/dist/dom/retained-effects.d.ts +6 -0
- package/dist/dom/retained-effects.js +67 -0
- package/dist/dom/retained-effects.js.map +7 -0
- package/dist/dom/root-internal.d.ts +11 -0
- package/dist/dom/root-internal.js +35 -0
- package/dist/dom/root-internal.js.map +7 -0
- package/dist/dom/root.d.ts +17 -0
- package/dist/dom/root.js +38 -0
- package/dist/dom/root.js.map +7 -0
- package/dist/dom/synthetic-event.d.ts +1 -0
- package/dist/dom/synthetic-event.js +35 -0
- package/dist/dom/synthetic-event.js.map +7 -0
- package/dist/dom/test-utils.d.ts +1 -0
- package/dist/dom/test-utils.js +5 -0
- package/dist/dom/test-utils.js.map +7 -0
- package/dist/dom/transitions.d.ts +9 -0
- package/dist/dom/transitions.js +147 -0
- package/dist/dom/transitions.js.map +7 -0
- package/dist/dom/tree.d.ts +5 -0
- package/dist/dom/tree.js +62 -0
- package/dist/dom/tree.js.map +7 -0
- package/dist/dom/walk.d.ts +2 -0
- package/dist/dom/walk.js +14 -0
- package/dist/dom/walk.js.map +7 -0
- package/dist/next/client.d.ts +9 -0
- package/dist/next/client.js +14 -0
- package/dist/next/client.js.map +7 -0
- package/dist/next/dev-cache-loader.cjs +13 -0
- package/dist/next/index.d.ts +2 -0
- package/dist/next/index.js +97 -0
- package/dist/next/index.js.map +7 -0
- package/dist/next/loader.cjs +10 -0
- package/dist/next/react.d.ts +71 -0
- package/dist/next/react.js +9 -0
- package/dist/next/react.js.map +7 -0
- package/dist/react/act.d.ts +3 -0
- package/dist/react/act.js +124 -0
- package/dist/react/act.js.map +7 -0
- package/dist/react/action-scope.d.ts +17 -0
- package/dist/react/action-scope.js +60 -0
- package/dist/react/action-scope.js.map +7 -0
- package/dist/react/activity.d.ts +7 -0
- package/dist/react/activity.js +7 -0
- package/dist/react/activity.js.map +7 -0
- package/dist/react/children.d.ts +8 -0
- package/dist/react/children.js +76 -0
- package/dist/react/children.js.map +7 -0
- package/dist/react/class.d.ts +36 -0
- package/dist/react/class.js +39 -0
- package/dist/react/class.js.map +7 -0
- package/dist/react/compiler-runtime.d.ts +1 -0
- package/dist/react/compiler-runtime.js +9 -0
- package/dist/react/compiler-runtime.js.map +7 -0
- package/dist/react/context.d.ts +32 -0
- package/dist/react/context.js +25 -0
- package/dist/react/context.js.map +7 -0
- package/dist/react/element.d.ts +13 -0
- package/dist/react/element.js +70 -0
- package/dist/react/element.js.map +7 -0
- package/dist/react/form-state.d.ts +26 -0
- package/dist/react/form-state.js +30 -0
- package/dist/react/form-state.js.map +7 -0
- package/dist/react/hooks.d.ts +67 -0
- package/dist/react/hooks.js +165 -0
- package/dist/react/hooks.js.map +7 -0
- package/dist/react/index.d.ts +99 -0
- package/dist/react/index.js +143 -0
- package/dist/react/index.js.map +7 -0
- package/dist/react/jsx-runtime.d.ts +24 -0
- package/dist/react/jsx-runtime.js +37 -0
- package/dist/react/jsx-runtime.js.map +7 -0
- package/dist/react/memo.d.ts +20 -0
- package/dist/react/memo.js +27 -0
- package/dist/react/memo.js.map +7 -0
- package/dist/react/portal.d.ts +1 -0
- package/dist/react/portal.js +5 -0
- package/dist/react/portal.js.map +7 -0
- package/dist/react/shared-internals.d.ts +52 -0
- package/dist/react/shared-internals.js +22 -0
- package/dist/react/shared-internals.js.map +7 -0
- package/dist/react/suspense.d.ts +15 -0
- package/dist/react/suspense.js +15 -0
- package/dist/react/suspense.js.map +7 -0
- package/dist/react/thenable.d.ts +1 -0
- package/dist/react/thenable.js +25 -0
- package/dist/react/thenable.js.map +7 -0
- package/dist/react/view-transition.d.ts +32 -0
- package/dist/react/view-transition.js +12 -0
- package/dist/react/view-transition.js.map +7 -0
- package/dist/scheduler/index.d.ts +44 -0
- package/dist/scheduler/index.js +109 -0
- package/dist/scheduler/index.js.map +7 -0
- package/dist/server/bootstrap-script.d.ts +3 -0
- package/dist/server/bootstrap-script.js +17 -0
- package/dist/server/bootstrap-script.js.map +7 -0
- package/dist/server/dispatcher.d.ts +57 -0
- package/dist/server/dispatcher.js +157 -0
- package/dist/server/dispatcher.js.map +7 -0
- package/dist/server/escape.d.ts +6 -0
- package/dist/server/escape.js +75 -0
- package/dist/server/escape.js.map +7 -0
- package/dist/server/index.d.ts +16 -0
- package/dist/server/index.js +25 -0
- package/dist/server/index.js.map +7 -0
- package/dist/server/insertion-context.d.ts +3 -0
- package/dist/server/insertion-context.js +32 -0
- package/dist/server/renderToString.d.ts +7 -0
- package/dist/server/renderToString.js +33 -0
- package/dist/server/renderToString.js.map +7 -0
- package/dist/server/resource-hints.d.ts +22 -0
- package/dist/server/resource-hints.js +168 -0
- package/dist/server/resource-hints.js.map +7 -0
- package/dist/server/stream-ids.d.ts +3 -0
- package/dist/server/stream-ids.js +8 -0
- package/dist/server/stream.d.ts +61 -0
- package/dist/server/stream.js +418 -0
- package/dist/server/stream.js.map +7 -0
- package/dist/server/walk.d.ts +58 -0
- package/dist/server/walk.js +378 -0
- package/dist/server/walk.js.map +7 -0
- package/dist/vinext/compatibility.d.ts +23 -0
- package/dist/vinext/compatibility.js +127 -0
- package/dist/vinext/compatibility.js.map +7 -0
- package/dist/vinext/flight-timing.d.ts +1 -0
- package/dist/vinext/flight-timing.js +46 -0
- package/dist/vinext/flight-timing.js.map +7 -0
- package/dist/vinext/index.d.ts +5 -0
- package/dist/vinext/index.js +50 -0
- package/dist/vinext/index.js.map +7 -0
- package/dist/vite/index.d.ts +102 -0
- package/dist/vite/index.js +291 -0
- package/dist/vite/index.js.map +7 -0
- package/dist/vite/react18.d.ts +4 -0
- package/dist/vite/react18.js +74 -0
- package/dist/vite/react18.js.map +7 -0
- package/package.json +121 -4
- package/src/cloudflare/index.ts +44 -0
- package/src/core/attributes.ts +20 -0
- package/src/core/browser.ts +34 -0
- package/src/core/class-props.ts +12 -0
- package/src/core/devtools.ts +69 -0
- package/src/core/functions.ts +11 -0
- package/src/core/index.ts +2 -0
- package/src/core/internal.ts +123 -0
- package/src/core/resource-hints.ts +39 -0
- package/src/core/types.ts +39 -0
- package/src/core/unitless-style.ts +1 -0
- package/src/dom/_all.ts +46 -0
- package/src/dom/client.ts +17 -0
- package/src/dom/commit.ts +223 -0
- package/src/dom/devtools-effects.ts +78 -0
- package/src/dom/devtools.ts +527 -0
- package/src/dom/dispatcher.ts +476 -0
- package/src/dom/document-metadata.ts +41 -0
- package/src/dom/dom.ts +181 -0
- package/src/dom/error-info.ts +20 -0
- package/src/dom/event-replay.ts +39 -0
- package/src/dom/features/activity/full.ts +150 -0
- package/src/dom/features/activity/index.ts +1 -0
- package/src/dom/features/activity/stub.ts +12 -0
- package/src/dom/features/class/full.ts +202 -0
- package/src/dom/features/class/index.ts +1 -0
- package/src/dom/features/class/stub.ts +58 -0
- package/src/dom/features/context/full.ts +107 -0
- package/src/dom/features/context/index.ts +1 -0
- package/src/dom/features/context/stub.ts +26 -0
- package/src/dom/features/forward-ref/full.ts +9 -0
- package/src/dom/features/forward-ref/index.ts +1 -0
- package/src/dom/features/forward-ref/stub.ts +15 -0
- package/src/dom/features/fragment-refs/index.ts +1 -0
- package/src/dom/features/fragment-refs/stub.ts +6 -0
- package/src/dom/features/hydration/full.ts +563 -0
- package/src/dom/features/hydration/index.ts +1 -0
- package/src/dom/features/hydration/stub.ts +86 -0
- package/src/dom/features/index.ts +12 -0
- package/src/dom/features/lazy/full.ts +27 -0
- package/src/dom/features/lazy/index.ts +1 -0
- package/src/dom/features/lazy/stub.ts +24 -0
- package/src/dom/features/memo/full.ts +39 -0
- package/src/dom/features/memo/index.ts +1 -0
- package/src/dom/features/memo/stub.ts +13 -0
- package/src/dom/features/portal/full.ts +14 -0
- package/src/dom/features/portal/index.ts +1 -0
- package/src/dom/features/portal/stub.ts +11 -0
- package/src/dom/features/suspense/full.ts +469 -0
- package/src/dom/features/suspense/index.ts +1 -0
- package/src/dom/features/suspense/stub.ts +13 -0
- package/src/dom/features/suspense-runtime/index.ts +1 -0
- package/src/dom/features/suspense-runtime/stub.ts +1 -0
- package/src/dom/features/view-transition/full.ts +292 -0
- package/src/dom/features/view-transition/index.ts +1 -0
- package/src/dom/features/view-transition/resources.ts +123 -0
- package/src/dom/features/view-transition/stub.ts +8 -0
- package/src/dom/features/view-transition/visual.ts +454 -0
- package/src/dom/form-actions.ts +69 -0
- package/src/dom/form-controls.ts +91 -0
- package/src/dom/fragment-instance.ts +462 -0
- package/src/dom/index.ts +49 -0
- package/src/dom/portal.ts +16 -0
- package/src/dom/react-ids.ts +36 -0
- package/src/dom/reconcile.ts +1423 -0
- package/src/dom/refresh.ts +171 -0
- package/src/dom/resource-hints.ts +104 -0
- package/src/dom/resource-store.ts +50 -0
- package/src/dom/resources.ts +47 -0
- package/src/dom/retained-effects.ts +57 -0
- package/src/dom/root-internal.ts +37 -0
- package/src/dom/root.ts +59 -0
- package/src/dom/synthetic-event.ts +22 -0
- package/src/dom/test-utils.ts +1 -0
- package/src/dom/transitions.ts +141 -0
- package/src/dom/tree.ts +56 -0
- package/src/dom/walk.ts +8 -0
- package/src/next/client.ts +10 -0
- package/src/next/dev-cache-loader.cjs +13 -0
- package/src/next/index.ts +95 -0
- package/src/next/loader.cjs +10 -0
- package/src/next/react.ts +7 -0
- package/src/react/act.ts +105 -0
- package/src/react/action-scope.ts +57 -0
- package/src/react/activity.ts +10 -0
- package/src/react/children.ts +86 -0
- package/src/react/class.ts +66 -0
- package/src/react/compiler-runtime.ts +8 -0
- package/src/react/context.ts +46 -0
- package/src/react/element.ts +82 -0
- package/src/react/form-state.ts +35 -0
- package/src/react/hooks.ts +214 -0
- package/src/react/index.ts +91 -0
- package/src/react/jsx-runtime.ts +50 -0
- package/src/react/memo.ts +42 -0
- package/src/react/portal.ts +1 -0
- package/src/react/shared-internals.ts +80 -0
- package/src/react/suspense.ts +18 -0
- package/src/react/thenable.ts +21 -0
- package/src/react/view-transition.ts +41 -0
- package/src/scheduler/index.ts +124 -0
- package/src/server/bootstrap-script.ts +92 -0
- package/src/server/dispatcher.ts +168 -0
- package/src/server/escape.ts +102 -0
- package/src/server/index.ts +26 -0
- package/src/server/insertion-context.ts +28 -0
- package/src/server/renderToString.ts +35 -0
- package/src/server/resource-hints.ts +166 -0
- package/src/server/stream-ids.ts +5 -0
- package/src/server/stream.ts +525 -0
- package/src/server/walk.ts +555 -0
- package/src/vinext/compatibility.ts +122 -0
- package/src/vinext/flight-timing.ts +37 -0
- package/src/vinext/index.ts +47 -0
- package/src/vite/index.ts +476 -0
- package/src/vite/react18.ts +74 -0
- package/vendor/cloudflare-vite-plugin/LICENSE +25 -0
- package/vendor/cloudflare-vite-plugin/README.md +9 -0
- package/vendor/cloudflare-vite-plugin/dist/chunk-U6NEESU5-BmLHqeIt.mjs +43 -0
- package/vendor/cloudflare-vite-plugin/dist/index.d.mts +155 -0
- package/vendor/cloudflare-vite-plugin/dist/index.mjs +94700 -0
- package/vendor/cloudflare-vite-plugin/dist/open-PCXX3ZDZ-DYH87NhH.mjs +530 -0
- package/vendor/cloudflare-vite-plugin/dist/package-4cnqy5mM.mjs +84 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/asset-worker/index.js +5996 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/router-worker/index.js +6414 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/runner-worker/index.js +457 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/runner-worker/module-runner-legacy.js +1129 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/runner-worker/module-runner.js +1259 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/vite-proxy-worker/index.js +31 -0
- package/vendor/cloudflare-vite-plugin/package.json +90 -0
- package/vendor/cloudflare-vite-plugin/provenance.json +26 -0
- package/README.md +0 -3
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import { r as __name } from "./chunk-U6NEESU5-BmLHqeIt.mjs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import fs2 from "node:fs";
|
|
4
|
+
import path__default from "node:path";
|
|
5
|
+
import os from "node:os";
|
|
6
|
+
import { promisify } from "node:util";
|
|
7
|
+
import process5 from "node:process";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { Buffer } from "node:buffer";
|
|
10
|
+
import fs4, { constants as constants$1 } from "node:fs/promises";
|
|
11
|
+
import childProcess, { execFile } from "node:child_process";
|
|
12
|
+
|
|
13
|
+
//#region ../../node_modules/.pnpm/@cloudflare+workers-utils@0.48.0_vitest@5.0.4_@opentelemetry+api@1.9.1_@types+node@22.1_443e5be95f3e8eaad090e07e3d2e4303/node_modules/@cloudflare/workers-utils/dist/open-PCXX3ZDZ.mjs
|
|
14
|
+
createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
|
|
15
|
+
var isDockerCached;
|
|
16
|
+
function hasDockerEnv() {
|
|
17
|
+
try {
|
|
18
|
+
fs2.statSync("/.dockerenv");
|
|
19
|
+
return true;
|
|
20
|
+
} catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
__name(hasDockerEnv, "hasDockerEnv");
|
|
25
|
+
function hasDockerCGroup() {
|
|
26
|
+
try {
|
|
27
|
+
return fs2.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
28
|
+
} catch {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
__name(hasDockerCGroup, "hasDockerCGroup");
|
|
33
|
+
function isDocker() {
|
|
34
|
+
if (isDockerCached === void 0) isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
35
|
+
return isDockerCached;
|
|
36
|
+
}
|
|
37
|
+
__name(isDocker, "isDocker");
|
|
38
|
+
var cachedResult;
|
|
39
|
+
var hasContainerEnv = /* @__PURE__ */ __name(() => {
|
|
40
|
+
try {
|
|
41
|
+
fs2.statSync("/run/.containerenv");
|
|
42
|
+
return true;
|
|
43
|
+
} catch {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}, "hasContainerEnv");
|
|
47
|
+
function isInsideContainer() {
|
|
48
|
+
if (cachedResult === void 0) cachedResult = hasContainerEnv() || isDocker();
|
|
49
|
+
return cachedResult;
|
|
50
|
+
}
|
|
51
|
+
__name(isInsideContainer, "isInsideContainer");
|
|
52
|
+
var isWsl = /* @__PURE__ */ __name(() => {
|
|
53
|
+
if (process5.platform !== "linux") return false;
|
|
54
|
+
if (os.release().toLowerCase().includes("microsoft")) {
|
|
55
|
+
if (isInsideContainer()) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
return fs2.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
60
|
+
} catch {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}, "isWsl");
|
|
64
|
+
var is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
65
|
+
var execFile$1 = promisify(childProcess.execFile);
|
|
66
|
+
var powerShellPath = /* @__PURE__ */ __name(() => `${process5.env.SYSTEMROOT || process5.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`, "powerShellPath");
|
|
67
|
+
var executePowerShell = /* @__PURE__ */ __name(async (command, options = {}) => {
|
|
68
|
+
const { powerShellPath: psPath,...execFileOptions } = options;
|
|
69
|
+
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
70
|
+
return execFile$1(psPath ?? powerShellPath(), [...executePowerShell.argumentsPrefix, encodedCommand], {
|
|
71
|
+
encoding: "utf8",
|
|
72
|
+
...execFileOptions
|
|
73
|
+
});
|
|
74
|
+
}, "executePowerShell");
|
|
75
|
+
executePowerShell.argumentsPrefix = [
|
|
76
|
+
"-NoProfile",
|
|
77
|
+
"-NonInteractive",
|
|
78
|
+
"-ExecutionPolicy",
|
|
79
|
+
"Bypass",
|
|
80
|
+
"-EncodedCommand"
|
|
81
|
+
];
|
|
82
|
+
executePowerShell.encodeCommand = (command) => Buffer.from(command, "utf16le").toString("base64");
|
|
83
|
+
executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
|
|
84
|
+
function parseMountPointFromConfig(content) {
|
|
85
|
+
for (const line of content.split("\n")) {
|
|
86
|
+
if (/^\s*#/.test(line)) continue;
|
|
87
|
+
const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
|
|
88
|
+
if (!match) continue;
|
|
89
|
+
return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
__name(parseMountPointFromConfig, "parseMountPointFromConfig");
|
|
93
|
+
var execFile2 = promisify(childProcess.execFile);
|
|
94
|
+
var wslDrivesMountPoint = /* @__PURE__ */ (() => {
|
|
95
|
+
const defaultMountPoint = "/mnt/";
|
|
96
|
+
let mountPoint;
|
|
97
|
+
return async function() {
|
|
98
|
+
if (mountPoint) return mountPoint;
|
|
99
|
+
const configFilePath = "/etc/wsl.conf";
|
|
100
|
+
let isConfigFileExists = false;
|
|
101
|
+
try {
|
|
102
|
+
await fs4.access(configFilePath, constants$1.F_OK);
|
|
103
|
+
isConfigFileExists = true;
|
|
104
|
+
} catch {}
|
|
105
|
+
if (!isConfigFileExists) return defaultMountPoint;
|
|
106
|
+
const parsedMountPoint = parseMountPointFromConfig(await fs4.readFile(configFilePath, { encoding: "utf8" }));
|
|
107
|
+
if (parsedMountPoint === void 0) return defaultMountPoint;
|
|
108
|
+
mountPoint = parsedMountPoint;
|
|
109
|
+
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
110
|
+
return mountPoint;
|
|
111
|
+
};
|
|
112
|
+
})();
|
|
113
|
+
var powerShellPath2 = is_wsl_default ? /* @__PURE__ */ __name(async () => {
|
|
114
|
+
return `${await wslDrivesMountPoint()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
115
|
+
}, "powerShellPathFromWsl") : powerShellPath;
|
|
116
|
+
var canAccessPowerShellPromise;
|
|
117
|
+
var canAccessPowerShell = /* @__PURE__ */ __name(async () => {
|
|
118
|
+
canAccessPowerShellPromise ??= (async () => {
|
|
119
|
+
try {
|
|
120
|
+
const psPath = await powerShellPath2();
|
|
121
|
+
await fs4.access(psPath, constants$1.X_OK);
|
|
122
|
+
return true;
|
|
123
|
+
} catch {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
})();
|
|
127
|
+
return canAccessPowerShellPromise;
|
|
128
|
+
}, "canAccessPowerShell");
|
|
129
|
+
var wslDefaultBrowser = /* @__PURE__ */ __name(async () => {
|
|
130
|
+
const psPath = await powerShellPath2();
|
|
131
|
+
const { stdout: stdout$1 } = await executePowerShell(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, { powerShellPath: psPath });
|
|
132
|
+
return stdout$1.trim();
|
|
133
|
+
}, "wslDefaultBrowser");
|
|
134
|
+
var convertWslPathToWindows = /* @__PURE__ */ __name(async (path2) => {
|
|
135
|
+
if (/^[a-z]+:\/\//i.test(path2)) return path2;
|
|
136
|
+
try {
|
|
137
|
+
const { stdout: stdout$1 } = await execFile2("wslpath", ["-aw", path2], { encoding: "utf8" });
|
|
138
|
+
return stdout$1.trim();
|
|
139
|
+
} catch {
|
|
140
|
+
return path2;
|
|
141
|
+
}
|
|
142
|
+
}, "convertWslPathToWindows");
|
|
143
|
+
function defineLazyProperty(object, propertyName, valueGetter) {
|
|
144
|
+
const define = /* @__PURE__ */ __name((value) => Object.defineProperty(object, propertyName, {
|
|
145
|
+
value,
|
|
146
|
+
enumerable: true,
|
|
147
|
+
writable: true
|
|
148
|
+
}), "define");
|
|
149
|
+
Object.defineProperty(object, propertyName, {
|
|
150
|
+
configurable: true,
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get() {
|
|
153
|
+
const result = valueGetter();
|
|
154
|
+
define(result);
|
|
155
|
+
return result;
|
|
156
|
+
},
|
|
157
|
+
set(value) {
|
|
158
|
+
define(value);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return object;
|
|
162
|
+
}
|
|
163
|
+
__name(defineLazyProperty, "defineLazyProperty");
|
|
164
|
+
var execFileAsync = promisify(execFile);
|
|
165
|
+
async function defaultBrowserId() {
|
|
166
|
+
if (process5.platform !== "darwin") throw new Error("macOS only");
|
|
167
|
+
const { stdout: stdout$1 } = await execFileAsync("defaults", [
|
|
168
|
+
"read",
|
|
169
|
+
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
170
|
+
"LSHandlers"
|
|
171
|
+
]);
|
|
172
|
+
const browserId = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout$1)?.groups.id ?? "com.apple.Safari";
|
|
173
|
+
if (browserId === "com.apple.safari") return "com.apple.Safari";
|
|
174
|
+
return browserId;
|
|
175
|
+
}
|
|
176
|
+
__name(defaultBrowserId, "defaultBrowserId");
|
|
177
|
+
var execFileAsync2 = promisify(execFile);
|
|
178
|
+
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
179
|
+
if (process5.platform !== "darwin") throw new Error("macOS only");
|
|
180
|
+
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
181
|
+
const execOptions = {};
|
|
182
|
+
if (signal) execOptions.signal = signal;
|
|
183
|
+
const { stdout: stdout$1 } = await execFileAsync2("osascript", [
|
|
184
|
+
"-e",
|
|
185
|
+
script,
|
|
186
|
+
outputArguments
|
|
187
|
+
], execOptions);
|
|
188
|
+
return stdout$1.trim();
|
|
189
|
+
}
|
|
190
|
+
__name(runAppleScript, "runAppleScript");
|
|
191
|
+
async function bundleName(bundleId) {
|
|
192
|
+
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
|
|
193
|
+
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
194
|
+
}
|
|
195
|
+
__name(bundleName, "bundleName");
|
|
196
|
+
var execFileAsync3 = promisify(execFile);
|
|
197
|
+
var windowsBrowserProgIds = {
|
|
198
|
+
MSEdgeHTM: {
|
|
199
|
+
name: "Edge",
|
|
200
|
+
id: "com.microsoft.edge"
|
|
201
|
+
},
|
|
202
|
+
MSEdgeBHTML: {
|
|
203
|
+
name: "Edge Beta",
|
|
204
|
+
id: "com.microsoft.edge.beta"
|
|
205
|
+
},
|
|
206
|
+
MSEdgeDHTML: {
|
|
207
|
+
name: "Edge Dev",
|
|
208
|
+
id: "com.microsoft.edge.dev"
|
|
209
|
+
},
|
|
210
|
+
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: {
|
|
211
|
+
name: "Edge",
|
|
212
|
+
id: "com.microsoft.edge.old"
|
|
213
|
+
},
|
|
214
|
+
ChromeHTML: {
|
|
215
|
+
name: "Chrome",
|
|
216
|
+
id: "com.google.chrome"
|
|
217
|
+
},
|
|
218
|
+
ChromeBHTML: {
|
|
219
|
+
name: "Chrome Beta",
|
|
220
|
+
id: "com.google.chrome.beta"
|
|
221
|
+
},
|
|
222
|
+
ChromeDHTML: {
|
|
223
|
+
name: "Chrome Dev",
|
|
224
|
+
id: "com.google.chrome.dev"
|
|
225
|
+
},
|
|
226
|
+
ChromiumHTM: {
|
|
227
|
+
name: "Chromium",
|
|
228
|
+
id: "org.chromium.Chromium"
|
|
229
|
+
},
|
|
230
|
+
BraveHTML: {
|
|
231
|
+
name: "Brave",
|
|
232
|
+
id: "com.brave.Browser"
|
|
233
|
+
},
|
|
234
|
+
BraveBHTML: {
|
|
235
|
+
name: "Brave Beta",
|
|
236
|
+
id: "com.brave.Browser.beta"
|
|
237
|
+
},
|
|
238
|
+
BraveDHTML: {
|
|
239
|
+
name: "Brave Dev",
|
|
240
|
+
id: "com.brave.Browser.dev"
|
|
241
|
+
},
|
|
242
|
+
BraveSSHTM: {
|
|
243
|
+
name: "Brave Nightly",
|
|
244
|
+
id: "com.brave.Browser.nightly"
|
|
245
|
+
},
|
|
246
|
+
FirefoxURL: {
|
|
247
|
+
name: "Firefox",
|
|
248
|
+
id: "org.mozilla.firefox"
|
|
249
|
+
},
|
|
250
|
+
OperaStable: {
|
|
251
|
+
name: "Opera",
|
|
252
|
+
id: "com.operasoftware.Opera"
|
|
253
|
+
},
|
|
254
|
+
VivaldiHTM: {
|
|
255
|
+
name: "Vivaldi",
|
|
256
|
+
id: "com.vivaldi.Vivaldi"
|
|
257
|
+
},
|
|
258
|
+
"IE.HTTP": {
|
|
259
|
+
name: "Internet Explorer",
|
|
260
|
+
id: "com.microsoft.ie"
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
264
|
+
var UnknownBrowserError = class extends Error {
|
|
265
|
+
static {
|
|
266
|
+
__name(this, "UnknownBrowserError");
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
270
|
+
const { stdout: stdout$1 } = await _execFileAsync("reg", [
|
|
271
|
+
"QUERY",
|
|
272
|
+
" HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
273
|
+
"/v",
|
|
274
|
+
"ProgId"
|
|
275
|
+
]);
|
|
276
|
+
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout$1);
|
|
277
|
+
if (!match) throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout$1)}`);
|
|
278
|
+
const { id } = match.groups;
|
|
279
|
+
const browser = windowsBrowserProgIds[id];
|
|
280
|
+
if (!browser) throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
|
|
281
|
+
return browser;
|
|
282
|
+
}
|
|
283
|
+
__name(defaultBrowser, "defaultBrowser");
|
|
284
|
+
var execFileAsync4 = promisify(execFile);
|
|
285
|
+
var titleize = /* @__PURE__ */ __name((string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase()), "titleize");
|
|
286
|
+
async function defaultBrowser2() {
|
|
287
|
+
if (process5.platform === "darwin") {
|
|
288
|
+
const id = await defaultBrowserId();
|
|
289
|
+
return {
|
|
290
|
+
name: await bundleName(id),
|
|
291
|
+
id
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
if (process5.platform === "linux") {
|
|
295
|
+
const { stdout: stdout$1 } = await execFileAsync4("xdg-mime", [
|
|
296
|
+
"query",
|
|
297
|
+
"default",
|
|
298
|
+
"x-scheme-handler/http"
|
|
299
|
+
]);
|
|
300
|
+
const id = stdout$1.trim();
|
|
301
|
+
return {
|
|
302
|
+
name: titleize(id.replace(/.desktop$/, "").replace("-", " ")),
|
|
303
|
+
id
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
if (process5.platform === "win32") return defaultBrowser();
|
|
307
|
+
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
308
|
+
}
|
|
309
|
+
__name(defaultBrowser2, "defaultBrowser");
|
|
310
|
+
var is_in_ssh_default = Boolean(process5.env.SSH_CONNECTION || process5.env.SSH_CLIENT || process5.env.SSH_TTY);
|
|
311
|
+
var fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
312
|
+
var __dirname$1 = import.meta.url ? path__default.dirname(fileURLToPath(import.meta.url)) : "";
|
|
313
|
+
var localXdgOpenPath = path__default.join(__dirname$1, "xdg-open");
|
|
314
|
+
var { platform, arch: arch$1 } = process5;
|
|
315
|
+
var tryEachApp = /* @__PURE__ */ __name(async (apps2, opener) => {
|
|
316
|
+
if (apps2.length === 0) return;
|
|
317
|
+
const errors = [];
|
|
318
|
+
for (const app of apps2) try {
|
|
319
|
+
return await opener(app);
|
|
320
|
+
} catch (error) {
|
|
321
|
+
errors.push(error);
|
|
322
|
+
}
|
|
323
|
+
throw new AggregateError(errors, "Failed to open in all supported apps");
|
|
324
|
+
}, "tryEachApp");
|
|
325
|
+
var baseOpen = /* @__PURE__ */ __name(async (options) => {
|
|
326
|
+
options = {
|
|
327
|
+
wait: false,
|
|
328
|
+
background: false,
|
|
329
|
+
newInstance: false,
|
|
330
|
+
allowNonzeroExitCode: false,
|
|
331
|
+
...options
|
|
332
|
+
};
|
|
333
|
+
const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
|
|
334
|
+
delete options[fallbackAttemptSymbol];
|
|
335
|
+
if (Array.isArray(options.app)) return tryEachApp(options.app, (singleApp) => baseOpen({
|
|
336
|
+
...options,
|
|
337
|
+
app: singleApp,
|
|
338
|
+
[fallbackAttemptSymbol]: true
|
|
339
|
+
}));
|
|
340
|
+
let { name: app, arguments: appArguments = [] } = options.app ?? {};
|
|
341
|
+
appArguments = [...appArguments];
|
|
342
|
+
if (Array.isArray(app)) return tryEachApp(app, (appName) => baseOpen({
|
|
343
|
+
...options,
|
|
344
|
+
app: {
|
|
345
|
+
name: appName,
|
|
346
|
+
arguments: appArguments
|
|
347
|
+
},
|
|
348
|
+
[fallbackAttemptSymbol]: true
|
|
349
|
+
}));
|
|
350
|
+
if (app === "browser" || app === "browserPrivate") {
|
|
351
|
+
const ids = {
|
|
352
|
+
"com.google.chrome": "chrome",
|
|
353
|
+
"google-chrome.desktop": "chrome",
|
|
354
|
+
"com.brave.browser": "brave",
|
|
355
|
+
"org.mozilla.firefox": "firefox",
|
|
356
|
+
"firefox.desktop": "firefox",
|
|
357
|
+
"com.microsoft.msedge": "edge",
|
|
358
|
+
"com.microsoft.edge": "edge",
|
|
359
|
+
"com.microsoft.edgemac": "edge",
|
|
360
|
+
"microsoft-edge.desktop": "edge",
|
|
361
|
+
"com.apple.safari": "safari"
|
|
362
|
+
};
|
|
363
|
+
const flags = {
|
|
364
|
+
chrome: "--incognito",
|
|
365
|
+
brave: "--incognito",
|
|
366
|
+
firefox: "--private-window",
|
|
367
|
+
edge: "--inPrivate"
|
|
368
|
+
};
|
|
369
|
+
let browser;
|
|
370
|
+
if (is_wsl_default) {
|
|
371
|
+
const progId = await wslDefaultBrowser();
|
|
372
|
+
browser = _windowsBrowserProgIdMap.get(progId) ?? {};
|
|
373
|
+
} else browser = await defaultBrowser2();
|
|
374
|
+
if (browser.id in ids) {
|
|
375
|
+
const browserName = ids[browser.id.toLowerCase()];
|
|
376
|
+
if (app === "browserPrivate") {
|
|
377
|
+
if (browserName === "safari") throw new Error("Safari doesn't support opening in private mode via command line");
|
|
378
|
+
appArguments.push(flags[browserName]);
|
|
379
|
+
}
|
|
380
|
+
return baseOpen({
|
|
381
|
+
...options,
|
|
382
|
+
app: {
|
|
383
|
+
name: apps[browserName],
|
|
384
|
+
arguments: appArguments
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
throw new Error(`${browser.name} is not supported as a default browser`);
|
|
389
|
+
}
|
|
390
|
+
let command;
|
|
391
|
+
const cliArguments = [];
|
|
392
|
+
const childProcessOptions = {};
|
|
393
|
+
let shouldUseWindowsInWsl = false;
|
|
394
|
+
if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) shouldUseWindowsInWsl = await canAccessPowerShell();
|
|
395
|
+
if (platform === "darwin") {
|
|
396
|
+
command = "open";
|
|
397
|
+
if (options.wait) cliArguments.push("--wait-apps");
|
|
398
|
+
if (options.background) cliArguments.push("--background");
|
|
399
|
+
if (options.newInstance) cliArguments.push("--new");
|
|
400
|
+
if (app) cliArguments.push("-a", app);
|
|
401
|
+
} else if (platform === "win32" || shouldUseWindowsInWsl) {
|
|
402
|
+
command = await powerShellPath2();
|
|
403
|
+
cliArguments.push(...executePowerShell.argumentsPrefix);
|
|
404
|
+
if (!is_wsl_default) childProcessOptions.windowsVerbatimArguments = true;
|
|
405
|
+
if (is_wsl_default && options.target) options.target = await convertWslPathToWindows(options.target);
|
|
406
|
+
const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
|
|
407
|
+
if (options.wait) encodedArguments.push("-Wait");
|
|
408
|
+
if (app) {
|
|
409
|
+
encodedArguments.push(executePowerShell.escapeArgument(app));
|
|
410
|
+
if (options.target) appArguments.push(options.target);
|
|
411
|
+
} else if (options.target) encodedArguments.push(executePowerShell.escapeArgument(options.target));
|
|
412
|
+
if (appArguments.length > 0) {
|
|
413
|
+
appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
|
|
414
|
+
encodedArguments.push("-ArgumentList", appArguments.join(","));
|
|
415
|
+
}
|
|
416
|
+
options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
|
|
417
|
+
if (!options.wait) childProcessOptions.stdio = "ignore";
|
|
418
|
+
} else {
|
|
419
|
+
if (app) command = app;
|
|
420
|
+
else {
|
|
421
|
+
const isBundled = !__dirname$1 || __dirname$1 === "/";
|
|
422
|
+
let exeLocalXdgOpen = false;
|
|
423
|
+
try {
|
|
424
|
+
await fs4.access(localXdgOpenPath, constants$1.X_OK);
|
|
425
|
+
exeLocalXdgOpen = true;
|
|
426
|
+
} catch {}
|
|
427
|
+
command = process5.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
428
|
+
}
|
|
429
|
+
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
430
|
+
if (!options.wait) {
|
|
431
|
+
childProcessOptions.stdio = "ignore";
|
|
432
|
+
childProcessOptions.detached = true;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
if (platform === "darwin" && appArguments.length > 0) cliArguments.push("--args", ...appArguments);
|
|
436
|
+
if (options.target) cliArguments.push(options.target);
|
|
437
|
+
const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
|
|
438
|
+
if (options.wait) return new Promise((resolve$1, reject) => {
|
|
439
|
+
subprocess.once("error", reject);
|
|
440
|
+
subprocess.once("close", (exitCode) => {
|
|
441
|
+
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
442
|
+
reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
resolve$1(subprocess);
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
if (isFallbackAttempt) return new Promise((resolve$1, reject) => {
|
|
449
|
+
subprocess.once("error", reject);
|
|
450
|
+
subprocess.once("spawn", () => {
|
|
451
|
+
subprocess.once("close", (exitCode) => {
|
|
452
|
+
subprocess.off("error", reject);
|
|
453
|
+
if (exitCode !== 0) {
|
|
454
|
+
reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
subprocess.unref();
|
|
458
|
+
resolve$1(subprocess);
|
|
459
|
+
});
|
|
460
|
+
});
|
|
461
|
+
});
|
|
462
|
+
subprocess.unref();
|
|
463
|
+
return new Promise((resolve$1, reject) => {
|
|
464
|
+
subprocess.once("error", reject);
|
|
465
|
+
subprocess.once("spawn", () => {
|
|
466
|
+
subprocess.off("error", reject);
|
|
467
|
+
resolve$1(subprocess);
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
}, "baseOpen");
|
|
471
|
+
var open = /* @__PURE__ */ __name((target, options) => {
|
|
472
|
+
if (typeof target !== "string") throw new TypeError("Expected a `target`");
|
|
473
|
+
return baseOpen({
|
|
474
|
+
...options,
|
|
475
|
+
target
|
|
476
|
+
});
|
|
477
|
+
}, "open");
|
|
478
|
+
function detectArchBinary(binary) {
|
|
479
|
+
if (typeof binary === "string" || Array.isArray(binary)) return binary;
|
|
480
|
+
const { [arch$1]: archBinary } = binary;
|
|
481
|
+
if (!archBinary) throw new Error(`${arch$1} is not supported`);
|
|
482
|
+
return archBinary;
|
|
483
|
+
}
|
|
484
|
+
__name(detectArchBinary, "detectArchBinary");
|
|
485
|
+
function detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {
|
|
486
|
+
if (wsl && is_wsl_default) return detectArchBinary(wsl);
|
|
487
|
+
if (!platformBinary) throw new Error(`${platform} is not supported`);
|
|
488
|
+
return detectArchBinary(platformBinary);
|
|
489
|
+
}
|
|
490
|
+
__name(detectPlatformBinary, "detectPlatformBinary");
|
|
491
|
+
var apps = {
|
|
492
|
+
browser: "browser",
|
|
493
|
+
browserPrivate: "browserPrivate"
|
|
494
|
+
};
|
|
495
|
+
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
496
|
+
darwin: "google chrome",
|
|
497
|
+
win32: "chrome",
|
|
498
|
+
linux: [
|
|
499
|
+
"google-chrome",
|
|
500
|
+
"google-chrome-stable",
|
|
501
|
+
"chromium",
|
|
502
|
+
"chromium-browser"
|
|
503
|
+
]
|
|
504
|
+
}, { wsl: {
|
|
505
|
+
ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
|
|
506
|
+
x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
|
|
507
|
+
} }));
|
|
508
|
+
defineLazyProperty(apps, "brave", () => detectPlatformBinary({
|
|
509
|
+
darwin: "brave browser",
|
|
510
|
+
win32: "brave",
|
|
511
|
+
linux: ["brave-browser", "brave"]
|
|
512
|
+
}, { wsl: {
|
|
513
|
+
ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
|
|
514
|
+
x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
|
|
515
|
+
} }));
|
|
516
|
+
defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
|
|
517
|
+
darwin: "firefox",
|
|
518
|
+
win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
|
|
519
|
+
linux: "firefox"
|
|
520
|
+
}, { wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" }));
|
|
521
|
+
defineLazyProperty(apps, "edge", () => detectPlatformBinary({
|
|
522
|
+
darwin: "microsoft edge",
|
|
523
|
+
win32: "msedge",
|
|
524
|
+
linux: ["microsoft-edge", "microsoft-edge-dev"]
|
|
525
|
+
}, { wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" }));
|
|
526
|
+
defineLazyProperty(apps, "safari", () => detectPlatformBinary({ darwin: "Safari" }));
|
|
527
|
+
var open_default = open;
|
|
528
|
+
|
|
529
|
+
//#endregion
|
|
530
|
+
export { open_default as default };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
//#region package.json
|
|
2
|
+
var package_default = {
|
|
3
|
+
name: "@cloudflare/vite-plugin",
|
|
4
|
+
version: "1.65.0",
|
|
5
|
+
description: "Cloudflare plugin for Vite",
|
|
6
|
+
keywords: [
|
|
7
|
+
"cloudflare",
|
|
8
|
+
"cloudflare-workers",
|
|
9
|
+
"vite",
|
|
10
|
+
"vite-plugin",
|
|
11
|
+
"workers"
|
|
12
|
+
],
|
|
13
|
+
homepage: "https://github.com/cloudflare/workers-sdk/tree/vite-plugin-v1/packages/vite-plugin-cloudflare#readme",
|
|
14
|
+
bugs: { "url": "https://github.com/cloudflare/workers-sdk/issues" },
|
|
15
|
+
license: "MIT",
|
|
16
|
+
repository: {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/cloudflare/workers-sdk.git",
|
|
19
|
+
"directory": "packages/vite-plugin-cloudflare"
|
|
20
|
+
},
|
|
21
|
+
files: ["dist"],
|
|
22
|
+
type: "module",
|
|
23
|
+
sideEffects: false,
|
|
24
|
+
main: "./dist/index.mjs",
|
|
25
|
+
types: "./dist/index.d.mts",
|
|
26
|
+
exports: { ".": {
|
|
27
|
+
"types": "./dist/index.d.mts",
|
|
28
|
+
"import": "./dist/index.mjs"
|
|
29
|
+
} },
|
|
30
|
+
publishConfig: { "access": "public" },
|
|
31
|
+
scripts: {
|
|
32
|
+
"build": "tsdown",
|
|
33
|
+
"check:type": "tsc --build",
|
|
34
|
+
"dev": "tsdown --watch",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"test:ci": "pnpm test",
|
|
37
|
+
"test:e2e": "vitest run -c e2e/vitest.config.ts",
|
|
38
|
+
"test:watch": "vitest"
|
|
39
|
+
},
|
|
40
|
+
dependencies: {
|
|
41
|
+
"@cloudflare/unenv-preset": "2.16.2",
|
|
42
|
+
"miniflare": "5.20261019.2-beta",
|
|
43
|
+
"unenv": "2.0.0-rc.24",
|
|
44
|
+
"wrangler": "4.152.0",
|
|
45
|
+
"ws": "8.22.0"
|
|
46
|
+
},
|
|
47
|
+
devDependencies: {
|
|
48
|
+
"@cloudflare/containers-shared": "0.23.2",
|
|
49
|
+
"@cloudflare/mock-npm-registry": "workspace:*",
|
|
50
|
+
"@cloudflare/remote-bindings": "workspace:*",
|
|
51
|
+
"@cloudflare/workers-shared": "workspace:*",
|
|
52
|
+
"@cloudflare/workers-tsconfig": "workspace:*",
|
|
53
|
+
"@cloudflare/workers-types": "5.20261019.1",
|
|
54
|
+
"@cloudflare/workers-utils": "0.48.0",
|
|
55
|
+
"@remix-run/node-fetch-server": "0.8.1",
|
|
56
|
+
"@types/node": "22.15.17",
|
|
57
|
+
"@types/semver": "7.8.0",
|
|
58
|
+
"@types/ws": "8.18.2",
|
|
59
|
+
"am-i-vibing": "0.5.0",
|
|
60
|
+
"defu": "6.1.7",
|
|
61
|
+
"get-port": "7.2.0",
|
|
62
|
+
"magic-string": "0.30.21",
|
|
63
|
+
"mlly": "1.8.2",
|
|
64
|
+
"open": "11.0.0",
|
|
65
|
+
"picocolors": "1.1.1",
|
|
66
|
+
"qr": "0.6.0",
|
|
67
|
+
"semver": "7.8.5",
|
|
68
|
+
"tinyglobby": "0.2.16",
|
|
69
|
+
"tree-kill": "1.2.2",
|
|
70
|
+
"tsdown": "0.16.3",
|
|
71
|
+
"typescript": "5.8.3",
|
|
72
|
+
"vite": "catalog:default",
|
|
73
|
+
"vite-legacy": "npm:vite@7.1.12",
|
|
74
|
+
"vitest": "5.0.4"
|
|
75
|
+
},
|
|
76
|
+
peerDependencies: {
|
|
77
|
+
"vite": "^6.1.0 || ^7.0.0 || ^8.0.0",
|
|
78
|
+
"wrangler": "^4.152.0"
|
|
79
|
+
},
|
|
80
|
+
"workers-sdk": { "prerelease": true }
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
export { package_default as default };
|