@nocobase/plugin-ai 2.1.0-alpha.26 → 2.1.0-alpha.28
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/build.config.ts +16 -0
- package/dist/ai/ai-employees/dara.js +1 -0
- package/dist/ai/docs/nocobase/ai/ai-quick-start.md +60 -0
- package/dist/ai/docs/nocobase/ai/claude-code/index.md +107 -0
- package/dist/ai/docs/nocobase/ai/codex/index.md +104 -0
- package/dist/ai/docs/nocobase/ai/hermes-agent/index.md +124 -0
- package/dist/ai/docs/nocobase/ai/index.md +102 -0
- package/dist/ai/docs/nocobase/ai/install-upgrade-migration.mdx +407 -0
- package/dist/ai/docs/nocobase/ai/mcp/index.md +167 -0
- package/dist/ai/docs/nocobase/ai/openclaw/index.md +112 -0
- package/dist/ai/docs/nocobase/ai/opencode/index.md +106 -0
- package/dist/ai/docs/nocobase/ai/quick-start.mdx +175 -0
- package/dist/ai/docs/nocobase/ai/workbuddy/index.md +119 -0
- package/dist/ai/docs/nocobase/ai-builder/acl.md +92 -0
- package/dist/ai/docs/nocobase/ai-builder/data-modeling.md +95 -0
- package/dist/ai/docs/nocobase/ai-builder/dsl-reconciler.md +90 -0
- package/dist/ai/docs/nocobase/ai-builder/env-bootstrap.md +116 -0
- package/dist/ai/docs/nocobase/ai-builder/index.md +127 -0
- package/dist/ai/docs/nocobase/ai-builder/plugin-manage.md +80 -0
- package/dist/ai/docs/nocobase/ai-builder/publish.md +95 -0
- package/dist/ai/docs/nocobase/ai-builder/security.md +233 -0
- package/dist/ai/docs/nocobase/ai-builder/ui-builder.md +100 -0
- package/dist/ai/docs/nocobase/ai-builder/workflow.md +171 -0
- package/dist/ai/docs/nocobase/ai-dev/capabilities.md +234 -0
- package/dist/ai/docs/nocobase/ai-dev/index.md +102 -0
- package/dist/ai/docs/nocobase/ai-dev/watermark-plugin.md +147 -0
- package/dist/ai/docs/nocobase/ai-employees/configuration/admin-configuration.md +278 -0
- package/dist/ai/docs/nocobase/ai-employees/configuration/prompt-engineering-guide.md +319 -0
- package/dist/ai/docs/nocobase/ai-employees/features/built-in-employee.md +231 -0
- package/dist/ai/docs/nocobase/ai-employees/features/collaborate.md +34 -0
- package/dist/ai/docs/nocobase/ai-employees/features/enable-ai-employee.md +20 -0
- package/dist/ai/docs/nocobase/ai-employees/features/llm-service.md +41 -0
- package/dist/ai/docs/nocobase/ai-employees/features/mcp.md +68 -0
- package/dist/ai/docs/nocobase/ai-employees/features/new-ai-employees.md +43 -0
- package/dist/ai/docs/nocobase/ai-employees/features/pick-block.md +29 -0
- package/dist/ai/docs/nocobase/ai-employees/features/skills.md +39 -0
- package/dist/ai/docs/nocobase/ai-employees/features/task.md +41 -0
- package/dist/ai/docs/nocobase/ai-employees/features/tools.md +60 -0
- package/dist/ai/docs/nocobase/ai-employees/features/web-search.md +39 -0
- package/dist/ai/docs/nocobase/ai-employees/file-manager.md +18 -0
- package/dist/ai/docs/nocobase/ai-employees/index.md +72 -0
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/index.md +25 -0
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base.md +82 -0
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/rag.md +29 -0
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/vector-database.md +32 -0
- package/dist/ai/docs/nocobase/ai-employees/knowledge-base/vector-store.md +24 -0
- package/dist/ai/docs/nocobase/ai-employees/permission.md +211 -0
- package/dist/ai/docs/nocobase/ai-employees/quick-start.md +89 -0
- package/dist/ai/docs/nocobase/ai-employees/scenarios/business-report.md +46 -0
- package/dist/ai/docs/nocobase/ai-employees/scenarios/viz-crm.md +248 -0
- package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/employee/approval.md +31 -0
- package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/employee/configuration.md +133 -0
- package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/llm/chat.md +88 -0
- package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/llm/multimodal-chat.md +21 -0
- package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/llm/structured-output.md +59 -0
- package/dist/ai/docs/nocobase/api/acl/acl.md +7 -0
- package/dist/ai/docs/nocobase/api/app/env.md +288 -0
- package/dist/ai/docs/nocobase/api/auth/auth-manager.md +175 -0
- package/dist/ai/docs/nocobase/api/auth/auth.md +103 -0
- package/dist/ai/docs/nocobase/api/auth/base-auth.md +70 -0
- package/dist/ai/docs/nocobase/api/cache/cache-manager.md +194 -0
- package/dist/ai/docs/nocobase/api/cache/cache.md +60 -0
- package/dist/ai/docs/nocobase/api/cli/api/dynamic.md +47 -0
- package/dist/ai/docs/nocobase/api/cli/api/index.md +49 -0
- package/dist/ai/docs/nocobase/api/cli/api/resource/create.md +40 -0
- package/dist/ai/docs/nocobase/api/cli/api/resource/destroy.md +39 -0
- package/dist/ai/docs/nocobase/api/cli/api/resource/get.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/api/resource/index.md +55 -0
- package/dist/ai/docs/nocobase/api/cli/api/resource/list.md +46 -0
- package/dist/ai/docs/nocobase/api/cli/api/resource/query.md +44 -0
- package/dist/ai/docs/nocobase/api/cli/api/resource/update.md +44 -0
- package/dist/ai/docs/nocobase/api/cli/app/down.md +37 -0
- package/dist/ai/docs/nocobase/api/cli/app/index.md +42 -0
- package/dist/ai/docs/nocobase/api/cli/app/logs.md +38 -0
- package/dist/ai/docs/nocobase/api/cli/app/restart.md +46 -0
- package/dist/ai/docs/nocobase/api/cli/app/start.md +47 -0
- package/dist/ai/docs/nocobase/api/cli/app/stop.md +37 -0
- package/dist/ai/docs/nocobase/api/cli/app/upgrade.md +39 -0
- package/dist/ai/docs/nocobase/api/cli/db/index.md +39 -0
- package/dist/ai/docs/nocobase/api/cli/db/logs.md +37 -0
- package/dist/ai/docs/nocobase/api/cli/db/ps.md +34 -0
- package/dist/ai/docs/nocobase/api/cli/db/start.md +36 -0
- package/dist/ai/docs/nocobase/api/cli/db/stop.md +36 -0
- package/dist/ai/docs/nocobase/api/cli/env/add.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/env/auth.md +37 -0
- package/dist/ai/docs/nocobase/api/cli/env/index.md +44 -0
- package/dist/ai/docs/nocobase/api/cli/env/info.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/env/list.md +33 -0
- package/dist/ai/docs/nocobase/api/cli/env/remove.md +35 -0
- package/dist/ai/docs/nocobase/api/cli/env/update.md +40 -0
- package/dist/ai/docs/nocobase/api/cli/env/use.md +32 -0
- package/dist/ai/docs/nocobase/api/cli/index.md +153 -0
- package/dist/ai/docs/nocobase/api/cli/init.md +98 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/disable.md +35 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/enable.md +35 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/index.md +36 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/list.md +34 -0
- package/dist/ai/docs/nocobase/api/cli/scaffold/index.md +34 -0
- package/dist/ai/docs/nocobase/api/cli/scaffold/migration.md +35 -0
- package/dist/ai/docs/nocobase/api/cli/scaffold/plugin.md +34 -0
- package/dist/ai/docs/nocobase/api/cli/self/check.md +34 -0
- package/dist/ai/docs/nocobase/api/cli/self/index.md +35 -0
- package/dist/ai/docs/nocobase/api/cli/self/update.md +37 -0
- package/dist/ai/docs/nocobase/api/cli/skills/check.md +33 -0
- package/dist/ai/docs/nocobase/api/cli/skills/index.md +38 -0
- package/dist/ai/docs/nocobase/api/cli/skills/install.md +36 -0
- package/dist/ai/docs/nocobase/api/cli/skills/remove.md +36 -0
- package/dist/ai/docs/nocobase/api/cli/skills/update.md +36 -0
- package/dist/ai/docs/nocobase/api/cli/source/build.md +40 -0
- package/dist/ai/docs/nocobase/api/cli/source/dev.md +44 -0
- package/dist/ai/docs/nocobase/api/cli/source/download.md +59 -0
- package/dist/ai/docs/nocobase/api/cli/source/index.md +39 -0
- package/dist/ai/docs/nocobase/api/cli/source/test.md +53 -0
- package/dist/ai/docs/nocobase/api/client/application.md +1 -0
- package/dist/ai/docs/nocobase/api/client/plugin.md +5 -0
- package/dist/ai/docs/nocobase/api/data-source-manager/data-source-manager.md +56 -0
- package/dist/ai/docs/nocobase/api/data-source-manager/data-source.md +79 -0
- package/dist/ai/docs/nocobase/api/data-source-manager/i-collection-manager.md +110 -0
- package/dist/ai/docs/nocobase/api/data-source-manager/i-collection.md +69 -0
- package/dist/ai/docs/nocobase/api/data-source-manager/i-field.md +33 -0
- package/dist/ai/docs/nocobase/api/data-source-manager/i-model.md +15 -0
- package/dist/ai/docs/nocobase/api/data-source-manager/i-repository.md +62 -0
- package/dist/ai/docs/nocobase/api/database/collection.md +514 -0
- package/dist/ai/docs/nocobase/api/database/field.md +558 -0
- package/dist/ai/docs/nocobase/api/database/index.md +1193 -0
- package/dist/ai/docs/nocobase/api/database/interfaces/base-interface.md +29 -0
- package/dist/ai/docs/nocobase/api/database/operators.md +808 -0
- package/dist/ai/docs/nocobase/api/database/relation-repository/belongs-to-many-repository.md +191 -0
- package/dist/ai/docs/nocobase/api/database/relation-repository/belongs-to-repository.md +4 -0
- package/dist/ai/docs/nocobase/api/database/relation-repository/has-many-repository.md +134 -0
- package/dist/ai/docs/nocobase/api/database/relation-repository/has-one-repository.md +187 -0
- package/dist/ai/docs/nocobase/api/database/relation-repository/index.md +48 -0
- package/dist/ai/docs/nocobase/api/database/repository.md +677 -0
- package/dist/ai/docs/nocobase/api/database/shared/create-options.md +22 -0
- package/dist/ai/docs/nocobase/api/database/shared/destroy-options.md +17 -0
- package/dist/ai/docs/nocobase/api/database/shared/find-one.md +9 -0
- package/dist/ai/docs/nocobase/api/database/shared/find-options.md +1 -0
- package/dist/ai/docs/nocobase/api/database/shared/transaction.md +1 -0
- package/dist/ai/docs/nocobase/api/database/shared/update-options.md +24 -0
- package/dist/ai/docs/nocobase/api/database/shared.md +8 -0
- package/dist/ai/docs/nocobase/api/flow-engine/data-source-manager.md +1 -0
- package/dist/ai/docs/nocobase/api/flow-engine/flow-context.md +176 -0
- package/dist/ai/docs/nocobase/api/flow-engine/flow-engine.md +6 -0
- package/dist/ai/docs/nocobase/api/flow-engine/flow-model.md +7 -0
- package/dist/ai/docs/nocobase/api/flow-engine/flow-resource.md +1 -0
- package/dist/ai/docs/nocobase/api/flow-engine/resource.md +384 -0
- package/dist/ai/docs/nocobase/api/index.md +4 -0
- package/dist/ai/docs/nocobase/api/logger/logger.md +165 -0
- package/dist/ai/docs/nocobase/api/sdk/auth.md +70 -0
- package/dist/ai/docs/nocobase/api/sdk/index.md +151 -0
- package/dist/ai/docs/nocobase/api/sdk/storage.md +54 -0
- package/dist/ai/docs/nocobase/api/server/app-command.md +9 -0
- package/dist/ai/docs/nocobase/api/server/application.md +1 -0
- package/dist/ai/docs/nocobase/api/server/audit-manager.md +141 -0
- package/dist/ai/docs/nocobase/api/server/context.md +17 -0
- package/dist/ai/docs/nocobase/api/server/migration.md +305 -0
- package/dist/ai/docs/nocobase/api/server/plugin.md +13 -0
- package/dist/ai/docs/nocobase/api/telemetry/metric.md +105 -0
- package/dist/ai/docs/nocobase/api/telemetry/telemetry.md +67 -0
- package/dist/ai/docs/nocobase/api/telemetry/trace.md +91 -0
- package/dist/ai/docs/nocobase/auth-verification/2fa/index.md +50 -0
- package/dist/ai/docs/nocobase/auth-verification/api-keys/index.md +44 -0
- package/dist/ai/docs/nocobase/auth-verification/auth/authenticators.md +35 -0
- package/dist/ai/docs/nocobase/auth-verification/auth/dev/api.md +112 -0
- package/dist/ai/docs/nocobase/auth-verification/auth/dev/index.md +193 -0
- package/dist/ai/docs/nocobase/auth-verification/auth/index.md +20 -0
- package/dist/ai/docs/nocobase/auth-verification/auth/password.md +127 -0
- package/dist/ai/docs/nocobase/auth-verification/auth-cas/index.md +44 -0
- package/dist/ai/docs/nocobase/auth-verification/auth-dingtalk/index.md +72 -0
- package/dist/ai/docs/nocobase/auth-verification/auth-ldap/index.md +59 -0
- package/dist/ai/docs/nocobase/auth-verification/auth-oidc/examples/google.md +27 -0
- package/dist/ai/docs/nocobase/auth-verification/auth-oidc/examples/microsoft.md +50 -0
- package/dist/ai/docs/nocobase/auth-verification/auth-oidc/index.md +96 -0
- package/dist/ai/docs/nocobase/auth-verification/auth-saml/examples/google.md +49 -0
- package/dist/ai/docs/nocobase/auth-verification/auth-saml/index.md +67 -0
- package/dist/ai/docs/nocobase/auth-verification/auth-sms/index.md +60 -0
- package/dist/ai/docs/nocobase/auth-verification/auth-wecom/index.md +144 -0
- package/dist/ai/docs/nocobase/auth-verification/index.md +1 -0
- package/dist/ai/docs/nocobase/auth-verification/verification/dev/api.md +63 -0
- package/dist/ai/docs/nocobase/auth-verification/verification/dev/scene.md +13 -0
- package/dist/ai/docs/nocobase/auth-verification/verification/dev/sms-type.md +95 -0
- package/dist/ai/docs/nocobase/auth-verification/verification/dev/type.md +11 -0
- package/dist/ai/docs/nocobase/auth-verification/verification/index.md +37 -0
- package/dist/ai/docs/nocobase/auth-verification/verification/sms.md +71 -0
- package/dist/ai/docs/nocobase/auth-verification/verification-totp/index.md +48 -0
- package/dist/ai/docs/nocobase/calculation-engine/formula.md +323 -0
- package/dist/ai/docs/nocobase/calculation-engine/index.md +30 -0
- package/dist/ai/docs/nocobase/calculation-engine/math.md +298 -0
- package/dist/ai/docs/nocobase/changelog/2.1.0-beta-24.md +134 -0
- package/dist/ai/docs/nocobase/cluster-mode/development.md +141 -0
- package/dist/ai/docs/nocobase/cluster-mode/index.md +36 -0
- package/dist/ai/docs/nocobase/cluster-mode/kubernetes.md +386 -0
- package/dist/ai/docs/nocobase/cluster-mode/operations.md +63 -0
- package/dist/ai/docs/nocobase/cluster-mode/preparations.md +164 -0
- package/dist/ai/docs/nocobase/cluster-mode/services-splitting.md +85 -0
- package/dist/ai/docs/nocobase/data-sources/calendar/calendar-collection.md +14 -0
- package/dist/ai/docs/nocobase/data-sources/calendar/index.md +111 -0
- package/dist/ai/docs/nocobase/data-sources/collection-comment/index.md +66 -0
- package/dist/ai/docs/nocobase/data-sources/collection-expression/collection.md +23 -0
- package/dist/ai/docs/nocobase/data-sources/collection-fdw/enable-federated.md +40 -0
- package/dist/ai/docs/nocobase/data-sources/collection-fdw/index.md +72 -0
- package/dist/ai/docs/nocobase/data-sources/collection-sql/index.md +58 -0
- package/dist/ai/docs/nocobase/data-sources/collection-tree/index.md +18 -0
- package/dist/ai/docs/nocobase/data-sources/collection-view/index.md +12 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/china-region.md +11 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/collection-select.md +11 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/json.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/nano-id.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/snowflake-id.md +9 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/sort.md +21 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/uuid.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/associations/index.md +12 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/associations/m2m/index.md +54 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/associations/m2o/index.md +42 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/associations/o2m/index.md +46 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/associations/o2o/index.md +70 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/color.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/email.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/icon.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/input.md +22 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/integer.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/number.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/password.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/percent.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/phone.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/textarea.md +22 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/url.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/checkbox-group.md +9 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/checkbox.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/china-region.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/multiple-select.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/radio-group.md +9 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/select.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/date.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/datetime-without-tz.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/datetime.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/index.md +72 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/time.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/unix-timestamp.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/circle.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/line.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/point.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/polygon.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/index.md +36 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/media/field-attachment.md +21 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/media/markdown.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/media/rich-text.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/created-at.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/created-by.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/space.md +17 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/table-oid.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/updated-at.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/updated-by.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/validation.md +115 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/collection.md +19 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/data-source.md +1 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/index.md +53 -0
- package/dist/ai/docs/nocobase/data-sources/data-modeling/main-vs-external-data-sources.md +165 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-external-mariadb/index.md +18 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-external-mssql/index.md +18 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-external-mysql/index.md +18 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-external-oracle/index.md +40 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-external-postgres/index.md +18 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-kingbase/index.md +121 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-main/general-collection.md +30 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-main/index.md +100 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-main/inheritance-collection.md +22 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-manager/external-database.md +101 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-manager/index.md +42 -0
- package/dist/ai/docs/nocobase/data-sources/data-source-rest-api/index.md +283 -0
- package/dist/ai/docs/nocobase/data-sources/development/index.md +6 -0
- package/dist/ai/docs/nocobase/data-sources/field-attachment-url/index.md +27 -0
- package/dist/ai/docs/nocobase/data-sources/field-china-region/index.md +19 -0
- package/dist/ai/docs/nocobase/data-sources/field-encryption/index.md +100 -0
- package/dist/ai/docs/nocobase/data-sources/field-formula/index.md +17 -0
- package/dist/ai/docs/nocobase/data-sources/field-m2m-array/index.md +46 -0
- package/dist/ai/docs/nocobase/data-sources/field-markdown-vditor/index.md +13 -0
- package/dist/ai/docs/nocobase/data-sources/field-sequence/index.md +17 -0
- package/dist/ai/docs/nocobase/data-sources/field-signature/index.md +36 -0
- package/dist/ai/docs/nocobase/data-sources/field-sort/index.md +163 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/development/index.md +138 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/field-attachment.md +19 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/file-collection.md +40 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/http-api.md +195 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/index.md +37 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/storage/aliyun-oss.md +33 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/storage/amazon-s3.md +10 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/storage/index.md +61 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/storage/local.md +20 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/storage/s3-pro.md +383 -0
- package/dist/ai/docs/nocobase/data-sources/file-manager/storage/tencent-cos.md +33 -0
- package/dist/ai/docs/nocobase/data-sources/graph-collection-manager/index.md +22 -0
- package/dist/ai/docs/nocobase/data-sources/index.md +53 -0
- package/dist/ai/docs/nocobase/data-visualization/best-practices.md +3 -0
- package/dist/ai/docs/nocobase/data-visualization/faq.md +30 -0
- package/dist/ai/docs/nocobase/data-visualization/guide/chart-events.md +80 -0
- package/dist/ai/docs/nocobase/data-visualization/guide/chart-options.md +100 -0
- package/dist/ai/docs/nocobase/data-visualization/guide/context-variables.md +28 -0
- package/dist/ai/docs/nocobase/data-visualization/guide/custom-chart-options.md +172 -0
- package/dist/ai/docs/nocobase/data-visualization/guide/data-query.md +95 -0
- package/dist/ai/docs/nocobase/data-visualization/guide/filters-and-linkage.md +23 -0
- package/dist/ai/docs/nocobase/data-visualization/guide/preview-and-save.md +36 -0
- package/dist/ai/docs/nocobase/data-visualization/guide/sql-data-query.md +76 -0
- package/dist/ai/docs/nocobase/data-visualization/index.md +26 -0
- package/dist/ai/docs/nocobase/data-visualization/quick-start.md +95 -0
- package/dist/ai/docs/nocobase/database/index.md +5 -0
- package/dist/ai/docs/nocobase/development/index.md +49 -0
- package/dist/ai/docs/nocobase/email-manager/advanced/auto-save-draft.md +17 -0
- package/dist/ai/docs/nocobase/email-manager/advanced/batch-send.md +40 -0
- package/dist/ai/docs/nocobase/email-manager/advanced/label.md +18 -0
- package/dist/ai/docs/nocobase/email-manager/advanced/note.md +14 -0
- package/dist/ai/docs/nocobase/email-manager/advanced/todo.md +13 -0
- package/dist/ai/docs/nocobase/email-manager/configuration/faq.md +39 -0
- package/dist/ai/docs/nocobase/email-manager/configuration/gmail.md +198 -0
- package/dist/ai/docs/nocobase/email-manager/configuration/guide.md +56 -0
- package/dist/ai/docs/nocobase/email-manager/configuration/outlook.md +106 -0
- package/dist/ai/docs/nocobase/email-manager/index.md +11 -0
- package/dist/ai/docs/nocobase/email-manager/usage/alias.md +34 -0
- package/dist/ai/docs/nocobase/email-manager/usage/configuration.md +101 -0
- package/dist/ai/docs/nocobase/email-manager/usage/guide.md +100 -0
- package/dist/ai/docs/nocobase/email-manager/usage/signature.md +25 -0
- package/dist/ai/docs/nocobase/email-manager/usage/template.md +25 -0
- package/dist/ai/docs/nocobase/file-manager/development/index.md +172 -0
- package/dist/ai/docs/nocobase/file-manager/field-attachment.md +21 -0
- package/dist/ai/docs/nocobase/file-manager/file-collection.md +34 -0
- package/dist/ai/docs/nocobase/file-manager/file-preview/index.md +11 -0
- package/dist/ai/docs/nocobase/file-manager/file-preview/ms-office.md +60 -0
- package/dist/ai/docs/nocobase/file-manager/http-api.md +188 -0
- package/dist/ai/docs/nocobase/file-manager/index.md +18 -0
- package/dist/ai/docs/nocobase/file-manager/storage/aliyun-oss.md +37 -0
- package/dist/ai/docs/nocobase/file-manager/storage/amazon-s3.md +33 -0
- package/dist/ai/docs/nocobase/file-manager/storage/index.md +69 -0
- package/dist/ai/docs/nocobase/file-manager/storage/local.md +20 -0
- package/dist/ai/docs/nocobase/file-manager/storage/s3-pro.md +387 -0
- package/dist/ai/docs/nocobase/file-manager/storage/tencent-cos.md +33 -0
- package/dist/ai/docs/nocobase/flow-engine/add-sub-model.md +174 -0
- package/dist/ai/docs/nocobase/flow-engine/create-flow-model.md +89 -0
- package/dist/ai/docs/nocobase/flow-engine/create-mock-client.md +85 -0
- package/dist/ai/docs/nocobase/flow-engine/definitions/action-definition.md +495 -0
- package/dist/ai/docs/nocobase/flow-engine/definitions/event-definition.md +461 -0
- package/dist/ai/docs/nocobase/flow-engine/definitions/flow-definition.md +259 -0
- package/dist/ai/docs/nocobase/flow-engine/definitions/model-definition.md +397 -0
- package/dist/ai/docs/nocobase/flow-engine/definitions/step-definition.md +403 -0
- package/dist/ai/docs/nocobase/flow-engine/event-flow.md +94 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-context.md +90 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-definition.md +5 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-engine-and-plugins.md +80 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-model-lifecycle.md +48 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-model-options.md +1 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-model-renderer.md +200 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-model-repository.md +81 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-model-settings.md +101 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-model-usage.md +1 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-model-vs-react-component.md +74 -0
- package/dist/ai/docs/nocobase/flow-engine/flow-model.md +45 -0
- package/dist/ai/docs/nocobase/flow-engine/index.md +59 -0
- package/dist/ai/docs/nocobase/flow-engine/js-model/js-action.md +1 -0
- package/dist/ai/docs/nocobase/flow-engine/js-model/js-block.md +2 -0
- package/dist/ai/docs/nocobase/flow-engine/js-model/js-column.md +1 -0
- package/dist/ai/docs/nocobase/flow-engine/js-model/js-field.md +1 -0
- package/dist/ai/docs/nocobase/flow-engine/js-model/js-item.md +1 -0
- package/dist/ai/docs/nocobase/flow-engine/learning-roadmap.md +3 -0
- package/dist/ai/docs/nocobase/flow-engine/model-definition.md +63 -0
- package/dist/ai/docs/nocobase/flow-engine/observable.md +50 -0
- package/dist/ai/docs/nocobase/flow-engine/quickstart.md +310 -0
- package/dist/ai/docs/nocobase/flow-engine/register-flow-model.md +42 -0
- package/dist/ai/docs/nocobase/flow-engine/runjs-extension-points.md +249 -0
- package/dist/ai/docs/nocobase/flow-engine/ui-schema.md +272 -0
- package/dist/ai/docs/nocobase/flow-engine/uischema.md +9 -0
- package/dist/ai/docs/nocobase/flow-engine/what-is-flow-engine.md +59 -0
- package/dist/ai/docs/nocobase/get-started/deployment/cluster.md +5 -0
- package/dist/ai/docs/nocobase/get-started/deployment/common-commands/docker-compose.md +1 -0
- package/dist/ai/docs/nocobase/get-started/deployment/common-commands/pm2.md +1 -0
- package/dist/ai/docs/nocobase/get-started/deployment/internal.md +1 -0
- package/dist/ai/docs/nocobase/get-started/deployment/intranet/create-nocobase-app.mdx +386 -0
- package/dist/ai/docs/nocobase/get-started/deployment/intranet/docker.mdx +5 -0
- package/dist/ai/docs/nocobase/get-started/deployment/production.md +42 -0
- package/dist/ai/docs/nocobase/get-started/deployment/static-resource-proxy/caddy.md +1 -0
- package/dist/ai/docs/nocobase/get-started/deployment/static-resource-proxy/cdn.md +1 -0
- package/dist/ai/docs/nocobase/get-started/deployment/static-resource-proxy/nginx.md +1 -0
- package/dist/ai/docs/nocobase/get-started/how-nocobase-works.mdx +6 -0
- package/dist/ai/docs/nocobase/get-started/install-upgrade-plugins.mdx +89 -0
- package/dist/ai/docs/nocobase/get-started/installation/create-nocobase-app.mdx +230 -0
- package/dist/ai/docs/nocobase/get-started/installation/docker.mdx +620 -0
- package/dist/ai/docs/nocobase/get-started/installation/env.md +479 -0
- package/dist/ai/docs/nocobase/get-started/installation/git.mdx +112 -0
- package/dist/ai/docs/nocobase/get-started/quickstart.md +58 -0
- package/dist/ai/docs/nocobase/get-started/system-requirements.md +88 -0
- package/dist/ai/docs/nocobase/get-started/translations.md +329 -0
- package/dist/ai/docs/nocobase/get-started/upgrading/create-nocobase-app.md +53 -0
- package/dist/ai/docs/nocobase/get-started/upgrading/docker.md +76 -0
- package/dist/ai/docs/nocobase/get-started/upgrading/git.md +61 -0
- package/dist/ai/docs/nocobase/guide/index.md +109 -0
- package/dist/ai/docs/nocobase/index.md +75 -0
- package/dist/ai/docs/nocobase/integration/api-doc/index.md +59 -0
- package/dist/ai/docs/nocobase/integration/api-keys/index.md +42 -0
- package/dist/ai/docs/nocobase/integration/api-keys/usage.md +291 -0
- package/dist/ai/docs/nocobase/integration/block-iframe/index.md +291 -0
- package/dist/ai/docs/nocobase/integration/embed/index.md +30 -0
- package/dist/ai/docs/nocobase/integration/fdw/enable-federated.md +39 -0
- package/dist/ai/docs/nocobase/integration/fdw/index.md +66 -0
- package/dist/ai/docs/nocobase/integration/index.md +85 -0
- package/dist/ai/docs/nocobase/integration/sso/index.md +135 -0
- package/dist/ai/docs/nocobase/integration/workflow-http-request/index.md +325 -0
- package/dist/ai/docs/nocobase/integration/workflow-webhook/index.md +248 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/action-settings/assign-values.md +39 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/action-settings/bind-workflow.md +43 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/action-settings/double-check.md +18 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/action-settings/edit-button.md +21 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/action-settings/edit-popup.md +33 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/action-settings/linkage-rule.md +65 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/index.md +43 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/permission.md +79 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/add-child.md +9 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/add-new.md +22 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/ai-employee.md +1 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/bulk-edit.md +54 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/bulk-update.md +40 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/custom-request.md +37 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/delete.md +20 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/duplicate.md +95 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/edit.md +25 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/export-attachments.md +46 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/export-pro.md +93 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/export.md +36 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/filter.md +34 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/import-pro.md +136 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/import.md +237 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/js-action.md +97 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/js-item.md +170 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/link.md +32 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/pop-up.md +25 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/refresh.md +4 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/submit.md +29 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/trigger-workflow.md +1 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/update-record.md +39 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/view.md +19 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/block-settings/block-delete.md +8 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/block-settings/block-height.md +41 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/block-settings/block-layout.md +39 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/block-settings/block-linkage-rule.md +37 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/block-settings/block-title.md +8 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/block-settings/data-loading-method.md +15 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/block-settings/data-scope.md +43 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/block-settings/drag-sort.md +45 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/block-settings/field-linkage-rule.md +57 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/block-settings/sorting-rule.md +30 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/calendar.md +129 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/chart.md +17 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/details.md +100 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/form.md +87 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/grid-card.md +87 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/kanban.md +141 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/list.md +91 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/table.md +159 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/filter-blocks/form.md +99 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/filter-blocks/tree.md +57 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/index.md +85 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/other-blocks/action-panel.md +41 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/other-blocks/iframe.md +195 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/other-blocks/js-block.md +113 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/other-blocks/markdown.md +67 -0
- package/dist/ai/docs/nocobase/interface-builder/event-flow.md +261 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/association-field.md +75 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/data-scope.md +48 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/default-value.md +120 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/edit-description.md +16 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/edit-title.md +12 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/edit-tooltip.md +16 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/field-component.md +27 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/number-format.md +32 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/pattern.md +52 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/required.md +35 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/show-label.md +14 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/title-field.md +28 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/field-settings/validation-rules.md +48 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/generic/detail-form-item.md +68 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/generic/filter-form-item.md +29 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/generic/form-item.md +57 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/generic/table-column.md +92 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/index.md +38 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/cascade-select.md +42 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/date-picker.md +30 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/file-manager.md +14 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-column.md +98 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-field.md +139 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-item.md +91 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/picker.md +35 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/select.md +65 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/sub-detail.md +39 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/sub-form.md +42 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/sub-table-popup.md +64 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/sub-table.md +56 -0
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/title.md +52 -0
- package/dist/ai/docs/nocobase/interface-builder/form-drafts.md +19 -0
- package/dist/ai/docs/nocobase/interface-builder/index.md +58 -0
- package/dist/ai/docs/nocobase/interface-builder/linkage-rule.md +118 -0
- package/dist/ai/docs/nocobase/interface-builder/runjs.md +71 -0
- package/dist/ai/docs/nocobase/interface-builder/ui-templates.md +167 -0
- package/dist/ai/docs/nocobase/interface-builder/variables.md +267 -0
- package/dist/ai/docs/nocobase/log-and-monitor/logger/index.md +152 -0
- package/dist/ai/docs/nocobase/log-and-monitor/logger/overview.md +44 -0
- package/dist/ai/docs/nocobase/log-and-monitor/telemetry/exporter-http.md +23 -0
- package/dist/ai/docs/nocobase/log-and-monitor/telemetry/exporter-prometheus.md +55 -0
- package/dist/ai/docs/nocobase/log-and-monitor/telemetry/index.md +67 -0
- package/dist/ai/docs/nocobase/multi-app/multi-app/index.md +66 -0
- package/dist/ai/docs/nocobase/multi-app/multi-app/local.md +106 -0
- package/dist/ai/docs/nocobase/multi-app/multi-app/remote.md +232 -0
- package/dist/ai/docs/nocobase/multi-app/multi-space/index.md +132 -0
- package/dist/ai/docs/nocobase/notification-manager/development/api.md +152 -0
- package/dist/ai/docs/nocobase/notification-manager/development/extension.md +300 -0
- package/dist/ai/docs/nocobase/notification-manager/index.md +43 -0
- package/dist/ai/docs/nocobase/notification-manager/notification-email/index.md +32 -0
- package/dist/ai/docs/nocobase/notification-manager/notification-in-app-message/index.md +60 -0
- package/dist/ai/docs/nocobase/notification-manager/wecom/index.md +34 -0
- package/dist/ai/docs/nocobase/ops-management/backup-manager/index.mdx +191 -0
- package/dist/ai/docs/nocobase/ops-management/migration-manager/index.md +197 -0
- package/dist/ai/docs/nocobase/ops-management/release-management/index.md +52 -0
- package/dist/ai/docs/nocobase/ops-management/variables-and-secrets/index.md +271 -0
- package/dist/ai/docs/nocobase/plugin-development/ai-development.md +7 -0
- package/dist/ai/docs/nocobase/plugin-development/build.md +86 -0
- package/dist/ai/docs/nocobase/plugin-development/client/acl.md +13 -0
- package/dist/ai/docs/nocobase/plugin-development/client/appendix/cheatsheet.md +108 -0
- package/dist/ai/docs/nocobase/plugin-development/client/appendix/faq.md +297 -0
- package/dist/ai/docs/nocobase/plugin-development/client/component/i18n.md +186 -0
- package/dist/ai/docs/nocobase/plugin-development/client/component/index.md +260 -0
- package/dist/ai/docs/nocobase/plugin-development/client/component/styles-themes.md +279 -0
- package/dist/ai/docs/nocobase/plugin-development/client/component-vs-flow-model.md +135 -0
- package/dist/ai/docs/nocobase/plugin-development/client/context.md +8 -0
- package/dist/ai/docs/nocobase/plugin-development/client/ctx/common-capabilities.md +492 -0
- package/dist/ai/docs/nocobase/plugin-development/client/ctx/index.md +112 -0
- package/dist/ai/docs/nocobase/plugin-development/client/ctx/what-is-context.md +9 -0
- package/dist/ai/docs/nocobase/plugin-development/client/data-source-manager.md +8 -0
- package/dist/ai/docs/nocobase/plugin-development/client/examples/custom-action.md +274 -0
- package/dist/ai/docs/nocobase/plugin-development/client/examples/custom-block.md +201 -0
- package/dist/ai/docs/nocobase/plugin-development/client/examples/custom-field.md +171 -0
- package/dist/ai/docs/nocobase/plugin-development/client/examples/fullstack-plugin.md +514 -0
- package/dist/ai/docs/nocobase/plugin-development/client/examples/index.md +31 -0
- package/dist/ai/docs/nocobase/plugin-development/client/examples/settings-page.md +406 -0
- package/dist/ai/docs/nocobase/plugin-development/client/flow-engine/action.md +134 -0
- package/dist/ai/docs/nocobase/plugin-development/client/flow-engine/block.md +197 -0
- package/dist/ai/docs/nocobase/plugin-development/client/flow-engine/field.md +79 -0
- package/dist/ai/docs/nocobase/plugin-development/client/flow-engine/index.md +245 -0
- package/dist/ai/docs/nocobase/plugin-development/client/i18n.md +57 -0
- package/dist/ai/docs/nocobase/plugin-development/client/index.md +58 -0
- package/dist/ai/docs/nocobase/plugin-development/client/logger.md +128 -0
- package/dist/ai/docs/nocobase/plugin-development/client/plugin.md +133 -0
- package/dist/ai/docs/nocobase/plugin-development/client/request.md +174 -0
- package/dist/ai/docs/nocobase/plugin-development/client/resource.md +8 -0
- package/dist/ai/docs/nocobase/plugin-development/client/router.md +244 -0
- package/dist/ai/docs/nocobase/plugin-development/client/test.md +14 -0
- package/dist/ai/docs/nocobase/plugin-development/common/i18n.md +135 -0
- package/dist/ai/docs/nocobase/plugin-development/dependency-management.md +136 -0
- package/dist/ai/docs/nocobase/plugin-development/index.md +97 -0
- package/dist/ai/docs/nocobase/plugin-development/languages.md +123 -0
- package/dist/ai/docs/nocobase/plugin-development/lifecycle.md +12 -0
- package/dist/ai/docs/nocobase/plugin-development/plugin-upgrade-guide.md +2 -0
- package/dist/ai/docs/nocobase/plugin-development/project-structure.md +122 -0
- package/dist/ai/docs/nocobase/plugin-development/server/acl.md +188 -0
- package/dist/ai/docs/nocobase/plugin-development/server/app.md +15 -0
- package/dist/ai/docs/nocobase/plugin-development/server/cache.md +238 -0
- package/dist/ai/docs/nocobase/plugin-development/server/collection-options.md +1470 -0
- package/dist/ai/docs/nocobase/plugin-development/server/collections.md +230 -0
- package/dist/ai/docs/nocobase/plugin-development/server/command.md +164 -0
- package/dist/ai/docs/nocobase/plugin-development/server/context.md +138 -0
- package/dist/ai/docs/nocobase/plugin-development/server/cron-job-manager.md +101 -0
- package/dist/ai/docs/nocobase/plugin-development/server/data-source-manager.md +83 -0
- package/dist/ai/docs/nocobase/plugin-development/server/database.md +135 -0
- package/dist/ai/docs/nocobase/plugin-development/server/event.md +117 -0
- package/dist/ai/docs/nocobase/plugin-development/server/i18n.md +145 -0
- package/dist/ai/docs/nocobase/plugin-development/server/index.md +37 -0
- package/dist/ai/docs/nocobase/plugin-development/server/logger.md +120 -0
- package/dist/ai/docs/nocobase/plugin-development/server/middleware.md +163 -0
- package/dist/ai/docs/nocobase/plugin-development/server/migration.md +213 -0
- package/dist/ai/docs/nocobase/plugin-development/server/plugin.md +109 -0
- package/dist/ai/docs/nocobase/plugin-development/server/resource-manager.md +236 -0
- package/dist/ai/docs/nocobase/plugin-development/server/telemetry.md +118 -0
- package/dist/ai/docs/nocobase/plugin-development/server/test.md +226 -0
- package/dist/ai/docs/nocobase/plugin-development/write-your-first-plugin.md +161 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-acl/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-action-bulk-edit/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-action-bulk-update/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-action-custom-request/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-action-duplicate/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-action-export/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-action-export-pro/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-action-import/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-action-import-pro/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-action-print/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-action-template-print/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-ai/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-ai-gigachat/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-ai-knowledge-base/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-api-doc/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-api-keys/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-app-supervisor/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-async-task-manager/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-audit-logger/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-audit-logs/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-auth/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-auth-cas/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-auth-dingtalk/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-auth-ldap/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-auth-oidc/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-auth-saml/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-auth-sms/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-auth-wecom/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-backup-restore/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-backups/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-grid-card/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-iframe/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-list/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-markdown/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-multi-step-form/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-template/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-tree/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-workbench/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-calendar/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-charts/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-client/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-collection-fdw/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-collection-sql/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-collection-tree/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-comments/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-custom-brand/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-custom-variables/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-external-clickhouse/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-external-doris/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-external-mariadb/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-external-mssql/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-external-mysql/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-external-oracle/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-external-postgres/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-kingbase/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-main/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-manager/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-source-rest-api/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-visualization/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-data-visualization-echarts/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-departments/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-email-manager/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-embed/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-environment-variables/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-error-handler/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-attachment-url/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-china-region/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-code/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-component-mask/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-encryption/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-formula/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-m2m-array/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-markdown-vditor/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-sequence/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-signature/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-field-sort/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-file-manager/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-file-previewer-office/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-file-storage-s3-pro/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-flow-engine/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-form-drafts/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-gantt/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-graph-collection-manager/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-ip-restriction/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-kanban/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-license/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-locale-tester/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-localization/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-lock-adapter-redis/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-logger/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-map/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-migration-manager/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-mobile/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-mobile-client/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-multi-app-manager/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-multi-app-share-collection/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-multi-keyword-filter/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-multi-space/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-notification-email/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-notification-in-app-message/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-notification-manager/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-password-policy/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-public-forms/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-pubsub-adapter-redis/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-queue-adapter-rabbitmq/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-queue-adapter-redis/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-record-history/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-request-encryption/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-snapshot-field/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-system-settings/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-telemetry/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-telemetry-prometheus/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-text-copy/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-theme-editor/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-two-factor-authentication/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-ui-schema-storage/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-ui-templates/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-user-data-sync/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-users/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-verification/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-verification-totp-authenticator/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workerid-allocator-redis/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-action-trigger/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-aggregate/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-approval/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-cc/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-custom-action-trigger/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-date-calculation/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-delay/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-dynamic-calculation/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-javascript/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-json-query/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-json-variable-mapping/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-loop/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-mailer/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-manual/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-notification/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-parallel/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-request/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-request-interceptor/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-response-message/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-sql/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-subflow/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-test/index.md +12 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-variable/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-webhook/index.md +15 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/preset-cluster/index.md +16 -0
- package/dist/ai/docs/nocobase/plugins/index.mdx +8 -0
- package/dist/ai/docs/nocobase/record-history/index.md +99 -0
- package/dist/ai/docs/nocobase/routes/index.md +65 -0
- package/dist/ai/docs/nocobase/runjs/context/block-model.md +90 -0
- package/dist/ai/docs/nocobase/runjs/context/collection-field.md +132 -0
- package/dist/ai/docs/nocobase/runjs/context/collection.md +100 -0
- package/dist/ai/docs/nocobase/runjs/context/data-source-manager.md +120 -0
- package/dist/ai/docs/nocobase/runjs/context/data-source.md +136 -0
- package/dist/ai/docs/nocobase/runjs/context/element.md +104 -0
- package/dist/ai/docs/nocobase/runjs/context/exit-all.md +96 -0
- package/dist/ai/docs/nocobase/runjs/context/exit.md +104 -0
- package/dist/ai/docs/nocobase/runjs/context/filter-manager.md +102 -0
- package/dist/ai/docs/nocobase/runjs/context/form.md +169 -0
- package/dist/ai/docs/nocobase/runjs/context/get-model.md +85 -0
- package/dist/ai/docs/nocobase/runjs/context/get-value.md +65 -0
- package/dist/ai/docs/nocobase/runjs/context/get-var.md +157 -0
- package/dist/ai/docs/nocobase/runjs/context/i18n.md +80 -0
- package/dist/ai/docs/nocobase/runjs/context/import-async.md +488 -0
- package/dist/ai/docs/nocobase/runjs/context/init-resource.md +74 -0
- package/dist/ai/docs/nocobase/runjs/context/libs.md +109 -0
- package/dist/ai/docs/nocobase/runjs/context/location.md +88 -0
- package/dist/ai/docs/nocobase/runjs/context/logger.md +85 -0
- package/dist/ai/docs/nocobase/runjs/context/make-resource.md +90 -0
- package/dist/ai/docs/nocobase/runjs/context/message.md +107 -0
- package/dist/ai/docs/nocobase/runjs/context/modal.md +115 -0
- package/dist/ai/docs/nocobase/runjs/context/model.md +85 -0
- package/dist/ai/docs/nocobase/runjs/context/notification.md +106 -0
- package/dist/ai/docs/nocobase/runjs/context/off.md +48 -0
- package/dist/ai/docs/nocobase/runjs/context/on.md +80 -0
- package/dist/ai/docs/nocobase/runjs/context/open-view.md +120 -0
- package/dist/ai/docs/nocobase/runjs/context/render.md +114 -0
- package/dist/ai/docs/nocobase/runjs/context/request.md +163 -0
- package/dist/ai/docs/nocobase/runjs/context/require-async.md +110 -0
- package/dist/ai/docs/nocobase/runjs/context/resource.md +92 -0
- package/dist/ai/docs/nocobase/runjs/context/route.md +76 -0
- package/dist/ai/docs/nocobase/runjs/context/router.md +111 -0
- package/dist/ai/docs/nocobase/runjs/context/set-value.md +73 -0
- package/dist/ai/docs/nocobase/runjs/context/sql.md +200 -0
- package/dist/ai/docs/nocobase/runjs/context/t.md +82 -0
- package/dist/ai/docs/nocobase/runjs/context/view.md +131 -0
- package/dist/ai/docs/nocobase/runjs/document.md +1 -0
- package/dist/ai/docs/nocobase/runjs/import-modules.md +110 -0
- package/dist/ai/docs/nocobase/runjs/index.md +65 -0
- package/dist/ai/docs/nocobase/runjs/jsx.md +84 -0
- package/dist/ai/docs/nocobase/runjs/model/form-block-model.md +1 -0
- package/dist/ai/docs/nocobase/runjs/render.md +64 -0
- package/dist/ai/docs/nocobase/runjs/resource/api-resource.md +155 -0
- package/dist/ai/docs/nocobase/runjs/resource/multi-record-resource.md +188 -0
- package/dist/ai/docs/nocobase/runjs/resource/single-record-resource.md +169 -0
- package/dist/ai/docs/nocobase/runjs/resource/sql-resource.md +170 -0
- package/dist/ai/docs/nocobase/runjs/window.md +20 -0
- package/dist/ai/docs/nocobase/security/audit-logger/index.md +101 -0
- package/dist/ai/docs/nocobase/security/guide.md +296 -0
- package/dist/ai/docs/nocobase/security/ip-restriction/index.md +56 -0
- package/dist/ai/docs/nocobase/security/password-policy/index.md +112 -0
- package/dist/ai/docs/nocobase/security/password-policy/lockout.md +26 -0
- package/dist/ai/docs/nocobase/security/token-policy/index.md +67 -0
- package/dist/ai/docs/nocobase/solution/crm/changelog.md +62 -0
- package/dist/ai/docs/nocobase/solution/crm/design.md +921 -0
- package/dist/ai/docs/nocobase/solution/crm/guide/guide-customers-emails.md +178 -0
- package/dist/ai/docs/nocobase/solution/crm/guide/guide-leads.md +238 -0
- package/dist/ai/docs/nocobase/solution/crm/guide/guide-opportunities.md +248 -0
- package/dist/ai/docs/nocobase/solution/crm/guide/guide-overview.md +210 -0
- package/dist/ai/docs/nocobase/solution/crm/guide/guide-products-orders.md +153 -0
- package/dist/ai/docs/nocobase/solution/crm/guide/guide-roles.md +131 -0
- package/dist/ai/docs/nocobase/solution/crm/guide/index.md +58 -0
- package/dist/ai/docs/nocobase/solution/crm/index.md +142 -0
- package/dist/ai/docs/nocobase/solution/crm/installation.md +160 -0
- package/dist/ai/docs/nocobase/solution/crm/more.md +5 -0
- package/dist/ai/docs/nocobase/solution/crm/v1.md +90 -0
- package/dist/ai/docs/nocobase/solution/ticket-system/changelog.md +30 -0
- package/dist/ai/docs/nocobase/solution/ticket-system/design.md +690 -0
- package/dist/ai/docs/nocobase/solution/ticket-system/index.md +177 -0
- package/dist/ai/docs/nocobase/solution/ticket-system/installation.md +133 -0
- package/dist/ai/docs/nocobase/solution/ticket-system/more.md +3 -0
- package/dist/ai/docs/nocobase/system-management/custom-brand/index.md +34 -0
- package/dist/ai/docs/nocobase/system-management/language-settings/index.md +13 -0
- package/dist/ai/docs/nocobase/system-management/localization/index.md +79 -0
- package/dist/ai/docs/nocobase/system-management/plugin-manager/index.md +14 -0
- package/dist/ai/docs/nocobase/system-management/system-settings/index.md +6 -0
- package/dist/ai/docs/nocobase/system-management/theme-editor/index.md +57 -0
- package/dist/ai/docs/nocobase/template-print/advanced/advanced-features.md +246 -0
- package/dist/ai/docs/nocobase/template-print/advanced/conditionals.md +431 -0
- package/dist/ai/docs/nocobase/template-print/configuration.md +76 -0
- package/dist/ai/docs/nocobase/template-print/faq.md +97 -0
- package/dist/ai/docs/nocobase/template-print/http-api.md +142 -0
- package/dist/ai/docs/nocobase/template-print/index.md +121 -0
- package/dist/ai/docs/nocobase/template-print/install.md +97 -0
- package/dist/ai/docs/nocobase/template-print/scenes.md +378 -0
- package/dist/ai/docs/nocobase/template-print/syntax/basic-usage.md +107 -0
- package/dist/ai/docs/nocobase/template-print/syntax/formatters/array-formatting.md +87 -0
- package/dist/ai/docs/nocobase/template-print/syntax/formatters/currency-formatting.md +47 -0
- package/dist/ai/docs/nocobase/template-print/syntax/formatters/date-formatting.md +187 -0
- package/dist/ai/docs/nocobase/template-print/syntax/formatters/index.md +108 -0
- package/dist/ai/docs/nocobase/template-print/syntax/formatters/media-field-formatting.md +35 -0
- package/dist/ai/docs/nocobase/template-print/syntax/formatters/number-formatting.md +203 -0
- package/dist/ai/docs/nocobase/template-print/syntax/formatters/text-formatting.md +333 -0
- package/dist/ai/docs/nocobase/template-print/syntax/formatters/time-interval-formatting.md +36 -0
- package/dist/ai/docs/nocobase/template-print/syntax/loops.md +451 -0
- package/dist/ai/docs/nocobase/tutorials/index.md +1 -0
- package/dist/ai/docs/nocobase/tutorials/v1/01-getting-started.md +187 -0
- package/dist/ai/docs/nocobase/tutorials/v1/02-designing-system.md +78 -0
- package/dist/ai/docs/nocobase/tutorials/v1/03-task-data.md +152 -0
- package/dist/ai/docs/nocobase/tutorials/v1/04-plugins.md +207 -0
- package/dist/ai/docs/nocobase/tutorials/v1/05-tabs-dynamic-blocks.md +135 -0
- package/dist/ai/docs/nocobase/tutorials/v1/06-user-permissions.md +190 -0
- package/dist/ai/docs/nocobase/tutorials/v1/07-workflow.md +159 -0
- package/dist/ai/docs/nocobase/tutorials/v1/08-project-overview.md +75 -0
- package/dist/ai/docs/nocobase/tutorials/v1/09-knowledge-base.md +198 -0
- package/dist/ai/docs/nocobase/tutorials/v1/10-dashboard-charts.md +234 -0
- package/dist/ai/docs/nocobase/tutorials/v1/11-dashboard-filters.md +176 -0
- package/dist/ai/docs/nocobase/tutorials/v1/12-subtasks-workhours.md +190 -0
- package/dist/ai/docs/nocobase/tutorials/v1/13-meeting-rooms.md +346 -0
- package/dist/ai/docs/nocobase/tutorials/v1/14-user-review.md +208 -0
- package/dist/ai/docs/nocobase/tutorials/v1/15-crm-lead-conversion.md +214 -0
- package/dist/ai/docs/nocobase/tutorials/v1/16-markdown-tips.md +121 -0
- package/dist/ai/docs/nocobase/tutorials/v1/17-crm-overview.md +136 -0
- package/dist/ai/docs/nocobase/tutorials/v1/18-lead-followup.md +253 -0
- package/dist/ai/docs/nocobase/tutorials/v1/19-crm-sales-cloud.md +42 -0
- package/dist/ai/docs/nocobase/tutorials/v1/20-api-keys.md +258 -0
- package/dist/ai/docs/nocobase/tutorials/v1/21-markdown-variables.md +231 -0
- package/dist/ai/docs/nocobase/tutorials/v1/22-deploy-faster.md +378 -0
- package/dist/ai/docs/nocobase/tutorials/v1/23-crm-pipeline.md +220 -0
- package/dist/ai/docs/nocobase/tutorials/v1/24-crm-demo-deploy.md +135 -0
- package/dist/ai/docs/nocobase/tutorials/v1/index.md +50 -0
- package/dist/ai/docs/nocobase/tutorials/v2/01-getting-started.md +176 -0
- package/dist/ai/docs/nocobase/tutorials/v2/02-data-modeling.md +319 -0
- package/dist/ai/docs/nocobase/tutorials/v2/03-building-pages.md +240 -0
- package/dist/ai/docs/nocobase/tutorials/v2/04-forms-and-details.md +279 -0
- package/dist/ai/docs/nocobase/tutorials/v2/05-roles-and-permissions.md +198 -0
- package/dist/ai/docs/nocobase/tutorials/v2/06-workflows.md +326 -0
- package/dist/ai/docs/nocobase/tutorials/v2/07-dashboard.md +270 -0
- package/dist/ai/docs/nocobase/tutorials/v2/index.md +93 -0
- package/dist/ai/docs/nocobase/ui-development-action/index.md +2 -0
- package/dist/ai/docs/nocobase/ui-development-action/write-an-action-plugin.md +0 -0
- package/dist/ai/docs/nocobase/ui-development-block/index.md +69 -0
- package/dist/ai/docs/nocobase/ui-development-block/write-a-block-plugin.md +116 -0
- package/dist/ai/docs/nocobase/ui-development-field/index.md +2 -0
- package/dist/ai/docs/nocobase/ui-development-field/write-a-field-plugin.md +0 -0
- package/dist/ai/docs/nocobase/users-permissions/acl/dev/permission-tab.md +68 -0
- package/dist/ai/docs/nocobase/users-permissions/acl/permissions.md +56 -0
- package/dist/ai/docs/nocobase/users-permissions/acl/role.md +43 -0
- package/dist/ai/docs/nocobase/users-permissions/acl/ui.md +239 -0
- package/dist/ai/docs/nocobase/users-permissions/acl/union.md +171 -0
- package/dist/ai/docs/nocobase/users-permissions/departments/index.md +106 -0
- package/dist/ai/docs/nocobase/users-permissions/departments/role.md +26 -0
- package/dist/ai/docs/nocobase/users-permissions/sync/dev/resource.md +63 -0
- package/dist/ai/docs/nocobase/users-permissions/sync/dev/source.md +146 -0
- package/dist/ai/docs/nocobase/users-permissions/sync/index.md +54 -0
- package/dist/ai/docs/nocobase/users-permissions/sync/sources/api.md +75 -0
- package/dist/ai/docs/nocobase/users-permissions/sync/sources/wecom.md +65 -0
- package/dist/ai/docs/nocobase/users-permissions/user.md +64 -0
- package/dist/ai/docs/nocobase/workflow/advanced/executions.md +66 -0
- package/dist/ai/docs/nocobase/workflow/advanced/options.md +33 -0
- package/dist/ai/docs/nocobase/workflow/advanced/revisions.md +25 -0
- package/dist/ai/docs/nocobase/workflow/advanced/variables.md +66 -0
- package/dist/ai/docs/nocobase/workflow/development/api.md +382 -0
- package/dist/ai/docs/nocobase/workflow/development/index.md +12 -0
- package/dist/ai/docs/nocobase/workflow/development/node.md +413 -0
- package/dist/ai/docs/nocobase/workflow/development/trigger.md +109 -0
- package/dist/ai/docs/nocobase/workflow/getting-started.md +123 -0
- package/dist/ai/docs/nocobase/workflow/index.md +43 -0
- package/dist/ai/docs/nocobase/workflow/nodes/aggregate.md +75 -0
- package/dist/ai/docs/nocobase/workflow/nodes/approval.md +172 -0
- package/dist/ai/docs/nocobase/workflow/nodes/calculation.md +45 -0
- package/dist/ai/docs/nocobase/workflow/nodes/cc.md +81 -0
- package/dist/ai/docs/nocobase/workflow/nodes/condition.md +41 -0
- package/dist/ai/docs/nocobase/workflow/nodes/create.md +49 -0
- package/dist/ai/docs/nocobase/workflow/nodes/date-calculation.md +138 -0
- package/dist/ai/docs/nocobase/workflow/nodes/delay.md +40 -0
- package/dist/ai/docs/nocobase/workflow/nodes/destroy.md +41 -0
- package/dist/ai/docs/nocobase/workflow/nodes/end.md +27 -0
- package/dist/ai/docs/nocobase/workflow/nodes/index.md +45 -0
- package/dist/ai/docs/nocobase/workflow/nodes/javascript.md +165 -0
- package/dist/ai/docs/nocobase/workflow/nodes/json-query.md +147 -0
- package/dist/ai/docs/nocobase/workflow/nodes/json-variable-mapping.md +85 -0
- package/dist/ai/docs/nocobase/workflow/nodes/loop.md +149 -0
- package/dist/ai/docs/nocobase/workflow/nodes/mailer.md +51 -0
- package/dist/ai/docs/nocobase/workflow/nodes/manual.md +247 -0
- package/dist/ai/docs/nocobase/workflow/nodes/multi-conditions.md +95 -0
- package/dist/ai/docs/nocobase/workflow/nodes/output.md +31 -0
- package/dist/ai/docs/nocobase/workflow/nodes/parallel.md +41 -0
- package/dist/ai/docs/nocobase/workflow/nodes/query.md +46 -0
- package/dist/ai/docs/nocobase/workflow/nodes/request.md +117 -0
- package/dist/ai/docs/nocobase/workflow/nodes/response-message.md +63 -0
- package/dist/ai/docs/nocobase/workflow/nodes/response.md +27 -0
- package/dist/ai/docs/nocobase/workflow/nodes/sql.md +94 -0
- package/dist/ai/docs/nocobase/workflow/nodes/subflow.md +67 -0
- package/dist/ai/docs/nocobase/workflow/nodes/update.md +52 -0
- package/dist/ai/docs/nocobase/workflow/nodes/variable.md +104 -0
- package/dist/ai/docs/nocobase/workflow/triggers/approval.md +355 -0
- package/dist/ai/docs/nocobase/workflow/triggers/collection.md +99 -0
- package/dist/ai/docs/nocobase/workflow/triggers/custom-action.md +228 -0
- package/dist/ai/docs/nocobase/workflow/triggers/index.md +26 -0
- package/dist/ai/docs/nocobase/workflow/triggers/post-action.md +213 -0
- package/dist/ai/docs/nocobase/workflow/triggers/pre-action.md +204 -0
- package/dist/ai/docs/nocobase/workflow/triggers/schedule.md +85 -0
- package/dist/ai/docs/nocobase/workflow/triggers/webhook.md +93 -0
- package/dist/ai/skills/document-search/SKILLS.md +95 -41
- package/dist/ai/tools/sub-agents/shared.js +3 -1
- package/dist/client/119.78774f3ad953af49.js +10 -0
- package/dist/client/228.a3df2921c8beb766.js +10 -0
- package/dist/client/343.6f36d97dd122c5b6.js +10 -0
- package/dist/client/559.c119db3f985a695f.js +10 -0
- package/dist/client/646.85a5f27994307223.js +10 -0
- package/dist/client/792.2e48eab4767d662a.js +10 -0
- package/dist/client/ai-employees/ai-coding/tools/context-tools.d.ts +4 -0
- package/dist/client/ai-employees/ai-coding/ui/CodeToolCard.d.ts +17 -0
- package/dist/client/ai-employees/types.d.ts +2 -0
- package/dist/client/index.js +5 -5
- package/dist/client/llm-providers/mimo/ModelSettings.d.ts +10 -0
- package/dist/client/llm-providers/mimo/index.d.ts +10 -0
- package/dist/collections/ai-employees.d.ts +7 -0
- package/dist/collections/ai-employees.js +13 -0
- package/dist/externalVersion.js +15 -15
- package/dist/locale/en-US.json +10 -2
- package/dist/locale/zh-CN.json +10 -2
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/250.index.cjs.js +30 -0
- package/dist/node_modules/just-bash/417.index.cjs.js +19 -0
- package/dist/node_modules/just-bash/LICENSE +201 -0
- package/dist/node_modules/just-bash/dist/Bash.d.ts +229 -0
- package/dist/node_modules/just-bash/dist/ast/types.d.ts +609 -0
- package/dist/node_modules/just-bash/dist/banned-patterns-test.d.ts +1 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/alias-3GODYSFD.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/awk2-DB6QZAC5.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/base64-43M2R3GA.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/basename-KBUKWB2E.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/bash-6ZHZ6BX7.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/cat-XZIJZXKP.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chmod-N5CQATDW.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-22NDZXS5.js +33 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-26NO42TF.js +14 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-2HVFB2TU.js +287 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-3MBAUIBB.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-3Y32LPNT.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-4CFAYBLV.js +21 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-4OALHZXB.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-4PRVMER6.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-4VDEBYW7.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-54G6AE72.js +32 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-5G2VOPPJ.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-5WFYIUU2.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-6KZRLMG3.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-7ADG3DNO.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-7BORMNPQ.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-7G3MC56B.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-A5UGPLEI.js +21 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-AAW7UMPO.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-ARI4VLCN.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-AXWFPG37.js +10 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-AZ3RUDR2.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-BGGF3ELU.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-BYDV4VEF.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-CGE2EHYP.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-CM4532DS.js +36 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-CQG2HEAL.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-D5WP4CKS.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-DOXYBGNA.js +12 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-DU4S5MUI.js +13 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-EJQKHROT.js +14 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-EONWONZV.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-EPPBDXOG.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-EUXCM6C4.js +12 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-F3LGZXLQ.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-FA2CHD73.js +16 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-FLPVVSN5.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-FSZWFMB4.js +16 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-GO6FXSC4.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-GOJZHH3L.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-GTNBSMZR.js +23 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-IDGH4PGU.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-ITA43A73.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-JBABAK44.js +4 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-JDNI5HBX.js +33 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-JLX6YWGA.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-JQBC3FXE.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-JTF74J6E.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-KCMUAACL.js +19 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-KGOUQS5A.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-L6XUBS6H.js +84 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-LCDPWJBA.js +15 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-LGJM5YFT.js +17 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-LIYVQA3X.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-LJKIWB5F.js +4 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-LMK6G2HH.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-LOJMXC4F.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-LTL632J4.js +140 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-MAVV76T4.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-MO4RPBN2.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-MRP4ZCD7.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-N43DJTSI.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-NAX7MTAR.js +21 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-NSUMEERA.js +12 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-NTW6IA45.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-OBH7XN5N.js +1 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-OBI37ZY4.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-OOJCYVYF.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-ORUYSLP4.js +16 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-OXHVTSNH.js +74 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-PNI5NMXP.js +100 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-PPBQJBC2.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-PQNTKMH3.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-PS4LOXE5.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-PXVBSPBE.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-RA3TG4UK.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-RBQGQWGV.js +10 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-RJSAGJQJ.js +11 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-RLNOQILG.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-ROJPSS6N.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-RT7TRQVZ.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-S3QAKT3R.js +11 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-S7OHMN3F.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-SGA7Y45Z.js +17 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-SXRVLCZ4.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-TEFXEYX3.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-THALLNXT.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-TTNNO45C.js +17 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-UFJFAFSS.js +28 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-V7ZOPVQS.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-VNER2XXL.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-WLBA7L7U.js +23 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-WWZVR5NN.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-WXMBDX4P.js +14 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-XXCTETRW.js +11 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-XY5HGZW5.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-YEKSVVRC.js +11 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-YLE2OYY6.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-YMMJLYIX.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-YTIURC67.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-YU6OGPZR.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-YWZOGBFE.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-ZA4HUKJ3.js +13 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-ZKC5HQYO.js +14 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-ZSVBYEY4.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/chunk-ZUDPEMHG.js +63 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/clear-KRGKPFOI.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/column-XGV32UPN.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/comm-R3F3Z5DX.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/cp-XH2ZB7WT.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/curl-2DCNBIKJ.js +26 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/cut-5EY2XPXX.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/date-WUPBL2TL.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/diff-5NUI5BHG.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/dirname-5FAOMLBL.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/du-LDAPXSGF.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/echo-2MUAOGUE.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/env-NTPN5QYM.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/expand-26XPP5KB.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/expansion-QUT3FT7V.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/expr-G4EF4POQ.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/file-MMSHRWCJ.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/find-7CVMEZBO.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/flag-coverage-QMWFYZRC.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/fold-XSVNTAWH.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/grep-7BJ7HFBM.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/gzip-LHOO65AN.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/head-YMNRW3F3.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/help-DVG4AAGE.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/history-UUKG55YW.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/hostname-WY6RKE32.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/html-to-markdown-V6PK6S5U.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/join-Y4Q5WVVE.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/jq-DVZM2CEN.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/js-exec-RWEELTC2.js +97 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/js-exec-worker.js +4380 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/ln-EGC4HRXZ.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/ls-WONXDVOX.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/md5sum-NCLXV2S3.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/mkdir-Z47OISSR.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/mv-OY7X62QC.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/nl-XH3L75DR.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/od-52FBC34W.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/paste-3UVLMQ2K.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/printf-NA7DYZBO.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/pwd-6VBAPL3Y.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/python3-JUJKPBFB.js +12 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/readlink-BD5VFOC5.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/rev-UHEPS2UL.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/rg-DK6FRF6Q.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/rm-L3NZOLLG.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/rmdir-5KLM4EA6.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/sed-WWXBUNG3.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/seq-V7KBLSQ7.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/sha1sum-BHNJ5ALF.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/sha256sum-HJJ3NJ5L.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/sleep-ND6FZRZ4.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/sort-7GENYU2I.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/split-YWV64TJH.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/sqlite3-CVNFMP3Z.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/stat-XS2LXYS2.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/strings-XXKZCWY5.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/tac-T42SKDDI.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/tail-V537TDFR.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/tar-GTGFEWDS.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/tee-HK2SYCAR.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/time-5R4QWCYF.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/timeout-Z24MNWOP.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/touch-DWKSZGOQ.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/tr-4FPGAEVB.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/tree-HEKABARE.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/true-DP5UZP52.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/unexpand-OYZ7KOYR.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/uniq-TMSAIZM3.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/wc-ZIV3TFVG.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/which-5PO4LAOG.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/whoami-E7PN2UWC.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/worker.js +3136 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/xan-3G6YA5O6.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/xan-view-6J5MMMQB.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/xargs-SCYIFXOW.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/chunks/yq-CWUVVSHY.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/just-bash.js +754 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/alias-3GODYSFD.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/awk2-DB6QZAC5.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/base64-43M2R3GA.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/basename-KBUKWB2E.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/bash-6ZHZ6BX7.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/cat-XZIJZXKP.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chmod-N5CQATDW.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-22NDZXS5.js +33 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-26NO42TF.js +14 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-2HVFB2TU.js +287 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-3MBAUIBB.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-3Y32LPNT.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-4CFAYBLV.js +21 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-4OALHZXB.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-4PRVMER6.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-4VDEBYW7.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-54G6AE72.js +32 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-5G2VOPPJ.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-5WFYIUU2.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-6KZRLMG3.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-7ADG3DNO.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-7BORMNPQ.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-7G3MC56B.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-A5UGPLEI.js +21 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-AAW7UMPO.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-ARI4VLCN.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-AXWFPG37.js +10 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-AZ3RUDR2.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-BGGF3ELU.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-BYDV4VEF.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-CGE2EHYP.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-CM4532DS.js +36 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-CQG2HEAL.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-D5WP4CKS.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-DOXYBGNA.js +12 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-DU4S5MUI.js +13 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-EJQKHROT.js +14 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-EONWONZV.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-EPPBDXOG.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-EUXCM6C4.js +12 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-F3LGZXLQ.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-FA2CHD73.js +16 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-FLPVVSN5.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-FSZWFMB4.js +16 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-GO6FXSC4.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-GOJZHH3L.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-GTNBSMZR.js +23 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-HC7WB764.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-IDGH4PGU.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-ITA43A73.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-JBABAK44.js +4 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-JDNI5HBX.js +33 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-JLX6YWGA.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-JQBC3FXE.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-JTF74J6E.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-KCMUAACL.js +19 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-KGOUQS5A.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-L6XUBS6H.js +84 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-LCDPWJBA.js +15 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-LGJM5YFT.js +17 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-LIYVQA3X.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-LJKIWB5F.js +4 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-LMK6G2HH.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-LOJMXC4F.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-LTL632J4.js +140 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-MAVV76T4.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-MO4RPBN2.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-MRP4ZCD7.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-N43DJTSI.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-NAX7MTAR.js +21 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-NSUMEERA.js +12 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-NTW6IA45.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-OBH7XN5N.js +1 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-OBI37ZY4.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-OOJCYVYF.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-ORUYSLP4.js +16 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-OXHVTSNH.js +74 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-PNI5NMXP.js +100 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-PPBQJBC2.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-PQNTKMH3.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-PS4LOXE5.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-RA3TG4UK.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-RBQGQWGV.js +10 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-RJSAGJQJ.js +11 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-RLNOQILG.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-ROJPSS6N.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-RT7TRQVZ.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-S3QAKT3R.js +11 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-S7OHMN3F.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-SGA7Y45Z.js +17 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-SXRVLCZ4.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-TEFXEYX3.js +3 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-THALLNXT.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-TTNNO45C.js +17 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-UFJFAFSS.js +28 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-V7ZOPVQS.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-VNER2XXL.js +7 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-WLBA7L7U.js +23 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-WWZVR5NN.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-WXMBDX4P.js +14 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-XXCTETRW.js +11 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-XY5HGZW5.js +8 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-YEKSVVRC.js +11 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-YLE2OYY6.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-YMMJLYIX.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-YTIURC67.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-YU6OGPZR.js +5 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-YWZOGBFE.js +9 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-ZA4HUKJ3.js +13 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-ZKC5HQYO.js +14 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-ZSVBYEY4.js +6 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/chunk-ZUDPEMHG.js +63 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/clear-KRGKPFOI.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/column-XGV32UPN.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/comm-R3F3Z5DX.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/cp-XH2ZB7WT.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/curl-2DCNBIKJ.js +26 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/cut-5EY2XPXX.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/date-WUPBL2TL.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/diff-5NUI5BHG.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/dirname-5FAOMLBL.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/du-LDAPXSGF.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/echo-2MUAOGUE.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/env-NTPN5QYM.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/expand-26XPP5KB.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/expansion-QUT3FT7V.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/expr-G4EF4POQ.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/file-MMSHRWCJ.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/find-7CVMEZBO.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/flag-coverage-QMWFYZRC.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/fold-XSVNTAWH.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/grep-7BJ7HFBM.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/gzip-LHOO65AN.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/head-YMNRW3F3.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/help-DVG4AAGE.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/history-UUKG55YW.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/hostname-WY6RKE32.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/html-to-markdown-V6PK6S5U.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/join-Y4Q5WVVE.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/jq-DVZM2CEN.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/js-exec-AKWY6BP5.js +97 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/ln-EGC4HRXZ.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/ls-WONXDVOX.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/md5sum-NCLXV2S3.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/mkdir-Z47OISSR.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/mv-OY7X62QC.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/nl-XH3L75DR.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/od-52FBC34W.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/paste-3UVLMQ2K.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/printf-NA7DYZBO.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/pwd-6VBAPL3Y.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/python3-RRCCYJKA.js +12 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/readlink-BD5VFOC5.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/rev-UHEPS2UL.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/rg-DK6FRF6Q.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/rm-L3NZOLLG.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/rmdir-5KLM4EA6.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/sed-WWXBUNG3.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/seq-V7KBLSQ7.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/sha1sum-BHNJ5ALF.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/sha256sum-HJJ3NJ5L.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/sleep-ND6FZRZ4.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/sort-7GENYU2I.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/split-YWV64TJH.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/sqlite3-CVNFMP3Z.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/stat-XS2LXYS2.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/strings-XXKZCWY5.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/tac-T42SKDDI.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/tail-V537TDFR.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/tar-GTGFEWDS.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/tee-HK2SYCAR.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/time-5R4QWCYF.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/timeout-Z24MNWOP.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/touch-DWKSZGOQ.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/tr-4FPGAEVB.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/tree-HEKABARE.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/true-DP5UZP52.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/unexpand-OYZ7KOYR.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/uniq-TMSAIZM3.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/wc-ZIV3TFVG.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/which-5PO4LAOG.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/whoami-E7PN2UWC.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/xan-3G6YA5O6.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/xan-view-6J5MMMQB.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/xargs-SCYIFXOW.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/chunks/yq-CWUVVSHY.js +2 -0
- package/dist/node_modules/just-bash/dist/bin/shell/shell.js +733 -0
- package/dist/node_modules/just-bash/dist/browser.d.ts +23 -0
- package/dist/node_modules/just-bash/dist/bundle/browser.js +1513 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/alias-JE7RI5QX.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/awk2-RRKCSTJR.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/base64-4YMZCVJ5.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/basename-AA2KJYZQ.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/bash-IJWYRKFO.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/cat-RDUMLXKC.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chmod-SYMGL4JA.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-24IMIIXA.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-3THT3N7L.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-3ZUFRYJ4.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-43RSSTFA.js +73 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-44UOCSGV.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-4GTNDTRF.js +7 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-4HHKTUW3.js +2 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-4Q4SM6WR.js +4 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-55VFSPNA.js +2 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-5PYKJV42.js +4 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-5QMZ5MUS.js +4 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-5QVNJEHU.js +8 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-5V6VZH6T.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-62RKD26F.js +20 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-64BAICW3.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-74CEPOFO.js +22 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-75FNCC7W.js +286 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-7L36YK2X.js +2 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-7TSDKFEO.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-A4HU7SVR.js +2 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-A4JSPFCI.js +6 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-A5O5YHGN.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-A65PWWJC.js +2 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-A7A2DBEE.js +6 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-A7ICOL4V.js +13 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-ALLTKNUZ.js +5 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-APT7OOP2.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-B53Y5JFV.js +8 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-BAQA74XA.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-CWQS3NFK.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-D4J545R4.js +11 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-D6CWQ5DW.js +5 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-D7MEQ3VN.js +4 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-DBKNVD4L.js +9 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-DCAAORBQ.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-DXB73IDG.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-EEXR5ZDP.js +2 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-EIZGF4BS.js +8 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-F23WWYKW.js +16 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-GCTKCWKD.js +3 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-GFQRA5P5.js +7 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-GJTDUJ5Q.js +10 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-GOV5EKKI.js +9 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-GXVXFKBA.js +5 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-HDQ56CKY.js +15 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-HJQJAYMS.js +2 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-HJWBQKYG.js +5 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-HL6NGDO2.js +22 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-HP7NBOKN.js +20 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-HWBSOZZR.js +35 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-HWKDQ44K.js +3 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-I57KEIP3.js +10 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-IPJHKYVM.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-JVPRLUMK.js +7 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-KMEYNNUA.js +15 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-KX3P26DQ.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-LL3S3NLB.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-LTZRCH7N.js +31 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-LWEGUNWT.js +7 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-MDDMCKUK.js +6 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-MDLLFABN.js +4 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-MHTUABJP.js +8 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-MIZPJHVH.js +7 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-MLXIYONF.js +15 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-MYE6AGBJ.js +16 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-NAERJDUW.js +8 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-NCNPKYJZ.js +2 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-NRZWEENR.js +5 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-NUFRM6SI.js +0 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-NUYSJFDK.js +7 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-OCLXQMOG.js +6 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-OCS6LSEM.js +13 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-OJDRYQWQ.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-PBXLG62G.js +8 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-PP6PSHAB.js +4 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-PXTK5WE2.js +20 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-PYDZ2LCK.js +16 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-PYSFUGCK.js +10 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-QCDB2VPH.js +6 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-QJ7O6ZN3.js +5 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-R6QSAL5T.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-R6VWJ2ZL.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-RAFHQYLP.js +139 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-RPNGRAAP.js +7 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-RQ254MFG.js +12 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-SDNKECQQ.js +5 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-T56QNPHK.js +14 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-TLSUDHID.js +6 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-TOMNU26N.js +4 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-TXBZCHCQ.js +5 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-U6NMAV24.js +32 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-V7TAPXDL.js +27 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-VBEY5J6R.js +99 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-VJFXDYWH.js +10 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-VOBGTVA6.js +6 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-VYOJP4TV.js +13 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-WKFATFPP.js +4 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-X2AJGDEF.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-XIZSGUXJ.js +62 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-XKQRETAK.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-XVDPCNWR.js +11 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-YSHZL3MF.js +32 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-YTNYSM6T.js +11 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-Z6LRHWXI.js +13 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/chunk-Z7JVV2SM.js +12 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/clear-5CZ5X4YR.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/column-WLPMMSTS.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/comm-5SLSESQG.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/cp-XOYR4ABJ.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/curl-47BFPSFW.js +25 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/cut-OPC3VAGB.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/date-DD7FVA2V.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/diff-HJF2MPDN.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/dirname-LEMTZZFS.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/du-WO2ENHXQ.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/echo-O45JWWI2.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/env-5EPCWSXR.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/expand-DTNXU4LQ.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/expansion-UGGADTZC.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/expr-DNFUYZGY.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/file-IGDTDPLG.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/find-KNMMLVJD.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/flag-coverage-XLSDDMFQ.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/fold-LDSORVYE.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/grep-2UMHPO7Y.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/gzip-AQXSGOVS.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/head-HT2B6D2J.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/help-VVWX7SA5.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/history-J4QRNGRO.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/hostname-BK6HG2DE.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/html-to-markdown-TFCECAGV.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/join-GG2LDHE5.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/jq-LCDWFF5Y.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/js-exec-VXN6TZ7U.js +96 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/js-exec-worker.js +4380 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/ln-4TRFBYAT.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/ls-KSXFZCWH.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/md5sum-INMIK4DX.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/mkdir-TDEMSB6C.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/mv-Z6MORUFL.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/nl-U5YJDM32.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/od-VJEF2UR5.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/paste-7N6AFSDS.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/printf-CX64KX2P.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/pwd-D4OZ7N27.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/python3-BFV3N3GY.js +11 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/readlink-MI4GCHJF.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/rev-XOSYPP45.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/rg-KYSTAD4Q.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/rm-RTZG23RL.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/rmdir-XTQXT7RK.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/sed-OFX3F4FE.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/seq-RN5ZUASB.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/sha1sum-VJPNLNU6.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/sha256sum-PI32XWXY.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/sleep-VZFPZFWA.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/sort-DCNRDA7U.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/split-SITCSYCZ.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/sqlite3-56UMWEY3.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/stat-BT5A227F.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/strings-7PLOGTPD.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/tac-SJGXQ4T2.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/tail-S5ULNTJU.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/tar-LYLTEJV3.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/tee-O7VXZDCO.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/time-DEUO3QV2.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/timeout-VRKMCG72.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/touch-DX2IJOQ4.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/tr-2HXZRDSW.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/tree-LYXBS7DC.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/true-WHJNXCHG.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/unexpand-RGTMIGZM.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/uniq-SUNANL47.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/wc-TQB3VNOX.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/which-XZHEH76L.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/whoami-DGKU3D2X.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/worker.js +3136 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/xan-EY6QWK2V.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/xan-view-OW2TB7Z3.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/xargs-I6EZUCYF.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/chunks/yq-M7NFNNED.js +1 -0
- package/dist/node_modules/just-bash/dist/bundle/index.cjs +70 -0
- package/dist/node_modules/just-bash/dist/bundle/index.js +709 -0
- package/dist/node_modules/just-bash/dist/commands/alias/alias.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/commands/awk/ast.d.ts +202 -0
- package/dist/node_modules/just-bash/dist/commands/awk/awk2.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/commands/awk/builtins.d.ts +17 -0
- package/dist/node_modules/just-bash/dist/commands/awk/interpreter/context.d.ts +75 -0
- package/dist/node_modules/just-bash/dist/commands/awk/interpreter/expressions.d.ts +17 -0
- package/dist/node_modules/just-bash/dist/commands/awk/interpreter/fields.d.ts +25 -0
- package/dist/node_modules/just-bash/dist/commands/awk/interpreter/index.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/commands/awk/interpreter/interpreter.d.ts +54 -0
- package/dist/node_modules/just-bash/dist/commands/awk/interpreter/statements.d.ts +11 -0
- package/dist/node_modules/just-bash/dist/commands/awk/interpreter/type-coercion.d.ts +32 -0
- package/dist/node_modules/just-bash/dist/commands/awk/interpreter/types.d.ts +13 -0
- package/dist/node_modules/just-bash/dist/commands/awk/interpreter/variables.d.ts +35 -0
- package/dist/node_modules/just-bash/dist/commands/awk/lexer.d.ts +100 -0
- package/dist/node_modules/just-bash/dist/commands/awk/parser2-print.d.ts +35 -0
- package/dist/node_modules/just-bash/dist/commands/awk/parser2.d.ts +81 -0
- package/dist/node_modules/just-bash/dist/commands/base64/base64.d.ts +7 -0
- package/dist/node_modules/just-bash/dist/commands/basename/basename.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/bash/bash.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/commands/browser-excluded.d.ts +16 -0
- package/dist/node_modules/just-bash/dist/commands/cat/cat.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/chmod/chmod.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/clear/clear.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/column/column.d.ts +11 -0
- package/dist/node_modules/just-bash/dist/commands/comm/comm.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/cp/cp.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/curl/curl.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/commands/curl/form.d.ts +21 -0
- package/dist/node_modules/just-bash/dist/commands/curl/help.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/commands/curl/parse.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/commands/curl/response-formatting.d.ts +20 -0
- package/dist/node_modules/just-bash/dist/commands/curl/types.d.ts +31 -0
- package/dist/node_modules/just-bash/dist/commands/cut/cut.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/date/date.d.ts +7 -0
- package/dist/node_modules/just-bash/dist/commands/diff/diff.d.ts +7 -0
- package/dist/node_modules/just-bash/dist/commands/dirname/dirname.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/du/du.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/duration.d.ts +5 -0
- package/dist/node_modules/just-bash/dist/commands/echo/echo.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/env/env.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/commands/expand/expand.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/expand/unexpand.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/expr/expr.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/commands/file/file.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/commands/find/find.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/find/matcher.d.ts +69 -0
- package/dist/node_modules/just-bash/dist/commands/find/parser.d.ts +2 -0
- package/dist/node_modules/just-bash/dist/commands/find/types.d.ts +88 -0
- package/dist/node_modules/just-bash/dist/commands/flag-coverage.d.ts +2 -0
- package/dist/node_modules/just-bash/dist/commands/fold/fold.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/format-mode.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/fuzz-flags-types.d.ts +17 -0
- package/dist/node_modules/just-bash/dist/commands/fuzz-flags.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/commands/grep/grep.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/commands/gzip/gzip.d.ts +13 -0
- package/dist/node_modules/just-bash/dist/commands/head/head-tail-shared.d.ts +38 -0
- package/dist/node_modules/just-bash/dist/commands/head/head.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/help/help.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/help.d.ts +16 -0
- package/dist/node_modules/just-bash/dist/commands/history/history.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/hostname/hostname.d.ts +11 -0
- package/dist/node_modules/just-bash/dist/commands/html-to-markdown/html-to-markdown.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/commands/join/join.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/jq/jq.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/commands/js-exec/fetch-polyfill.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/commands/js-exec/js-exec-worker.d.ts +30 -0
- package/dist/node_modules/just-bash/dist/commands/js-exec/js-exec.d.ts +11 -0
- package/dist/node_modules/just-bash/dist/commands/js-exec/module-shims.d.ts +29 -0
- package/dist/node_modules/just-bash/dist/commands/js-exec/path-polyfill.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/commands/ln/ln.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/ls/ls.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/md5sum/checksum.d.ts +7 -0
- package/dist/node_modules/just-bash/dist/commands/md5sum/md5sum.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/md5sum/sha1sum.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/md5sum/sha256sum.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/mkdir/mkdir.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/mv/mv.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/nl/nl.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/od/od.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/paste/paste.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/printf/escapes.d.ts +25 -0
- package/dist/node_modules/just-bash/dist/commands/printf/printf.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/printf/strftime.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/commands/pwd/pwd.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/python3/python3.d.ts +16 -0
- package/dist/node_modules/just-bash/dist/commands/python3/worker.d.ts +28 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/array-builtins.d.ts +20 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/control-builtins.d.ts +18 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/date-builtins.d.ts +15 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/format-builtins.d.ts +11 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/index-builtins.d.ts +16 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/index.d.ts +17 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/math-builtins.d.ts +15 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/navigation-builtins.d.ts +18 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/object-builtins.d.ts +15 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/path-builtins.d.ts +20 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/sql-builtins.d.ts +16 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/string-builtins.d.ts +15 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/builtins/type-builtins.d.ts +11 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/evaluator.d.ts +40 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/index.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/parser-types.d.ts +171 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/parser.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/path-operations.d.ts +15 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/safe-object.d.ts +83 -0
- package/dist/node_modules/just-bash/dist/commands/query-engine/value-operations.d.ts +41 -0
- package/dist/node_modules/just-bash/dist/commands/readlink/readlink.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/registry.d.ts +56 -0
- package/dist/node_modules/just-bash/dist/commands/rev/rev.d.ts +13 -0
- package/dist/node_modules/just-bash/dist/commands/rg/file-types.d.ts +49 -0
- package/dist/node_modules/just-bash/dist/commands/rg/gitignore.d.ts +98 -0
- package/dist/node_modules/just-bash/dist/commands/rg/rg-options.d.ts +61 -0
- package/dist/node_modules/just-bash/dist/commands/rg/rg-parser.d.ts +20 -0
- package/dist/node_modules/just-bash/dist/commands/rg/rg-search.d.ts +15 -0
- package/dist/node_modules/just-bash/dist/commands/rg/rg.d.ts +14 -0
- package/dist/node_modules/just-bash/dist/commands/rm/rm.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/rmdir/rmdir.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/search-engine/index.d.ts +10 -0
- package/dist/node_modules/just-bash/dist/commands/search-engine/matcher.d.ts +60 -0
- package/dist/node_modules/just-bash/dist/commands/search-engine/regex.d.ts +33 -0
- package/dist/node_modules/just-bash/dist/commands/sed/executor.d.ts +7 -0
- package/dist/node_modules/just-bash/dist/commands/sed/lexer.d.ts +86 -0
- package/dist/node_modules/just-bash/dist/commands/sed/parser.d.ts +18 -0
- package/dist/node_modules/just-bash/dist/commands/sed/sed-regex.d.ts +23 -0
- package/dist/node_modules/just-bash/dist/commands/sed/sed.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/sed/types.d.ts +216 -0
- package/dist/node_modules/just-bash/dist/commands/seq/seq.d.ts +16 -0
- package/dist/node_modules/just-bash/dist/commands/sleep/sleep.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/sort/comparator.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/commands/sort/parser.d.ts +11 -0
- package/dist/node_modules/just-bash/dist/commands/sort/sort.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/sort/types.d.ts +30 -0
- package/dist/node_modules/just-bash/dist/commands/split/split.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/sqlite3/formatters.d.ts +15 -0
- package/dist/node_modules/just-bash/dist/commands/sqlite3/sqlite3.d.ts +22 -0
- package/dist/node_modules/just-bash/dist/commands/sqlite3/worker.d.ts +45 -0
- package/dist/node_modules/just-bash/dist/commands/stat/stat.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/strings/strings.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/tac/tac.d.ts +11 -0
- package/dist/node_modules/just-bash/dist/commands/tail/tail.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/tar/archive.d.ts +135 -0
- package/dist/node_modules/just-bash/dist/commands/tar/bzip2-compress.d.ts +17 -0
- package/dist/node_modules/just-bash/dist/commands/tar/tar-options.d.ts +37 -0
- package/dist/node_modules/just-bash/dist/commands/tar/tar.d.ts +10 -0
- package/dist/node_modules/just-bash/dist/commands/tee/tee.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/time/time.d.ts +27 -0
- package/dist/node_modules/just-bash/dist/commands/timeout/timeout.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/touch/touch.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/tr/tr.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/tree/tree.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/true/true.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/commands/uniq/uniq.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/wc/wc.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/which/which.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/whoami/whoami.d.ts +11 -0
- package/dist/node_modules/just-bash/dist/commands/worker-bridge/bridge-handler.d.ts +71 -0
- package/dist/node_modules/just-bash/dist/commands/worker-bridge/protocol.d.ts +140 -0
- package/dist/node_modules/just-bash/dist/commands/worker-bridge/sync-backend.d.ts +81 -0
- package/dist/node_modules/just-bash/dist/commands/xan/aggregation.d.ts +20 -0
- package/dist/node_modules/just-bash/dist/commands/xan/column-selection.d.ts +19 -0
- package/dist/node_modules/just-bash/dist/commands/xan/csv.d.ts +37 -0
- package/dist/node_modules/just-bash/dist/commands/xan/moonblade-parser.d.ts +80 -0
- package/dist/node_modules/just-bash/dist/commands/xan/moonblade-to-jq.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/xan/moonblade-tokenizer.d.ts +25 -0
- package/dist/node_modules/just-bash/dist/commands/xan/subcommands.d.ts +15 -0
- package/dist/node_modules/just-bash/dist/commands/xan/xan-agg.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/commands/xan/xan-columns.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/commands/xan/xan-core.d.ts +10 -0
- package/dist/node_modules/just-bash/dist/commands/xan/xan-data.d.ts +52 -0
- package/dist/node_modules/just-bash/dist/commands/xan/xan-filter.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/commands/xan/xan-map.d.ts +11 -0
- package/dist/node_modules/just-bash/dist/commands/xan/xan-reshape.d.ts +40 -0
- package/dist/node_modules/just-bash/dist/commands/xan/xan-simple.d.ts +40 -0
- package/dist/node_modules/just-bash/dist/commands/xan/xan-view.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/commands/xan/xan.d.ts +10 -0
- package/dist/node_modules/just-bash/dist/commands/xargs/xargs.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/commands/yq/formats.d.ts +64 -0
- package/dist/node_modules/just-bash/dist/commands/yq/yq.d.ts +13 -0
- package/dist/node_modules/just-bash/dist/custom-commands.d.ts +42 -0
- package/dist/node_modules/just-bash/dist/fs/encoding.d.ts +17 -0
- package/dist/node_modules/just-bash/dist/fs/in-memory-fs/in-memory-fs.d.ts +73 -0
- package/dist/node_modules/just-bash/dist/fs/in-memory-fs/index.d.ts +1 -0
- package/dist/node_modules/just-bash/dist/fs/init.d.ts +22 -0
- package/dist/node_modules/just-bash/dist/fs/interface.d.ts +229 -0
- package/dist/node_modules/just-bash/dist/fs/mountable-fs/index.d.ts +1 -0
- package/dist/node_modules/just-bash/dist/fs/mountable-fs/mountable-fs.d.ts +116 -0
- package/dist/node_modules/just-bash/dist/fs/overlay-fs/index.d.ts +1 -0
- package/dist/node_modules/just-bash/dist/fs/overlay-fs/overlay-fs.d.ts +163 -0
- package/dist/node_modules/just-bash/dist/fs/path-utils.d.ts +46 -0
- package/dist/node_modules/just-bash/dist/fs/read-write-fs/index.d.ts +1 -0
- package/dist/node_modules/just-bash/dist/fs/read-write-fs/read-write-fs.d.ts +96 -0
- package/dist/node_modules/just-bash/dist/fs/real-fs-utils.d.ts +90 -0
- package/dist/node_modules/just-bash/dist/fs/sanitize-error.d.ts +19 -0
- package/dist/node_modules/just-bash/dist/index.d.cts +27 -0
- package/dist/node_modules/just-bash/dist/index.d.ts +27 -0
- package/dist/node_modules/just-bash/dist/interpreter/alias-expansion.d.ts +23 -0
- package/dist/node_modules/just-bash/dist/interpreter/arithmetic.d.ts +24 -0
- package/dist/node_modules/just-bash/dist/interpreter/assignment-expansion.d.ts +24 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtin-dispatch.d.ts +39 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/break.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/cd.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/compgen.d.ts +26 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/complete.d.ts +17 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/compopt.d.ts +28 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/continue.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/declare-array-parsing.d.ts +14 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/declare-print.d.ts +39 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/declare.d.ts +35 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/dirs.d.ts +29 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/eval.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/exit.d.ts +5 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/export.d.ts +14 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/getopts.d.ts +18 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/hash.d.ts +19 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/help.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/index.d.ts +45 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/let.d.ts +18 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/local.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/mapfile.d.ts +17 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/read.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/return.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/set.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/shift.d.ts +15 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/shopt.d.ts +7 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/source.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/unset.d.ts +16 -0
- package/dist/node_modules/just-bash/dist/interpreter/builtins/variable-assignment.d.ts +66 -0
- package/dist/node_modules/just-bash/dist/interpreter/command-resolution.d.ts +43 -0
- package/dist/node_modules/just-bash/dist/interpreter/conditionals.d.ts +17 -0
- package/dist/node_modules/just-bash/dist/interpreter/control-flow.d.ts +21 -0
- package/dist/node_modules/just-bash/dist/interpreter/defense-aware-command-context.d.ts +6 -0
- package/dist/node_modules/just-bash/dist/interpreter/errors.d.ts +158 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/analysis.d.ts +37 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/arith-text-expansion.d.ts +20 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/array-pattern-ops.d.ts +21 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/array-prefix-suffix.d.ts +46 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/array-slice-transform.d.ts +36 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/array-word-expansion.d.ts +39 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/brace-range.d.ts +20 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/command-substitution.d.ts +23 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/glob-escape.d.ts +32 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/indirect-expansion.d.ts +42 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/parameter-ops.d.ts +113 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/pattern-expansion.d.ts +23 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/pattern-removal.d.ts +18 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/pattern.d.ts +23 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/positional-params.d.ts +59 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/prompt.d.ts +39 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/quoting.d.ts +13 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/tilde.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/unquoted-expansion.d.ts +76 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/variable-attrs.d.ts +19 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/variable.d.ts +36 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/word-glob-expansion.d.ts +33 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion/word-split.d.ts +29 -0
- package/dist/node_modules/just-bash/dist/interpreter/expansion.d.ts +53 -0
- package/dist/node_modules/just-bash/dist/interpreter/functions.d.ts +12 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/array.d.ts +43 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/condition.d.ts +22 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/errors.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/file-tests.d.ts +33 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/ifs.d.ts +104 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/loop.d.ts +24 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/nameref.d.ts +65 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/numeric-compare.d.ts +13 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/quoting.d.ts +24 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/readonly.d.ts +45 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/regex.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/result.d.ts +60 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/shell-constants.d.ts +25 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/shellopts.d.ts +28 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/statements.d.ts +20 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/string-compare.d.ts +24 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/string-tests.d.ts +13 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/tilde.d.ts +13 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/variable-tests.d.ts +9 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/word-matching.d.ts +26 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/word-parts.d.ts +22 -0
- package/dist/node_modules/just-bash/dist/interpreter/helpers/xtrace.d.ts +18 -0
- package/dist/node_modules/just-bash/dist/interpreter/index.d.ts +3 -0
- package/dist/node_modules/just-bash/dist/interpreter/interpreter.d.ts +77 -0
- package/dist/node_modules/just-bash/dist/interpreter/pipeline-execution.d.ts +16 -0
- package/dist/node_modules/just-bash/dist/interpreter/redirections.d.ts +51 -0
- package/dist/node_modules/just-bash/dist/interpreter/simple-command-assignments.d.ts +29 -0
- package/dist/node_modules/just-bash/dist/interpreter/subshell-group.d.ts +32 -0
- package/dist/node_modules/just-bash/dist/interpreter/type-command.d.ts +37 -0
- package/dist/node_modules/just-bash/dist/interpreter/types.d.ts +344 -0
- package/dist/node_modules/just-bash/dist/limits.d.ts +52 -0
- package/dist/node_modules/just-bash/dist/network/allow-list/shared.d.ts +57 -0
- package/dist/node_modules/just-bash/dist/network/allow-list.d.ts +59 -0
- package/dist/node_modules/just-bash/dist/network/fetch.d.ts +25 -0
- package/dist/node_modules/just-bash/dist/network/index.d.ts +7 -0
- package/dist/node_modules/just-bash/dist/network/types.d.ts +155 -0
- package/dist/node_modules/just-bash/dist/parser/arithmetic-parser.d.ts +23 -0
- package/dist/node_modules/just-bash/dist/parser/arithmetic-primaries.d.ts +45 -0
- package/dist/node_modules/just-bash/dist/parser/command-parser.d.ts +10 -0
- package/dist/node_modules/just-bash/dist/parser/compound-parser.d.ts +28 -0
- package/dist/node_modules/just-bash/dist/parser/conditional-parser.d.ts +8 -0
- package/dist/node_modules/just-bash/dist/parser/expansion-parser.d.ts +16 -0
- package/dist/node_modules/just-bash/dist/parser/lexer.d.ts +197 -0
- package/dist/node_modules/just-bash/dist/parser/parser-substitution.d.ts +62 -0
- package/dist/node_modules/just-bash/dist/parser/parser.d.ts +135 -0
- package/dist/node_modules/just-bash/dist/parser/types.d.ts +25 -0
- package/dist/node_modules/just-bash/dist/parser/word-parser.d.ts +33 -0
- package/dist/node_modules/just-bash/dist/sandbox/Command.d.ts +35 -0
- package/dist/node_modules/just-bash/dist/sandbox/Sandbox.d.ts +90 -0
- package/dist/node_modules/just-bash/dist/sandbox/index.d.ts +2 -0
- package/dist/node_modules/just-bash/dist/shell-metadata.d.ts +25 -0
- package/dist/node_modules/just-bash/dist/timers.d.ts +4 -0
- package/dist/node_modules/just-bash/dist/types.d.ts +198 -0
- package/dist/node_modules/just-bash/dist/utils/args.d.ts +55 -0
- package/dist/node_modules/just-bash/dist/utils/constants.d.ts +15 -0
- package/dist/node_modules/just-bash/dist/utils/file-reader.d.ts +67 -0
- package/dist/node_modules/just-bash/dist/utils/glob.d.ts +25 -0
- package/dist/node_modules/just-bash/dist/vitest-setup.d.ts +1 -0
- package/dist/node_modules/just-bash/node_modules/@tokenizer/inflate/lib/GzipHandler.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/@tokenizer/inflate/lib/GzipHandler.js +19 -0
- package/dist/node_modules/just-bash/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +26 -0
- package/dist/node_modules/just-bash/node_modules/@tokenizer/inflate/lib/ZipHandler.js +233 -0
- package/dist/node_modules/just-bash/node_modules/@tokenizer/inflate/lib/ZipToken.d.ts +94 -0
- package/dist/node_modules/just-bash/node_modules/@tokenizer/inflate/lib/ZipToken.js +117 -0
- package/dist/node_modules/just-bash/node_modules/@tokenizer/inflate/lib/index.d.ts +3 -0
- package/dist/node_modules/just-bash/node_modules/@tokenizer/inflate/lib/index.js +2 -0
- package/dist/node_modules/just-bash/node_modules/@tokenizer/inflate/package.json +76 -0
- package/dist/node_modules/just-bash/node_modules/balanced-match/dist/commonjs/index.d.ts +9 -0
- package/dist/node_modules/just-bash/node_modules/balanced-match/dist/commonjs/index.js +59 -0
- package/dist/node_modules/just-bash/node_modules/balanced-match/dist/commonjs/package.json +3 -0
- package/dist/node_modules/just-bash/node_modules/balanced-match/dist/esm/index.d.ts +9 -0
- package/dist/node_modules/just-bash/node_modules/balanced-match/dist/esm/index.js +54 -0
- package/dist/node_modules/just-bash/node_modules/balanced-match/dist/esm/package.json +3 -0
- package/dist/node_modules/just-bash/node_modules/balanced-match/package.json +68 -0
- package/dist/node_modules/just-bash/node_modules/brace-expansion/dist/commonjs/index.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/brace-expansion/dist/commonjs/index.js +201 -0
- package/dist/node_modules/just-bash/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/dist/node_modules/just-bash/node_modules/brace-expansion/dist/esm/index.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/brace-expansion/dist/esm/index.js +197 -0
- package/dist/node_modules/just-bash/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/dist/node_modules/just-bash/node_modules/brace-expansion/package.json +64 -0
- package/dist/node_modules/just-bash/node_modules/debug/package.json +64 -0
- package/dist/node_modules/just-bash/node_modules/debug/src/browser.js +272 -0
- package/dist/node_modules/just-bash/node_modules/debug/src/common.js +292 -0
- package/dist/node_modules/just-bash/node_modules/debug/src/index.js +10 -0
- package/dist/node_modules/just-bash/node_modules/debug/src/node.js +263 -0
- package/dist/node_modules/just-bash/node_modules/diff/dist/diff.js +1782 -0
- package/dist/node_modules/just-bash/node_modules/diff/dist/diff.min.js +1 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/convert/dmp.d.ts +8 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/convert/dmp.js +24 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/convert/xml.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/convert/xml.js +34 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/array.d.ts +19 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/array.js +40 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/base.d.ts +20 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/base.js +265 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/character.d.ts +19 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/character.js +31 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/css.d.ts +18 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/css.js +34 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/json.d.ts +24 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/json.js +105 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/line.d.ts +24 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/line.js +89 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/sentence.d.ts +21 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/sentence.js +67 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/word.d.ts +35 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/diff/word.js +312 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/index.d.ts +20 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/index.js +64 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/package.json +1 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/patch/apply.d.ts +62 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/patch/apply.js +267 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/patch/create.d.ts +122 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/patch/create.js +251 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/patch/line-endings.d.ts +17 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/patch/line-endings.js +61 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/patch/parse.d.ts +8 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/patch/parse.js +150 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/patch/reverse.d.ts +9 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/patch/reverse.js +37 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/types.d.ts +213 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/util/array.d.ts +3 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/util/array.js +21 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/util/distance-iterator.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/util/distance-iterator.js +40 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/util/params.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/util/params.js +17 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/util/string.d.ts +30 -0
- package/dist/node_modules/just-bash/node_modules/diff/libcjs/util/string.js +200 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/convert/dmp.d.ts +8 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/convert/dmp.js +21 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/convert/xml.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/convert/xml.js +31 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/array.d.ts +19 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/array.js +16 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/base.d.ts +20 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/base.js +253 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/character.d.ts +19 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/character.js +7 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/css.d.ts +18 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/css.js +10 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/json.d.ts +24 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/json.js +78 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/line.d.ts +24 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/line.js +65 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/sentence.d.ts +21 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/sentence.js +43 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/word.d.ts +35 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/diff/word.js +281 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/index.d.ts +20 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/index.js +30 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/package.json +1 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/patch/apply.d.ts +62 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/patch/apply.js +257 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/patch/create.d.ts +122 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/patch/create.js +228 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/patch/line-endings.d.ts +17 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/patch/line-endings.js +44 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/patch/parse.d.ts +8 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/patch/parse.js +147 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/patch/reverse.d.ts +9 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/patch/reverse.js +23 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/types.d.ts +213 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/types.js +1 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/util/array.d.ts +3 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/util/array.js +17 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/util/distance-iterator.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/util/distance-iterator.js +37 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/util/params.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/util/params.js +14 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/util/string.d.ts +30 -0
- package/dist/node_modules/just-bash/node_modules/diff/libesm/util/string.js +184 -0
- package/dist/node_modules/just-bash/node_modules/diff/package.json +130 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/lib/fxbuilder.min.js +2 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/lib/fxp.d.cts +458 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/lib/fxp.min.js +2 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/lib/fxparser.min.js +2 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/lib/fxvalidator.min.js +2 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/package.json +92 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/cli/cli.js +97 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/cli/man.js +17 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/cli/read.js +43 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/fxp.d.ts +445 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/fxp.js +14 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/ignoreAttributes.js +18 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/util.js +68 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +16 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +104 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +61 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +69 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +103 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +100 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +154 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +94 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/TagPath.js +81 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +13 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/XMLParser.js +83 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +235 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +210 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +111 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +116 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +121 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +105 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +22 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +19 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +38 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +13 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +14 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +6 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/validator.js +425 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +285 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +134 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/xmlbuilder/prettifyJs2Xml.js +0 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +379 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +46 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +629 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +71 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/xmlparser/node2json.js +119 -0
- package/dist/node_modules/just-bash/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +40 -0
- package/dist/node_modules/just-bash/node_modules/file-type/core.d.ts +253 -0
- package/dist/node_modules/just-bash/node_modules/file-type/core.js +2899 -0
- package/dist/node_modules/just-bash/node_modules/file-type/index.d.ts +98 -0
- package/dist/node_modules/just-bash/node_modules/file-type/index.js +163 -0
- package/dist/node_modules/just-bash/node_modules/file-type/license +9 -0
- package/dist/node_modules/just-bash/node_modules/file-type/package.json +290 -0
- package/dist/node_modules/just-bash/node_modules/file-type/supported.js +360 -0
- package/dist/node_modules/just-bash/node_modules/file-type/util.js +60 -0
- package/dist/node_modules/just-bash/node_modules/ini/lib/ini.js +280 -0
- package/dist/node_modules/just-bash/node_modules/ini/package.json +45 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/ast.d.ts +22 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/ast.js +845 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/index.d.ts +174 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/index.js +1127 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/ast.d.ts +22 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/ast.js +841 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/escape.js +26 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/index.d.ts +174 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/index.js +1114 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/package.json +3 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/dist/esm/unescape.js +34 -0
- package/dist/node_modules/just-bash/node_modules/minimatch/package.json +73 -0
- package/dist/node_modules/just-bash/node_modules/sprintf-js/dist/.gitattributes +4 -0
- package/dist/node_modules/just-bash/node_modules/sprintf-js/dist/angular-sprintf.min.js +3 -0
- package/dist/node_modules/just-bash/node_modules/sprintf-js/dist/sprintf.min.js +3 -0
- package/dist/node_modules/just-bash/node_modules/sprintf-js/package.json +35 -0
- package/dist/node_modules/just-bash/node_modules/sprintf-js/src/angular-sprintf.js +24 -0
- package/dist/node_modules/just-bash/node_modules/sprintf-js/src/sprintf.js +231 -0
- package/dist/node_modules/just-bash/node_modules/strnum/package.json +31 -0
- package/dist/node_modules/just-bash/node_modules/strnum/strnum.js +161 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/LICENSE.txt +21 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/AbstractTokenizer.d.ts +76 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/AbstractTokenizer.js +111 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/BlobTokenizer.d.ts +29 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/BlobTokenizer.js +53 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/BufferTokenizer.d.ts +29 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/BufferTokenizer.js +52 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/FileTokenizer.d.ts +37 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/FileTokenizer.js +61 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +34 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/ReadStreamTokenizer.js +107 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/core.d.ts +40 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/core.js +62 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/index.d.ts +16 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/index.js +22 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +54 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/AbstractStreamReader.js +71 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/Deferred.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/Deferred.js +10 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/Errors.d.ts +10 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/Errors.js +16 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/StreamReader.d.ts +29 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/StreamReader.js +83 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +14 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/WebStreamByobReader.js +27 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +19 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +62 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +14 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/WebStreamReader.js +13 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +5 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +19 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/index.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/stream/index.js +5 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/types.d.ts +139 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/lib/types.js +1 -0
- package/dist/node_modules/just-bash/node_modules/strtok3/package.json +94 -0
- package/dist/node_modules/just-bash/node_modules/token-types/LICENSE.txt +9 -0
- package/dist/node_modules/just-bash/node_modules/token-types/lib/index.d.ts +135 -0
- package/dist/node_modules/just-bash/node_modules/token-types/lib/index.js +401 -0
- package/dist/node_modules/just-bash/node_modules/token-types/package.json +81 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/composer.js +217 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +223 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/errors.js +57 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/index.js +17 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/log.js +11 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/nodes/Alias.js +114 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/parse/lexer.js +717 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/parse/parser.js +967 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +64 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +24 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/util.js +11 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/dist/visit.js +233 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/index.js +5 -0
- package/dist/node_modules/just-bash/node_modules/yaml/browser/package.json +3 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/cli.d.ts +8 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/composer.js +222 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-flow-scalar.js +225 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/doc/Document.js +337 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/doc/directives.js +178 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/errors.d.ts +21 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/errors.js +62 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/index.d.ts +25 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/index.js +50 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/log.d.ts +3 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/log.js +19 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/Alias.js +116 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/Scalar.d.ts +43 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/options.d.ts +350 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/cst.js +112 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/lexer.js +719 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/parse/parser.js +972 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/public-api.js +107 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/tags.js +99 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/merge.js +68 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyNumber.js +26 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/test-events.js +134 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/util.d.ts +16 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/util.js +28 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/visit.d.ts +102 -0
- package/dist/node_modules/just-bash/node_modules/yaml/dist/visit.js +236 -0
- package/dist/node_modules/just-bash/node_modules/yaml/package.json +97 -0
- package/dist/node_modules/just-bash/node_modules/yaml/util.js +2 -0
- package/dist/node_modules/just-bash/package.json +1 -0
- package/dist/node_modules/just-bash/vendor/cpython-emscripten/python.cjs +2 -0
- package/dist/node_modules/just-bash/vendor/cpython-emscripten/python.wasm +0 -0
- package/dist/node_modules/just-bash/vendor/cpython-emscripten/python313.zip +0 -0
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-employee.js +9 -3
- package/dist/server/llm-providers/common/reasoning.d.ts +0 -7
- package/dist/server/llm-providers/common/reasoning.js +18 -36
- package/dist/server/llm-providers/mimo.d.ts +37 -0
- package/dist/server/llm-providers/mimo.js +156 -0
- package/dist/server/migrations/20260428175558-update-ai-employee-category.d.ts +14 -0
- package/dist/server/migrations/20260428175558-update-ai-employee-category.js +55 -0
- package/dist/server/migrations/20260429175132-ai-employee-deprecated-orin.d.ts +14 -0
- package/dist/server/migrations/20260429175132-ai-employee-deprecated-orin.js +53 -0
- package/dist/server/plugin.d.ts +2 -0
- package/dist/server/plugin.js +5 -3
- package/dist/server/resource/aiEmployees.js +10 -1
- package/dist/server/tools/docs.d.ts +7 -24
- package/dist/server/tools/docs.js +197 -400
- package/npm-shims/@mongodb-js/zstd/index.d.ts +2 -0
- package/npm-shims/@mongodb-js/zstd/index.js +6 -0
- package/npm-shims/@mongodb-js/zstd/package.json +9 -0
- package/npm-shims/node-liblzma/index.js +10 -0
- package/npm-shims/node-liblzma/package.json +9 -0
- package/package.json +4 -2
- package/dist/client/228.b18148eb1009d2fb.js +0 -10
- package/dist/client/343.83f7d96664e4e038.js +0 -10
- package/dist/client/559.133d286a0a0a1d93.js +0 -10
- package/dist/client/646.cba98d80e9e6ea74.js +0 -10
- package/dist/client/792.ae8ad1fcae9fd974.js +0 -10
- package/dist/node_modules/fast-glob/LICENSE +0 -21
- package/dist/node_modules/fast-glob/out/index.d.ts +0 -40
- package/dist/node_modules/fast-glob/out/index.js +0 -37
- package/dist/node_modules/fast-glob/out/managers/tasks.d.ts +0 -22
- package/dist/node_modules/fast-glob/out/managers/tasks.js +0 -110
- package/dist/node_modules/fast-glob/out/providers/async.d.ts +0 -9
- package/dist/node_modules/fast-glob/out/providers/async.js +0 -23
- package/dist/node_modules/fast-glob/out/providers/filters/deep.d.ts +0 -16
- package/dist/node_modules/fast-glob/out/providers/filters/deep.js +0 -62
- package/dist/node_modules/fast-glob/out/providers/filters/entry.d.ts +0 -16
- package/dist/node_modules/fast-glob/out/providers/filters/entry.js +0 -63
- package/dist/node_modules/fast-glob/out/providers/filters/error.d.ts +0 -8
- package/dist/node_modules/fast-glob/out/providers/filters/error.js +0 -15
- package/dist/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +0 -33
- package/dist/node_modules/fast-glob/out/providers/matchers/matcher.js +0 -45
- package/dist/node_modules/fast-glob/out/providers/matchers/partial.d.ts +0 -4
- package/dist/node_modules/fast-glob/out/providers/matchers/partial.js +0 -38
- package/dist/node_modules/fast-glob/out/providers/provider.d.ts +0 -19
- package/dist/node_modules/fast-glob/out/providers/provider.js +0 -48
- package/dist/node_modules/fast-glob/out/providers/stream.d.ts +0 -11
- package/dist/node_modules/fast-glob/out/providers/stream.js +0 -31
- package/dist/node_modules/fast-glob/out/providers/sync.d.ts +0 -9
- package/dist/node_modules/fast-glob/out/providers/sync.js +0 -23
- package/dist/node_modules/fast-glob/out/providers/transformers/entry.d.ts +0 -8
- package/dist/node_modules/fast-glob/out/providers/transformers/entry.js +0 -26
- package/dist/node_modules/fast-glob/out/readers/async.d.ts +0 -10
- package/dist/node_modules/fast-glob/out/readers/async.js +0 -35
- package/dist/node_modules/fast-glob/out/readers/reader.d.ts +0 -15
- package/dist/node_modules/fast-glob/out/readers/reader.js +0 -33
- package/dist/node_modules/fast-glob/out/readers/stream.d.ts +0 -14
- package/dist/node_modules/fast-glob/out/readers/stream.js +0 -55
- package/dist/node_modules/fast-glob/out/readers/sync.d.ts +0 -12
- package/dist/node_modules/fast-glob/out/readers/sync.js +0 -43
- package/dist/node_modules/fast-glob/out/settings.d.ts +0 -164
- package/dist/node_modules/fast-glob/out/settings.js +0 -59
- package/dist/node_modules/fast-glob/out/types/index.d.ts +0 -31
- package/dist/node_modules/fast-glob/out/utils/array.d.ts +0 -2
- package/dist/node_modules/fast-glob/out/utils/array.js +0 -22
- package/dist/node_modules/fast-glob/out/utils/errno.d.ts +0 -2
- package/dist/node_modules/fast-glob/out/utils/errno.js +0 -7
- package/dist/node_modules/fast-glob/out/utils/fs.d.ts +0 -4
- package/dist/node_modules/fast-glob/out/utils/fs.js +0 -19
- package/dist/node_modules/fast-glob/out/utils/index.d.ts +0 -8
- package/dist/node_modules/fast-glob/out/utils/index.js +0 -17
- package/dist/node_modules/fast-glob/out/utils/path.d.ts +0 -13
- package/dist/node_modules/fast-glob/out/utils/path.js +0 -68
- package/dist/node_modules/fast-glob/out/utils/pattern.d.ts +0 -47
- package/dist/node_modules/fast-glob/out/utils/pattern.js +0 -188
- package/dist/node_modules/fast-glob/out/utils/stream.d.ts +0 -4
- package/dist/node_modules/fast-glob/out/utils/stream.js +0 -17
- package/dist/node_modules/fast-glob/out/utils/string.d.ts +0 -2
- package/dist/node_modules/fast-glob/out/utils/string.js +0 -11
- package/dist/node_modules/fast-glob/package.json +0 -1
- package/dist/node_modules/flexsearch/LICENSE +0 -201
- package/dist/node_modules/flexsearch/dist/db/clickhouse/index.cjs +0 -727
- package/dist/node_modules/flexsearch/dist/db/indexeddb/index.cjs +0 -680
- package/dist/node_modules/flexsearch/dist/db/mongodb/index.cjs +0 -710
- package/dist/node_modules/flexsearch/dist/db/postgres/index.cjs +0 -932
- package/dist/node_modules/flexsearch/dist/db/redis/index.cjs +0 -591
- package/dist/node_modules/flexsearch/dist/db/sqlite/index.cjs +0 -871
- package/dist/node_modules/flexsearch/dist/flexsearch.bundle.debug.js +0 -2926
- package/dist/node_modules/flexsearch/dist/flexsearch.bundle.min.js +0 -8
- package/dist/node_modules/flexsearch/dist/flexsearch.bundle.module.debug.js +0 -2922
- package/dist/node_modules/flexsearch/dist/flexsearch.bundle.module.min.js +0 -108
- package/dist/node_modules/flexsearch/dist/flexsearch.compact.debug.js +0 -1652
- package/dist/node_modules/flexsearch/dist/flexsearch.compact.min.js +0 -58
- package/dist/node_modules/flexsearch/dist/flexsearch.compact.module.debug.js +0 -1648
- package/dist/node_modules/flexsearch/dist/flexsearch.compact.module.min.js +0 -59
- package/dist/node_modules/flexsearch/dist/flexsearch.es5.debug.js +0 -3944
- package/dist/node_modules/flexsearch/dist/flexsearch.es5.min.js +0 -144
- package/dist/node_modules/flexsearch/dist/flexsearch.light.debug.js +0 -651
- package/dist/node_modules/flexsearch/dist/flexsearch.light.min.js +0 -28
- package/dist/node_modules/flexsearch/dist/flexsearch.light.module.debug.js +0 -647
- package/dist/node_modules/flexsearch/dist/flexsearch.light.module.min.js +0 -29
- package/dist/node_modules/flexsearch/dist/lang/de.min.js +0 -2
- package/dist/node_modules/flexsearch/dist/lang/en.min.js +0 -2
- package/dist/node_modules/flexsearch/dist/lang/fr.min.js +0 -3
- package/dist/node_modules/flexsearch/dist/module/async.js +0 -72
- package/dist/node_modules/flexsearch/dist/module/bundle.js +0 -330
- package/dist/node_modules/flexsearch/dist/module/cache.js +0 -118
- package/dist/node_modules/flexsearch/dist/module/charset/cjk.js +0 -8
- package/dist/node_modules/flexsearch/dist/module/charset/exact.js +0 -10
- package/dist/node_modules/flexsearch/dist/module/charset/latin/advanced.js +0 -15
- package/dist/node_modules/flexsearch/dist/module/charset/latin/balance.js +0 -10
- package/dist/node_modules/flexsearch/dist/module/charset/latin/extra.js +0 -14
- package/dist/node_modules/flexsearch/dist/module/charset/latin/soundex.js +0 -53
- package/dist/node_modules/flexsearch/dist/module/charset/normalize.js +0 -5
- package/dist/node_modules/flexsearch/dist/module/charset/polyfill.js +0 -1
- package/dist/node_modules/flexsearch/dist/module/charset.js +0 -40
- package/dist/node_modules/flexsearch/dist/module/common.js +0 -135
- package/dist/node_modules/flexsearch/dist/module/compress.js +0 -64
- package/dist/node_modules/flexsearch/dist/module/db/clickhouse/index.js +0 -569
- package/dist/node_modules/flexsearch/dist/module/db/indexeddb/index.js +0 -516
- package/dist/node_modules/flexsearch/dist/module/db/interface.js +0 -51
- package/dist/node_modules/flexsearch/dist/module/db/mongodb/index.js +0 -571
- package/dist/node_modules/flexsearch/dist/module/db/postgres/index.js +0 -624
- package/dist/node_modules/flexsearch/dist/module/db/redis/index.js +0 -461
- package/dist/node_modules/flexsearch/dist/module/db/sqlite/index.js +0 -707
- package/dist/node_modules/flexsearch/dist/module/document/add.js +0 -228
- package/dist/node_modules/flexsearch/dist/module/document/highlight.js +0 -448
- package/dist/node_modules/flexsearch/dist/module/document/search.js +0 -515
- package/dist/node_modules/flexsearch/dist/module/document.js +0 -485
- package/dist/node_modules/flexsearch/dist/module/encoder.js +0 -453
- package/dist/node_modules/flexsearch/dist/module/index/add.js +0 -229
- package/dist/node_modules/flexsearch/dist/module/index/remove.js +0 -101
- package/dist/node_modules/flexsearch/dist/module/index/search.js +0 -326
- package/dist/node_modules/flexsearch/dist/module/index.js +0 -184
- package/dist/node_modules/flexsearch/dist/module/intersect.js +0 -272
- package/dist/node_modules/flexsearch/dist/module/keystore.js +0 -349
- package/dist/node_modules/flexsearch/dist/module/lang/de.js +0 -43
- package/dist/node_modules/flexsearch/dist/module/lang/en.js +0 -40
- package/dist/node_modules/flexsearch/dist/module/lang/fr.js +0 -27
- package/dist/node_modules/flexsearch/dist/module/preset.js +0 -53
- package/dist/node_modules/flexsearch/dist/module/profiler.js +0 -9
- package/dist/node_modules/flexsearch/dist/module/resolve/and.js +0 -84
- package/dist/node_modules/flexsearch/dist/module/resolve/default.js +0 -76
- package/dist/node_modules/flexsearch/dist/module/resolve/handler.js +0 -216
- package/dist/node_modules/flexsearch/dist/module/resolve/not.js +0 -89
- package/dist/node_modules/flexsearch/dist/module/resolve/or.js +0 -49
- package/dist/node_modules/flexsearch/dist/module/resolve/xor.js +0 -124
- package/dist/node_modules/flexsearch/dist/module/resolver.js +0 -257
- package/dist/node_modules/flexsearch/dist/module/serialize.js +0 -468
- package/dist/node_modules/flexsearch/dist/module/type.js +0 -305
- package/dist/node_modules/flexsearch/dist/module/worker/handler.js +0 -77
- package/dist/node_modules/flexsearch/dist/module/worker/node.js +0 -73
- package/dist/node_modules/flexsearch/dist/module/worker/worker.js +0 -2
- package/dist/node_modules/flexsearch/dist/module/worker.js +0 -146
- package/dist/node_modules/flexsearch/dist/module-debug/async.js +0 -72
- package/dist/node_modules/flexsearch/dist/module-debug/bundle.js +0 -330
- package/dist/node_modules/flexsearch/dist/module-debug/cache.js +0 -118
- package/dist/node_modules/flexsearch/dist/module-debug/charset/cjk.js +0 -8
- package/dist/node_modules/flexsearch/dist/module-debug/charset/exact.js +0 -10
- package/dist/node_modules/flexsearch/dist/module-debug/charset/latin/advanced.js +0 -15
- package/dist/node_modules/flexsearch/dist/module-debug/charset/latin/balance.js +0 -10
- package/dist/node_modules/flexsearch/dist/module-debug/charset/latin/extra.js +0 -14
- package/dist/node_modules/flexsearch/dist/module-debug/charset/latin/soundex.js +0 -53
- package/dist/node_modules/flexsearch/dist/module-debug/charset/normalize.js +0 -5
- package/dist/node_modules/flexsearch/dist/module-debug/charset/polyfill.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-debug/charset.js +0 -40
- package/dist/node_modules/flexsearch/dist/module-debug/common.js +0 -135
- package/dist/node_modules/flexsearch/dist/module-debug/compress.js +0 -64
- package/dist/node_modules/flexsearch/dist/module-debug/db/clickhouse/index.js +0 -569
- package/dist/node_modules/flexsearch/dist/module-debug/db/indexeddb/index.js +0 -516
- package/dist/node_modules/flexsearch/dist/module-debug/db/interface.js +0 -51
- package/dist/node_modules/flexsearch/dist/module-debug/db/mongodb/index.js +0 -571
- package/dist/node_modules/flexsearch/dist/module-debug/db/postgres/index.js +0 -624
- package/dist/node_modules/flexsearch/dist/module-debug/db/redis/index.js +0 -461
- package/dist/node_modules/flexsearch/dist/module-debug/db/sqlite/index.js +0 -707
- package/dist/node_modules/flexsearch/dist/module-debug/document/add.js +0 -229
- package/dist/node_modules/flexsearch/dist/module-debug/document/highlight.js +0 -458
- package/dist/node_modules/flexsearch/dist/module-debug/document/search.js +0 -537
- package/dist/node_modules/flexsearch/dist/module-debug/document.js +0 -489
- package/dist/node_modules/flexsearch/dist/module-debug/encoder.js +0 -457
- package/dist/node_modules/flexsearch/dist/module-debug/index/add.js +0 -229
- package/dist/node_modules/flexsearch/dist/module-debug/index/remove.js +0 -101
- package/dist/node_modules/flexsearch/dist/module-debug/index/search.js +0 -326
- package/dist/node_modules/flexsearch/dist/module-debug/index.js +0 -190
- package/dist/node_modules/flexsearch/dist/module-debug/intersect.js +0 -272
- package/dist/node_modules/flexsearch/dist/module-debug/keystore.js +0 -349
- package/dist/node_modules/flexsearch/dist/module-debug/lang/de.js +0 -43
- package/dist/node_modules/flexsearch/dist/module-debug/lang/en.js +0 -40
- package/dist/node_modules/flexsearch/dist/module-debug/lang/fr.js +0 -27
- package/dist/node_modules/flexsearch/dist/module-debug/preset.js +0 -56
- package/dist/node_modules/flexsearch/dist/module-debug/profiler.js +0 -9
- package/dist/node_modules/flexsearch/dist/module-debug/resolve/and.js +0 -84
- package/dist/node_modules/flexsearch/dist/module-debug/resolve/default.js +0 -76
- package/dist/node_modules/flexsearch/dist/module-debug/resolve/handler.js +0 -228
- package/dist/node_modules/flexsearch/dist/module-debug/resolve/not.js +0 -89
- package/dist/node_modules/flexsearch/dist/module-debug/resolve/or.js +0 -49
- package/dist/node_modules/flexsearch/dist/module-debug/resolve/xor.js +0 -124
- package/dist/node_modules/flexsearch/dist/module-debug/resolver.js +0 -261
- package/dist/node_modules/flexsearch/dist/module-debug/serialize.js +0 -468
- package/dist/node_modules/flexsearch/dist/module-debug/type.js +0 -305
- package/dist/node_modules/flexsearch/dist/module-debug/worker/handler.js +0 -85
- package/dist/node_modules/flexsearch/dist/module-debug/worker/node.js +0 -73
- package/dist/node_modules/flexsearch/dist/module-debug/worker/worker.js +0 -2
- package/dist/node_modules/flexsearch/dist/module-debug/worker.js +0 -148
- package/dist/node_modules/flexsearch/dist/module-min/async.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/bundle.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/cache.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/charset/cjk.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/charset/exact.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/charset/latin/advanced.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/charset/latin/balance.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/charset/latin/extra.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/charset/latin/soundex.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/charset/normalize.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/charset/polyfill.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/charset.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/common.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/compress.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/db/clickhouse/index.js +0 -130
- package/dist/node_modules/flexsearch/dist/module-min/db/indexeddb/index.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/db/interface.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/db/mongodb/index.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/db/postgres/index.js +0 -135
- package/dist/node_modules/flexsearch/dist/module-min/db/redis/index.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/db/sqlite/index.js +0 -119
- package/dist/node_modules/flexsearch/dist/module-min/document/add.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/document/highlight.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/document/search.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/document.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/encoder.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/index/add.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/index/remove.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/index/search.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/index.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/intersect.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/keystore.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/lang/de.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/lang/en.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/lang/fr.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/preset.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/profiler.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/resolve/and.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/resolve/default.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/resolve/handler.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/resolve/not.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/resolve/or.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/resolve/xor.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/resolver.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/serialize.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/type.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/worker/handler.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/worker/node.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/worker/worker.js +0 -1
- package/dist/node_modules/flexsearch/dist/module-min/worker.js +0 -1
- package/dist/node_modules/flexsearch/dist/node/node.js +0 -84
- package/dist/node_modules/flexsearch/index.d.ts +0 -1140
- package/dist/node_modules/flexsearch/node.js +0 -84
- package/dist/node_modules/flexsearch/package.json +0 -1
- package/dist/node_modules/flexsearch/src/async.js +0 -78
- package/dist/node_modules/flexsearch/src/bundle.js +0 -392
- package/dist/node_modules/flexsearch/src/cache.js +0 -125
- package/dist/node_modules/flexsearch/src/charset/cjk.js +0 -14
- package/dist/node_modules/flexsearch/src/charset/exact.js +0 -12
- package/dist/node_modules/flexsearch/src/charset/latin/advanced.js +0 -34
- package/dist/node_modules/flexsearch/src/charset/latin/balance.js +0 -47
- package/dist/node_modules/flexsearch/src/charset/latin/extra.js +0 -17
- package/dist/node_modules/flexsearch/src/charset/latin/soundex.js +0 -55
- package/dist/node_modules/flexsearch/src/charset/normalize.js +0 -11
- package/dist/node_modules/flexsearch/src/charset/old/arabic/default.js +0 -15
- package/dist/node_modules/flexsearch/src/charset/old/cjk/default.js +0 -13
- package/dist/node_modules/flexsearch/src/charset/old/cyrillic/default.js +0 -13
- package/dist/node_modules/flexsearch/src/charset/old/greek/default.js +0 -39
- package/dist/node_modules/flexsearch/src/charset/polyfill.js +0 -233
- package/dist/node_modules/flexsearch/src/charset.js +0 -41
- package/dist/node_modules/flexsearch/src/common.js +0 -142
- package/dist/node_modules/flexsearch/src/compress.js +0 -78
- package/dist/node_modules/flexsearch/src/config.js +0 -56
- package/dist/node_modules/flexsearch/src/db/clickhouse/index.js +0 -704
- package/dist/node_modules/flexsearch/src/db/clickhouse/package.json +0 -10
- package/dist/node_modules/flexsearch/src/db/indexeddb/index.js +0 -709
- package/dist/node_modules/flexsearch/src/db/interface.js +0 -62
- package/dist/node_modules/flexsearch/src/db/mongodb/index.js +0 -714
- package/dist/node_modules/flexsearch/src/db/mongodb/package.json +0 -10
- package/dist/node_modules/flexsearch/src/db/postgres/index.js +0 -1008
- package/dist/node_modules/flexsearch/src/db/postgres/package.json +0 -10
- package/dist/node_modules/flexsearch/src/db/redis/index.js +0 -587
- package/dist/node_modules/flexsearch/src/db/redis/package.json +0 -10
- package/dist/node_modules/flexsearch/src/db/sqlite/index.js +0 -848
- package/dist/node_modules/flexsearch/src/db/sqlite/package.json +0 -10
- package/dist/node_modules/flexsearch/src/document/add.js +0 -267
- package/dist/node_modules/flexsearch/src/document/highlight.js +0 -838
- package/dist/node_modules/flexsearch/src/document/search.js +0 -661
- package/dist/node_modules/flexsearch/src/document.js +0 -581
- package/dist/node_modules/flexsearch/src/encoder.js +0 -637
- package/dist/node_modules/flexsearch/src/index/add.js +0 -330
- package/dist/node_modules/flexsearch/src/index/remove.js +0 -173
- package/dist/node_modules/flexsearch/src/index/search.js +0 -436
- package/dist/node_modules/flexsearch/src/index.js +0 -290
- package/dist/node_modules/flexsearch/src/intersect.js +0 -718
- package/dist/node_modules/flexsearch/src/keystore.js +0 -441
- package/dist/node_modules/flexsearch/src/lang/de.js +0 -207
- package/dist/node_modules/flexsearch/src/lang/en.js +0 -337
- package/dist/node_modules/flexsearch/src/lang/fr.js +0 -233
- package/dist/node_modules/flexsearch/src/preset.js +0 -63
- package/dist/node_modules/flexsearch/src/profiler.js +0 -24
- package/dist/node_modules/flexsearch/src/resolve/and.js +0 -108
- package/dist/node_modules/flexsearch/src/resolve/default.js +0 -91
- package/dist/node_modules/flexsearch/src/resolve/handler.js +0 -287
- package/dist/node_modules/flexsearch/src/resolve/not.js +0 -104
- package/dist/node_modules/flexsearch/src/resolve/or.js +0 -65
- package/dist/node_modules/flexsearch/src/resolve/xor.js +0 -140
- package/dist/node_modules/flexsearch/src/resolver.js +0 -307
- package/dist/node_modules/flexsearch/src/serialize.js +0 -526
- package/dist/node_modules/flexsearch/src/type.js +0 -306
- package/dist/node_modules/flexsearch/src/worker/handler.js +0 -100
- package/dist/node_modules/flexsearch/src/worker/node.js +0 -84
- package/dist/node_modules/flexsearch/src/worker/worker.js +0 -2
- package/dist/node_modules/flexsearch/src/worker.js +0 -207
- package/dist/node_modules/flexsearch/task/babel.bundle.json +0 -47
- package/dist/node_modules/flexsearch/task/babel.debug.json +0 -47
- package/dist/node_modules/flexsearch/task/babel.js +0 -144
- package/dist/node_modules/flexsearch/task/babel.min.json +0 -49
- package/dist/node_modules/flexsearch/task/build.js +0 -513
- /package/dist/node_modules/{fast-glob/out/types/index.js → just-bash/node_modules/diff/libcjs/types.js} +0 -0
|
@@ -0,0 +1,4380 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// src/commands/js-exec/js-exec-worker.ts
|
|
9
|
+
import { stripTypeScriptTypes } from "node:module";
|
|
10
|
+
import { parentPort } from "node:worker_threads";
|
|
11
|
+
import {
|
|
12
|
+
getQuickJS
|
|
13
|
+
} from "quickjs-emscripten";
|
|
14
|
+
|
|
15
|
+
// src/security/blocked-globals.ts
|
|
16
|
+
function getBlockedGlobals() {
|
|
17
|
+
const globals = [
|
|
18
|
+
// Direct code execution vectors
|
|
19
|
+
{
|
|
20
|
+
prop: "Function",
|
|
21
|
+
target: globalThis,
|
|
22
|
+
violationType: "function_constructor",
|
|
23
|
+
strategy: "throw",
|
|
24
|
+
reason: "Function constructor allows arbitrary code execution"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
prop: "eval",
|
|
28
|
+
target: globalThis,
|
|
29
|
+
violationType: "eval",
|
|
30
|
+
strategy: "throw",
|
|
31
|
+
reason: "eval() allows arbitrary code execution"
|
|
32
|
+
},
|
|
33
|
+
// Timer functions with string argument allow code execution
|
|
34
|
+
{
|
|
35
|
+
prop: "setTimeout",
|
|
36
|
+
target: globalThis,
|
|
37
|
+
violationType: "setTimeout",
|
|
38
|
+
strategy: "throw",
|
|
39
|
+
reason: "setTimeout with string argument allows code execution"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
prop: "setInterval",
|
|
43
|
+
target: globalThis,
|
|
44
|
+
violationType: "setInterval",
|
|
45
|
+
strategy: "throw",
|
|
46
|
+
reason: "setInterval with string argument allows code execution"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
prop: "setImmediate",
|
|
50
|
+
target: globalThis,
|
|
51
|
+
violationType: "setImmediate",
|
|
52
|
+
strategy: "throw",
|
|
53
|
+
reason: "setImmediate could be used to escape sandbox context"
|
|
54
|
+
},
|
|
55
|
+
// Note: We intentionally do NOT block `process` entirely because:
|
|
56
|
+
// 1. Node.js internals (Promise resolution, etc.) use process.nextTick
|
|
57
|
+
// 2. Blocking process entirely breaks normal async operation
|
|
58
|
+
// 3. The primary code execution vectors (Function, eval) are already blocked
|
|
59
|
+
// However, we DO block specific dangerous process properties.
|
|
60
|
+
{
|
|
61
|
+
prop: "env",
|
|
62
|
+
target: process,
|
|
63
|
+
violationType: "process_env",
|
|
64
|
+
strategy: "throw",
|
|
65
|
+
reason: "process.env could leak sensitive environment variables",
|
|
66
|
+
// Node.js internals and bundled dependencies read these env vars
|
|
67
|
+
// during module loading, file watching, and I/O within the
|
|
68
|
+
// AsyncLocalStorage context. None are user secrets.
|
|
69
|
+
allowedKeys: /* @__PURE__ */ new Set([
|
|
70
|
+
// Node.js core
|
|
71
|
+
"NODE_V8_COVERAGE",
|
|
72
|
+
"NODE_DEBUG",
|
|
73
|
+
"NODE_DEBUG_NATIVE",
|
|
74
|
+
"NODE_COMPILE_CACHE",
|
|
75
|
+
"WATCH_REPORT_DEPENDENCIES",
|
|
76
|
+
// Dependencies
|
|
77
|
+
"FORCE_COLOR",
|
|
78
|
+
// chalk/supports-color
|
|
79
|
+
"DEBUG",
|
|
80
|
+
// debug package
|
|
81
|
+
"UNDICI_NO_FG",
|
|
82
|
+
// undici (Node.js fetch)
|
|
83
|
+
"JEST_WORKER_ID",
|
|
84
|
+
// jest/vitest worker detection
|
|
85
|
+
"__MINIMATCH_TESTING_PLATFORM__",
|
|
86
|
+
// minimatch
|
|
87
|
+
"LOG_TOKENS",
|
|
88
|
+
// query engine debug logging
|
|
89
|
+
"LOG_STREAM"
|
|
90
|
+
// query engine debug logging
|
|
91
|
+
])
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
prop: "binding",
|
|
95
|
+
target: process,
|
|
96
|
+
violationType: "process_binding",
|
|
97
|
+
strategy: "throw",
|
|
98
|
+
reason: "process.binding provides access to native Node.js modules"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
prop: "_linkedBinding",
|
|
102
|
+
target: process,
|
|
103
|
+
violationType: "process_binding",
|
|
104
|
+
strategy: "throw",
|
|
105
|
+
reason: "process._linkedBinding provides access to native Node.js modules"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
prop: "dlopen",
|
|
109
|
+
target: process,
|
|
110
|
+
violationType: "process_dlopen",
|
|
111
|
+
strategy: "throw",
|
|
112
|
+
reason: "process.dlopen allows loading native addons"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
prop: "getBuiltinModule",
|
|
116
|
+
target: process,
|
|
117
|
+
violationType: "process_get_builtin_module",
|
|
118
|
+
strategy: "throw",
|
|
119
|
+
reason: "process.getBuiltinModule allows loading native Node.js modules (fs, child_process, vm)"
|
|
120
|
+
},
|
|
121
|
+
// Note: process.mainModule is handled specially in defense-in-depth-box.ts
|
|
122
|
+
// and worker-defense-in-depth.ts because it may be undefined in ESM contexts
|
|
123
|
+
// but we still want to block both reading and setting it.
|
|
124
|
+
// Process control vectors
|
|
125
|
+
{
|
|
126
|
+
prop: "exit",
|
|
127
|
+
target: process,
|
|
128
|
+
violationType: "process_exit",
|
|
129
|
+
strategy: "throw",
|
|
130
|
+
reason: "process.exit could terminate the interpreter"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
prop: "abort",
|
|
134
|
+
target: process,
|
|
135
|
+
violationType: "process_exit",
|
|
136
|
+
strategy: "throw",
|
|
137
|
+
reason: "process.abort could crash the interpreter"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
prop: "kill",
|
|
141
|
+
target: process,
|
|
142
|
+
violationType: "process_kill",
|
|
143
|
+
strategy: "throw",
|
|
144
|
+
reason: "process.kill could signal other processes"
|
|
145
|
+
},
|
|
146
|
+
// Privilege escalation vectors
|
|
147
|
+
{
|
|
148
|
+
prop: "setuid",
|
|
149
|
+
target: process,
|
|
150
|
+
violationType: "process_setuid",
|
|
151
|
+
strategy: "throw",
|
|
152
|
+
reason: "process.setuid could escalate privileges"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
prop: "setgid",
|
|
156
|
+
target: process,
|
|
157
|
+
violationType: "process_setuid",
|
|
158
|
+
strategy: "throw",
|
|
159
|
+
reason: "process.setgid could escalate privileges"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
prop: "seteuid",
|
|
163
|
+
target: process,
|
|
164
|
+
violationType: "process_setuid",
|
|
165
|
+
strategy: "throw",
|
|
166
|
+
reason: "process.seteuid could escalate effective user privileges"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
prop: "setegid",
|
|
170
|
+
target: process,
|
|
171
|
+
violationType: "process_setuid",
|
|
172
|
+
strategy: "throw",
|
|
173
|
+
reason: "process.setegid could escalate effective group privileges"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
prop: "initgroups",
|
|
177
|
+
target: process,
|
|
178
|
+
violationType: "process_setuid",
|
|
179
|
+
strategy: "throw",
|
|
180
|
+
reason: "process.initgroups could modify supplementary group IDs"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
prop: "setgroups",
|
|
184
|
+
target: process,
|
|
185
|
+
violationType: "process_setuid",
|
|
186
|
+
strategy: "throw",
|
|
187
|
+
reason: "process.setgroups could modify supplementary group IDs"
|
|
188
|
+
},
|
|
189
|
+
// File permission manipulation
|
|
190
|
+
{
|
|
191
|
+
prop: "umask",
|
|
192
|
+
target: process,
|
|
193
|
+
violationType: "process_umask",
|
|
194
|
+
strategy: "throw",
|
|
195
|
+
reason: "process.umask could modify file creation permissions"
|
|
196
|
+
},
|
|
197
|
+
// Information disclosure vectors
|
|
198
|
+
// Note: process.argv is an array (object) so gets an object proxy
|
|
199
|
+
{
|
|
200
|
+
prop: "argv",
|
|
201
|
+
target: process,
|
|
202
|
+
violationType: "process_argv",
|
|
203
|
+
strategy: "throw",
|
|
204
|
+
reason: "process.argv may contain secrets in CLI arguments"
|
|
205
|
+
},
|
|
206
|
+
// Note: process.execPath is a string primitive, handled specially
|
|
207
|
+
// in defense-in-depth-box.ts and worker-defense-in-depth.ts
|
|
208
|
+
// Note: process.connected is a boolean primitive, handled specially
|
|
209
|
+
// in defense-in-depth-box.ts and worker-defense-in-depth.ts
|
|
210
|
+
// Working directory access/manipulation
|
|
211
|
+
{
|
|
212
|
+
prop: "cwd",
|
|
213
|
+
target: process,
|
|
214
|
+
violationType: "process_chdir",
|
|
215
|
+
strategy: "throw",
|
|
216
|
+
reason: "process.cwd could disclose real host working directory path"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
prop: "chdir",
|
|
220
|
+
target: process,
|
|
221
|
+
violationType: "process_chdir",
|
|
222
|
+
strategy: "throw",
|
|
223
|
+
reason: "process.chdir could confuse the interpreter's CWD tracking"
|
|
224
|
+
},
|
|
225
|
+
// Diagnostic report (leaks full environment, host paths, system info)
|
|
226
|
+
{
|
|
227
|
+
prop: "report",
|
|
228
|
+
target: process,
|
|
229
|
+
violationType: "process_report",
|
|
230
|
+
strategy: "throw",
|
|
231
|
+
reason: "process.report could disclose full environment, host paths, and system info"
|
|
232
|
+
},
|
|
233
|
+
// Environment file loading (Node 21.7+)
|
|
234
|
+
{
|
|
235
|
+
prop: "loadEnvFile",
|
|
236
|
+
target: process,
|
|
237
|
+
violationType: "process_env",
|
|
238
|
+
strategy: "throw",
|
|
239
|
+
reason: "process.loadEnvFile could load env files bypassing env proxy"
|
|
240
|
+
},
|
|
241
|
+
// Exception handler manipulation
|
|
242
|
+
{
|
|
243
|
+
prop: "setUncaughtExceptionCaptureCallback",
|
|
244
|
+
target: process,
|
|
245
|
+
violationType: "process_exception_handler",
|
|
246
|
+
strategy: "throw",
|
|
247
|
+
reason: "setUncaughtExceptionCaptureCallback could intercept security errors"
|
|
248
|
+
},
|
|
249
|
+
// IPC communication vectors (may be undefined in non-IPC contexts)
|
|
250
|
+
{
|
|
251
|
+
prop: "send",
|
|
252
|
+
target: process,
|
|
253
|
+
violationType: "process_send",
|
|
254
|
+
strategy: "throw",
|
|
255
|
+
reason: "process.send could communicate with parent process in IPC contexts"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
prop: "channel",
|
|
259
|
+
target: process,
|
|
260
|
+
violationType: "process_channel",
|
|
261
|
+
strategy: "throw",
|
|
262
|
+
reason: "process.channel could access IPC channel to parent process"
|
|
263
|
+
},
|
|
264
|
+
// Timing side-channel vectors
|
|
265
|
+
{
|
|
266
|
+
prop: "cpuUsage",
|
|
267
|
+
target: process,
|
|
268
|
+
violationType: "process_timing",
|
|
269
|
+
strategy: "throw",
|
|
270
|
+
reason: "process.cpuUsage could enable timing side-channel attacks"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
prop: "memoryUsage",
|
|
274
|
+
target: process,
|
|
275
|
+
violationType: "process_timing",
|
|
276
|
+
strategy: "throw",
|
|
277
|
+
reason: "process.memoryUsage could enable timing side-channel attacks"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
prop: "hrtime",
|
|
281
|
+
target: process,
|
|
282
|
+
violationType: "process_timing",
|
|
283
|
+
strategy: "throw",
|
|
284
|
+
reason: "process.hrtime could enable timing side-channel attacks"
|
|
285
|
+
},
|
|
286
|
+
// We also don't block `require` because:
|
|
287
|
+
// 1. It may not exist in all environments (ESM)
|
|
288
|
+
// 2. import() is the modern escape vector and can't be blocked this way
|
|
289
|
+
// Reference leak vectors
|
|
290
|
+
{
|
|
291
|
+
prop: "WeakRef",
|
|
292
|
+
target: globalThis,
|
|
293
|
+
violationType: "weak_ref",
|
|
294
|
+
strategy: "throw",
|
|
295
|
+
reason: "WeakRef could be used to leak references outside sandbox"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
prop: "FinalizationRegistry",
|
|
299
|
+
target: globalThis,
|
|
300
|
+
violationType: "finalization_registry",
|
|
301
|
+
strategy: "throw",
|
|
302
|
+
reason: "FinalizationRegistry could be used to leak references outside sandbox"
|
|
303
|
+
},
|
|
304
|
+
// Introspection/interception vectors (freeze instead of throw)
|
|
305
|
+
// SECURITY RATIONALE: Reflect is frozen (not blocked) because:
|
|
306
|
+
// 1. Defense infrastructure uses Reflect.apply/get/set/construct internally
|
|
307
|
+
// 2. Frozen Reflect cannot be mutated but remains fully functional
|
|
308
|
+
// 3. Reflect.construct(Function, ['code']) IS safe because globalThis.Function
|
|
309
|
+
// is replaced with a blocking proxy — Reflect.construct receives the proxy
|
|
310
|
+
// 4. Security depends on NEVER leaking original Function/eval references.
|
|
311
|
+
// If an unpatched Function ref leaked, Reflect.construct would bypass defense.
|
|
312
|
+
{
|
|
313
|
+
prop: "Reflect",
|
|
314
|
+
target: globalThis,
|
|
315
|
+
violationType: "reflect",
|
|
316
|
+
strategy: "freeze",
|
|
317
|
+
reason: "Reflect provides introspection capabilities"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
prop: "Proxy",
|
|
321
|
+
target: globalThis,
|
|
322
|
+
violationType: "proxy",
|
|
323
|
+
strategy: "throw",
|
|
324
|
+
reason: "Proxy allows intercepting and modifying object behavior"
|
|
325
|
+
},
|
|
326
|
+
// WebAssembly allows arbitrary code execution
|
|
327
|
+
{
|
|
328
|
+
prop: "WebAssembly",
|
|
329
|
+
target: globalThis,
|
|
330
|
+
violationType: "webassembly",
|
|
331
|
+
strategy: "throw",
|
|
332
|
+
reason: "WebAssembly allows executing arbitrary compiled code"
|
|
333
|
+
},
|
|
334
|
+
// SharedArrayBuffer and Atomics can enable side-channel attacks
|
|
335
|
+
{
|
|
336
|
+
prop: "SharedArrayBuffer",
|
|
337
|
+
target: globalThis,
|
|
338
|
+
violationType: "shared_array_buffer",
|
|
339
|
+
strategy: "throw",
|
|
340
|
+
reason: "SharedArrayBuffer could enable side-channel communication or timing attacks"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
prop: "Atomics",
|
|
344
|
+
target: globalThis,
|
|
345
|
+
violationType: "atomics",
|
|
346
|
+
strategy: "throw",
|
|
347
|
+
reason: "Atomics could enable side-channel communication or timing attacks"
|
|
348
|
+
},
|
|
349
|
+
// Note: Error.prepareStackTrace is handled specially in defense-in-depth-box.ts
|
|
350
|
+
// because we only want to block SETTING it, not reading (V8 reads it internally)
|
|
351
|
+
// Timing side-channel: performance.now() provides sub-millisecond resolution
|
|
352
|
+
// Note: Date.now() is intentionally NOT blocked — it's used for $SECONDS,
|
|
353
|
+
// date command, and has only ~1ms resolution (vs process.hrtime at ns).
|
|
354
|
+
{
|
|
355
|
+
prop: "performance",
|
|
356
|
+
target: globalThis,
|
|
357
|
+
violationType: "performance_timing",
|
|
358
|
+
strategy: "throw",
|
|
359
|
+
reason: "performance.now() provides sub-millisecond timing for side-channel attacks"
|
|
360
|
+
},
|
|
361
|
+
// Block direct access to process.stdout and process.stderr to prevent
|
|
362
|
+
// writing to the host's actual stdout/stderr, bypassing the interpreter's
|
|
363
|
+
// output accumulation.
|
|
364
|
+
{
|
|
365
|
+
prop: "stdout",
|
|
366
|
+
target: process,
|
|
367
|
+
violationType: "process_stdout",
|
|
368
|
+
strategy: "throw",
|
|
369
|
+
reason: "process.stdout could bypass interpreter output to write to host stdout"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
prop: "stderr",
|
|
373
|
+
target: process,
|
|
374
|
+
violationType: "process_stderr",
|
|
375
|
+
strategy: "throw",
|
|
376
|
+
reason: "process.stderr could bypass interpreter output to write to host stderr"
|
|
377
|
+
},
|
|
378
|
+
// Prototype pollution vectors
|
|
379
|
+
{
|
|
380
|
+
prop: "__defineGetter__",
|
|
381
|
+
target: Object.prototype,
|
|
382
|
+
violationType: "prototype_mutation",
|
|
383
|
+
strategy: "throw",
|
|
384
|
+
reason: "__defineGetter__ allows prototype pollution via getter injection"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
prop: "__defineSetter__",
|
|
388
|
+
target: Object.prototype,
|
|
389
|
+
violationType: "prototype_mutation",
|
|
390
|
+
strategy: "throw",
|
|
391
|
+
reason: "__defineSetter__ allows prototype pollution via setter injection"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
prop: "__lookupGetter__",
|
|
395
|
+
target: Object.prototype,
|
|
396
|
+
violationType: "prototype_mutation",
|
|
397
|
+
strategy: "throw",
|
|
398
|
+
reason: "__lookupGetter__ enables introspection for prototype pollution attacks"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
prop: "__lookupSetter__",
|
|
402
|
+
target: Object.prototype,
|
|
403
|
+
violationType: "prototype_mutation",
|
|
404
|
+
strategy: "throw",
|
|
405
|
+
reason: "__lookupSetter__ enables introspection for prototype pollution attacks"
|
|
406
|
+
},
|
|
407
|
+
// Freeze JSON and Math to prevent mutation of built-in utility objects
|
|
408
|
+
{
|
|
409
|
+
prop: "JSON",
|
|
410
|
+
target: globalThis,
|
|
411
|
+
violationType: "json_mutation",
|
|
412
|
+
strategy: "freeze",
|
|
413
|
+
reason: "Freeze JSON to prevent mutation of parsing/serialization"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
prop: "Math",
|
|
417
|
+
target: globalThis,
|
|
418
|
+
violationType: "math_mutation",
|
|
419
|
+
strategy: "freeze",
|
|
420
|
+
reason: "Freeze Math to prevent mutation of math utilities"
|
|
421
|
+
}
|
|
422
|
+
];
|
|
423
|
+
try {
|
|
424
|
+
const AsyncFunction = Object.getPrototypeOf(async () => {
|
|
425
|
+
}).constructor;
|
|
426
|
+
if (AsyncFunction && AsyncFunction !== Function) {
|
|
427
|
+
globals.push({
|
|
428
|
+
prop: "constructor",
|
|
429
|
+
target: Object.getPrototypeOf(async () => {
|
|
430
|
+
}),
|
|
431
|
+
violationType: "async_function_constructor",
|
|
432
|
+
strategy: "throw",
|
|
433
|
+
reason: "AsyncFunction constructor allows arbitrary async code execution"
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
} catch {
|
|
437
|
+
}
|
|
438
|
+
try {
|
|
439
|
+
const GeneratorFunction = Object.getPrototypeOf(
|
|
440
|
+
function* () {
|
|
441
|
+
}
|
|
442
|
+
).constructor;
|
|
443
|
+
if (GeneratorFunction && GeneratorFunction !== Function) {
|
|
444
|
+
globals.push({
|
|
445
|
+
prop: "constructor",
|
|
446
|
+
target: Object.getPrototypeOf(function* () {
|
|
447
|
+
}),
|
|
448
|
+
violationType: "generator_function_constructor",
|
|
449
|
+
strategy: "throw",
|
|
450
|
+
reason: "GeneratorFunction constructor allows arbitrary generator code execution"
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
} catch {
|
|
454
|
+
}
|
|
455
|
+
try {
|
|
456
|
+
const AsyncGeneratorFunction = Object.getPrototypeOf(
|
|
457
|
+
async function* () {
|
|
458
|
+
}
|
|
459
|
+
).constructor;
|
|
460
|
+
if (AsyncGeneratorFunction && AsyncGeneratorFunction !== Function && AsyncGeneratorFunction !== Object.getPrototypeOf(async () => {
|
|
461
|
+
}).constructor) {
|
|
462
|
+
globals.push({
|
|
463
|
+
prop: "constructor",
|
|
464
|
+
target: Object.getPrototypeOf(async function* () {
|
|
465
|
+
}),
|
|
466
|
+
violationType: "async_generator_function_constructor",
|
|
467
|
+
strategy: "throw",
|
|
468
|
+
reason: "AsyncGeneratorFunction constructor allows arbitrary async generator code execution"
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
} catch {
|
|
472
|
+
}
|
|
473
|
+
return globals.filter((g) => {
|
|
474
|
+
try {
|
|
475
|
+
return g.target[g.prop] !== void 0;
|
|
476
|
+
} catch {
|
|
477
|
+
return false;
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// src/security/defense-in-depth-box.ts
|
|
483
|
+
var IS_BROWSER = typeof __BROWSER__ !== "undefined" && __BROWSER__;
|
|
484
|
+
var AsyncLocalStorageClass = null;
|
|
485
|
+
if (!IS_BROWSER) {
|
|
486
|
+
try {
|
|
487
|
+
const { AsyncLocalStorage } = __require("node:async_hooks");
|
|
488
|
+
AsyncLocalStorageClass = AsyncLocalStorage;
|
|
489
|
+
} catch {
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
var executionContext = !IS_BROWSER && AsyncLocalStorageClass ? new AsyncLocalStorageClass() : null;
|
|
493
|
+
|
|
494
|
+
// src/security/worker-defense-in-depth.ts
|
|
495
|
+
var DEFENSE_IN_DEPTH_NOTICE = "\n\nThis is a defense-in-depth measure and indicates a bug in just-bash. Please report this at security@vercel.com";
|
|
496
|
+
var WorkerSecurityViolationError = class extends Error {
|
|
497
|
+
constructor(message, violation) {
|
|
498
|
+
super(message + DEFENSE_IN_DEPTH_NOTICE);
|
|
499
|
+
this.violation = violation;
|
|
500
|
+
this.name = "WorkerSecurityViolationError";
|
|
501
|
+
}
|
|
502
|
+
violation;
|
|
503
|
+
};
|
|
504
|
+
var MAX_STORED_VIOLATIONS = 1e3;
|
|
505
|
+
function generateExecutionId() {
|
|
506
|
+
if (typeof crypto !== "undefined" && crypto.randomUUID) {
|
|
507
|
+
return crypto.randomUUID();
|
|
508
|
+
}
|
|
509
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
510
|
+
const r = Math.random() * 16 | 0;
|
|
511
|
+
const v = c === "x" ? r : r & 3 | 8;
|
|
512
|
+
return v.toString(16);
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
var WorkerDefenseInDepth = class {
|
|
516
|
+
config;
|
|
517
|
+
isActivated = false;
|
|
518
|
+
originalDescriptors = [];
|
|
519
|
+
violations = [];
|
|
520
|
+
executionId;
|
|
521
|
+
/**
|
|
522
|
+
* Original Proxy constructor, captured before patching.
|
|
523
|
+
* This is captured at instance creation time to ensure we get the unpatched version.
|
|
524
|
+
*/
|
|
525
|
+
originalProxy;
|
|
526
|
+
/**
|
|
527
|
+
* Recursion guard to prevent infinite loops when proxy traps trigger
|
|
528
|
+
* code that accesses the same proxied object (e.g., process.env).
|
|
529
|
+
*/
|
|
530
|
+
inTrap = false;
|
|
531
|
+
/**
|
|
532
|
+
* Create and activate the worker defense layer.
|
|
533
|
+
*
|
|
534
|
+
* @param config - Configuration for the defense layer
|
|
535
|
+
*/
|
|
536
|
+
constructor(config) {
|
|
537
|
+
this.originalProxy = Proxy;
|
|
538
|
+
this.config = config;
|
|
539
|
+
this.executionId = generateExecutionId();
|
|
540
|
+
if (config.enabled !== false) {
|
|
541
|
+
this.activate();
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Get statistics about the defense layer.
|
|
546
|
+
*/
|
|
547
|
+
getStats() {
|
|
548
|
+
return {
|
|
549
|
+
violationsBlocked: this.violations.length,
|
|
550
|
+
violations: [...this.violations],
|
|
551
|
+
isActive: this.isActivated
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Clear stored violations. Useful for testing.
|
|
556
|
+
*/
|
|
557
|
+
clearViolations() {
|
|
558
|
+
this.violations = [];
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Get the execution ID for this worker.
|
|
562
|
+
*/
|
|
563
|
+
getExecutionId() {
|
|
564
|
+
return this.executionId;
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Deactivate the defense layer and restore original globals.
|
|
568
|
+
* Typically only needed for testing.
|
|
569
|
+
*/
|
|
570
|
+
deactivate() {
|
|
571
|
+
if (!this.isActivated) {
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
this.restorePatches();
|
|
575
|
+
this.isActivated = false;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Activate the defense layer by applying patches.
|
|
579
|
+
*/
|
|
580
|
+
activate() {
|
|
581
|
+
if (this.isActivated) {
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
this.applyPatches();
|
|
585
|
+
this.isActivated = true;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Get a human-readable path for a target object and property.
|
|
589
|
+
*/
|
|
590
|
+
getPathForTarget(target, prop) {
|
|
591
|
+
if (target === globalThis) {
|
|
592
|
+
return `globalThis.${prop}`;
|
|
593
|
+
}
|
|
594
|
+
if (typeof process !== "undefined" && target === process) {
|
|
595
|
+
return `process.${prop}`;
|
|
596
|
+
}
|
|
597
|
+
if (target === Error) {
|
|
598
|
+
return `Error.${prop}`;
|
|
599
|
+
}
|
|
600
|
+
if (target === Function.prototype) {
|
|
601
|
+
return `Function.prototype.${prop}`;
|
|
602
|
+
}
|
|
603
|
+
if (target === Object.prototype) {
|
|
604
|
+
return `Object.prototype.${prop}`;
|
|
605
|
+
}
|
|
606
|
+
return `<object>.${prop}`;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Record a violation and invoke the callback.
|
|
610
|
+
* In worker context, blocking always happens (no audit mode context check).
|
|
611
|
+
*/
|
|
612
|
+
recordViolation(type, path, message) {
|
|
613
|
+
const violation = {
|
|
614
|
+
timestamp: Date.now(),
|
|
615
|
+
type,
|
|
616
|
+
message,
|
|
617
|
+
path,
|
|
618
|
+
stack: new Error().stack,
|
|
619
|
+
executionId: this.executionId
|
|
620
|
+
};
|
|
621
|
+
if (this.violations.length < MAX_STORED_VIOLATIONS) {
|
|
622
|
+
this.violations.push(violation);
|
|
623
|
+
}
|
|
624
|
+
if (this.config.onViolation) {
|
|
625
|
+
try {
|
|
626
|
+
this.config.onViolation(violation);
|
|
627
|
+
} catch (e) {
|
|
628
|
+
console.debug(
|
|
629
|
+
"[WorkerDefenseInDepth] onViolation callback threw:",
|
|
630
|
+
e instanceof Error ? e.message : e
|
|
631
|
+
);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
return violation;
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Create a blocking proxy for a function.
|
|
638
|
+
* In worker context, always blocks (no context check needed).
|
|
639
|
+
*/
|
|
640
|
+
createBlockingProxy(original, path, violationType) {
|
|
641
|
+
const self = this;
|
|
642
|
+
const auditMode = this.config.auditMode;
|
|
643
|
+
return new this.originalProxy(original, {
|
|
644
|
+
apply(target, thisArg, args) {
|
|
645
|
+
const message = `${path} is blocked in worker context`;
|
|
646
|
+
const violation = self.recordViolation(violationType, path, message);
|
|
647
|
+
if (!auditMode) {
|
|
648
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
649
|
+
}
|
|
650
|
+
return Reflect.apply(target, thisArg, args);
|
|
651
|
+
},
|
|
652
|
+
construct(target, args, newTarget) {
|
|
653
|
+
const message = `${path} constructor is blocked in worker context`;
|
|
654
|
+
const violation = self.recordViolation(violationType, path, message);
|
|
655
|
+
if (!auditMode) {
|
|
656
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
657
|
+
}
|
|
658
|
+
return Reflect.construct(target, args, newTarget);
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Create a blocking proxy for an object (blocks all property access).
|
|
664
|
+
*/
|
|
665
|
+
createBlockingObjectProxy(original, path, violationType, allowedKeys) {
|
|
666
|
+
const self = this;
|
|
667
|
+
const auditMode = this.config.auditMode;
|
|
668
|
+
return new this.originalProxy(original, {
|
|
669
|
+
get(target, prop, receiver) {
|
|
670
|
+
if (self.inTrap) {
|
|
671
|
+
return Reflect.get(target, prop, receiver);
|
|
672
|
+
}
|
|
673
|
+
if (allowedKeys && typeof prop === "string" && allowedKeys.has(prop)) {
|
|
674
|
+
return Reflect.get(target, prop, receiver);
|
|
675
|
+
}
|
|
676
|
+
self.inTrap = true;
|
|
677
|
+
try {
|
|
678
|
+
const fullPath = `${path}.${String(prop)}`;
|
|
679
|
+
const message = `${fullPath} is blocked in worker context`;
|
|
680
|
+
const violation = self.recordViolation(
|
|
681
|
+
violationType,
|
|
682
|
+
fullPath,
|
|
683
|
+
message
|
|
684
|
+
);
|
|
685
|
+
if (!auditMode) {
|
|
686
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
687
|
+
}
|
|
688
|
+
return Reflect.get(target, prop, receiver);
|
|
689
|
+
} finally {
|
|
690
|
+
self.inTrap = false;
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
set(target, prop, value, receiver) {
|
|
694
|
+
if (self.inTrap) {
|
|
695
|
+
return Reflect.set(target, prop, value, receiver);
|
|
696
|
+
}
|
|
697
|
+
self.inTrap = true;
|
|
698
|
+
try {
|
|
699
|
+
const fullPath = `${path}.${String(prop)}`;
|
|
700
|
+
const message = `${fullPath} modification is blocked in worker context`;
|
|
701
|
+
const violation = self.recordViolation(
|
|
702
|
+
violationType,
|
|
703
|
+
fullPath,
|
|
704
|
+
message
|
|
705
|
+
);
|
|
706
|
+
if (!auditMode) {
|
|
707
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
708
|
+
}
|
|
709
|
+
return Reflect.set(target, prop, value, receiver);
|
|
710
|
+
} finally {
|
|
711
|
+
self.inTrap = false;
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
ownKeys(target) {
|
|
715
|
+
if (self.inTrap) {
|
|
716
|
+
return Reflect.ownKeys(target);
|
|
717
|
+
}
|
|
718
|
+
self.inTrap = true;
|
|
719
|
+
try {
|
|
720
|
+
const message = `${path} enumeration is blocked in worker context`;
|
|
721
|
+
const violation = self.recordViolation(violationType, path, message);
|
|
722
|
+
if (!auditMode) {
|
|
723
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
724
|
+
}
|
|
725
|
+
return Reflect.ownKeys(target);
|
|
726
|
+
} finally {
|
|
727
|
+
self.inTrap = false;
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
getOwnPropertyDescriptor(target, prop) {
|
|
731
|
+
if (self.inTrap) {
|
|
732
|
+
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
733
|
+
}
|
|
734
|
+
self.inTrap = true;
|
|
735
|
+
try {
|
|
736
|
+
const fullPath = `${path}.${String(prop)}`;
|
|
737
|
+
const message = `${fullPath} descriptor access is blocked in worker context`;
|
|
738
|
+
const violation = self.recordViolation(
|
|
739
|
+
violationType,
|
|
740
|
+
fullPath,
|
|
741
|
+
message
|
|
742
|
+
);
|
|
743
|
+
if (!auditMode) {
|
|
744
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
745
|
+
}
|
|
746
|
+
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
747
|
+
} finally {
|
|
748
|
+
self.inTrap = false;
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
has(target, prop) {
|
|
752
|
+
if (self.inTrap) {
|
|
753
|
+
return Reflect.has(target, prop);
|
|
754
|
+
}
|
|
755
|
+
self.inTrap = true;
|
|
756
|
+
try {
|
|
757
|
+
const fullPath = `${path}.${String(prop)}`;
|
|
758
|
+
const message = `${fullPath} existence check is blocked in worker context`;
|
|
759
|
+
const violation = self.recordViolation(
|
|
760
|
+
violationType,
|
|
761
|
+
fullPath,
|
|
762
|
+
message
|
|
763
|
+
);
|
|
764
|
+
if (!auditMode) {
|
|
765
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
766
|
+
}
|
|
767
|
+
return Reflect.has(target, prop);
|
|
768
|
+
} finally {
|
|
769
|
+
self.inTrap = false;
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
deleteProperty(target, prop) {
|
|
773
|
+
if (self.inTrap) {
|
|
774
|
+
return Reflect.deleteProperty(target, prop);
|
|
775
|
+
}
|
|
776
|
+
self.inTrap = true;
|
|
777
|
+
try {
|
|
778
|
+
const fullPath = `${path}.${String(prop)}`;
|
|
779
|
+
const message = `${fullPath} deletion is blocked in worker context`;
|
|
780
|
+
const violation = self.recordViolation(
|
|
781
|
+
violationType,
|
|
782
|
+
fullPath,
|
|
783
|
+
message
|
|
784
|
+
);
|
|
785
|
+
if (!auditMode) {
|
|
786
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
787
|
+
}
|
|
788
|
+
return Reflect.deleteProperty(target, prop);
|
|
789
|
+
} finally {
|
|
790
|
+
self.inTrap = false;
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
setPrototypeOf(target, proto) {
|
|
794
|
+
if (self.inTrap) {
|
|
795
|
+
return Reflect.setPrototypeOf(target, proto);
|
|
796
|
+
}
|
|
797
|
+
self.inTrap = true;
|
|
798
|
+
try {
|
|
799
|
+
const message = `${path} setPrototypeOf is blocked in worker context`;
|
|
800
|
+
const violation = self.recordViolation(violationType, path, message);
|
|
801
|
+
if (!auditMode) {
|
|
802
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
803
|
+
}
|
|
804
|
+
return Reflect.setPrototypeOf(target, proto);
|
|
805
|
+
} finally {
|
|
806
|
+
self.inTrap = false;
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
defineProperty(target, prop, descriptor) {
|
|
810
|
+
if (self.inTrap) {
|
|
811
|
+
return Reflect.defineProperty(target, prop, descriptor);
|
|
812
|
+
}
|
|
813
|
+
self.inTrap = true;
|
|
814
|
+
try {
|
|
815
|
+
const fullPath = `${path}.${String(prop)}`;
|
|
816
|
+
const message = `${fullPath} defineProperty is blocked in worker context`;
|
|
817
|
+
const violation = self.recordViolation(
|
|
818
|
+
violationType,
|
|
819
|
+
fullPath,
|
|
820
|
+
message
|
|
821
|
+
);
|
|
822
|
+
if (!auditMode) {
|
|
823
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
824
|
+
}
|
|
825
|
+
return Reflect.defineProperty(target, prop, descriptor);
|
|
826
|
+
} finally {
|
|
827
|
+
self.inTrap = false;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Apply security patches to dangerous globals.
|
|
834
|
+
*/
|
|
835
|
+
applyPatches() {
|
|
836
|
+
const blockedGlobals = getBlockedGlobals();
|
|
837
|
+
const excludeTypes = new Set(this.config.excludeViolationTypes ?? []);
|
|
838
|
+
for (const blocked of blockedGlobals) {
|
|
839
|
+
if (excludeTypes.has(blocked.violationType)) {
|
|
840
|
+
continue;
|
|
841
|
+
}
|
|
842
|
+
this.applyPatch(blocked);
|
|
843
|
+
}
|
|
844
|
+
if (!excludeTypes.has("function_constructor")) {
|
|
845
|
+
this.protectConstructorChain(excludeTypes);
|
|
846
|
+
}
|
|
847
|
+
if (!excludeTypes.has("error_prepare_stack_trace")) {
|
|
848
|
+
this.protectErrorPrepareStackTrace();
|
|
849
|
+
}
|
|
850
|
+
if (!excludeTypes.has("module_load")) {
|
|
851
|
+
this.protectModuleLoad();
|
|
852
|
+
}
|
|
853
|
+
if (!excludeTypes.has("module_resolve_filename")) {
|
|
854
|
+
this.protectModuleResolveFilename();
|
|
855
|
+
}
|
|
856
|
+
if (!excludeTypes.has("process_main_module")) {
|
|
857
|
+
this.protectProcessMainModule();
|
|
858
|
+
}
|
|
859
|
+
if (!excludeTypes.has("process_exec_path")) {
|
|
860
|
+
this.protectProcessExecPath();
|
|
861
|
+
}
|
|
862
|
+
if (!excludeTypes.has("process_connected")) {
|
|
863
|
+
this.protectProcessConnected();
|
|
864
|
+
}
|
|
865
|
+
this.lockWellKnownSymbols();
|
|
866
|
+
if (!excludeTypes.has("proxy")) {
|
|
867
|
+
this.protectProxyRevocable();
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Lock well-known Symbol properties on built-in constructors/prototypes.
|
|
872
|
+
*/
|
|
873
|
+
lockWellKnownSymbols() {
|
|
874
|
+
const lock = (obj, sym) => {
|
|
875
|
+
try {
|
|
876
|
+
const desc = Object.getOwnPropertyDescriptor(obj, sym);
|
|
877
|
+
if (desc?.configurable) {
|
|
878
|
+
if ("value" in desc) {
|
|
879
|
+
Object.defineProperty(obj, sym, {
|
|
880
|
+
...desc,
|
|
881
|
+
configurable: false,
|
|
882
|
+
writable: false
|
|
883
|
+
});
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
Object.defineProperty(obj, sym, { ...desc, configurable: false });
|
|
887
|
+
}
|
|
888
|
+
} catch {
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
for (const ctor of [Array, Map, Set, RegExp, Promise]) {
|
|
892
|
+
lock(ctor, Symbol.species);
|
|
893
|
+
}
|
|
894
|
+
for (const proto of [
|
|
895
|
+
Array.prototype,
|
|
896
|
+
String.prototype,
|
|
897
|
+
Map.prototype,
|
|
898
|
+
Set.prototype
|
|
899
|
+
]) {
|
|
900
|
+
lock(proto, Symbol.iterator);
|
|
901
|
+
}
|
|
902
|
+
lock(Symbol.prototype, Symbol.toPrimitive);
|
|
903
|
+
lock(Date.prototype, Symbol.toPrimitive);
|
|
904
|
+
for (const sym of [
|
|
905
|
+
Symbol.match,
|
|
906
|
+
Symbol.matchAll,
|
|
907
|
+
Symbol.replace,
|
|
908
|
+
Symbol.search,
|
|
909
|
+
Symbol.split
|
|
910
|
+
]) {
|
|
911
|
+
lock(RegExp.prototype, sym);
|
|
912
|
+
}
|
|
913
|
+
lock(Function.prototype, Symbol.hasInstance);
|
|
914
|
+
lock(Array.prototype, Symbol.unscopables);
|
|
915
|
+
for (const proto of [
|
|
916
|
+
Map.prototype,
|
|
917
|
+
Set.prototype,
|
|
918
|
+
Promise.prototype,
|
|
919
|
+
ArrayBuffer.prototype
|
|
920
|
+
]) {
|
|
921
|
+
lock(proto, Symbol.toStringTag);
|
|
922
|
+
}
|
|
923
|
+
try {
|
|
924
|
+
const stackDesc = Object.getOwnPropertyDescriptor(
|
|
925
|
+
Error,
|
|
926
|
+
"stackTraceLimit"
|
|
927
|
+
);
|
|
928
|
+
this.originalDescriptors.push({
|
|
929
|
+
target: Error,
|
|
930
|
+
prop: "stackTraceLimit",
|
|
931
|
+
descriptor: stackDesc
|
|
932
|
+
});
|
|
933
|
+
Object.defineProperty(Error, "stackTraceLimit", {
|
|
934
|
+
value: Error.stackTraceLimit,
|
|
935
|
+
writable: false,
|
|
936
|
+
configurable: true
|
|
937
|
+
});
|
|
938
|
+
} catch {
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Block Proxy.revocable to prevent bypassing Proxy constructor blocking.
|
|
943
|
+
*
|
|
944
|
+
* Proxy.revocable internally uses the real Proxy constructor, so it bypasses
|
|
945
|
+
* our blocking proxy on globalThis.Proxy. We replace it with a wrapper that
|
|
946
|
+
* always blocks in worker context.
|
|
947
|
+
*/
|
|
948
|
+
protectProxyRevocable() {
|
|
949
|
+
const self = this;
|
|
950
|
+
const auditMode = this.config.auditMode;
|
|
951
|
+
try {
|
|
952
|
+
const originalRevocable = this.originalProxy.revocable;
|
|
953
|
+
if (typeof originalRevocable !== "function") return;
|
|
954
|
+
const descriptor = Object.getOwnPropertyDescriptor(
|
|
955
|
+
this.originalProxy,
|
|
956
|
+
"revocable"
|
|
957
|
+
);
|
|
958
|
+
this.originalDescriptors.push({
|
|
959
|
+
target: this.originalProxy,
|
|
960
|
+
prop: "revocable",
|
|
961
|
+
descriptor
|
|
962
|
+
});
|
|
963
|
+
Object.defineProperty(this.originalProxy, "revocable", {
|
|
964
|
+
value: function revocable(_target, _handler) {
|
|
965
|
+
const message = "Proxy.revocable is blocked in worker context";
|
|
966
|
+
const violation = self.recordViolation(
|
|
967
|
+
"proxy",
|
|
968
|
+
"Proxy.revocable",
|
|
969
|
+
message
|
|
970
|
+
);
|
|
971
|
+
if (!auditMode) {
|
|
972
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
973
|
+
}
|
|
974
|
+
return originalRevocable(_target, _handler);
|
|
975
|
+
},
|
|
976
|
+
writable: false,
|
|
977
|
+
configurable: true
|
|
978
|
+
// Must be configurable for restoration
|
|
979
|
+
});
|
|
980
|
+
} catch {
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* Protect against .constructor.constructor escape vector.
|
|
985
|
+
* @param excludeTypes - Set of violation types to skip
|
|
986
|
+
*/
|
|
987
|
+
protectConstructorChain(excludeTypes) {
|
|
988
|
+
let AsyncFunction = null;
|
|
989
|
+
let GeneratorFunction = null;
|
|
990
|
+
let AsyncGeneratorFunction = null;
|
|
991
|
+
try {
|
|
992
|
+
AsyncFunction = Object.getPrototypeOf(async () => {
|
|
993
|
+
}).constructor;
|
|
994
|
+
} catch {
|
|
995
|
+
}
|
|
996
|
+
try {
|
|
997
|
+
GeneratorFunction = Object.getPrototypeOf(function* () {
|
|
998
|
+
}).constructor;
|
|
999
|
+
} catch {
|
|
1000
|
+
}
|
|
1001
|
+
try {
|
|
1002
|
+
AsyncGeneratorFunction = Object.getPrototypeOf(
|
|
1003
|
+
async function* () {
|
|
1004
|
+
}
|
|
1005
|
+
).constructor;
|
|
1006
|
+
} catch {
|
|
1007
|
+
}
|
|
1008
|
+
this.patchPrototypeConstructor(
|
|
1009
|
+
Function.prototype,
|
|
1010
|
+
"Function.prototype.constructor",
|
|
1011
|
+
"function_constructor"
|
|
1012
|
+
);
|
|
1013
|
+
if (!excludeTypes.has("async_function_constructor") && AsyncFunction && AsyncFunction !== Function) {
|
|
1014
|
+
this.patchPrototypeConstructor(
|
|
1015
|
+
AsyncFunction.prototype,
|
|
1016
|
+
"AsyncFunction.prototype.constructor",
|
|
1017
|
+
"async_function_constructor"
|
|
1018
|
+
);
|
|
1019
|
+
}
|
|
1020
|
+
if (!excludeTypes.has("generator_function_constructor") && GeneratorFunction && GeneratorFunction !== Function) {
|
|
1021
|
+
this.patchPrototypeConstructor(
|
|
1022
|
+
GeneratorFunction.prototype,
|
|
1023
|
+
"GeneratorFunction.prototype.constructor",
|
|
1024
|
+
"generator_function_constructor"
|
|
1025
|
+
);
|
|
1026
|
+
}
|
|
1027
|
+
if (!excludeTypes.has("async_generator_function_constructor") && AsyncGeneratorFunction && AsyncGeneratorFunction !== Function && AsyncGeneratorFunction !== AsyncFunction) {
|
|
1028
|
+
this.patchPrototypeConstructor(
|
|
1029
|
+
AsyncGeneratorFunction.prototype,
|
|
1030
|
+
"AsyncGeneratorFunction.prototype.constructor",
|
|
1031
|
+
"async_generator_function_constructor"
|
|
1032
|
+
);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Protect Error.prepareStackTrace from being set.
|
|
1037
|
+
*/
|
|
1038
|
+
protectErrorPrepareStackTrace() {
|
|
1039
|
+
const self = this;
|
|
1040
|
+
const auditMode = this.config.auditMode;
|
|
1041
|
+
try {
|
|
1042
|
+
const originalDescriptor = Object.getOwnPropertyDescriptor(
|
|
1043
|
+
Error,
|
|
1044
|
+
"prepareStackTrace"
|
|
1045
|
+
);
|
|
1046
|
+
this.originalDescriptors.push({
|
|
1047
|
+
target: Error,
|
|
1048
|
+
prop: "prepareStackTrace",
|
|
1049
|
+
descriptor: originalDescriptor
|
|
1050
|
+
});
|
|
1051
|
+
let currentValue = originalDescriptor?.value;
|
|
1052
|
+
Object.defineProperty(Error, "prepareStackTrace", {
|
|
1053
|
+
get() {
|
|
1054
|
+
return currentValue;
|
|
1055
|
+
},
|
|
1056
|
+
set(value) {
|
|
1057
|
+
const message = "Error.prepareStackTrace modification is blocked in worker context";
|
|
1058
|
+
const violation = self.recordViolation(
|
|
1059
|
+
"error_prepare_stack_trace",
|
|
1060
|
+
"Error.prepareStackTrace",
|
|
1061
|
+
message
|
|
1062
|
+
);
|
|
1063
|
+
if (!auditMode) {
|
|
1064
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1065
|
+
}
|
|
1066
|
+
currentValue = value;
|
|
1067
|
+
},
|
|
1068
|
+
configurable: true
|
|
1069
|
+
});
|
|
1070
|
+
} catch {
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
/**
|
|
1074
|
+
* Patch a prototype's constructor property.
|
|
1075
|
+
*
|
|
1076
|
+
* Returns a proxy that allows reading properties (like .name) but blocks
|
|
1077
|
+
* calling the constructor as a function (which would allow code execution).
|
|
1078
|
+
*/
|
|
1079
|
+
patchPrototypeConstructor(prototype, path, violationType) {
|
|
1080
|
+
const self = this;
|
|
1081
|
+
const auditMode = this.config.auditMode;
|
|
1082
|
+
try {
|
|
1083
|
+
const originalDescriptor = Object.getOwnPropertyDescriptor(
|
|
1084
|
+
prototype,
|
|
1085
|
+
"constructor"
|
|
1086
|
+
);
|
|
1087
|
+
this.originalDescriptors.push({
|
|
1088
|
+
target: prototype,
|
|
1089
|
+
prop: "constructor",
|
|
1090
|
+
descriptor: originalDescriptor
|
|
1091
|
+
});
|
|
1092
|
+
const originalValue = originalDescriptor?.value;
|
|
1093
|
+
const constructorProxy = originalValue && typeof originalValue === "function" ? new this.originalProxy(originalValue, {
|
|
1094
|
+
apply(_target, _thisArg, _args) {
|
|
1095
|
+
const message = `${path} invocation is blocked in worker context`;
|
|
1096
|
+
const violation = self.recordViolation(
|
|
1097
|
+
violationType,
|
|
1098
|
+
path,
|
|
1099
|
+
message
|
|
1100
|
+
);
|
|
1101
|
+
if (!auditMode) {
|
|
1102
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1103
|
+
}
|
|
1104
|
+
return void 0;
|
|
1105
|
+
},
|
|
1106
|
+
construct(_target, _args, _newTarget) {
|
|
1107
|
+
const message = `${path} construction is blocked in worker context`;
|
|
1108
|
+
const violation = self.recordViolation(
|
|
1109
|
+
violationType,
|
|
1110
|
+
path,
|
|
1111
|
+
message
|
|
1112
|
+
);
|
|
1113
|
+
if (!auditMode) {
|
|
1114
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1115
|
+
}
|
|
1116
|
+
return {};
|
|
1117
|
+
},
|
|
1118
|
+
// Allow all property access (like .name, .prototype, etc.)
|
|
1119
|
+
get(target, prop, receiver) {
|
|
1120
|
+
return Reflect.get(target, prop, receiver);
|
|
1121
|
+
},
|
|
1122
|
+
getPrototypeOf(target) {
|
|
1123
|
+
return Reflect.getPrototypeOf(target);
|
|
1124
|
+
},
|
|
1125
|
+
has(target, prop) {
|
|
1126
|
+
return Reflect.has(target, prop);
|
|
1127
|
+
},
|
|
1128
|
+
ownKeys(target) {
|
|
1129
|
+
return Reflect.ownKeys(target);
|
|
1130
|
+
},
|
|
1131
|
+
getOwnPropertyDescriptor(target, prop) {
|
|
1132
|
+
return Reflect.getOwnPropertyDescriptor(target, prop);
|
|
1133
|
+
}
|
|
1134
|
+
}) : originalValue;
|
|
1135
|
+
Object.defineProperty(prototype, "constructor", {
|
|
1136
|
+
get() {
|
|
1137
|
+
return constructorProxy;
|
|
1138
|
+
},
|
|
1139
|
+
set(value) {
|
|
1140
|
+
const message = `${path} modification is blocked in worker context`;
|
|
1141
|
+
const violation = self.recordViolation(violationType, path, message);
|
|
1142
|
+
if (!auditMode) {
|
|
1143
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1144
|
+
}
|
|
1145
|
+
Object.defineProperty(this, "constructor", {
|
|
1146
|
+
value,
|
|
1147
|
+
writable: true,
|
|
1148
|
+
configurable: true
|
|
1149
|
+
});
|
|
1150
|
+
},
|
|
1151
|
+
configurable: true
|
|
1152
|
+
});
|
|
1153
|
+
} catch {
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* Protect process.mainModule from being accessed or set.
|
|
1158
|
+
*
|
|
1159
|
+
* The attack vector is:
|
|
1160
|
+
* ```
|
|
1161
|
+
* process.mainModule.require('child_process').execSync('whoami')
|
|
1162
|
+
* process.mainModule.constructor._load('vm')
|
|
1163
|
+
* ```
|
|
1164
|
+
*
|
|
1165
|
+
* process.mainModule may be undefined in ESM contexts but could exist in
|
|
1166
|
+
* CommonJS workers. We block both reading and setting.
|
|
1167
|
+
*/
|
|
1168
|
+
protectProcessMainModule() {
|
|
1169
|
+
if (typeof process === "undefined") return;
|
|
1170
|
+
const self = this;
|
|
1171
|
+
const auditMode = this.config.auditMode;
|
|
1172
|
+
try {
|
|
1173
|
+
const originalDescriptor = Object.getOwnPropertyDescriptor(
|
|
1174
|
+
process,
|
|
1175
|
+
"mainModule"
|
|
1176
|
+
);
|
|
1177
|
+
this.originalDescriptors.push({
|
|
1178
|
+
target: process,
|
|
1179
|
+
prop: "mainModule",
|
|
1180
|
+
descriptor: originalDescriptor
|
|
1181
|
+
});
|
|
1182
|
+
const currentValue = originalDescriptor?.value;
|
|
1183
|
+
if (currentValue !== void 0) {
|
|
1184
|
+
Object.defineProperty(process, "mainModule", {
|
|
1185
|
+
get() {
|
|
1186
|
+
const message = "process.mainModule access is blocked in worker context";
|
|
1187
|
+
const violation = self.recordViolation(
|
|
1188
|
+
"process_main_module",
|
|
1189
|
+
"process.mainModule",
|
|
1190
|
+
message
|
|
1191
|
+
);
|
|
1192
|
+
if (!auditMode) {
|
|
1193
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1194
|
+
}
|
|
1195
|
+
return currentValue;
|
|
1196
|
+
},
|
|
1197
|
+
set(value) {
|
|
1198
|
+
const message = "process.mainModule modification is blocked in worker context";
|
|
1199
|
+
const violation = self.recordViolation(
|
|
1200
|
+
"process_main_module",
|
|
1201
|
+
"process.mainModule",
|
|
1202
|
+
message
|
|
1203
|
+
);
|
|
1204
|
+
if (!auditMode) {
|
|
1205
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1206
|
+
}
|
|
1207
|
+
Object.defineProperty(process, "mainModule", {
|
|
1208
|
+
value,
|
|
1209
|
+
writable: true,
|
|
1210
|
+
configurable: true
|
|
1211
|
+
});
|
|
1212
|
+
},
|
|
1213
|
+
configurable: true
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
} catch {
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* Protect process.execPath from being read or set in worker context.
|
|
1221
|
+
*
|
|
1222
|
+
* process.execPath is a string primitive (not an object), so it cannot be
|
|
1223
|
+
* proxied via the normal blocked globals mechanism. We use Object.defineProperty
|
|
1224
|
+
* with getter/setter (same pattern as protectProcessMainModule).
|
|
1225
|
+
*/
|
|
1226
|
+
protectProcessExecPath() {
|
|
1227
|
+
if (typeof process === "undefined") return;
|
|
1228
|
+
const self = this;
|
|
1229
|
+
const auditMode = this.config.auditMode;
|
|
1230
|
+
try {
|
|
1231
|
+
const originalDescriptor = Object.getOwnPropertyDescriptor(
|
|
1232
|
+
process,
|
|
1233
|
+
"execPath"
|
|
1234
|
+
);
|
|
1235
|
+
this.originalDescriptors.push({
|
|
1236
|
+
target: process,
|
|
1237
|
+
prop: "execPath",
|
|
1238
|
+
descriptor: originalDescriptor
|
|
1239
|
+
});
|
|
1240
|
+
const currentValue = originalDescriptor?.value ?? process.execPath;
|
|
1241
|
+
Object.defineProperty(process, "execPath", {
|
|
1242
|
+
get() {
|
|
1243
|
+
const message = "process.execPath access is blocked in worker context";
|
|
1244
|
+
const violation = self.recordViolation(
|
|
1245
|
+
"process_exec_path",
|
|
1246
|
+
"process.execPath",
|
|
1247
|
+
message
|
|
1248
|
+
);
|
|
1249
|
+
if (!auditMode) {
|
|
1250
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1251
|
+
}
|
|
1252
|
+
return currentValue;
|
|
1253
|
+
},
|
|
1254
|
+
set(value) {
|
|
1255
|
+
const message = "process.execPath modification is blocked in worker context";
|
|
1256
|
+
const violation = self.recordViolation(
|
|
1257
|
+
"process_exec_path",
|
|
1258
|
+
"process.execPath",
|
|
1259
|
+
message
|
|
1260
|
+
);
|
|
1261
|
+
if (!auditMode) {
|
|
1262
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1263
|
+
}
|
|
1264
|
+
Object.defineProperty(process, "execPath", {
|
|
1265
|
+
value,
|
|
1266
|
+
writable: true,
|
|
1267
|
+
configurable: true
|
|
1268
|
+
});
|
|
1269
|
+
},
|
|
1270
|
+
configurable: true
|
|
1271
|
+
});
|
|
1272
|
+
} catch {
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* Protect process.connected from being read or set in worker context.
|
|
1277
|
+
*
|
|
1278
|
+
* process.connected is a boolean primitive (not an object), so it cannot be
|
|
1279
|
+
* proxied via the normal blocked globals mechanism. We use Object.defineProperty
|
|
1280
|
+
* with getter/setter (same pattern as protectProcessExecPath).
|
|
1281
|
+
*
|
|
1282
|
+
* Only protects if process.connected exists (IPC contexts).
|
|
1283
|
+
*/
|
|
1284
|
+
protectProcessConnected() {
|
|
1285
|
+
if (typeof process === "undefined") return;
|
|
1286
|
+
if (process.connected === void 0) return;
|
|
1287
|
+
const self = this;
|
|
1288
|
+
const auditMode = this.config.auditMode;
|
|
1289
|
+
try {
|
|
1290
|
+
const originalDescriptor = Object.getOwnPropertyDescriptor(
|
|
1291
|
+
process,
|
|
1292
|
+
"connected"
|
|
1293
|
+
);
|
|
1294
|
+
this.originalDescriptors.push({
|
|
1295
|
+
target: process,
|
|
1296
|
+
prop: "connected",
|
|
1297
|
+
descriptor: originalDescriptor
|
|
1298
|
+
});
|
|
1299
|
+
const currentValue = originalDescriptor?.value ?? process.connected;
|
|
1300
|
+
Object.defineProperty(process, "connected", {
|
|
1301
|
+
get() {
|
|
1302
|
+
const message = "process.connected access is blocked in worker context";
|
|
1303
|
+
const violation = self.recordViolation(
|
|
1304
|
+
"process_connected",
|
|
1305
|
+
"process.connected",
|
|
1306
|
+
message
|
|
1307
|
+
);
|
|
1308
|
+
if (!auditMode) {
|
|
1309
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1310
|
+
}
|
|
1311
|
+
return currentValue;
|
|
1312
|
+
},
|
|
1313
|
+
set(value) {
|
|
1314
|
+
const message = "process.connected modification is blocked in worker context";
|
|
1315
|
+
const violation = self.recordViolation(
|
|
1316
|
+
"process_connected",
|
|
1317
|
+
"process.connected",
|
|
1318
|
+
message
|
|
1319
|
+
);
|
|
1320
|
+
if (!auditMode) {
|
|
1321
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1322
|
+
}
|
|
1323
|
+
Object.defineProperty(process, "connected", {
|
|
1324
|
+
value,
|
|
1325
|
+
writable: true,
|
|
1326
|
+
configurable: true
|
|
1327
|
+
});
|
|
1328
|
+
},
|
|
1329
|
+
configurable: true
|
|
1330
|
+
});
|
|
1331
|
+
} catch {
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
/**
|
|
1335
|
+
* Protect Module._load from being called.
|
|
1336
|
+
*
|
|
1337
|
+
* The attack vector is:
|
|
1338
|
+
* ```
|
|
1339
|
+
* module.constructor._load('child_process')
|
|
1340
|
+
* require.main.constructor._load('vm')
|
|
1341
|
+
* ```
|
|
1342
|
+
*
|
|
1343
|
+
* We access the Module class and replace _load with a blocking proxy.
|
|
1344
|
+
*/
|
|
1345
|
+
protectModuleLoad() {
|
|
1346
|
+
const self = this;
|
|
1347
|
+
const auditMode = this.config.auditMode;
|
|
1348
|
+
try {
|
|
1349
|
+
let ModuleClass = null;
|
|
1350
|
+
if (typeof process !== "undefined") {
|
|
1351
|
+
const mainModule = process.mainModule;
|
|
1352
|
+
if (mainModule && typeof mainModule === "object") {
|
|
1353
|
+
ModuleClass = mainModule.constructor;
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
if (!ModuleClass && typeof __require !== "undefined" && typeof __require.main !== "undefined") {
|
|
1357
|
+
ModuleClass = __require.main.constructor;
|
|
1358
|
+
}
|
|
1359
|
+
if (!ModuleClass || typeof ModuleClass._load !== "function") {
|
|
1360
|
+
return;
|
|
1361
|
+
}
|
|
1362
|
+
const original = ModuleClass._load;
|
|
1363
|
+
const descriptor = Object.getOwnPropertyDescriptor(ModuleClass, "_load");
|
|
1364
|
+
this.originalDescriptors.push({
|
|
1365
|
+
target: ModuleClass,
|
|
1366
|
+
prop: "_load",
|
|
1367
|
+
descriptor
|
|
1368
|
+
});
|
|
1369
|
+
const path = "Module._load";
|
|
1370
|
+
const proxy = new this.originalProxy(original, {
|
|
1371
|
+
apply(_target, _thisArg, _args) {
|
|
1372
|
+
const message = `${path} is blocked in worker context`;
|
|
1373
|
+
const violation = self.recordViolation("module_load", path, message);
|
|
1374
|
+
if (!auditMode) {
|
|
1375
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1376
|
+
}
|
|
1377
|
+
return Reflect.apply(_target, _thisArg, _args);
|
|
1378
|
+
}
|
|
1379
|
+
});
|
|
1380
|
+
Object.defineProperty(ModuleClass, "_load", {
|
|
1381
|
+
value: proxy,
|
|
1382
|
+
writable: true,
|
|
1383
|
+
configurable: true
|
|
1384
|
+
});
|
|
1385
|
+
} catch {
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* Protect Module._resolveFilename from being called in worker context.
|
|
1390
|
+
*
|
|
1391
|
+
* Module._resolveFilename is called for both require() and import() resolution.
|
|
1392
|
+
* Blocking it catches file-based import() specifiers.
|
|
1393
|
+
*
|
|
1394
|
+
* data: and blob: URLs are handled by ESM loader hooks registered
|
|
1395
|
+
* in the main thread (DefenseInDepthBox.protectDynamicImport).
|
|
1396
|
+
*/
|
|
1397
|
+
protectModuleResolveFilename() {
|
|
1398
|
+
const self = this;
|
|
1399
|
+
const auditMode = this.config.auditMode;
|
|
1400
|
+
try {
|
|
1401
|
+
let ModuleClass = null;
|
|
1402
|
+
if (typeof process !== "undefined") {
|
|
1403
|
+
const mainModule = process.mainModule;
|
|
1404
|
+
if (mainModule && typeof mainModule === "object") {
|
|
1405
|
+
ModuleClass = mainModule.constructor;
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
if (!ModuleClass && typeof __require !== "undefined" && typeof __require.main !== "undefined") {
|
|
1409
|
+
ModuleClass = __require.main.constructor;
|
|
1410
|
+
}
|
|
1411
|
+
if (!ModuleClass || typeof ModuleClass._resolveFilename !== "function") {
|
|
1412
|
+
return;
|
|
1413
|
+
}
|
|
1414
|
+
const original = ModuleClass._resolveFilename;
|
|
1415
|
+
const descriptor = Object.getOwnPropertyDescriptor(
|
|
1416
|
+
ModuleClass,
|
|
1417
|
+
"_resolveFilename"
|
|
1418
|
+
);
|
|
1419
|
+
this.originalDescriptors.push({
|
|
1420
|
+
target: ModuleClass,
|
|
1421
|
+
prop: "_resolveFilename",
|
|
1422
|
+
descriptor
|
|
1423
|
+
});
|
|
1424
|
+
const path = "Module._resolveFilename";
|
|
1425
|
+
const proxy = new this.originalProxy(original, {
|
|
1426
|
+
apply(_target, _thisArg, _args) {
|
|
1427
|
+
const message = `${path} is blocked in worker context`;
|
|
1428
|
+
const violation = self.recordViolation(
|
|
1429
|
+
"module_resolve_filename",
|
|
1430
|
+
path,
|
|
1431
|
+
message
|
|
1432
|
+
);
|
|
1433
|
+
if (!auditMode) {
|
|
1434
|
+
throw new WorkerSecurityViolationError(message, violation);
|
|
1435
|
+
}
|
|
1436
|
+
return Reflect.apply(_target, _thisArg, _args);
|
|
1437
|
+
}
|
|
1438
|
+
});
|
|
1439
|
+
Object.defineProperty(ModuleClass, "_resolveFilename", {
|
|
1440
|
+
value: proxy,
|
|
1441
|
+
writable: true,
|
|
1442
|
+
configurable: true
|
|
1443
|
+
});
|
|
1444
|
+
} catch {
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* Apply a single patch to a blocked global.
|
|
1449
|
+
*/
|
|
1450
|
+
applyPatch(blocked) {
|
|
1451
|
+
const { target, prop, violationType, strategy } = blocked;
|
|
1452
|
+
try {
|
|
1453
|
+
const original = target[prop];
|
|
1454
|
+
if (original === void 0) {
|
|
1455
|
+
return;
|
|
1456
|
+
}
|
|
1457
|
+
const descriptor = Object.getOwnPropertyDescriptor(target, prop);
|
|
1458
|
+
this.originalDescriptors.push({ target, prop, descriptor });
|
|
1459
|
+
if (strategy === "freeze") {
|
|
1460
|
+
if (typeof original === "object" && original !== null) {
|
|
1461
|
+
Object.freeze(original);
|
|
1462
|
+
}
|
|
1463
|
+
} else {
|
|
1464
|
+
const path = this.getPathForTarget(target, prop);
|
|
1465
|
+
const proxy = typeof original === "function" ? this.createBlockingProxy(
|
|
1466
|
+
original,
|
|
1467
|
+
path,
|
|
1468
|
+
violationType
|
|
1469
|
+
) : this.createBlockingObjectProxy(
|
|
1470
|
+
original,
|
|
1471
|
+
path,
|
|
1472
|
+
violationType,
|
|
1473
|
+
blocked.allowedKeys
|
|
1474
|
+
);
|
|
1475
|
+
Object.defineProperty(target, prop, {
|
|
1476
|
+
value: proxy,
|
|
1477
|
+
writable: true,
|
|
1478
|
+
configurable: true
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
} catch {
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* Restore all original values.
|
|
1486
|
+
*/
|
|
1487
|
+
restorePatches() {
|
|
1488
|
+
for (let i = this.originalDescriptors.length - 1; i >= 0; i--) {
|
|
1489
|
+
const { target, prop, descriptor } = this.originalDescriptors[i];
|
|
1490
|
+
try {
|
|
1491
|
+
if (descriptor) {
|
|
1492
|
+
Object.defineProperty(target, prop, descriptor);
|
|
1493
|
+
} else {
|
|
1494
|
+
delete target[prop];
|
|
1495
|
+
}
|
|
1496
|
+
} catch {
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
this.originalDescriptors = [];
|
|
1500
|
+
}
|
|
1501
|
+
};
|
|
1502
|
+
|
|
1503
|
+
// src/security/trusted-globals.ts
|
|
1504
|
+
var _SharedArrayBuffer = globalThis.SharedArrayBuffer;
|
|
1505
|
+
var _Atomics = globalThis.Atomics;
|
|
1506
|
+
var _performanceNow = performance.now.bind(performance);
|
|
1507
|
+
var _Headers = globalThis.Headers;
|
|
1508
|
+
|
|
1509
|
+
// src/commands/worker-bridge/protocol.ts
|
|
1510
|
+
var OpCode = {
|
|
1511
|
+
NOOP: 0,
|
|
1512
|
+
READ_FILE: 1,
|
|
1513
|
+
WRITE_FILE: 2,
|
|
1514
|
+
STAT: 3,
|
|
1515
|
+
READDIR: 4,
|
|
1516
|
+
MKDIR: 5,
|
|
1517
|
+
RM: 6,
|
|
1518
|
+
EXISTS: 7,
|
|
1519
|
+
APPEND_FILE: 8,
|
|
1520
|
+
SYMLINK: 9,
|
|
1521
|
+
READLINK: 10,
|
|
1522
|
+
LSTAT: 11,
|
|
1523
|
+
CHMOD: 12,
|
|
1524
|
+
REALPATH: 13,
|
|
1525
|
+
RENAME: 14,
|
|
1526
|
+
COPY_FILE: 15,
|
|
1527
|
+
// Special operations for I/O
|
|
1528
|
+
WRITE_STDOUT: 100,
|
|
1529
|
+
WRITE_STDERR: 101,
|
|
1530
|
+
EXIT: 102,
|
|
1531
|
+
// HTTP operations
|
|
1532
|
+
HTTP_REQUEST: 200,
|
|
1533
|
+
// Sub-shell execution
|
|
1534
|
+
EXEC_COMMAND: 300
|
|
1535
|
+
};
|
|
1536
|
+
var Status = {
|
|
1537
|
+
PENDING: 0,
|
|
1538
|
+
READY: 1,
|
|
1539
|
+
SUCCESS: 2,
|
|
1540
|
+
ERROR: 3
|
|
1541
|
+
};
|
|
1542
|
+
var ErrorCode = {
|
|
1543
|
+
NONE: 0,
|
|
1544
|
+
NOT_FOUND: 1,
|
|
1545
|
+
IS_DIRECTORY: 2,
|
|
1546
|
+
NOT_DIRECTORY: 3,
|
|
1547
|
+
EXISTS: 4,
|
|
1548
|
+
PERMISSION_DENIED: 5,
|
|
1549
|
+
INVALID_PATH: 6,
|
|
1550
|
+
IO_ERROR: 7,
|
|
1551
|
+
TIMEOUT: 8,
|
|
1552
|
+
NETWORK_ERROR: 9,
|
|
1553
|
+
NETWORK_NOT_CONFIGURED: 10
|
|
1554
|
+
};
|
|
1555
|
+
var Offset = {
|
|
1556
|
+
OP_CODE: 0,
|
|
1557
|
+
STATUS: 4,
|
|
1558
|
+
PATH_LENGTH: 8,
|
|
1559
|
+
DATA_LENGTH: 12,
|
|
1560
|
+
RESULT_LENGTH: 16,
|
|
1561
|
+
ERROR_CODE: 20,
|
|
1562
|
+
FLAGS: 24,
|
|
1563
|
+
MODE: 28,
|
|
1564
|
+
PATH_BUFFER: 32,
|
|
1565
|
+
DATA_BUFFER: 4128
|
|
1566
|
+
// 32 + 4096
|
|
1567
|
+
};
|
|
1568
|
+
var Size = {
|
|
1569
|
+
CONTROL_REGION: 32,
|
|
1570
|
+
PATH_BUFFER: 4096,
|
|
1571
|
+
// 1MB limit applies to all FS read/write operations through the bridge.
|
|
1572
|
+
// Files larger than this will be truncated. This is tight — consider
|
|
1573
|
+
// increasing if real workloads hit the cap. Reduced from 16MB for faster tests.
|
|
1574
|
+
DATA_BUFFER: 1048576,
|
|
1575
|
+
TOTAL: 1052704
|
|
1576
|
+
// 32 + 4096 + 1MB
|
|
1577
|
+
};
|
|
1578
|
+
var Flags = {
|
|
1579
|
+
NONE: 0,
|
|
1580
|
+
RECURSIVE: 1,
|
|
1581
|
+
FORCE: 2,
|
|
1582
|
+
MKDIR_RECURSIVE: 1
|
|
1583
|
+
};
|
|
1584
|
+
var StatLayout = {
|
|
1585
|
+
IS_FILE: 0,
|
|
1586
|
+
IS_DIRECTORY: 1,
|
|
1587
|
+
IS_SYMLINK: 2,
|
|
1588
|
+
MODE: 4,
|
|
1589
|
+
SIZE: 8,
|
|
1590
|
+
MTIME: 16,
|
|
1591
|
+
TOTAL: 24
|
|
1592
|
+
};
|
|
1593
|
+
var ProtocolBuffer = class {
|
|
1594
|
+
int32View;
|
|
1595
|
+
uint8View;
|
|
1596
|
+
dataView;
|
|
1597
|
+
constructor(buffer) {
|
|
1598
|
+
this.int32View = new Int32Array(buffer);
|
|
1599
|
+
this.uint8View = new Uint8Array(buffer);
|
|
1600
|
+
this.dataView = new DataView(buffer);
|
|
1601
|
+
}
|
|
1602
|
+
getOpCode() {
|
|
1603
|
+
return _Atomics.load(this.int32View, Offset.OP_CODE / 4);
|
|
1604
|
+
}
|
|
1605
|
+
setOpCode(code) {
|
|
1606
|
+
_Atomics.store(this.int32View, Offset.OP_CODE / 4, code);
|
|
1607
|
+
}
|
|
1608
|
+
getStatus() {
|
|
1609
|
+
return _Atomics.load(this.int32View, Offset.STATUS / 4);
|
|
1610
|
+
}
|
|
1611
|
+
setStatus(status) {
|
|
1612
|
+
_Atomics.store(this.int32View, Offset.STATUS / 4, status);
|
|
1613
|
+
}
|
|
1614
|
+
getPathLength() {
|
|
1615
|
+
return _Atomics.load(this.int32View, Offset.PATH_LENGTH / 4);
|
|
1616
|
+
}
|
|
1617
|
+
setPathLength(length) {
|
|
1618
|
+
_Atomics.store(this.int32View, Offset.PATH_LENGTH / 4, length);
|
|
1619
|
+
}
|
|
1620
|
+
getDataLength() {
|
|
1621
|
+
return _Atomics.load(this.int32View, Offset.DATA_LENGTH / 4);
|
|
1622
|
+
}
|
|
1623
|
+
setDataLength(length) {
|
|
1624
|
+
_Atomics.store(this.int32View, Offset.DATA_LENGTH / 4, length);
|
|
1625
|
+
}
|
|
1626
|
+
getResultLength() {
|
|
1627
|
+
return _Atomics.load(this.int32View, Offset.RESULT_LENGTH / 4);
|
|
1628
|
+
}
|
|
1629
|
+
setResultLength(length) {
|
|
1630
|
+
_Atomics.store(this.int32View, Offset.RESULT_LENGTH / 4, length);
|
|
1631
|
+
}
|
|
1632
|
+
getErrorCode() {
|
|
1633
|
+
return _Atomics.load(
|
|
1634
|
+
this.int32View,
|
|
1635
|
+
Offset.ERROR_CODE / 4
|
|
1636
|
+
);
|
|
1637
|
+
}
|
|
1638
|
+
setErrorCode(code) {
|
|
1639
|
+
_Atomics.store(this.int32View, Offset.ERROR_CODE / 4, code);
|
|
1640
|
+
}
|
|
1641
|
+
getFlags() {
|
|
1642
|
+
return _Atomics.load(this.int32View, Offset.FLAGS / 4);
|
|
1643
|
+
}
|
|
1644
|
+
setFlags(flags) {
|
|
1645
|
+
_Atomics.store(this.int32View, Offset.FLAGS / 4, flags);
|
|
1646
|
+
}
|
|
1647
|
+
getMode() {
|
|
1648
|
+
return _Atomics.load(this.int32View, Offset.MODE / 4);
|
|
1649
|
+
}
|
|
1650
|
+
setMode(mode) {
|
|
1651
|
+
_Atomics.store(this.int32View, Offset.MODE / 4, mode);
|
|
1652
|
+
}
|
|
1653
|
+
getPath() {
|
|
1654
|
+
const length = this.getPathLength();
|
|
1655
|
+
const bytes = this.uint8View.slice(
|
|
1656
|
+
Offset.PATH_BUFFER,
|
|
1657
|
+
Offset.PATH_BUFFER + length
|
|
1658
|
+
);
|
|
1659
|
+
return new TextDecoder().decode(bytes);
|
|
1660
|
+
}
|
|
1661
|
+
setPath(path) {
|
|
1662
|
+
const encoded = new TextEncoder().encode(path);
|
|
1663
|
+
if (encoded.length > Size.PATH_BUFFER) {
|
|
1664
|
+
throw new Error(`Path too long: ${encoded.length} > ${Size.PATH_BUFFER}`);
|
|
1665
|
+
}
|
|
1666
|
+
this.uint8View.set(encoded, Offset.PATH_BUFFER);
|
|
1667
|
+
this.setPathLength(encoded.length);
|
|
1668
|
+
}
|
|
1669
|
+
getData() {
|
|
1670
|
+
const length = this.getDataLength();
|
|
1671
|
+
return this.uint8View.slice(
|
|
1672
|
+
Offset.DATA_BUFFER,
|
|
1673
|
+
Offset.DATA_BUFFER + length
|
|
1674
|
+
);
|
|
1675
|
+
}
|
|
1676
|
+
setData(data) {
|
|
1677
|
+
if (data.length > Size.DATA_BUFFER) {
|
|
1678
|
+
throw new Error(`Data too large: ${data.length} > ${Size.DATA_BUFFER}`);
|
|
1679
|
+
}
|
|
1680
|
+
this.uint8View.set(data, Offset.DATA_BUFFER);
|
|
1681
|
+
this.setDataLength(data.length);
|
|
1682
|
+
}
|
|
1683
|
+
getDataAsString() {
|
|
1684
|
+
const data = this.getData();
|
|
1685
|
+
return new TextDecoder().decode(data);
|
|
1686
|
+
}
|
|
1687
|
+
setDataFromString(str) {
|
|
1688
|
+
const encoded = new TextEncoder().encode(str);
|
|
1689
|
+
this.setData(encoded);
|
|
1690
|
+
}
|
|
1691
|
+
getResult() {
|
|
1692
|
+
const length = this.getResultLength();
|
|
1693
|
+
return this.uint8View.slice(
|
|
1694
|
+
Offset.DATA_BUFFER,
|
|
1695
|
+
Offset.DATA_BUFFER + length
|
|
1696
|
+
);
|
|
1697
|
+
}
|
|
1698
|
+
setResult(data) {
|
|
1699
|
+
if (data.length > Size.DATA_BUFFER) {
|
|
1700
|
+
throw new Error(`Result too large: ${data.length} > ${Size.DATA_BUFFER}`);
|
|
1701
|
+
}
|
|
1702
|
+
this.uint8View.set(data, Offset.DATA_BUFFER);
|
|
1703
|
+
this.setResultLength(data.length);
|
|
1704
|
+
}
|
|
1705
|
+
getResultAsString() {
|
|
1706
|
+
const result = this.getResult();
|
|
1707
|
+
return new TextDecoder().decode(result);
|
|
1708
|
+
}
|
|
1709
|
+
setResultFromString(str) {
|
|
1710
|
+
const encoded = new TextEncoder().encode(str);
|
|
1711
|
+
this.setResult(encoded);
|
|
1712
|
+
}
|
|
1713
|
+
encodeStat(stat) {
|
|
1714
|
+
this.uint8View[Offset.DATA_BUFFER + StatLayout.IS_FILE] = stat.isFile ? 1 : 0;
|
|
1715
|
+
this.uint8View[Offset.DATA_BUFFER + StatLayout.IS_DIRECTORY] = stat.isDirectory ? 1 : 0;
|
|
1716
|
+
this.uint8View[Offset.DATA_BUFFER + StatLayout.IS_SYMLINK] = stat.isSymbolicLink ? 1 : 0;
|
|
1717
|
+
this.dataView.setInt32(
|
|
1718
|
+
Offset.DATA_BUFFER + StatLayout.MODE,
|
|
1719
|
+
stat.mode,
|
|
1720
|
+
true
|
|
1721
|
+
);
|
|
1722
|
+
const size = Math.min(stat.size, Number.MAX_SAFE_INTEGER);
|
|
1723
|
+
this.dataView.setFloat64(Offset.DATA_BUFFER + StatLayout.SIZE, size, true);
|
|
1724
|
+
this.dataView.setFloat64(
|
|
1725
|
+
Offset.DATA_BUFFER + StatLayout.MTIME,
|
|
1726
|
+
stat.mtime.getTime(),
|
|
1727
|
+
true
|
|
1728
|
+
);
|
|
1729
|
+
this.setResultLength(StatLayout.TOTAL);
|
|
1730
|
+
}
|
|
1731
|
+
decodeStat() {
|
|
1732
|
+
return {
|
|
1733
|
+
isFile: this.uint8View[Offset.DATA_BUFFER + StatLayout.IS_FILE] === 1,
|
|
1734
|
+
isDirectory: this.uint8View[Offset.DATA_BUFFER + StatLayout.IS_DIRECTORY] === 1,
|
|
1735
|
+
isSymbolicLink: this.uint8View[Offset.DATA_BUFFER + StatLayout.IS_SYMLINK] === 1,
|
|
1736
|
+
mode: this.dataView.getInt32(Offset.DATA_BUFFER + StatLayout.MODE, true),
|
|
1737
|
+
size: this.dataView.getFloat64(
|
|
1738
|
+
Offset.DATA_BUFFER + StatLayout.SIZE,
|
|
1739
|
+
true
|
|
1740
|
+
),
|
|
1741
|
+
mtime: new Date(
|
|
1742
|
+
this.dataView.getFloat64(Offset.DATA_BUFFER + StatLayout.MTIME, true)
|
|
1743
|
+
)
|
|
1744
|
+
};
|
|
1745
|
+
}
|
|
1746
|
+
waitForReady(timeout) {
|
|
1747
|
+
return _Atomics.wait(
|
|
1748
|
+
this.int32View,
|
|
1749
|
+
Offset.STATUS / 4,
|
|
1750
|
+
Status.PENDING,
|
|
1751
|
+
timeout
|
|
1752
|
+
);
|
|
1753
|
+
}
|
|
1754
|
+
waitForReadyAsync(timeout) {
|
|
1755
|
+
return _Atomics.waitAsync(
|
|
1756
|
+
this.int32View,
|
|
1757
|
+
Offset.STATUS / 4,
|
|
1758
|
+
Status.PENDING,
|
|
1759
|
+
timeout
|
|
1760
|
+
);
|
|
1761
|
+
}
|
|
1762
|
+
/**
|
|
1763
|
+
* Wait for status to become READY.
|
|
1764
|
+
* Returns immediately if status is already READY, or waits until it changes.
|
|
1765
|
+
*/
|
|
1766
|
+
async waitUntilReady(timeout) {
|
|
1767
|
+
const startTime = Date.now();
|
|
1768
|
+
while (true) {
|
|
1769
|
+
const status = this.getStatus();
|
|
1770
|
+
if (status === Status.READY) {
|
|
1771
|
+
return true;
|
|
1772
|
+
}
|
|
1773
|
+
const elapsed = Date.now() - startTime;
|
|
1774
|
+
if (elapsed >= timeout) {
|
|
1775
|
+
return false;
|
|
1776
|
+
}
|
|
1777
|
+
const remainingMs = timeout - elapsed;
|
|
1778
|
+
const result = _Atomics.waitAsync(
|
|
1779
|
+
this.int32View,
|
|
1780
|
+
Offset.STATUS / 4,
|
|
1781
|
+
status,
|
|
1782
|
+
remainingMs
|
|
1783
|
+
);
|
|
1784
|
+
if (result.async) {
|
|
1785
|
+
const waitResult = await result.value;
|
|
1786
|
+
if (waitResult === "timed-out") {
|
|
1787
|
+
return false;
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
waitForResult(timeout) {
|
|
1793
|
+
return _Atomics.wait(
|
|
1794
|
+
this.int32View,
|
|
1795
|
+
Offset.STATUS / 4,
|
|
1796
|
+
Status.READY,
|
|
1797
|
+
timeout
|
|
1798
|
+
);
|
|
1799
|
+
}
|
|
1800
|
+
notify() {
|
|
1801
|
+
return _Atomics.notify(this.int32View, Offset.STATUS / 4);
|
|
1802
|
+
}
|
|
1803
|
+
reset() {
|
|
1804
|
+
this.setOpCode(OpCode.NOOP);
|
|
1805
|
+
this.setStatus(Status.PENDING);
|
|
1806
|
+
this.setPathLength(0);
|
|
1807
|
+
this.setDataLength(0);
|
|
1808
|
+
this.setResultLength(0);
|
|
1809
|
+
this.setErrorCode(ErrorCode.NONE);
|
|
1810
|
+
this.setFlags(Flags.NONE);
|
|
1811
|
+
this.setMode(0);
|
|
1812
|
+
}
|
|
1813
|
+
};
|
|
1814
|
+
|
|
1815
|
+
// src/commands/worker-bridge/sync-backend.ts
|
|
1816
|
+
var SyncBackend = class {
|
|
1817
|
+
protocol;
|
|
1818
|
+
operationTimeoutMs;
|
|
1819
|
+
constructor(sharedBuffer, operationTimeoutMs = 3e4) {
|
|
1820
|
+
this.protocol = new ProtocolBuffer(sharedBuffer);
|
|
1821
|
+
this.operationTimeoutMs = operationTimeoutMs;
|
|
1822
|
+
}
|
|
1823
|
+
execSync(opCode, path, data, flags = 0, mode = 0) {
|
|
1824
|
+
this.protocol.reset();
|
|
1825
|
+
this.protocol.setOpCode(opCode);
|
|
1826
|
+
this.protocol.setPath(path);
|
|
1827
|
+
this.protocol.setFlags(flags);
|
|
1828
|
+
this.protocol.setMode(mode);
|
|
1829
|
+
if (data) {
|
|
1830
|
+
this.protocol.setData(data);
|
|
1831
|
+
}
|
|
1832
|
+
this.protocol.setStatus(Status.READY);
|
|
1833
|
+
this.protocol.notify();
|
|
1834
|
+
const waitResult = this.protocol.waitForResult(this.operationTimeoutMs);
|
|
1835
|
+
if (waitResult === "timed-out") {
|
|
1836
|
+
return { success: false, error: "Operation timed out" };
|
|
1837
|
+
}
|
|
1838
|
+
const status = this.protocol.getStatus();
|
|
1839
|
+
if (status === Status.SUCCESS) {
|
|
1840
|
+
return { success: true, result: this.protocol.getResult() };
|
|
1841
|
+
}
|
|
1842
|
+
return {
|
|
1843
|
+
success: false,
|
|
1844
|
+
error: this.protocol.getResultAsString() || `Error code: ${this.protocol.getErrorCode()}`
|
|
1845
|
+
};
|
|
1846
|
+
}
|
|
1847
|
+
readFile(path) {
|
|
1848
|
+
const result = this.execSync(OpCode.READ_FILE, path);
|
|
1849
|
+
if (!result.success) {
|
|
1850
|
+
throw new Error(result.error || "Failed to read file");
|
|
1851
|
+
}
|
|
1852
|
+
return result.result ?? new Uint8Array(0);
|
|
1853
|
+
}
|
|
1854
|
+
writeFile(path, data) {
|
|
1855
|
+
const result = this.execSync(OpCode.WRITE_FILE, path, data);
|
|
1856
|
+
if (!result.success) {
|
|
1857
|
+
throw new Error(result.error || "Failed to write file");
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
stat(path) {
|
|
1861
|
+
const result = this.execSync(OpCode.STAT, path);
|
|
1862
|
+
if (!result.success) {
|
|
1863
|
+
throw new Error(result.error || "Failed to stat");
|
|
1864
|
+
}
|
|
1865
|
+
return this.protocol.decodeStat();
|
|
1866
|
+
}
|
|
1867
|
+
lstat(path) {
|
|
1868
|
+
const result = this.execSync(OpCode.LSTAT, path);
|
|
1869
|
+
if (!result.success) {
|
|
1870
|
+
throw new Error(result.error || "Failed to lstat");
|
|
1871
|
+
}
|
|
1872
|
+
return this.protocol.decodeStat();
|
|
1873
|
+
}
|
|
1874
|
+
readdir(path) {
|
|
1875
|
+
const result = this.execSync(OpCode.READDIR, path);
|
|
1876
|
+
if (!result.success) {
|
|
1877
|
+
throw new Error(result.error || "Failed to readdir");
|
|
1878
|
+
}
|
|
1879
|
+
return JSON.parse(this.protocol.getResultAsString());
|
|
1880
|
+
}
|
|
1881
|
+
mkdir(path, recursive = false) {
|
|
1882
|
+
const flags = recursive ? Flags.MKDIR_RECURSIVE : 0;
|
|
1883
|
+
const result = this.execSync(OpCode.MKDIR, path, void 0, flags);
|
|
1884
|
+
if (!result.success) {
|
|
1885
|
+
throw new Error(result.error || "Failed to mkdir");
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
rm(path, recursive = false, force = false) {
|
|
1889
|
+
let flags = 0;
|
|
1890
|
+
if (recursive) flags |= Flags.RECURSIVE;
|
|
1891
|
+
if (force) flags |= Flags.FORCE;
|
|
1892
|
+
const result = this.execSync(OpCode.RM, path, void 0, flags);
|
|
1893
|
+
if (!result.success) {
|
|
1894
|
+
throw new Error(result.error || "Failed to rm");
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
exists(path) {
|
|
1898
|
+
const result = this.execSync(OpCode.EXISTS, path);
|
|
1899
|
+
if (!result.success) {
|
|
1900
|
+
return false;
|
|
1901
|
+
}
|
|
1902
|
+
return result.result?.[0] === 1;
|
|
1903
|
+
}
|
|
1904
|
+
appendFile(path, data) {
|
|
1905
|
+
const result = this.execSync(OpCode.APPEND_FILE, path, data);
|
|
1906
|
+
if (!result.success) {
|
|
1907
|
+
throw new Error(result.error || "Failed to append file");
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
symlink(target, linkPath) {
|
|
1911
|
+
const targetData = new TextEncoder().encode(target);
|
|
1912
|
+
const result = this.execSync(OpCode.SYMLINK, linkPath, targetData);
|
|
1913
|
+
if (!result.success) {
|
|
1914
|
+
throw new Error(result.error || "Failed to symlink");
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
readlink(path) {
|
|
1918
|
+
const result = this.execSync(OpCode.READLINK, path);
|
|
1919
|
+
if (!result.success) {
|
|
1920
|
+
throw new Error(result.error || "Failed to readlink");
|
|
1921
|
+
}
|
|
1922
|
+
return this.protocol.getResultAsString();
|
|
1923
|
+
}
|
|
1924
|
+
chmod(path, mode) {
|
|
1925
|
+
const result = this.execSync(OpCode.CHMOD, path, void 0, 0, mode);
|
|
1926
|
+
if (!result.success) {
|
|
1927
|
+
throw new Error(result.error || "Failed to chmod");
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
realpath(path) {
|
|
1931
|
+
const result = this.execSync(OpCode.REALPATH, path);
|
|
1932
|
+
if (!result.success) {
|
|
1933
|
+
throw new Error(result.error || "Failed to realpath");
|
|
1934
|
+
}
|
|
1935
|
+
return this.protocol.getResultAsString();
|
|
1936
|
+
}
|
|
1937
|
+
rename(oldPath, newPath) {
|
|
1938
|
+
const newPathData = new TextEncoder().encode(newPath);
|
|
1939
|
+
const result = this.execSync(OpCode.RENAME, oldPath, newPathData);
|
|
1940
|
+
if (!result.success) {
|
|
1941
|
+
throw new Error(result.error || "Failed to rename");
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
copyFile(src, dest) {
|
|
1945
|
+
const destData = new TextEncoder().encode(dest);
|
|
1946
|
+
const result = this.execSync(OpCode.COPY_FILE, src, destData);
|
|
1947
|
+
if (!result.success) {
|
|
1948
|
+
throw new Error(result.error || "Failed to copyFile");
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
writeStdout(data) {
|
|
1952
|
+
const encoded = new TextEncoder().encode(data);
|
|
1953
|
+
const result = this.execSync(OpCode.WRITE_STDOUT, "", encoded);
|
|
1954
|
+
if (!result.success) {
|
|
1955
|
+
throw new Error(result.error || "Failed to write stdout");
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
writeStderr(data) {
|
|
1959
|
+
const encoded = new TextEncoder().encode(data);
|
|
1960
|
+
const result = this.execSync(OpCode.WRITE_STDERR, "", encoded);
|
|
1961
|
+
if (!result.success) {
|
|
1962
|
+
throw new Error(result.error || "Failed to write stderr");
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
exit(code) {
|
|
1966
|
+
this.execSync(OpCode.EXIT, "", void 0, code);
|
|
1967
|
+
}
|
|
1968
|
+
/**
|
|
1969
|
+
* Make an HTTP request through the main thread's secureFetch.
|
|
1970
|
+
* Returns the response as a parsed object.
|
|
1971
|
+
*/
|
|
1972
|
+
httpRequest(url, options) {
|
|
1973
|
+
const requestData = options ? new TextEncoder().encode(JSON.stringify(options)) : void 0;
|
|
1974
|
+
const result = this.execSync(OpCode.HTTP_REQUEST, url, requestData);
|
|
1975
|
+
if (!result.success) {
|
|
1976
|
+
throw new Error(result.error || "HTTP request failed");
|
|
1977
|
+
}
|
|
1978
|
+
const responseJson = new TextDecoder().decode(result.result);
|
|
1979
|
+
const parsed = JSON.parse(responseJson);
|
|
1980
|
+
const bodyBase64 = parsed.bodyBase64 ?? "";
|
|
1981
|
+
const body = atob(bodyBase64);
|
|
1982
|
+
return {
|
|
1983
|
+
status: parsed.status,
|
|
1984
|
+
statusText: parsed.statusText,
|
|
1985
|
+
headers: parsed.headers,
|
|
1986
|
+
url: parsed.url,
|
|
1987
|
+
body,
|
|
1988
|
+
bodyBase64
|
|
1989
|
+
};
|
|
1990
|
+
}
|
|
1991
|
+
/**
|
|
1992
|
+
* Execute a shell command through the main thread's exec function.
|
|
1993
|
+
* Returns the result as { stdout, stderr, exitCode }.
|
|
1994
|
+
*/
|
|
1995
|
+
execCommand(command, stdin) {
|
|
1996
|
+
const requestData = stdin ? new TextEncoder().encode(JSON.stringify({ stdin })) : void 0;
|
|
1997
|
+
const result = this.execSync(OpCode.EXEC_COMMAND, command, requestData);
|
|
1998
|
+
if (!result.success) {
|
|
1999
|
+
throw new Error(result.error || "Command execution failed");
|
|
2000
|
+
}
|
|
2001
|
+
const responseJson = new TextDecoder().decode(result.result);
|
|
2002
|
+
return JSON.parse(responseJson);
|
|
2003
|
+
}
|
|
2004
|
+
/**
|
|
2005
|
+
* Execute a shell command with structured args (shell-escaped on the main thread).
|
|
2006
|
+
* Prevents command injection from unsanitized args.
|
|
2007
|
+
*/
|
|
2008
|
+
execCommandArgs(command, args) {
|
|
2009
|
+
const requestData = new TextEncoder().encode(JSON.stringify({ args }));
|
|
2010
|
+
const result = this.execSync(OpCode.EXEC_COMMAND, command, requestData);
|
|
2011
|
+
if (!result.success) {
|
|
2012
|
+
throw new Error(result.error || "Command execution failed");
|
|
2013
|
+
}
|
|
2014
|
+
const responseJson = new TextDecoder().decode(result.result);
|
|
2015
|
+
return JSON.parse(responseJson);
|
|
2016
|
+
}
|
|
2017
|
+
};
|
|
2018
|
+
|
|
2019
|
+
// src/commands/js-exec/fetch-polyfill.ts
|
|
2020
|
+
var FETCH_POLYFILL_SOURCE = `
|
|
2021
|
+
(function() {
|
|
2022
|
+
// --- URLSearchParams ---
|
|
2023
|
+
function URLSearchParams(init) {
|
|
2024
|
+
this._entries = [];
|
|
2025
|
+
if (!init) return;
|
|
2026
|
+
if (typeof init === 'string') {
|
|
2027
|
+
var s = init;
|
|
2028
|
+
if (s.charAt(0) === '?') s = s.slice(1);
|
|
2029
|
+
var pairs = s.split('&');
|
|
2030
|
+
for (var i = 0; i < pairs.length; i++) {
|
|
2031
|
+
var pair = pairs[i];
|
|
2032
|
+
if (pair === '') continue;
|
|
2033
|
+
var eq = pair.indexOf('=');
|
|
2034
|
+
if (eq === -1) {
|
|
2035
|
+
this._entries.push([decodeURIComponent(pair), '']);
|
|
2036
|
+
} else {
|
|
2037
|
+
this._entries.push([
|
|
2038
|
+
decodeURIComponent(pair.slice(0, eq)),
|
|
2039
|
+
decodeURIComponent(pair.slice(eq + 1))
|
|
2040
|
+
]);
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
} else if (typeof init === 'object' && init !== null) {
|
|
2044
|
+
if (init instanceof URLSearchParams) {
|
|
2045
|
+
this._entries = init._entries.slice();
|
|
2046
|
+
} else {
|
|
2047
|
+
var keys = Object.keys(init);
|
|
2048
|
+
for (var i = 0; i < keys.length; i++) {
|
|
2049
|
+
this._entries.push([keys[i], String(init[keys[i]])]);
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
URLSearchParams.prototype.append = function(name, value) {
|
|
2056
|
+
this._entries.push([String(name), String(value)]);
|
|
2057
|
+
};
|
|
2058
|
+
|
|
2059
|
+
URLSearchParams.prototype.delete = function(name) {
|
|
2060
|
+
var n = String(name);
|
|
2061
|
+
this._entries = this._entries.filter(function(e) { return e[0] !== n; });
|
|
2062
|
+
};
|
|
2063
|
+
|
|
2064
|
+
URLSearchParams.prototype.get = function(name) {
|
|
2065
|
+
var n = String(name);
|
|
2066
|
+
for (var i = 0; i < this._entries.length; i++) {
|
|
2067
|
+
if (this._entries[i][0] === n) return this._entries[i][1];
|
|
2068
|
+
}
|
|
2069
|
+
return null;
|
|
2070
|
+
};
|
|
2071
|
+
|
|
2072
|
+
URLSearchParams.prototype.getAll = function(name) {
|
|
2073
|
+
var n = String(name);
|
|
2074
|
+
var result = [];
|
|
2075
|
+
for (var i = 0; i < this._entries.length; i++) {
|
|
2076
|
+
if (this._entries[i][0] === n) result.push(this._entries[i][1]);
|
|
2077
|
+
}
|
|
2078
|
+
return result;
|
|
2079
|
+
};
|
|
2080
|
+
|
|
2081
|
+
URLSearchParams.prototype.has = function(name) {
|
|
2082
|
+
var n = String(name);
|
|
2083
|
+
for (var i = 0; i < this._entries.length; i++) {
|
|
2084
|
+
if (this._entries[i][0] === n) return true;
|
|
2085
|
+
}
|
|
2086
|
+
return false;
|
|
2087
|
+
};
|
|
2088
|
+
|
|
2089
|
+
URLSearchParams.prototype.set = function(name, value) {
|
|
2090
|
+
var n = String(name);
|
|
2091
|
+
var v = String(value);
|
|
2092
|
+
var found = false;
|
|
2093
|
+
var newEntries = [];
|
|
2094
|
+
for (var i = 0; i < this._entries.length; i++) {
|
|
2095
|
+
if (this._entries[i][0] === n) {
|
|
2096
|
+
if (!found) {
|
|
2097
|
+
newEntries.push([n, v]);
|
|
2098
|
+
found = true;
|
|
2099
|
+
}
|
|
2100
|
+
} else {
|
|
2101
|
+
newEntries.push(this._entries[i]);
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
if (!found) newEntries.push([n, v]);
|
|
2105
|
+
this._entries = newEntries;
|
|
2106
|
+
};
|
|
2107
|
+
|
|
2108
|
+
URLSearchParams.prototype.sort = function() {
|
|
2109
|
+
this._entries.sort(function(a, b) {
|
|
2110
|
+
if (a[0] < b[0]) return -1;
|
|
2111
|
+
if (a[0] > b[0]) return 1;
|
|
2112
|
+
return 0;
|
|
2113
|
+
});
|
|
2114
|
+
};
|
|
2115
|
+
|
|
2116
|
+
URLSearchParams.prototype.toString = function() {
|
|
2117
|
+
return this._entries.map(function(e) {
|
|
2118
|
+
return encodeURIComponent(e[0]) + '=' + encodeURIComponent(e[1]);
|
|
2119
|
+
}).join('&');
|
|
2120
|
+
};
|
|
2121
|
+
|
|
2122
|
+
URLSearchParams.prototype.forEach = function(callback, thisArg) {
|
|
2123
|
+
for (var i = 0; i < this._entries.length; i++) {
|
|
2124
|
+
callback.call(thisArg, this._entries[i][1], this._entries[i][0], this);
|
|
2125
|
+
}
|
|
2126
|
+
};
|
|
2127
|
+
|
|
2128
|
+
URLSearchParams.prototype.entries = function() {
|
|
2129
|
+
var idx = 0;
|
|
2130
|
+
var entries = this._entries;
|
|
2131
|
+
return {
|
|
2132
|
+
next: function() {
|
|
2133
|
+
if (idx >= entries.length) return { done: true, value: undefined };
|
|
2134
|
+
return { done: false, value: entries[idx++].slice() };
|
|
2135
|
+
},
|
|
2136
|
+
[Symbol.iterator]: function() { return this; }
|
|
2137
|
+
};
|
|
2138
|
+
};
|
|
2139
|
+
|
|
2140
|
+
URLSearchParams.prototype.keys = function() {
|
|
2141
|
+
var idx = 0;
|
|
2142
|
+
var entries = this._entries;
|
|
2143
|
+
return {
|
|
2144
|
+
next: function() {
|
|
2145
|
+
if (idx >= entries.length) return { done: true, value: undefined };
|
|
2146
|
+
return { done: false, value: entries[idx++][0] };
|
|
2147
|
+
},
|
|
2148
|
+
[Symbol.iterator]: function() { return this; }
|
|
2149
|
+
};
|
|
2150
|
+
};
|
|
2151
|
+
|
|
2152
|
+
URLSearchParams.prototype.values = function() {
|
|
2153
|
+
var idx = 0;
|
|
2154
|
+
var entries = this._entries;
|
|
2155
|
+
return {
|
|
2156
|
+
next: function() {
|
|
2157
|
+
if (idx >= entries.length) return { done: true, value: undefined };
|
|
2158
|
+
return { done: false, value: entries[idx++][1] };
|
|
2159
|
+
},
|
|
2160
|
+
[Symbol.iterator]: function() { return this; }
|
|
2161
|
+
};
|
|
2162
|
+
};
|
|
2163
|
+
|
|
2164
|
+
URLSearchParams.prototype[Symbol.iterator] = URLSearchParams.prototype.entries;
|
|
2165
|
+
|
|
2166
|
+
Object.defineProperty(URLSearchParams.prototype, 'size', {
|
|
2167
|
+
get: function() { return this._entries.length; }
|
|
2168
|
+
});
|
|
2169
|
+
|
|
2170
|
+
// --- URL ---
|
|
2171
|
+
var urlRegex = /^([a-zA-Z][a-zA-Z0-9+.-]*):(?:\\/\\/(?:([^:@/?#]*)(?::([^@/?#]*))?@)?([^:/?#]*)(?::([0-9]+))?)?(\\/[^?#]*)?(?:\\?([^#]*))?(?:#(.*))?$/;
|
|
2172
|
+
|
|
2173
|
+
function URL(url, base) {
|
|
2174
|
+
var input = String(url);
|
|
2175
|
+
|
|
2176
|
+
if (base !== undefined) {
|
|
2177
|
+
var baseUrl = (base instanceof URL) ? base : new URL(String(base));
|
|
2178
|
+
// Resolve relative URL against base
|
|
2179
|
+
if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(input)) {
|
|
2180
|
+
// Absolute URL - parse as-is
|
|
2181
|
+
} else if (input.charAt(0) === '/' && input.charAt(1) === '/') {
|
|
2182
|
+
// Protocol-relative
|
|
2183
|
+
input = baseUrl.protocol + input;
|
|
2184
|
+
} else if (input.charAt(0) === '/') {
|
|
2185
|
+
// Absolute path
|
|
2186
|
+
input = baseUrl.origin + input;
|
|
2187
|
+
} else if (input.charAt(0) === '?' || input.charAt(0) === '#') {
|
|
2188
|
+
// Query or hash only
|
|
2189
|
+
var basePath = baseUrl.protocol + '//' + baseUrl.host + baseUrl.pathname;
|
|
2190
|
+
if (input.charAt(0) === '#') {
|
|
2191
|
+
input = basePath + baseUrl.search + input;
|
|
2192
|
+
} else {
|
|
2193
|
+
input = basePath + input;
|
|
2194
|
+
}
|
|
2195
|
+
} else {
|
|
2196
|
+
// Relative path
|
|
2197
|
+
var basePath = baseUrl.protocol + '//' + baseUrl.host;
|
|
2198
|
+
var dirPath = baseUrl.pathname;
|
|
2199
|
+
var lastSlash = dirPath.lastIndexOf('/');
|
|
2200
|
+
if (lastSlash >= 0) dirPath = dirPath.slice(0, lastSlash + 1);
|
|
2201
|
+
else dirPath = '/';
|
|
2202
|
+
input = basePath + dirPath + input;
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
var m = urlRegex.exec(input);
|
|
2207
|
+
if (!m) throw new TypeError("Invalid URL: " + String(url));
|
|
2208
|
+
|
|
2209
|
+
this.protocol = m[1].toLowerCase() + ':';
|
|
2210
|
+
this.username = m[2] ? decodeURIComponent(m[2]) : '';
|
|
2211
|
+
this.password = m[3] ? decodeURIComponent(m[3]) : '';
|
|
2212
|
+
this.hostname = m[4] || '';
|
|
2213
|
+
this.port = m[5] || '';
|
|
2214
|
+
this.pathname = m[6] || '/';
|
|
2215
|
+
this.hash = m[8] ? '#' + m[8] : '';
|
|
2216
|
+
|
|
2217
|
+
// Normalize pathname (resolve . and ..)
|
|
2218
|
+
var parts = this.pathname.split('/');
|
|
2219
|
+
var resolved = [];
|
|
2220
|
+
for (var i = 0; i < parts.length; i++) {
|
|
2221
|
+
if (parts[i] === '..') { if (resolved.length > 1) resolved.pop(); }
|
|
2222
|
+
else if (parts[i] !== '.') resolved.push(parts[i]);
|
|
2223
|
+
}
|
|
2224
|
+
this.pathname = resolved.join('/') || '/';
|
|
2225
|
+
|
|
2226
|
+
// searchParams is live
|
|
2227
|
+
this._searchParamsStr = m[7] || '';
|
|
2228
|
+
this.searchParams = new URLSearchParams(this._searchParamsStr);
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
Object.defineProperty(URL.prototype, 'search', {
|
|
2232
|
+
get: function() {
|
|
2233
|
+
var s = this.searchParams.toString();
|
|
2234
|
+
return s ? '?' + s : '';
|
|
2235
|
+
},
|
|
2236
|
+
set: function(v) {
|
|
2237
|
+
this.searchParams = new URLSearchParams(String(v));
|
|
2238
|
+
}
|
|
2239
|
+
});
|
|
2240
|
+
|
|
2241
|
+
Object.defineProperty(URL.prototype, 'host', {
|
|
2242
|
+
get: function() {
|
|
2243
|
+
return this.port ? this.hostname + ':' + this.port : this.hostname;
|
|
2244
|
+
}
|
|
2245
|
+
});
|
|
2246
|
+
|
|
2247
|
+
Object.defineProperty(URL.prototype, 'origin', {
|
|
2248
|
+
get: function() {
|
|
2249
|
+
return this.protocol + '//' + this.host;
|
|
2250
|
+
}
|
|
2251
|
+
});
|
|
2252
|
+
|
|
2253
|
+
Object.defineProperty(URL.prototype, 'href', {
|
|
2254
|
+
get: function() {
|
|
2255
|
+
var auth = '';
|
|
2256
|
+
if (this.username) {
|
|
2257
|
+
auth = this.username;
|
|
2258
|
+
if (this.password) auth += ':' + this.password;
|
|
2259
|
+
auth += '@';
|
|
2260
|
+
}
|
|
2261
|
+
return this.protocol + '//' + auth + this.host + this.pathname + this.search + this.hash;
|
|
2262
|
+
},
|
|
2263
|
+
set: function(v) {
|
|
2264
|
+
var parsed = new URL(String(v));
|
|
2265
|
+
this.protocol = parsed.protocol;
|
|
2266
|
+
this.username = parsed.username;
|
|
2267
|
+
this.password = parsed.password;
|
|
2268
|
+
this.hostname = parsed.hostname;
|
|
2269
|
+
this.port = parsed.port;
|
|
2270
|
+
this.pathname = parsed.pathname;
|
|
2271
|
+
this.searchParams = parsed.searchParams;
|
|
2272
|
+
this.hash = parsed.hash;
|
|
2273
|
+
}
|
|
2274
|
+
});
|
|
2275
|
+
|
|
2276
|
+
URL.prototype.toString = function() { return this.href; };
|
|
2277
|
+
URL.prototype.toJSON = function() { return this.href; };
|
|
2278
|
+
|
|
2279
|
+
// --- Headers ---
|
|
2280
|
+
function Headers(init) {
|
|
2281
|
+
this._map = {};
|
|
2282
|
+
if (!init) return;
|
|
2283
|
+
if (init instanceof Headers) {
|
|
2284
|
+
var keys = Object.keys(init._map);
|
|
2285
|
+
for (var i = 0; i < keys.length; i++) {
|
|
2286
|
+
this._map[keys[i]] = init._map[keys[i]].slice();
|
|
2287
|
+
}
|
|
2288
|
+
} else if (typeof init === 'object') {
|
|
2289
|
+
var keys = Object.keys(init);
|
|
2290
|
+
for (var i = 0; i < keys.length; i++) {
|
|
2291
|
+
this._map[keys[i].toLowerCase()] = [String(init[keys[i]])];
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
Headers.prototype.append = function(name, value) {
|
|
2297
|
+
var key = String(name).toLowerCase();
|
|
2298
|
+
if (!this._map[key]) this._map[key] = [];
|
|
2299
|
+
this._map[key].push(String(value));
|
|
2300
|
+
};
|
|
2301
|
+
|
|
2302
|
+
Headers.prototype.delete = function(name) {
|
|
2303
|
+
delete this._map[String(name).toLowerCase()];
|
|
2304
|
+
};
|
|
2305
|
+
|
|
2306
|
+
Headers.prototype.get = function(name) {
|
|
2307
|
+
var vals = this._map[String(name).toLowerCase()];
|
|
2308
|
+
return vals ? vals.join(', ') : null;
|
|
2309
|
+
};
|
|
2310
|
+
|
|
2311
|
+
Headers.prototype.has = function(name) {
|
|
2312
|
+
return String(name).toLowerCase() in this._map;
|
|
2313
|
+
};
|
|
2314
|
+
|
|
2315
|
+
Headers.prototype.set = function(name, value) {
|
|
2316
|
+
this._map[String(name).toLowerCase()] = [String(value)];
|
|
2317
|
+
};
|
|
2318
|
+
|
|
2319
|
+
Headers.prototype.forEach = function(callback, thisArg) {
|
|
2320
|
+
var keys = Object.keys(this._map).sort();
|
|
2321
|
+
for (var i = 0; i < keys.length; i++) {
|
|
2322
|
+
callback.call(thisArg, this._map[keys[i]].join(', '), keys[i], this);
|
|
2323
|
+
}
|
|
2324
|
+
};
|
|
2325
|
+
|
|
2326
|
+
Headers.prototype.entries = function() {
|
|
2327
|
+
var keys = Object.keys(this._map).sort();
|
|
2328
|
+
var map = this._map;
|
|
2329
|
+
var idx = 0;
|
|
2330
|
+
return {
|
|
2331
|
+
next: function() {
|
|
2332
|
+
if (idx >= keys.length) return { done: true, value: undefined };
|
|
2333
|
+
var k = keys[idx++];
|
|
2334
|
+
return { done: false, value: [k, map[k].join(', ')] };
|
|
2335
|
+
},
|
|
2336
|
+
[Symbol.iterator]: function() { return this; }
|
|
2337
|
+
};
|
|
2338
|
+
};
|
|
2339
|
+
|
|
2340
|
+
Headers.prototype.keys = function() {
|
|
2341
|
+
var keys = Object.keys(this._map).sort();
|
|
2342
|
+
var idx = 0;
|
|
2343
|
+
return {
|
|
2344
|
+
next: function() {
|
|
2345
|
+
if (idx >= keys.length) return { done: true, value: undefined };
|
|
2346
|
+
return { done: false, value: keys[idx++] };
|
|
2347
|
+
},
|
|
2348
|
+
[Symbol.iterator]: function() { return this; }
|
|
2349
|
+
};
|
|
2350
|
+
};
|
|
2351
|
+
|
|
2352
|
+
Headers.prototype.values = function() {
|
|
2353
|
+
var keys = Object.keys(this._map).sort();
|
|
2354
|
+
var map = this._map;
|
|
2355
|
+
var idx = 0;
|
|
2356
|
+
return {
|
|
2357
|
+
next: function() {
|
|
2358
|
+
if (idx >= keys.length) return { done: true, value: undefined };
|
|
2359
|
+
return { done: false, value: map[keys[idx++]].join(', ') };
|
|
2360
|
+
},
|
|
2361
|
+
[Symbol.iterator]: function() { return this; }
|
|
2362
|
+
};
|
|
2363
|
+
};
|
|
2364
|
+
|
|
2365
|
+
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
|
|
2366
|
+
|
|
2367
|
+
// --- Response ---
|
|
2368
|
+
function Response(body, init) {
|
|
2369
|
+
if (init === undefined) init = {};
|
|
2370
|
+
this.status = init.status !== undefined ? init.status : 200;
|
|
2371
|
+
this.statusText = init.statusText !== undefined ? init.statusText : '';
|
|
2372
|
+
this.headers = init.headers instanceof Headers ? init.headers : new Headers(init.headers);
|
|
2373
|
+
this.body = body !== undefined && body !== null ? String(body) : '';
|
|
2374
|
+
this.ok = this.status >= 200 && this.status <= 299;
|
|
2375
|
+
this.url = '';
|
|
2376
|
+
this.redirected = false;
|
|
2377
|
+
this.type = 'basic';
|
|
2378
|
+
this.bodyUsed = false;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
Response.prototype.text = function() {
|
|
2382
|
+
this.bodyUsed = true;
|
|
2383
|
+
return Promise.resolve(this.body);
|
|
2384
|
+
};
|
|
2385
|
+
|
|
2386
|
+
Response.prototype.json = function() {
|
|
2387
|
+
this.bodyUsed = true;
|
|
2388
|
+
try {
|
|
2389
|
+
return Promise.resolve(JSON.parse(this.body));
|
|
2390
|
+
} catch (e) {
|
|
2391
|
+
return Promise.reject(e);
|
|
2392
|
+
}
|
|
2393
|
+
};
|
|
2394
|
+
|
|
2395
|
+
Response.prototype.clone = function() {
|
|
2396
|
+
var r = new Response(this.body, {
|
|
2397
|
+
status: this.status,
|
|
2398
|
+
statusText: this.statusText,
|
|
2399
|
+
headers: new Headers(this.headers)
|
|
2400
|
+
});
|
|
2401
|
+
r.url = this.url;
|
|
2402
|
+
r.redirected = this.redirected;
|
|
2403
|
+
r.type = this.type;
|
|
2404
|
+
return r;
|
|
2405
|
+
};
|
|
2406
|
+
|
|
2407
|
+
Response.json = function(data, init) {
|
|
2408
|
+
if (init === undefined) init = {};
|
|
2409
|
+
var headers = init.headers instanceof Headers ? init.headers : new Headers(init.headers);
|
|
2410
|
+
if (!headers.has('content-type')) {
|
|
2411
|
+
headers.set('content-type', 'application/json');
|
|
2412
|
+
}
|
|
2413
|
+
return new Response(JSON.stringify(data), {
|
|
2414
|
+
status: init.status !== undefined ? init.status : 200,
|
|
2415
|
+
statusText: init.statusText || '',
|
|
2416
|
+
headers: headers
|
|
2417
|
+
});
|
|
2418
|
+
};
|
|
2419
|
+
|
|
2420
|
+
Response.error = function() {
|
|
2421
|
+
var r = new Response(null, { status: 0, statusText: '' });
|
|
2422
|
+
r.type = 'error';
|
|
2423
|
+
r.ok = false;
|
|
2424
|
+
return r;
|
|
2425
|
+
};
|
|
2426
|
+
|
|
2427
|
+
Response.redirect = function(url, status) {
|
|
2428
|
+
if (status === undefined) status = 302;
|
|
2429
|
+
var r = new Response(null, {
|
|
2430
|
+
status: status,
|
|
2431
|
+
statusText: '',
|
|
2432
|
+
headers: new Headers({ location: String(url) })
|
|
2433
|
+
});
|
|
2434
|
+
r.redirected = true;
|
|
2435
|
+
return r;
|
|
2436
|
+
};
|
|
2437
|
+
|
|
2438
|
+
// --- Request ---
|
|
2439
|
+
function Request(input, init) {
|
|
2440
|
+
if (init === undefined) init = {};
|
|
2441
|
+
if (input instanceof Request) {
|
|
2442
|
+
this.url = input.url;
|
|
2443
|
+
this.method = input.method;
|
|
2444
|
+
this.headers = new Headers(input.headers);
|
|
2445
|
+
this.body = input.body;
|
|
2446
|
+
} else {
|
|
2447
|
+
this.url = String(input);
|
|
2448
|
+
this.method = 'GET';
|
|
2449
|
+
this.headers = new Headers();
|
|
2450
|
+
this.body = null;
|
|
2451
|
+
}
|
|
2452
|
+
if (init.method !== undefined) this.method = String(init.method).toUpperCase();
|
|
2453
|
+
if (init.headers !== undefined) this.headers = init.headers instanceof Headers ? init.headers : new Headers(init.headers);
|
|
2454
|
+
if (init.body !== undefined) this.body = init.body !== null ? String(init.body) : null;
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
Request.prototype.clone = function() {
|
|
2458
|
+
return new Request(this);
|
|
2459
|
+
};
|
|
2460
|
+
|
|
2461
|
+
// --- Assign to globalThis ---
|
|
2462
|
+
globalThis.URLSearchParams = URLSearchParams;
|
|
2463
|
+
globalThis.URL = URL;
|
|
2464
|
+
globalThis.Headers = Headers;
|
|
2465
|
+
globalThis.Response = Response;
|
|
2466
|
+
globalThis.Request = Request;
|
|
2467
|
+
|
|
2468
|
+
// --- Wrap native fetch ---
|
|
2469
|
+
var _nativeFetch = globalThis[Symbol.for('jb:fetch')];
|
|
2470
|
+
globalThis.fetch = function fetch(input, init) {
|
|
2471
|
+
try {
|
|
2472
|
+
var url, method, headers, body;
|
|
2473
|
+
|
|
2474
|
+
if (input instanceof Request) {
|
|
2475
|
+
url = input.url;
|
|
2476
|
+
method = input.method;
|
|
2477
|
+
headers = {};
|
|
2478
|
+
input.headers.forEach(function(v, k) { headers[k] = v; });
|
|
2479
|
+
body = input.body;
|
|
2480
|
+
} else {
|
|
2481
|
+
url = String(input);
|
|
2482
|
+
method = undefined;
|
|
2483
|
+
headers = undefined;
|
|
2484
|
+
body = undefined;
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
if (init) {
|
|
2488
|
+
if (init.method !== undefined) method = String(init.method).toUpperCase();
|
|
2489
|
+
if (init.headers !== undefined) {
|
|
2490
|
+
var h = init.headers instanceof Headers ? init.headers : new Headers(init.headers);
|
|
2491
|
+
headers = {};
|
|
2492
|
+
h.forEach(function(v, k) { headers[k] = v; });
|
|
2493
|
+
}
|
|
2494
|
+
if (init.body !== undefined) body = init.body !== null ? String(init.body) : undefined;
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
var opts = Object.create(null);
|
|
2498
|
+
if (method) opts.method = method;
|
|
2499
|
+
if (headers) opts.headers = headers;
|
|
2500
|
+
if (body) opts.body = body;
|
|
2501
|
+
|
|
2502
|
+
var raw = _nativeFetch(url, opts);
|
|
2503
|
+
|
|
2504
|
+
var respHeaders = new Headers(raw.headers || {});
|
|
2505
|
+
var response = new Response(raw.body, {
|
|
2506
|
+
status: raw.status,
|
|
2507
|
+
statusText: raw.statusText || '',
|
|
2508
|
+
headers: respHeaders
|
|
2509
|
+
});
|
|
2510
|
+
response.url = raw.url || url;
|
|
2511
|
+
|
|
2512
|
+
return Promise.resolve(response);
|
|
2513
|
+
} catch (e) {
|
|
2514
|
+
return Promise.reject(new TypeError(e.message || 'fetch failed'));
|
|
2515
|
+
}
|
|
2516
|
+
};
|
|
2517
|
+
})();
|
|
2518
|
+
`;
|
|
2519
|
+
|
|
2520
|
+
// src/commands/js-exec/module-shims.ts
|
|
2521
|
+
var EVENTS_MODULE_SOURCE = `
|
|
2522
|
+
var EventEmitter = (function() {
|
|
2523
|
+
function EE() {
|
|
2524
|
+
this._events = {};
|
|
2525
|
+
this._maxListeners = 10;
|
|
2526
|
+
}
|
|
2527
|
+
EE.prototype.on = function(event, listener) {
|
|
2528
|
+
if (!this._events[event]) this._events[event] = [];
|
|
2529
|
+
this._events[event].push(listener);
|
|
2530
|
+
return this;
|
|
2531
|
+
};
|
|
2532
|
+
EE.prototype.addListener = EE.prototype.on;
|
|
2533
|
+
EE.prototype.once = function(event, listener) {
|
|
2534
|
+
var self = this;
|
|
2535
|
+
function wrapper() {
|
|
2536
|
+
self.removeListener(event, wrapper);
|
|
2537
|
+
listener.apply(this, arguments);
|
|
2538
|
+
}
|
|
2539
|
+
wrapper._original = listener;
|
|
2540
|
+
return this.on(event, wrapper);
|
|
2541
|
+
};
|
|
2542
|
+
EE.prototype.off = function(event, listener) {
|
|
2543
|
+
return this.removeListener(event, listener);
|
|
2544
|
+
};
|
|
2545
|
+
EE.prototype.removeListener = function(event, listener) {
|
|
2546
|
+
var list = this._events[event];
|
|
2547
|
+
if (list) {
|
|
2548
|
+
this._events[event] = list.filter(function(fn) {
|
|
2549
|
+
return fn !== listener && fn._original !== listener;
|
|
2550
|
+
});
|
|
2551
|
+
}
|
|
2552
|
+
return this;
|
|
2553
|
+
};
|
|
2554
|
+
EE.prototype.removeAllListeners = function(event) {
|
|
2555
|
+
if (event) delete this._events[event];
|
|
2556
|
+
else this._events = {};
|
|
2557
|
+
return this;
|
|
2558
|
+
};
|
|
2559
|
+
EE.prototype.emit = function(event) {
|
|
2560
|
+
var list = this._events[event];
|
|
2561
|
+
if (!list || list.length === 0) return false;
|
|
2562
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
2563
|
+
var fns = list.slice();
|
|
2564
|
+
for (var i = 0; i < fns.length; i++) fns[i].apply(this, args);
|
|
2565
|
+
return true;
|
|
2566
|
+
};
|
|
2567
|
+
EE.prototype.listeners = function(event) {
|
|
2568
|
+
return (this._events[event] || []).slice();
|
|
2569
|
+
};
|
|
2570
|
+
EE.prototype.listenerCount = function(event) {
|
|
2571
|
+
return (this._events[event] || []).length;
|
|
2572
|
+
};
|
|
2573
|
+
EE.prototype.setMaxListeners = function(n) {
|
|
2574
|
+
this._maxListeners = n;
|
|
2575
|
+
return this;
|
|
2576
|
+
};
|
|
2577
|
+
EE.prototype.eventNames = function() {
|
|
2578
|
+
return Object.keys(this._events);
|
|
2579
|
+
};
|
|
2580
|
+
EE.prototype.prependListener = function(event, listener) {
|
|
2581
|
+
if (!this._events[event]) this._events[event] = [];
|
|
2582
|
+
this._events[event].unshift(listener);
|
|
2583
|
+
return this;
|
|
2584
|
+
};
|
|
2585
|
+
return EE;
|
|
2586
|
+
})();
|
|
2587
|
+
globalThis[Symbol.for('jb:events')] = { EventEmitter: EventEmitter };
|
|
2588
|
+
`;
|
|
2589
|
+
var OS_MODULE_SOURCE = `
|
|
2590
|
+
var _os = {
|
|
2591
|
+
platform: function() { return globalThis.process.platform; },
|
|
2592
|
+
arch: function() { return globalThis.process.arch; },
|
|
2593
|
+
homedir: function() { return '/home/user'; },
|
|
2594
|
+
tmpdir: function() { return '/tmp'; },
|
|
2595
|
+
type: function() { return 'Linux'; },
|
|
2596
|
+
hostname: function() { return 'sandbox'; },
|
|
2597
|
+
EOL: '\\n',
|
|
2598
|
+
cpus: function() { return []; },
|
|
2599
|
+
totalmem: function() { return 0; },
|
|
2600
|
+
freemem: function() { return 0; },
|
|
2601
|
+
endianness: function() { return 'LE'; }
|
|
2602
|
+
};
|
|
2603
|
+
globalThis[Symbol.for('jb:os')] = _os;
|
|
2604
|
+
`;
|
|
2605
|
+
var URL_MODULE_SOURCE = `
|
|
2606
|
+
var _urlMod = {
|
|
2607
|
+
URL: globalThis.URL,
|
|
2608
|
+
URLSearchParams: globalThis.URLSearchParams,
|
|
2609
|
+
parse: function(urlStr) {
|
|
2610
|
+
try {
|
|
2611
|
+
var u = new URL(urlStr);
|
|
2612
|
+
return {
|
|
2613
|
+
protocol: u.protocol, host: u.host, hostname: u.hostname,
|
|
2614
|
+
port: u.port, pathname: u.pathname, search: u.search,
|
|
2615
|
+
hash: u.hash, href: u.href, path: u.pathname + u.search
|
|
2616
|
+
};
|
|
2617
|
+
} catch(e) {
|
|
2618
|
+
return {
|
|
2619
|
+
protocol: null, host: null, hostname: null, port: null,
|
|
2620
|
+
pathname: urlStr, search: '', hash: '', href: urlStr, path: urlStr
|
|
2621
|
+
};
|
|
2622
|
+
}
|
|
2623
|
+
},
|
|
2624
|
+
format: function(obj) {
|
|
2625
|
+
if (typeof obj === 'string') return obj;
|
|
2626
|
+
if (obj instanceof URL) return obj.href;
|
|
2627
|
+
var auth = obj.auth ? obj.auth + '@' : '';
|
|
2628
|
+
var host = obj.host || ((obj.hostname || '') + (obj.port ? ':' + obj.port : ''));
|
|
2629
|
+
return (obj.protocol ? obj.protocol + '//' : '') + auth + host +
|
|
2630
|
+
(obj.pathname || '/') + (obj.search || '') + (obj.hash || '');
|
|
2631
|
+
}
|
|
2632
|
+
};
|
|
2633
|
+
globalThis[Symbol.for('jb:url')] = _urlMod;
|
|
2634
|
+
`;
|
|
2635
|
+
var ASSERT_MODULE_SOURCE = `
|
|
2636
|
+
var _deepEqual = function(a, b) {
|
|
2637
|
+
if (a === b) return true;
|
|
2638
|
+
if (a === null || b === null || typeof a !== 'object' || typeof b !== 'object') return false;
|
|
2639
|
+
if (Array.isArray(a) !== Array.isArray(b)) return false;
|
|
2640
|
+
var ka = Object.keys(a), kb = Object.keys(b);
|
|
2641
|
+
if (ka.length !== kb.length) return false;
|
|
2642
|
+
for (var i = 0; i < ka.length; i++) {
|
|
2643
|
+
if (!_deepEqual(a[ka[i]], b[ka[i]])) return false;
|
|
2644
|
+
}
|
|
2645
|
+
return true;
|
|
2646
|
+
};
|
|
2647
|
+
var _assert = function(val, msg) {
|
|
2648
|
+
if (!val) throw new Error(msg || 'AssertionError: expected truthy value');
|
|
2649
|
+
};
|
|
2650
|
+
_assert.ok = _assert;
|
|
2651
|
+
_assert.equal = function(a, b, msg) {
|
|
2652
|
+
if (a != b) throw new Error(msg || 'AssertionError: ' + a + ' != ' + b);
|
|
2653
|
+
};
|
|
2654
|
+
_assert.notEqual = function(a, b, msg) {
|
|
2655
|
+
if (a == b) throw new Error(msg || 'AssertionError: ' + a + ' == ' + b);
|
|
2656
|
+
};
|
|
2657
|
+
_assert.strictEqual = function(a, b, msg) {
|
|
2658
|
+
if (a !== b) throw new Error(msg || 'AssertionError: ' + a + ' !== ' + b);
|
|
2659
|
+
};
|
|
2660
|
+
_assert.notStrictEqual = function(a, b, msg) {
|
|
2661
|
+
if (a === b) throw new Error(msg || 'AssertionError: ' + a + ' === ' + b);
|
|
2662
|
+
};
|
|
2663
|
+
_assert.deepEqual = function(a, b, msg) {
|
|
2664
|
+
if (!_deepEqual(a, b)) throw new Error(msg || 'AssertionError: objects not deep equal');
|
|
2665
|
+
};
|
|
2666
|
+
_assert.deepStrictEqual = _assert.deepEqual;
|
|
2667
|
+
_assert.notDeepEqual = function(a, b, msg) {
|
|
2668
|
+
if (_deepEqual(a, b)) throw new Error(msg || 'AssertionError: objects are deep equal');
|
|
2669
|
+
};
|
|
2670
|
+
_assert.throws = function(fn, expected, msg) {
|
|
2671
|
+
var threw = false;
|
|
2672
|
+
try { fn(); } catch(e) {
|
|
2673
|
+
threw = true;
|
|
2674
|
+
if (expected instanceof RegExp && !expected.test(e.message))
|
|
2675
|
+
throw new Error(msg || 'AssertionError: error message did not match');
|
|
2676
|
+
}
|
|
2677
|
+
if (!threw) throw new Error(msg || 'AssertionError: function did not throw');
|
|
2678
|
+
};
|
|
2679
|
+
_assert.doesNotThrow = function(fn, msg) {
|
|
2680
|
+
// @banned-pattern-ignore: sandbox-internal assertion helper; e.message is from user code inside QuickJS, not host details
|
|
2681
|
+
try { fn(); } catch(e) {
|
|
2682
|
+
throw new Error(msg || 'AssertionError: function threw: ' + e.message);
|
|
2683
|
+
}
|
|
2684
|
+
};
|
|
2685
|
+
_assert.fail = function(msg) {
|
|
2686
|
+
throw new Error(msg || 'AssertionError: assert.fail()');
|
|
2687
|
+
};
|
|
2688
|
+
globalThis[Symbol.for('jb:assert')] = _assert;
|
|
2689
|
+
`;
|
|
2690
|
+
var UTIL_MODULE_SOURCE = `
|
|
2691
|
+
var _util = {
|
|
2692
|
+
format: function() {
|
|
2693
|
+
var args = Array.prototype.slice.call(arguments);
|
|
2694
|
+
if (args.length === 0) return '';
|
|
2695
|
+
var fmt = args[0];
|
|
2696
|
+
if (typeof fmt !== 'string') {
|
|
2697
|
+
return args.map(function(a) {
|
|
2698
|
+
return typeof a === 'string' ? a : JSON.stringify(a);
|
|
2699
|
+
}).join(' ');
|
|
2700
|
+
}
|
|
2701
|
+
var i = 1;
|
|
2702
|
+
var str = fmt.replace(/%[sdjifoO%]/g, function(m) {
|
|
2703
|
+
if (m === '%%') return '%';
|
|
2704
|
+
if (i >= args.length) return m;
|
|
2705
|
+
var v = args[i++];
|
|
2706
|
+
if (m === '%s') return String(v);
|
|
2707
|
+
if (m === '%d') return Number(v).toString();
|
|
2708
|
+
if (m === '%i') { var n = Number(v); return (isNaN(n) ? 'NaN' : Math.trunc(n)).toString(); }
|
|
2709
|
+
if (m === '%j') return JSON.stringify(v);
|
|
2710
|
+
if (m === '%f') return parseFloat(v).toString();
|
|
2711
|
+
if (m === '%o' || m === '%O') return JSON.stringify(v);
|
|
2712
|
+
return m;
|
|
2713
|
+
});
|
|
2714
|
+
while (i < args.length) {
|
|
2715
|
+
str += ' ' + (typeof args[i] === 'string' ? args[i] : JSON.stringify(args[i]));
|
|
2716
|
+
i++;
|
|
2717
|
+
}
|
|
2718
|
+
return str;
|
|
2719
|
+
},
|
|
2720
|
+
inspect: function(obj, opts) {
|
|
2721
|
+
if (obj === null) return 'null';
|
|
2722
|
+
if (obj === undefined) return 'undefined';
|
|
2723
|
+
if (typeof obj === 'string') return "'" + obj + "'";
|
|
2724
|
+
if (typeof obj === 'function') return '[Function: ' + (obj.name || 'anonymous') + ']';
|
|
2725
|
+
var seen = [];
|
|
2726
|
+
try {
|
|
2727
|
+
return JSON.stringify(obj, function(key, val) {
|
|
2728
|
+
if (typeof val === 'object' && val !== null) {
|
|
2729
|
+
if (seen.indexOf(val) !== -1) return '[Circular]';
|
|
2730
|
+
seen.push(val);
|
|
2731
|
+
}
|
|
2732
|
+
return val;
|
|
2733
|
+
});
|
|
2734
|
+
} catch(e) { return String(obj); }
|
|
2735
|
+
},
|
|
2736
|
+
promisify: function(fn) {
|
|
2737
|
+
return function() {
|
|
2738
|
+
var args = Array.prototype.slice.call(arguments);
|
|
2739
|
+
return new Promise(function(resolve, reject) {
|
|
2740
|
+
args.push(function(err, val) { if (err) reject(err); else resolve(val); });
|
|
2741
|
+
fn.apply(null, args);
|
|
2742
|
+
});
|
|
2743
|
+
};
|
|
2744
|
+
},
|
|
2745
|
+
types: {
|
|
2746
|
+
isDate: function(v) { return v instanceof Date; },
|
|
2747
|
+
isRegExp: function(v) { return v instanceof RegExp; },
|
|
2748
|
+
isArray: function(v) { return Array.isArray(v); },
|
|
2749
|
+
isMap: function(v) { return typeof Map !== 'undefined' && v instanceof Map; },
|
|
2750
|
+
isSet: function(v) { return typeof Set !== 'undefined' && v instanceof Set; }
|
|
2751
|
+
},
|
|
2752
|
+
inherits: function(ctor, superCtor) {
|
|
2753
|
+
ctor.prototype = Object.create(superCtor.prototype);
|
|
2754
|
+
ctor.prototype.constructor = ctor;
|
|
2755
|
+
}
|
|
2756
|
+
};
|
|
2757
|
+
globalThis[Symbol.for('jb:util')] = _util;
|
|
2758
|
+
`;
|
|
2759
|
+
var BUFFER_MODULE_SOURCE = `
|
|
2760
|
+
function _utf8Encode(str) {
|
|
2761
|
+
var bytes = [];
|
|
2762
|
+
for (var i = 0; i < str.length; i++) {
|
|
2763
|
+
var c = str.charCodeAt(i);
|
|
2764
|
+
if (c < 0x80) {
|
|
2765
|
+
bytes.push(c);
|
|
2766
|
+
} else if (c < 0x800) {
|
|
2767
|
+
bytes.push(0xC0 | (c >> 6), 0x80 | (c & 0x3F));
|
|
2768
|
+
} else if (c >= 0xD800 && c <= 0xDBFF && i + 1 < str.length) {
|
|
2769
|
+
var lo = str.charCodeAt(++i);
|
|
2770
|
+
var cp = ((c - 0xD800) * 0x400) + (lo - 0xDC00) + 0x10000;
|
|
2771
|
+
bytes.push(0xF0 | (cp >> 18), 0x80 | ((cp >> 12) & 0x3F), 0x80 | ((cp >> 6) & 0x3F), 0x80 | (cp & 0x3F));
|
|
2772
|
+
} else {
|
|
2773
|
+
bytes.push(0xE0 | (c >> 12), 0x80 | ((c >> 6) & 0x3F), 0x80 | (c & 0x3F));
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
return bytes;
|
|
2777
|
+
}
|
|
2778
|
+
function _utf8Decode(bytes) {
|
|
2779
|
+
var str = '';
|
|
2780
|
+
var i = 0;
|
|
2781
|
+
while (i < bytes.length) {
|
|
2782
|
+
var b = bytes[i];
|
|
2783
|
+
if (b < 0x80) { str += String.fromCharCode(b); i++; }
|
|
2784
|
+
else if ((b & 0xE0) === 0xC0) { str += String.fromCharCode(((b & 0x1F) << 6) | (bytes[i+1] & 0x3F)); i += 2; }
|
|
2785
|
+
else if ((b & 0xF0) === 0xE0) { str += String.fromCharCode(((b & 0x0F) << 12) | ((bytes[i+1] & 0x3F) << 6) | (bytes[i+2] & 0x3F)); i += 3; }
|
|
2786
|
+
else if ((b & 0xF8) === 0xF0) { var cp = ((b & 0x07) << 18) | ((bytes[i+1] & 0x3F) << 12) | ((bytes[i+2] & 0x3F) << 6) | (bytes[i+3] & 0x3F); cp -= 0x10000; str += String.fromCharCode((cp >> 10) + 0xD800, (cp & 0x3FF) + 0xDC00); i += 4; }
|
|
2787
|
+
else { i++; }
|
|
2788
|
+
}
|
|
2789
|
+
return str;
|
|
2790
|
+
}
|
|
2791
|
+
// _utf8Encode/_utf8Decode are IIFE-local vars, available to all module shims
|
|
2792
|
+
|
|
2793
|
+
function Buffer(arg) {
|
|
2794
|
+
if (typeof arg === 'number') {
|
|
2795
|
+
this._data = new Uint8Array(arg);
|
|
2796
|
+
} else if (arg instanceof ArrayBuffer) {
|
|
2797
|
+
this._data = new Uint8Array(arg);
|
|
2798
|
+
} else if (arg instanceof Uint8Array) {
|
|
2799
|
+
this._data = new Uint8Array(arg);
|
|
2800
|
+
} else if (Array.isArray(arg)) {
|
|
2801
|
+
this._data = new Uint8Array(arg);
|
|
2802
|
+
} else {
|
|
2803
|
+
this._data = new Uint8Array(0);
|
|
2804
|
+
}
|
|
2805
|
+
this.length = this._data.length;
|
|
2806
|
+
}
|
|
2807
|
+
Buffer.from = function(data, encoding) {
|
|
2808
|
+
if (typeof data === 'string') {
|
|
2809
|
+
return new Buffer(_utf8Encode(data));
|
|
2810
|
+
}
|
|
2811
|
+
if (data instanceof ArrayBuffer) return new Buffer(data);
|
|
2812
|
+
if (data instanceof Uint8Array) return new Buffer(data);
|
|
2813
|
+
if (Array.isArray(data)) return new Buffer(data);
|
|
2814
|
+
if (data && data._data) return new Buffer(data._data.slice());
|
|
2815
|
+
return new Buffer(0);
|
|
2816
|
+
};
|
|
2817
|
+
Buffer.alloc = function(size, fill) {
|
|
2818
|
+
var buf = new Buffer(size);
|
|
2819
|
+
if (fill !== undefined) {
|
|
2820
|
+
var fillByte = typeof fill === 'number' ? fill : 0;
|
|
2821
|
+
buf._data.fill(fillByte);
|
|
2822
|
+
}
|
|
2823
|
+
return buf;
|
|
2824
|
+
};
|
|
2825
|
+
Buffer.allocUnsafe = Buffer.alloc;
|
|
2826
|
+
Buffer.isBuffer = function(obj) { return obj instanceof Buffer; };
|
|
2827
|
+
Buffer.concat = function(list, totalLength) {
|
|
2828
|
+
if (!totalLength) {
|
|
2829
|
+
totalLength = 0;
|
|
2830
|
+
for (var i = 0; i < list.length; i++) totalLength += list[i].length;
|
|
2831
|
+
}
|
|
2832
|
+
var result = new Uint8Array(totalLength);
|
|
2833
|
+
var offset = 0;
|
|
2834
|
+
for (var i = 0; i < list.length; i++) {
|
|
2835
|
+
result.set(list[i]._data, offset);
|
|
2836
|
+
offset += list[i].length;
|
|
2837
|
+
}
|
|
2838
|
+
return new Buffer(result);
|
|
2839
|
+
};
|
|
2840
|
+
Buffer.byteLength = function(str) {
|
|
2841
|
+
return _utf8Encode(str).length;
|
|
2842
|
+
};
|
|
2843
|
+
Buffer.prototype.toString = function(encoding) {
|
|
2844
|
+
return _utf8Decode(this._data);
|
|
2845
|
+
};
|
|
2846
|
+
Buffer.prototype.toJSON = function() {
|
|
2847
|
+
return { type: 'Buffer', data: Array.from(this._data) };
|
|
2848
|
+
};
|
|
2849
|
+
Buffer.prototype.slice = function(start, end) {
|
|
2850
|
+
return new Buffer(this._data.slice(start, end));
|
|
2851
|
+
};
|
|
2852
|
+
Buffer.prototype.copy = function(target, targetStart, sourceStart, sourceEnd) {
|
|
2853
|
+
targetStart = targetStart || 0;
|
|
2854
|
+
sourceStart = sourceStart || 0;
|
|
2855
|
+
sourceEnd = sourceEnd || this.length;
|
|
2856
|
+
var sub = this._data.subarray(sourceStart, sourceEnd);
|
|
2857
|
+
target._data.set(sub, targetStart);
|
|
2858
|
+
return sub.length;
|
|
2859
|
+
};
|
|
2860
|
+
Buffer.prototype.write = function(str, offset) {
|
|
2861
|
+
var bytes = _utf8Encode(str);
|
|
2862
|
+
offset = offset || 0;
|
|
2863
|
+
this._data.set(bytes, offset);
|
|
2864
|
+
return bytes.length;
|
|
2865
|
+
};
|
|
2866
|
+
Buffer.prototype.fill = function(val, offset, end) {
|
|
2867
|
+
this._data.fill(typeof val === 'number' ? val : 0, offset, end);
|
|
2868
|
+
return this;
|
|
2869
|
+
};
|
|
2870
|
+
Buffer.prototype.equals = function(other) {
|
|
2871
|
+
if (this.length !== other.length) return false;
|
|
2872
|
+
for (var i = 0; i < this.length; i++) {
|
|
2873
|
+
if (this._data[i] !== other._data[i]) return false;
|
|
2874
|
+
}
|
|
2875
|
+
return true;
|
|
2876
|
+
};
|
|
2877
|
+
Buffer.prototype.readUInt8 = function(offset) { return this._data[offset]; };
|
|
2878
|
+
Buffer.prototype.writeUInt8 = function(value, offset) { this._data[offset] = value; return offset + 1; };
|
|
2879
|
+
globalThis[Symbol.for('jb:buffer')] = { Buffer: Buffer };
|
|
2880
|
+
globalThis.Buffer = Buffer;
|
|
2881
|
+
`;
|
|
2882
|
+
var STREAM_MODULE_SOURCE = `
|
|
2883
|
+
var _EE = globalThis[Symbol.for('jb:events')].EventEmitter;
|
|
2884
|
+
|
|
2885
|
+
function Stream() { _EE.call(this); }
|
|
2886
|
+
Stream.prototype = Object.create(_EE.prototype);
|
|
2887
|
+
Stream.prototype.constructor = Stream;
|
|
2888
|
+
Stream.prototype.pipe = function(dest) {
|
|
2889
|
+
this.on('data', function(chunk) { dest.write(chunk); });
|
|
2890
|
+
this.on('end', function() { if (dest.end) dest.end(); });
|
|
2891
|
+
return dest;
|
|
2892
|
+
};
|
|
2893
|
+
|
|
2894
|
+
function Readable(opts) {
|
|
2895
|
+
Stream.call(this);
|
|
2896
|
+
this.readable = true;
|
|
2897
|
+
this._readableState = { ended: false, buffer: [] };
|
|
2898
|
+
}
|
|
2899
|
+
Readable.prototype = Object.create(Stream.prototype);
|
|
2900
|
+
Readable.prototype.constructor = Readable;
|
|
2901
|
+
Readable.prototype.read = function() { return null; };
|
|
2902
|
+
Readable.prototype.push = function(chunk) {
|
|
2903
|
+
if (chunk === null) { this._readableState.ended = true; this.emit('end'); return false; }
|
|
2904
|
+
this.emit('data', chunk);
|
|
2905
|
+
return true;
|
|
2906
|
+
};
|
|
2907
|
+
Readable.prototype.destroy = function() { this.emit('close'); return this; };
|
|
2908
|
+
|
|
2909
|
+
function Writable(opts) {
|
|
2910
|
+
Stream.call(this);
|
|
2911
|
+
this.writable = true;
|
|
2912
|
+
this._writableState = { ended: false };
|
|
2913
|
+
}
|
|
2914
|
+
Writable.prototype = Object.create(Stream.prototype);
|
|
2915
|
+
Writable.prototype.constructor = Writable;
|
|
2916
|
+
Writable.prototype.write = function(chunk) { return true; };
|
|
2917
|
+
Writable.prototype.end = function(chunk) {
|
|
2918
|
+
if (chunk) this.write(chunk);
|
|
2919
|
+
this._writableState.ended = true;
|
|
2920
|
+
this.emit('finish');
|
|
2921
|
+
return this;
|
|
2922
|
+
};
|
|
2923
|
+
Writable.prototype.destroy = function() { this.emit('close'); return this; };
|
|
2924
|
+
|
|
2925
|
+
function Duplex(opts) {
|
|
2926
|
+
Readable.call(this, opts);
|
|
2927
|
+
Writable.call(this, opts);
|
|
2928
|
+
}
|
|
2929
|
+
Duplex.prototype = Object.create(Readable.prototype);
|
|
2930
|
+
var _wKeys = Object.keys(Writable.prototype);
|
|
2931
|
+
for (var _wi = 0; _wi < _wKeys.length; _wi++) {
|
|
2932
|
+
if (!Duplex.prototype[_wKeys[_wi]]) Duplex.prototype[_wKeys[_wi]] = Writable.prototype[_wKeys[_wi]];
|
|
2933
|
+
}
|
|
2934
|
+
Duplex.prototype.constructor = Duplex;
|
|
2935
|
+
|
|
2936
|
+
function Transform(opts) { Duplex.call(this, opts); }
|
|
2937
|
+
Transform.prototype = Object.create(Duplex.prototype);
|
|
2938
|
+
Transform.prototype.constructor = Transform;
|
|
2939
|
+
Transform.prototype._transform = function(chunk, encoding, cb) { if (cb) cb(null, chunk); };
|
|
2940
|
+
|
|
2941
|
+
function PassThrough(opts) { Transform.call(this, opts); }
|
|
2942
|
+
PassThrough.prototype = Object.create(Transform.prototype);
|
|
2943
|
+
PassThrough.prototype.constructor = PassThrough;
|
|
2944
|
+
|
|
2945
|
+
function pipeline() {
|
|
2946
|
+
var streams = Array.prototype.slice.call(arguments);
|
|
2947
|
+
var cb = typeof streams[streams.length - 1] === 'function' ? streams.pop() : null;
|
|
2948
|
+
for (var i = 0; i < streams.length - 1; i++) streams[i].pipe(streams[i + 1]);
|
|
2949
|
+
if (cb) {
|
|
2950
|
+
var last = streams[streams.length - 1];
|
|
2951
|
+
last.on('finish', function() { cb(null); });
|
|
2952
|
+
last.on('error', function(e) { cb(e); });
|
|
2953
|
+
}
|
|
2954
|
+
return streams[streams.length - 1];
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
globalThis[Symbol.for('jb:stream')] = {
|
|
2958
|
+
Stream: Stream, Readable: Readable, Writable: Writable,
|
|
2959
|
+
Duplex: Duplex, Transform: Transform, PassThrough: PassThrough,
|
|
2960
|
+
pipeline: pipeline
|
|
2961
|
+
};
|
|
2962
|
+
`;
|
|
2963
|
+
var STRING_DECODER_MODULE_SOURCE = `
|
|
2964
|
+
function StringDecoder(encoding) {
|
|
2965
|
+
this.encoding = (encoding || 'utf-8').toLowerCase();
|
|
2966
|
+
if (this.encoding === 'utf8') this.encoding = 'utf-8';
|
|
2967
|
+
}
|
|
2968
|
+
StringDecoder.prototype.write = function(buf) {
|
|
2969
|
+
if (typeof buf === 'string') return buf;
|
|
2970
|
+
var data = buf instanceof Uint8Array ? buf : (buf && buf._data ? buf._data : new Uint8Array(0));
|
|
2971
|
+
return _utf8Decode(data);
|
|
2972
|
+
};
|
|
2973
|
+
StringDecoder.prototype.end = function(buf) {
|
|
2974
|
+
if (buf) return this.write(buf);
|
|
2975
|
+
return '';
|
|
2976
|
+
};
|
|
2977
|
+
globalThis[Symbol.for('jb:string_decoder')] = { StringDecoder: StringDecoder };
|
|
2978
|
+
`;
|
|
2979
|
+
var QUERYSTRING_MODULE_SOURCE = `
|
|
2980
|
+
var _qs = {
|
|
2981
|
+
parse: function(str, sep, eq) {
|
|
2982
|
+
sep = sep || '&'; eq = eq || '=';
|
|
2983
|
+
var result = Object.create(null);
|
|
2984
|
+
if (!str || typeof str !== 'string') return result;
|
|
2985
|
+
var pairs = str.split(sep);
|
|
2986
|
+
for (var i = 0; i < pairs.length; i++) {
|
|
2987
|
+
var idx = pairs[i].indexOf(eq);
|
|
2988
|
+
var key, val;
|
|
2989
|
+
if (idx >= 0) {
|
|
2990
|
+
key = decodeURIComponent(pairs[i].slice(0, idx).replace(/\\+/g, ' '));
|
|
2991
|
+
val = decodeURIComponent(pairs[i].slice(idx + 1).replace(/\\+/g, ' '));
|
|
2992
|
+
} else {
|
|
2993
|
+
key = decodeURIComponent(pairs[i].replace(/\\+/g, ' '));
|
|
2994
|
+
val = '';
|
|
2995
|
+
}
|
|
2996
|
+
if (result[key] !== undefined) {
|
|
2997
|
+
if (Array.isArray(result[key])) result[key].push(val);
|
|
2998
|
+
else result[key] = [result[key], val];
|
|
2999
|
+
} else {
|
|
3000
|
+
result[key] = val;
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
return result;
|
|
3004
|
+
},
|
|
3005
|
+
stringify: function(obj, sep, eq) {
|
|
3006
|
+
sep = sep || '&'; eq = eq || '=';
|
|
3007
|
+
var pairs = [];
|
|
3008
|
+
var keys = Object.keys(obj);
|
|
3009
|
+
for (var i = 0; i < keys.length; i++) {
|
|
3010
|
+
var key = keys[i];
|
|
3011
|
+
var val = obj[key];
|
|
3012
|
+
if (Array.isArray(val)) {
|
|
3013
|
+
for (var j = 0; j < val.length; j++) {
|
|
3014
|
+
pairs.push(encodeURIComponent(key) + eq + encodeURIComponent(val[j]));
|
|
3015
|
+
}
|
|
3016
|
+
} else {
|
|
3017
|
+
pairs.push(encodeURIComponent(key) + eq + encodeURIComponent(val));
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
return pairs.join(sep);
|
|
3021
|
+
},
|
|
3022
|
+
escape: function(str) { return encodeURIComponent(str); },
|
|
3023
|
+
unescape: function(str) { return decodeURIComponent(str); }
|
|
3024
|
+
};
|
|
3025
|
+
_qs.decode = _qs.parse;
|
|
3026
|
+
_qs.encode = _qs.stringify;
|
|
3027
|
+
globalThis[Symbol.for('jb:querystring')] = _qs;
|
|
3028
|
+
`;
|
|
3029
|
+
var UNSUPPORTED_MODULES = Object.assign(
|
|
3030
|
+
/* @__PURE__ */ Object.create(null),
|
|
3031
|
+
{
|
|
3032
|
+
http: "Use fetch() for HTTP requests.",
|
|
3033
|
+
https: "Use fetch() for HTTP requests.",
|
|
3034
|
+
http2: "Use fetch() for HTTP requests.",
|
|
3035
|
+
net: "Network socket APIs are not supported.",
|
|
3036
|
+
tls: "Network socket APIs are not supported.",
|
|
3037
|
+
dgram: "Network socket APIs are not supported.",
|
|
3038
|
+
dns: "DNS APIs are not supported.",
|
|
3039
|
+
cluster: "Cluster APIs are not supported.",
|
|
3040
|
+
worker_threads: "Worker thread APIs are not supported.",
|
|
3041
|
+
vm: "VM APIs are not supported.",
|
|
3042
|
+
v8: "V8 APIs are not supported.",
|
|
3043
|
+
inspector: "Inspector APIs are not supported.",
|
|
3044
|
+
readline: "Readline APIs are not supported.",
|
|
3045
|
+
repl: "REPL APIs are not supported.",
|
|
3046
|
+
module: "Module APIs are not supported.",
|
|
3047
|
+
perf_hooks: "Performance hooks are not supported.",
|
|
3048
|
+
async_hooks: "Async hooks are not supported.",
|
|
3049
|
+
diagnostics_channel: "Diagnostics channel is not supported.",
|
|
3050
|
+
trace_events: "Trace events are not supported.",
|
|
3051
|
+
crypto: "Crypto APIs are not available in this sandbox.",
|
|
3052
|
+
zlib: "Compression APIs are not supported.",
|
|
3053
|
+
tty: "TTY APIs are not supported.",
|
|
3054
|
+
domain: "Domain APIs are not supported."
|
|
3055
|
+
}
|
|
3056
|
+
);
|
|
3057
|
+
|
|
3058
|
+
// src/commands/js-exec/path-polyfill.ts
|
|
3059
|
+
var PATH_MODULE_SOURCE = `
|
|
3060
|
+
(function() {
|
|
3061
|
+
var sep = '/';
|
|
3062
|
+
var delimiter = ':';
|
|
3063
|
+
|
|
3064
|
+
function normalize(p) {
|
|
3065
|
+
if (p === '') return '.';
|
|
3066
|
+
var isAbs = p.charCodeAt(0) === 47;
|
|
3067
|
+
var trailingSlash = p.charCodeAt(p.length - 1) === 47;
|
|
3068
|
+
var parts = p.split('/');
|
|
3069
|
+
var out = [];
|
|
3070
|
+
for (var i = 0; i < parts.length; i++) {
|
|
3071
|
+
var seg = parts[i];
|
|
3072
|
+
if (seg === '' || seg === '.') continue;
|
|
3073
|
+
if (seg === '..') {
|
|
3074
|
+
if (out.length > 0 && out[out.length - 1] !== '..') out.pop();
|
|
3075
|
+
else if (!isAbs) out.push('..');
|
|
3076
|
+
} else {
|
|
3077
|
+
out.push(seg);
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
3080
|
+
var result = out.join('/');
|
|
3081
|
+
if (isAbs) result = '/' + result;
|
|
3082
|
+
if (trailingSlash && result[result.length - 1] !== '/') result += '/';
|
|
3083
|
+
return result || (isAbs ? '/' : '.');
|
|
3084
|
+
}
|
|
3085
|
+
|
|
3086
|
+
function join() {
|
|
3087
|
+
var joined = '';
|
|
3088
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
3089
|
+
var arg = arguments[i];
|
|
3090
|
+
if (typeof arg !== 'string') throw new TypeError('Path must be a string');
|
|
3091
|
+
if (arg.length > 0) {
|
|
3092
|
+
if (joined.length > 0) joined += '/' + arg;
|
|
3093
|
+
else joined = arg;
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
if (joined.length === 0) return '.';
|
|
3097
|
+
return normalize(joined);
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
function resolve() {
|
|
3101
|
+
var resolved = '';
|
|
3102
|
+
var resolvedAbsolute = false;
|
|
3103
|
+
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
3104
|
+
var path = i >= 0 ? arguments[i] : globalThis.process.cwd();
|
|
3105
|
+
if (typeof path !== 'string') throw new TypeError('Path must be a string');
|
|
3106
|
+
if (path.length === 0) continue;
|
|
3107
|
+
if (resolved.length > 0) resolved = path + '/' + resolved;
|
|
3108
|
+
else resolved = path;
|
|
3109
|
+
resolvedAbsolute = path.charCodeAt(0) === 47;
|
|
3110
|
+
}
|
|
3111
|
+
resolved = normalize(resolved);
|
|
3112
|
+
if (resolvedAbsolute) return '/' + resolved.replace(/^\\/+/, '');
|
|
3113
|
+
return resolved.length > 0 ? resolved : '.';
|
|
3114
|
+
}
|
|
3115
|
+
|
|
3116
|
+
function isAbsolute(p) {
|
|
3117
|
+
return typeof p === 'string' && p.length > 0 && p.charCodeAt(0) === 47;
|
|
3118
|
+
}
|
|
3119
|
+
|
|
3120
|
+
function dirname(p) {
|
|
3121
|
+
if (p.length === 0) return '.';
|
|
3122
|
+
var hasRoot = p.charCodeAt(0) === 47;
|
|
3123
|
+
var end = -1;
|
|
3124
|
+
for (var i = p.length - 1; i >= 1; i--) {
|
|
3125
|
+
if (p.charCodeAt(i) === 47) { end = i; break; }
|
|
3126
|
+
}
|
|
3127
|
+
if (end === -1) return hasRoot ? '/' : '.';
|
|
3128
|
+
if (hasRoot && end === 0) return '/';
|
|
3129
|
+
return p.slice(0, end);
|
|
3130
|
+
}
|
|
3131
|
+
|
|
3132
|
+
function basename(p, ext) {
|
|
3133
|
+
var start = 0;
|
|
3134
|
+
for (var i = p.length - 1; i >= 0; i--) {
|
|
3135
|
+
if (p.charCodeAt(i) === 47) { start = i + 1; break; }
|
|
3136
|
+
}
|
|
3137
|
+
var base = p.slice(start);
|
|
3138
|
+
if (ext && base.endsWith(ext)) {
|
|
3139
|
+
base = base.slice(0, base.length - ext.length);
|
|
3140
|
+
}
|
|
3141
|
+
return base;
|
|
3142
|
+
}
|
|
3143
|
+
|
|
3144
|
+
function extname(p) {
|
|
3145
|
+
var startDot = -1;
|
|
3146
|
+
var startPart = 0;
|
|
3147
|
+
for (var i = p.length - 1; i >= 0; i--) {
|
|
3148
|
+
var code = p.charCodeAt(i);
|
|
3149
|
+
if (code === 47) { startPart = i + 1; break; }
|
|
3150
|
+
if (code === 46 && startDot === -1) startDot = i;
|
|
3151
|
+
}
|
|
3152
|
+
if (startDot === -1 || startDot === startPart ||
|
|
3153
|
+
(startDot === startPart + 1 && p.charCodeAt(startPart) === 46)) {
|
|
3154
|
+
return '';
|
|
3155
|
+
}
|
|
3156
|
+
return p.slice(startDot);
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
function relative(from, to) {
|
|
3160
|
+
if (from === to) return '';
|
|
3161
|
+
from = resolve(from);
|
|
3162
|
+
to = resolve(to);
|
|
3163
|
+
if (from === to) return '';
|
|
3164
|
+
var fromParts = from.split('/').filter(Boolean);
|
|
3165
|
+
var toParts = to.split('/').filter(Boolean);
|
|
3166
|
+
var common = 0;
|
|
3167
|
+
var length = Math.min(fromParts.length, toParts.length);
|
|
3168
|
+
for (var i = 0; i < length; i++) {
|
|
3169
|
+
if (fromParts[i] !== toParts[i]) break;
|
|
3170
|
+
common++;
|
|
3171
|
+
}
|
|
3172
|
+
var ups = [];
|
|
3173
|
+
for (var i = common; i < fromParts.length; i++) ups.push('..');
|
|
3174
|
+
return ups.concat(toParts.slice(common)).join('/') || '.';
|
|
3175
|
+
}
|
|
3176
|
+
|
|
3177
|
+
function parse(p) {
|
|
3178
|
+
var root = p.charCodeAt(0) === 47 ? '/' : '';
|
|
3179
|
+
var dir = dirname(p);
|
|
3180
|
+
var base = basename(p);
|
|
3181
|
+
var ext = extname(p);
|
|
3182
|
+
var name = ext ? base.slice(0, base.length - ext.length) : base;
|
|
3183
|
+
return { root: root, dir: dir, base: base, ext: ext, name: name };
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3186
|
+
function format(obj) {
|
|
3187
|
+
var dir = obj.dir || obj.root || '';
|
|
3188
|
+
var base = obj.base || ((obj.name || '') + (obj.ext || ''));
|
|
3189
|
+
if (!dir) return base;
|
|
3190
|
+
if (dir === obj.root) return dir + base;
|
|
3191
|
+
return dir + '/' + base;
|
|
3192
|
+
}
|
|
3193
|
+
|
|
3194
|
+
var posix = { sep: sep, delimiter: delimiter, join: join, resolve: resolve, normalize: normalize, isAbsolute: isAbsolute, dirname: dirname, basename: basename, extname: extname, relative: relative, parse: parse, format: format };
|
|
3195
|
+
posix.posix = posix;
|
|
3196
|
+
|
|
3197
|
+
globalThis[Symbol.for('jb:path')] = posix;
|
|
3198
|
+
})();
|
|
3199
|
+
`;
|
|
3200
|
+
|
|
3201
|
+
// src/commands/js-exec/js-exec-worker.ts
|
|
3202
|
+
var quickjsModule = null;
|
|
3203
|
+
var quickjsLoading = null;
|
|
3204
|
+
async function getQuickJSModule() {
|
|
3205
|
+
if (quickjsModule) {
|
|
3206
|
+
return quickjsModule;
|
|
3207
|
+
}
|
|
3208
|
+
if (quickjsLoading) {
|
|
3209
|
+
return quickjsLoading;
|
|
3210
|
+
}
|
|
3211
|
+
quickjsLoading = getQuickJS();
|
|
3212
|
+
quickjsModule = await quickjsLoading;
|
|
3213
|
+
return quickjsModule;
|
|
3214
|
+
}
|
|
3215
|
+
var MEMORY_LIMIT = 64 * 1024 * 1024;
|
|
3216
|
+
var INTERRUPT_CYCLES = 1e5;
|
|
3217
|
+
function formatError(errorVal) {
|
|
3218
|
+
if (typeof errorVal === "object" && errorVal !== null && "message" in errorVal) {
|
|
3219
|
+
const err = errorVal;
|
|
3220
|
+
const msg = err.message;
|
|
3221
|
+
if (err.stack) {
|
|
3222
|
+
const lines = err.stack.split("\n");
|
|
3223
|
+
for (const line of lines) {
|
|
3224
|
+
const trimmed = line.trim();
|
|
3225
|
+
if (trimmed.startsWith("at ")) {
|
|
3226
|
+
const cleaned = trimmed.replace(/^at <eval> \((\/.+)\)$/, "at $1");
|
|
3227
|
+
return `${cleaned}: ${msg}`;
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
return msg;
|
|
3232
|
+
}
|
|
3233
|
+
return String(errorVal);
|
|
3234
|
+
}
|
|
3235
|
+
function throwError(context, message) {
|
|
3236
|
+
return { error: context.newError(message) };
|
|
3237
|
+
}
|
|
3238
|
+
function jsToHandle(context, value) {
|
|
3239
|
+
if (value === null || value === void 0) {
|
|
3240
|
+
return context.undefined;
|
|
3241
|
+
}
|
|
3242
|
+
if (typeof value === "string") {
|
|
3243
|
+
return context.newString(value);
|
|
3244
|
+
}
|
|
3245
|
+
if (typeof value === "number") {
|
|
3246
|
+
return context.newNumber(value);
|
|
3247
|
+
}
|
|
3248
|
+
if (typeof value === "boolean") {
|
|
3249
|
+
return value ? context.true : context.false;
|
|
3250
|
+
}
|
|
3251
|
+
if (Array.isArray(value)) {
|
|
3252
|
+
const arr = context.newArray();
|
|
3253
|
+
for (let i = 0; i < value.length; i++) {
|
|
3254
|
+
const elemHandle = jsToHandle(context, value[i]);
|
|
3255
|
+
context.setProp(arr, i, elemHandle);
|
|
3256
|
+
elemHandle.dispose();
|
|
3257
|
+
}
|
|
3258
|
+
return arr;
|
|
3259
|
+
}
|
|
3260
|
+
if (typeof value === "object") {
|
|
3261
|
+
const obj = context.newObject();
|
|
3262
|
+
for (const [k, v] of Object.entries(value)) {
|
|
3263
|
+
const valHandle = jsToHandle(context, v);
|
|
3264
|
+
context.setProp(obj, k, valHandle);
|
|
3265
|
+
valHandle.dispose();
|
|
3266
|
+
}
|
|
3267
|
+
return obj;
|
|
3268
|
+
}
|
|
3269
|
+
return context.undefined;
|
|
3270
|
+
}
|
|
3271
|
+
function resolveModulePath(name, fromFile, cwd) {
|
|
3272
|
+
if (name.startsWith("/")) return name;
|
|
3273
|
+
const base = fromFile ? fromFile.substring(0, fromFile.lastIndexOf("/")) || "/" : cwd;
|
|
3274
|
+
const parts = `${base}/${name}`.split("/").filter(Boolean);
|
|
3275
|
+
const resolved = [];
|
|
3276
|
+
for (const p of parts) {
|
|
3277
|
+
if (p === "..") resolved.pop();
|
|
3278
|
+
else if (p !== ".") resolved.push(p);
|
|
3279
|
+
}
|
|
3280
|
+
return `/${resolved.join("/")}`;
|
|
3281
|
+
}
|
|
3282
|
+
var VIRTUAL_MODULES = Object.assign(
|
|
3283
|
+
/* @__PURE__ */ Object.create(null),
|
|
3284
|
+
{
|
|
3285
|
+
fs: `
|
|
3286
|
+
const _fs = globalThis.fs;
|
|
3287
|
+
export const readFile = _fs.readFile;
|
|
3288
|
+
export const readFileSync = function(path, opts) { return _fs.readFileSync(path, opts); };
|
|
3289
|
+
export const readFileBuffer = _fs.readFileBuffer;
|
|
3290
|
+
export const writeFile = _fs.writeFile;
|
|
3291
|
+
export const writeFileSync = _fs.writeFileSync;
|
|
3292
|
+
export const stat = _fs.stat;
|
|
3293
|
+
export const statSync = _fs.statSync;
|
|
3294
|
+
export const lstat = _fs.lstat;
|
|
3295
|
+
export const lstatSync = _fs.lstatSync;
|
|
3296
|
+
export const readdir = _fs.readdir;
|
|
3297
|
+
export const readdirSync = _fs.readdirSync;
|
|
3298
|
+
export const mkdir = _fs.mkdir;
|
|
3299
|
+
export const mkdirSync = _fs.mkdirSync;
|
|
3300
|
+
export const rm = _fs.rm;
|
|
3301
|
+
export const rmSync = _fs.rmSync;
|
|
3302
|
+
export const exists = _fs.exists;
|
|
3303
|
+
export const existsSync = _fs.existsSync;
|
|
3304
|
+
export const appendFile = _fs.appendFile;
|
|
3305
|
+
export const appendFileSync = _fs.appendFileSync;
|
|
3306
|
+
export const symlink = _fs.symlink;
|
|
3307
|
+
export const symlinkSync = _fs.symlinkSync;
|
|
3308
|
+
export const readlink = _fs.readlink;
|
|
3309
|
+
export const readlinkSync = _fs.readlinkSync;
|
|
3310
|
+
export const chmod = _fs.chmod;
|
|
3311
|
+
export const chmodSync = _fs.chmodSync;
|
|
3312
|
+
export const realpath = _fs.realpath;
|
|
3313
|
+
export const realpathSync = _fs.realpathSync;
|
|
3314
|
+
export const rename = _fs.rename;
|
|
3315
|
+
export const renameSync = _fs.renameSync;
|
|
3316
|
+
export const copyFile = _fs.copyFile;
|
|
3317
|
+
export const copyFileSync = _fs.copyFileSync;
|
|
3318
|
+
export const unlinkSync = _fs.unlinkSync;
|
|
3319
|
+
export const unlink = _fs.unlink;
|
|
3320
|
+
export const rmdirSync = _fs.rmdirSync;
|
|
3321
|
+
export const rmdir = _fs.rmdir;
|
|
3322
|
+
export const promises = _fs.promises;
|
|
3323
|
+
export default _fs;
|
|
3324
|
+
`,
|
|
3325
|
+
path: `${PATH_MODULE_SOURCE}
|
|
3326
|
+
const _path = globalThis[Symbol.for('jb:path')];
|
|
3327
|
+
export const join = _path.join;
|
|
3328
|
+
export const resolve = _path.resolve;
|
|
3329
|
+
export const normalize = _path.normalize;
|
|
3330
|
+
export const isAbsolute = _path.isAbsolute;
|
|
3331
|
+
export const dirname = _path.dirname;
|
|
3332
|
+
export const basename = _path.basename;
|
|
3333
|
+
export const extname = _path.extname;
|
|
3334
|
+
export const relative = _path.relative;
|
|
3335
|
+
export const parse = _path.parse;
|
|
3336
|
+
export const format = _path.format;
|
|
3337
|
+
export const sep = _path.sep;
|
|
3338
|
+
export const delimiter = _path.delimiter;
|
|
3339
|
+
export const posix = _path.posix;
|
|
3340
|
+
export default _path;
|
|
3341
|
+
`,
|
|
3342
|
+
process: `
|
|
3343
|
+
const _process = globalThis.process;
|
|
3344
|
+
export const argv = _process.argv;
|
|
3345
|
+
export const cwd = _process.cwd;
|
|
3346
|
+
export const exit = _process.exit;
|
|
3347
|
+
export const env = _process.env;
|
|
3348
|
+
export const platform = _process.platform;
|
|
3349
|
+
export const arch = _process.arch;
|
|
3350
|
+
export const versions = _process.versions;
|
|
3351
|
+
export const version = _process.version;
|
|
3352
|
+
export default _process;
|
|
3353
|
+
`,
|
|
3354
|
+
child_process: `
|
|
3355
|
+
const _exec = globalThis[Symbol.for('jb:exec')];
|
|
3356
|
+
const _execArgs = globalThis[Symbol.for('jb:execArgs')];
|
|
3357
|
+
export function execSync(cmd, opts) {
|
|
3358
|
+
var r = _exec(cmd, opts);
|
|
3359
|
+
if (r.exitCode !== 0) {
|
|
3360
|
+
var e = new Error('Command failed: ' + cmd);
|
|
3361
|
+
e.status = r.exitCode;
|
|
3362
|
+
e.stderr = r.stderr;
|
|
3363
|
+
e.stdout = r.stdout;
|
|
3364
|
+
throw e;
|
|
3365
|
+
}
|
|
3366
|
+
return r.stdout;
|
|
3367
|
+
}
|
|
3368
|
+
export function exec(cmd, opts) { return _exec(cmd, opts); }
|
|
3369
|
+
export function spawnSync(cmd, args, opts) {
|
|
3370
|
+
var r = _execArgs(cmd, args || []);
|
|
3371
|
+
return { stdout: r.stdout, stderr: r.stderr, status: r.exitCode };
|
|
3372
|
+
}
|
|
3373
|
+
export default { exec: exec, execSync: execSync, spawnSync: spawnSync };
|
|
3374
|
+
`,
|
|
3375
|
+
os: `
|
|
3376
|
+
const _os = globalThis[Symbol.for('jb:os')];
|
|
3377
|
+
export const platform = _os.platform;
|
|
3378
|
+
export const arch = _os.arch;
|
|
3379
|
+
export const homedir = _os.homedir;
|
|
3380
|
+
export const tmpdir = _os.tmpdir;
|
|
3381
|
+
export const type = _os.type;
|
|
3382
|
+
export const hostname = _os.hostname;
|
|
3383
|
+
export const EOL = _os.EOL;
|
|
3384
|
+
export const cpus = _os.cpus;
|
|
3385
|
+
export const totalmem = _os.totalmem;
|
|
3386
|
+
export const freemem = _os.freemem;
|
|
3387
|
+
export const endianness = _os.endianness;
|
|
3388
|
+
export default _os;
|
|
3389
|
+
`,
|
|
3390
|
+
url: `
|
|
3391
|
+
const _url = globalThis[Symbol.for('jb:url')];
|
|
3392
|
+
export const URL = _url.URL;
|
|
3393
|
+
export const URLSearchParams = _url.URLSearchParams;
|
|
3394
|
+
export const parse = _url.parse;
|
|
3395
|
+
export const format = _url.format;
|
|
3396
|
+
export default _url;
|
|
3397
|
+
`,
|
|
3398
|
+
assert: `
|
|
3399
|
+
const _assert = globalThis[Symbol.for('jb:assert')];
|
|
3400
|
+
export const ok = _assert.ok;
|
|
3401
|
+
export const equal = _assert.equal;
|
|
3402
|
+
export const notEqual = _assert.notEqual;
|
|
3403
|
+
export const strictEqual = _assert.strictEqual;
|
|
3404
|
+
export const notStrictEqual = _assert.notStrictEqual;
|
|
3405
|
+
export const deepEqual = _assert.deepEqual;
|
|
3406
|
+
export const deepStrictEqual = _assert.deepStrictEqual;
|
|
3407
|
+
export const notDeepEqual = _assert.notDeepEqual;
|
|
3408
|
+
export const throws = _assert.throws;
|
|
3409
|
+
export const doesNotThrow = _assert.doesNotThrow;
|
|
3410
|
+
export const fail = _assert.fail;
|
|
3411
|
+
export default _assert;
|
|
3412
|
+
`,
|
|
3413
|
+
util: `
|
|
3414
|
+
const _util = globalThis[Symbol.for('jb:util')];
|
|
3415
|
+
export const format = _util.format;
|
|
3416
|
+
export const inspect = _util.inspect;
|
|
3417
|
+
export const promisify = _util.promisify;
|
|
3418
|
+
export const types = _util.types;
|
|
3419
|
+
export const inherits = _util.inherits;
|
|
3420
|
+
export default _util;
|
|
3421
|
+
`,
|
|
3422
|
+
events: `
|
|
3423
|
+
const _events = globalThis[Symbol.for('jb:events')];
|
|
3424
|
+
export const EventEmitter = _events.EventEmitter;
|
|
3425
|
+
export default _events;
|
|
3426
|
+
`,
|
|
3427
|
+
buffer: `
|
|
3428
|
+
const _buffer = globalThis[Symbol.for('jb:buffer')];
|
|
3429
|
+
export const Buffer = _buffer.Buffer;
|
|
3430
|
+
export default _buffer;
|
|
3431
|
+
`,
|
|
3432
|
+
stream: `
|
|
3433
|
+
const _stream = globalThis[Symbol.for('jb:stream')];
|
|
3434
|
+
export const Stream = _stream.Stream;
|
|
3435
|
+
export const Readable = _stream.Readable;
|
|
3436
|
+
export const Writable = _stream.Writable;
|
|
3437
|
+
export const Duplex = _stream.Duplex;
|
|
3438
|
+
export const Transform = _stream.Transform;
|
|
3439
|
+
export const PassThrough = _stream.PassThrough;
|
|
3440
|
+
export const pipeline = _stream.pipeline;
|
|
3441
|
+
export default _stream;
|
|
3442
|
+
`,
|
|
3443
|
+
string_decoder: `
|
|
3444
|
+
const _sd = globalThis[Symbol.for('jb:string_decoder')];
|
|
3445
|
+
export const StringDecoder = _sd.StringDecoder;
|
|
3446
|
+
export default _sd;
|
|
3447
|
+
`,
|
|
3448
|
+
querystring: `
|
|
3449
|
+
const _qs = globalThis[Symbol.for('jb:querystring')];
|
|
3450
|
+
export const parse = _qs.parse;
|
|
3451
|
+
export const stringify = _qs.stringify;
|
|
3452
|
+
export const escape = _qs.escape;
|
|
3453
|
+
export const unescape = _qs.unescape;
|
|
3454
|
+
export const decode = _qs.decode;
|
|
3455
|
+
export const encode = _qs.encode;
|
|
3456
|
+
export default _qs;
|
|
3457
|
+
`
|
|
3458
|
+
}
|
|
3459
|
+
);
|
|
3460
|
+
for (const [name, hint] of Object.entries(UNSUPPORTED_MODULES)) {
|
|
3461
|
+
VIRTUAL_MODULES[name] = `throw new Error("Module '${name}' is not available in the js-exec sandbox. ${hint} Run 'js-exec --help' for available modules.");`;
|
|
3462
|
+
}
|
|
3463
|
+
function setupContext(context, backend, input) {
|
|
3464
|
+
const consoleObj = context.newObject();
|
|
3465
|
+
const logFn = context.newFunction("log", (...args) => {
|
|
3466
|
+
const parts = args.map((a) => {
|
|
3467
|
+
const val = context.dump(a);
|
|
3468
|
+
return typeof val === "string" ? val : JSON.stringify(val);
|
|
3469
|
+
});
|
|
3470
|
+
try {
|
|
3471
|
+
backend.writeStdout(`${parts.join(" ")}
|
|
3472
|
+
`);
|
|
3473
|
+
} catch (e) {
|
|
3474
|
+
return throwError(context, e.message || "write failed");
|
|
3475
|
+
}
|
|
3476
|
+
return context.undefined;
|
|
3477
|
+
});
|
|
3478
|
+
context.setProp(consoleObj, "log", logFn);
|
|
3479
|
+
logFn.dispose();
|
|
3480
|
+
const errorFn = context.newFunction("error", (...args) => {
|
|
3481
|
+
const parts = args.map((a) => {
|
|
3482
|
+
const val = context.dump(a);
|
|
3483
|
+
return typeof val === "string" ? val : JSON.stringify(val);
|
|
3484
|
+
});
|
|
3485
|
+
try {
|
|
3486
|
+
backend.writeStderr(`${parts.join(" ")}
|
|
3487
|
+
`);
|
|
3488
|
+
} catch (e) {
|
|
3489
|
+
return throwError(context, e.message || "write failed");
|
|
3490
|
+
}
|
|
3491
|
+
return context.undefined;
|
|
3492
|
+
});
|
|
3493
|
+
context.setProp(consoleObj, "error", errorFn);
|
|
3494
|
+
errorFn.dispose();
|
|
3495
|
+
const warnFn = context.newFunction("warn", (...args) => {
|
|
3496
|
+
const parts = args.map((a) => {
|
|
3497
|
+
const val = context.dump(a);
|
|
3498
|
+
return typeof val === "string" ? val : JSON.stringify(val);
|
|
3499
|
+
});
|
|
3500
|
+
try {
|
|
3501
|
+
backend.writeStderr(`${parts.join(" ")}
|
|
3502
|
+
`);
|
|
3503
|
+
} catch (e) {
|
|
3504
|
+
return throwError(context, e.message || "write failed");
|
|
3505
|
+
}
|
|
3506
|
+
return context.undefined;
|
|
3507
|
+
});
|
|
3508
|
+
context.setProp(consoleObj, "warn", warnFn);
|
|
3509
|
+
warnFn.dispose();
|
|
3510
|
+
context.setProp(context.global, "console", consoleObj);
|
|
3511
|
+
consoleObj.dispose();
|
|
3512
|
+
const fsObj = context.newObject();
|
|
3513
|
+
const readFileFn = context.newFunction(
|
|
3514
|
+
"readFile",
|
|
3515
|
+
(pathHandle) => {
|
|
3516
|
+
const path = context.getString(pathHandle);
|
|
3517
|
+
try {
|
|
3518
|
+
const data = backend.readFile(path);
|
|
3519
|
+
return context.newString(new TextDecoder().decode(data));
|
|
3520
|
+
} catch (e) {
|
|
3521
|
+
return throwError(context, e.message || "readFile failed");
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
);
|
|
3525
|
+
context.setProp(fsObj, "readFile", readFileFn);
|
|
3526
|
+
readFileFn.dispose();
|
|
3527
|
+
const readFileBufferFn = context.newFunction(
|
|
3528
|
+
"readFileBuffer",
|
|
3529
|
+
(pathHandle) => {
|
|
3530
|
+
const path = context.getString(pathHandle);
|
|
3531
|
+
try {
|
|
3532
|
+
const data = backend.readFile(path);
|
|
3533
|
+
return context.newArrayBuffer(
|
|
3534
|
+
data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength)
|
|
3535
|
+
);
|
|
3536
|
+
} catch (e) {
|
|
3537
|
+
return throwError(
|
|
3538
|
+
context,
|
|
3539
|
+
e.message || "readFileBuffer failed"
|
|
3540
|
+
);
|
|
3541
|
+
}
|
|
3542
|
+
}
|
|
3543
|
+
);
|
|
3544
|
+
context.setProp(fsObj, "readFileBuffer", readFileBufferFn);
|
|
3545
|
+
readFileBufferFn.dispose();
|
|
3546
|
+
const writeFileFn = context.newFunction(
|
|
3547
|
+
"writeFile",
|
|
3548
|
+
(pathHandle, dataHandle) => {
|
|
3549
|
+
const path = context.getString(pathHandle);
|
|
3550
|
+
const data = context.getString(dataHandle);
|
|
3551
|
+
try {
|
|
3552
|
+
backend.writeFile(path, new TextEncoder().encode(data));
|
|
3553
|
+
return context.undefined;
|
|
3554
|
+
} catch (e) {
|
|
3555
|
+
return throwError(context, e.message || "writeFile failed");
|
|
3556
|
+
}
|
|
3557
|
+
}
|
|
3558
|
+
);
|
|
3559
|
+
context.setProp(fsObj, "writeFile", writeFileFn);
|
|
3560
|
+
writeFileFn.dispose();
|
|
3561
|
+
const statFn = context.newFunction("stat", (pathHandle) => {
|
|
3562
|
+
const path = context.getString(pathHandle);
|
|
3563
|
+
try {
|
|
3564
|
+
const stat = backend.stat(path);
|
|
3565
|
+
return jsToHandle(context, {
|
|
3566
|
+
isFile: stat.isFile,
|
|
3567
|
+
isDirectory: stat.isDirectory,
|
|
3568
|
+
isSymbolicLink: stat.isSymbolicLink,
|
|
3569
|
+
mode: stat.mode,
|
|
3570
|
+
size: stat.size,
|
|
3571
|
+
mtime: stat.mtime.toISOString()
|
|
3572
|
+
});
|
|
3573
|
+
} catch (e) {
|
|
3574
|
+
return throwError(context, e.message || "stat failed");
|
|
3575
|
+
}
|
|
3576
|
+
});
|
|
3577
|
+
context.setProp(fsObj, "stat", statFn);
|
|
3578
|
+
statFn.dispose();
|
|
3579
|
+
const readdirFn = context.newFunction(
|
|
3580
|
+
"readdir",
|
|
3581
|
+
(pathHandle) => {
|
|
3582
|
+
const path = context.getString(pathHandle);
|
|
3583
|
+
try {
|
|
3584
|
+
const entries = backend.readdir(path);
|
|
3585
|
+
return jsToHandle(context, entries);
|
|
3586
|
+
} catch (e) {
|
|
3587
|
+
return throwError(context, e.message || "readdir failed");
|
|
3588
|
+
}
|
|
3589
|
+
}
|
|
3590
|
+
);
|
|
3591
|
+
context.setProp(fsObj, "readdir", readdirFn);
|
|
3592
|
+
readdirFn.dispose();
|
|
3593
|
+
const mkdirFn = context.newFunction(
|
|
3594
|
+
"mkdir",
|
|
3595
|
+
(pathHandle, optsHandle) => {
|
|
3596
|
+
const path = context.getString(pathHandle);
|
|
3597
|
+
let recursive = false;
|
|
3598
|
+
if (optsHandle) {
|
|
3599
|
+
const opts = context.dump(optsHandle);
|
|
3600
|
+
if (opts && typeof opts === "object" && "recursive" in opts) {
|
|
3601
|
+
recursive = Boolean(opts.recursive);
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
try {
|
|
3605
|
+
backend.mkdir(path, recursive);
|
|
3606
|
+
return context.undefined;
|
|
3607
|
+
} catch (e) {
|
|
3608
|
+
return throwError(context, e.message || "mkdir failed");
|
|
3609
|
+
}
|
|
3610
|
+
}
|
|
3611
|
+
);
|
|
3612
|
+
context.setProp(fsObj, "mkdir", mkdirFn);
|
|
3613
|
+
mkdirFn.dispose();
|
|
3614
|
+
const rmFn = context.newFunction(
|
|
3615
|
+
"rm",
|
|
3616
|
+
(pathHandle, optsHandle) => {
|
|
3617
|
+
const path = context.getString(pathHandle);
|
|
3618
|
+
let recursive = false;
|
|
3619
|
+
let force = false;
|
|
3620
|
+
if (optsHandle) {
|
|
3621
|
+
const opts = context.dump(optsHandle);
|
|
3622
|
+
if (opts && typeof opts === "object") {
|
|
3623
|
+
if ("recursive" in opts) recursive = Boolean(opts.recursive);
|
|
3624
|
+
if ("force" in opts) force = Boolean(opts.force);
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
try {
|
|
3628
|
+
backend.rm(path, recursive, force);
|
|
3629
|
+
return context.undefined;
|
|
3630
|
+
} catch (e) {
|
|
3631
|
+
return throwError(context, e.message || "rm failed");
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
);
|
|
3635
|
+
context.setProp(fsObj, "rm", rmFn);
|
|
3636
|
+
rmFn.dispose();
|
|
3637
|
+
const existsFn = context.newFunction(
|
|
3638
|
+
"exists",
|
|
3639
|
+
(pathHandle) => {
|
|
3640
|
+
const path = context.getString(pathHandle);
|
|
3641
|
+
return backend.exists(path) ? context.true : context.false;
|
|
3642
|
+
}
|
|
3643
|
+
);
|
|
3644
|
+
context.setProp(fsObj, "exists", existsFn);
|
|
3645
|
+
existsFn.dispose();
|
|
3646
|
+
const appendFileFn = context.newFunction(
|
|
3647
|
+
"appendFile",
|
|
3648
|
+
(pathHandle, dataHandle) => {
|
|
3649
|
+
const path = context.getString(pathHandle);
|
|
3650
|
+
const data = context.getString(dataHandle);
|
|
3651
|
+
try {
|
|
3652
|
+
backend.appendFile(path, new TextEncoder().encode(data));
|
|
3653
|
+
return context.undefined;
|
|
3654
|
+
} catch (e) {
|
|
3655
|
+
return throwError(context, e.message || "appendFile failed");
|
|
3656
|
+
}
|
|
3657
|
+
}
|
|
3658
|
+
);
|
|
3659
|
+
context.setProp(fsObj, "appendFile", appendFileFn);
|
|
3660
|
+
appendFileFn.dispose();
|
|
3661
|
+
const lstatFn = context.newFunction("lstat", (pathHandle) => {
|
|
3662
|
+
const path = context.getString(pathHandle);
|
|
3663
|
+
try {
|
|
3664
|
+
const s = backend.lstat(path);
|
|
3665
|
+
return jsToHandle(context, {
|
|
3666
|
+
isFile: s.isFile,
|
|
3667
|
+
isDirectory: s.isDirectory,
|
|
3668
|
+
isSymbolicLink: s.isSymbolicLink,
|
|
3669
|
+
mode: s.mode,
|
|
3670
|
+
size: s.size,
|
|
3671
|
+
mtime: s.mtime.toISOString()
|
|
3672
|
+
});
|
|
3673
|
+
} catch (e) {
|
|
3674
|
+
return throwError(context, e.message || "lstat failed");
|
|
3675
|
+
}
|
|
3676
|
+
});
|
|
3677
|
+
context.setProp(fsObj, "lstat", lstatFn);
|
|
3678
|
+
lstatFn.dispose();
|
|
3679
|
+
const symlinkFn = context.newFunction(
|
|
3680
|
+
"symlink",
|
|
3681
|
+
(targetHandle, pathHandle) => {
|
|
3682
|
+
const target = context.getString(targetHandle);
|
|
3683
|
+
const linkPath = context.getString(pathHandle);
|
|
3684
|
+
try {
|
|
3685
|
+
backend.symlink(target, linkPath);
|
|
3686
|
+
return context.undefined;
|
|
3687
|
+
} catch (e) {
|
|
3688
|
+
return throwError(context, e.message || "symlink failed");
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3691
|
+
);
|
|
3692
|
+
context.setProp(fsObj, "symlink", symlinkFn);
|
|
3693
|
+
symlinkFn.dispose();
|
|
3694
|
+
const readlinkFn = context.newFunction(
|
|
3695
|
+
"readlink",
|
|
3696
|
+
(pathHandle) => {
|
|
3697
|
+
const path = context.getString(pathHandle);
|
|
3698
|
+
try {
|
|
3699
|
+
const target = backend.readlink(path);
|
|
3700
|
+
return context.newString(target);
|
|
3701
|
+
} catch (e) {
|
|
3702
|
+
return throwError(context, e.message || "readlink failed");
|
|
3703
|
+
}
|
|
3704
|
+
}
|
|
3705
|
+
);
|
|
3706
|
+
context.setProp(fsObj, "readlink", readlinkFn);
|
|
3707
|
+
readlinkFn.dispose();
|
|
3708
|
+
const chmodFn = context.newFunction(
|
|
3709
|
+
"chmod",
|
|
3710
|
+
(pathHandle, modeHandle) => {
|
|
3711
|
+
const path = context.getString(pathHandle);
|
|
3712
|
+
const mode = context.dump(modeHandle);
|
|
3713
|
+
try {
|
|
3714
|
+
backend.chmod(path, typeof mode === "number" ? mode : 0);
|
|
3715
|
+
return context.undefined;
|
|
3716
|
+
} catch (e) {
|
|
3717
|
+
return throwError(context, e.message || "chmod failed");
|
|
3718
|
+
}
|
|
3719
|
+
}
|
|
3720
|
+
);
|
|
3721
|
+
context.setProp(fsObj, "chmod", chmodFn);
|
|
3722
|
+
chmodFn.dispose();
|
|
3723
|
+
const realpathFn = context.newFunction(
|
|
3724
|
+
"realpath",
|
|
3725
|
+
(pathHandle) => {
|
|
3726
|
+
const path = context.getString(pathHandle);
|
|
3727
|
+
try {
|
|
3728
|
+
const resolved = backend.realpath(path);
|
|
3729
|
+
return context.newString(resolved);
|
|
3730
|
+
} catch (e) {
|
|
3731
|
+
return throwError(context, e.message || "realpath failed");
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
);
|
|
3735
|
+
context.setProp(fsObj, "realpath", realpathFn);
|
|
3736
|
+
realpathFn.dispose();
|
|
3737
|
+
const renameFn = context.newFunction(
|
|
3738
|
+
"rename",
|
|
3739
|
+
(oldHandle, newHandle) => {
|
|
3740
|
+
const oldPath = context.getString(oldHandle);
|
|
3741
|
+
const newPath = context.getString(newHandle);
|
|
3742
|
+
try {
|
|
3743
|
+
backend.rename(oldPath, newPath);
|
|
3744
|
+
return context.undefined;
|
|
3745
|
+
} catch (e) {
|
|
3746
|
+
return throwError(context, e.message || "rename failed");
|
|
3747
|
+
}
|
|
3748
|
+
}
|
|
3749
|
+
);
|
|
3750
|
+
context.setProp(fsObj, "rename", renameFn);
|
|
3751
|
+
renameFn.dispose();
|
|
3752
|
+
const copyFileFn = context.newFunction(
|
|
3753
|
+
"copyFile",
|
|
3754
|
+
(srcHandle, destHandle) => {
|
|
3755
|
+
const src = context.getString(srcHandle);
|
|
3756
|
+
const dest = context.getString(destHandle);
|
|
3757
|
+
try {
|
|
3758
|
+
backend.copyFile(src, dest);
|
|
3759
|
+
return context.undefined;
|
|
3760
|
+
} catch (e) {
|
|
3761
|
+
return throwError(context, e.message || "copyFile failed");
|
|
3762
|
+
}
|
|
3763
|
+
}
|
|
3764
|
+
);
|
|
3765
|
+
context.setProp(fsObj, "copyFile", copyFileFn);
|
|
3766
|
+
copyFileFn.dispose();
|
|
3767
|
+
context.setProp(context.global, "fs", fsObj);
|
|
3768
|
+
fsObj.dispose();
|
|
3769
|
+
const fetchFn = context.newFunction(
|
|
3770
|
+
"fetch",
|
|
3771
|
+
(urlHandle, optsHandle) => {
|
|
3772
|
+
const url = context.getString(urlHandle);
|
|
3773
|
+
let options;
|
|
3774
|
+
if (optsHandle) {
|
|
3775
|
+
options = context.dump(optsHandle);
|
|
3776
|
+
}
|
|
3777
|
+
try {
|
|
3778
|
+
const result = backend.httpRequest(url, {
|
|
3779
|
+
method: options?.method,
|
|
3780
|
+
headers: options?.headers,
|
|
3781
|
+
body: options?.body
|
|
3782
|
+
});
|
|
3783
|
+
return jsToHandle(context, result);
|
|
3784
|
+
} catch (e) {
|
|
3785
|
+
return throwError(context, e.message || "fetch failed");
|
|
3786
|
+
}
|
|
3787
|
+
}
|
|
3788
|
+
);
|
|
3789
|
+
context.setProp(context.global, "__fetch", fetchFn);
|
|
3790
|
+
fetchFn.dispose();
|
|
3791
|
+
const execFn = context.newFunction(
|
|
3792
|
+
"exec",
|
|
3793
|
+
(cmdHandle, optsHandle) => {
|
|
3794
|
+
const command = context.getString(cmdHandle);
|
|
3795
|
+
let stdin;
|
|
3796
|
+
if (optsHandle) {
|
|
3797
|
+
const opts = context.dump(optsHandle);
|
|
3798
|
+
if (opts?.stdin) {
|
|
3799
|
+
stdin = String(opts.stdin);
|
|
3800
|
+
}
|
|
3801
|
+
}
|
|
3802
|
+
try {
|
|
3803
|
+
const result = backend.execCommand(command, stdin);
|
|
3804
|
+
return jsToHandle(context, result);
|
|
3805
|
+
} catch (e) {
|
|
3806
|
+
return throwError(context, e.message || "exec failed");
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
);
|
|
3810
|
+
context.setProp(context.global, "__exec", execFn);
|
|
3811
|
+
execFn.dispose();
|
|
3812
|
+
const execArgsFn = context.newFunction(
|
|
3813
|
+
"execArgs",
|
|
3814
|
+
(cmdHandle, argsHandle) => {
|
|
3815
|
+
const command = context.getString(cmdHandle);
|
|
3816
|
+
const args = context.dump(argsHandle);
|
|
3817
|
+
try {
|
|
3818
|
+
const result = backend.execCommandArgs(command, args);
|
|
3819
|
+
return jsToHandle(context, result);
|
|
3820
|
+
} catch (e) {
|
|
3821
|
+
return throwError(context, e.message || "exec failed");
|
|
3822
|
+
}
|
|
3823
|
+
}
|
|
3824
|
+
);
|
|
3825
|
+
context.setProp(context.global, "__execArgs", execArgsFn);
|
|
3826
|
+
execArgsFn.dispose();
|
|
3827
|
+
const envObj = jsToHandle(context, input.env);
|
|
3828
|
+
context.setProp(context.global, "env", envObj);
|
|
3829
|
+
envObj.dispose();
|
|
3830
|
+
const processObj = context.newObject();
|
|
3831
|
+
const argv = [input.scriptPath || "js-exec", ...input.args];
|
|
3832
|
+
const argvHandle = jsToHandle(context, argv);
|
|
3833
|
+
context.setProp(processObj, "argv", argvHandle);
|
|
3834
|
+
argvHandle.dispose();
|
|
3835
|
+
const cwdFn = context.newFunction("cwd", () => {
|
|
3836
|
+
return context.newString(input.cwd);
|
|
3837
|
+
});
|
|
3838
|
+
context.setProp(processObj, "cwd", cwdFn);
|
|
3839
|
+
cwdFn.dispose();
|
|
3840
|
+
const exitFn = context.newFunction("exit", (codeHandle) => {
|
|
3841
|
+
let code = 0;
|
|
3842
|
+
if (codeHandle) {
|
|
3843
|
+
const val = context.dump(codeHandle);
|
|
3844
|
+
code = typeof val === "number" ? val : 0;
|
|
3845
|
+
}
|
|
3846
|
+
backend.exit(code);
|
|
3847
|
+
return throwError(context, "__EXIT__");
|
|
3848
|
+
});
|
|
3849
|
+
context.setProp(processObj, "exit", exitFn);
|
|
3850
|
+
exitFn.dispose();
|
|
3851
|
+
context.setProp(context.global, "process", processObj);
|
|
3852
|
+
processObj.dispose();
|
|
3853
|
+
const compatResult = context.evalCode(
|
|
3854
|
+
`(function() {
|
|
3855
|
+
// Bridge native handles from string keys (set by QuickJS setProp) to symbol keys
|
|
3856
|
+
globalThis[Symbol.for('jb:fetch')] = globalThis.__fetch;
|
|
3857
|
+
globalThis[Symbol.for('jb:exec')] = globalThis.__exec;
|
|
3858
|
+
globalThis[Symbol.for('jb:execArgs')] = globalThis.__execArgs;
|
|
3859
|
+
delete globalThis.__fetch;
|
|
3860
|
+
delete globalThis.__exec;
|
|
3861
|
+
delete globalThis.__execArgs;
|
|
3862
|
+
|
|
3863
|
+
var _fs = globalThis.fs;
|
|
3864
|
+
// Save original native functions
|
|
3865
|
+
var orig = Object.create(null);
|
|
3866
|
+
var allNames = [
|
|
3867
|
+
'readFile', 'readFileBuffer', 'writeFile', 'stat', 'lstat', 'readdir',
|
|
3868
|
+
'mkdir', 'rm', 'exists', 'appendFile', 'symlink', 'readlink',
|
|
3869
|
+
'chmod', 'realpath', 'rename', 'copyFile'
|
|
3870
|
+
];
|
|
3871
|
+
for (var i = 0; i < allNames.length; i++) {
|
|
3872
|
+
orig[allNames[i]] = _fs[allNames[i]];
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3875
|
+
// Wrap async-style methods to always throw (matching Node.js which requires a callback).
|
|
3876
|
+
// In Node.js, calling fs.readFile() without a callback throws TypeError.
|
|
3877
|
+
// We don't support callbacks, so the async form always errors.
|
|
3878
|
+
function wrapCb(fn, name) {
|
|
3879
|
+
return function() {
|
|
3880
|
+
throw new Error(
|
|
3881
|
+
"fs." + name + "() with callbacks is not supported. " +
|
|
3882
|
+
"Use fs." + name + "Sync() or fs.promises." + name + "() instead."
|
|
3883
|
+
);
|
|
3884
|
+
};
|
|
3885
|
+
}
|
|
3886
|
+
var cbNames = [
|
|
3887
|
+
'readFile', 'writeFile', 'stat', 'lstat', 'readdir', 'mkdir',
|
|
3888
|
+
'rm', 'appendFile', 'symlink', 'readlink', 'chmod', 'realpath',
|
|
3889
|
+
'rename', 'copyFile'
|
|
3890
|
+
];
|
|
3891
|
+
for (var i = 0; i < cbNames.length; i++) {
|
|
3892
|
+
if (orig[cbNames[i]]) _fs[cbNames[i]] = wrapCb(orig[cbNames[i]], cbNames[i]);
|
|
3893
|
+
}
|
|
3894
|
+
// exists: callback is especially common in legacy Node.js
|
|
3895
|
+
_fs.exists = wrapCb(orig.exists, 'exists');
|
|
3896
|
+
|
|
3897
|
+
// readFileSync: match Node.js behavior
|
|
3898
|
+
// - No encoding: return Buffer
|
|
3899
|
+
// - With encoding (e.g. 'utf8'): return string
|
|
3900
|
+
_fs.readFileSync = function(path, opts) {
|
|
3901
|
+
var encoding = typeof opts === 'string' ? opts : (opts && opts.encoding);
|
|
3902
|
+
if (encoding) return orig.readFile(path);
|
|
3903
|
+
return Buffer.from(orig.readFileBuffer(path));
|
|
3904
|
+
};
|
|
3905
|
+
_fs.writeFileSync = orig.writeFile;
|
|
3906
|
+
_fs.statSync = orig.stat;
|
|
3907
|
+
_fs.lstatSync = orig.lstat;
|
|
3908
|
+
_fs.readdirSync = orig.readdir;
|
|
3909
|
+
_fs.mkdirSync = orig.mkdir;
|
|
3910
|
+
_fs.rmSync = orig.rm;
|
|
3911
|
+
_fs.existsSync = orig.exists;
|
|
3912
|
+
_fs.appendFileSync = orig.appendFile;
|
|
3913
|
+
_fs.symlinkSync = orig.symlink;
|
|
3914
|
+
_fs.readlinkSync = orig.readlink;
|
|
3915
|
+
_fs.chmodSync = orig.chmod;
|
|
3916
|
+
_fs.realpathSync = orig.realpath;
|
|
3917
|
+
_fs.renameSync = orig.rename;
|
|
3918
|
+
_fs.copyFileSync = orig.copyFile;
|
|
3919
|
+
_fs.unlinkSync = orig.rm;
|
|
3920
|
+
_fs.rmdirSync = orig.rm;
|
|
3921
|
+
_fs.unlink = wrapCb(orig.rm, 'unlink');
|
|
3922
|
+
_fs.rmdir = wrapCb(orig.rm, 'rmdir');
|
|
3923
|
+
|
|
3924
|
+
// promises namespace
|
|
3925
|
+
_fs.promises = {};
|
|
3926
|
+
for (var i = 0; i < allNames.length; i++) {
|
|
3927
|
+
var m = allNames[i];
|
|
3928
|
+
(function(fn) {
|
|
3929
|
+
_fs.promises[m] = function() {
|
|
3930
|
+
try { return Promise.resolve(fn.apply(null, arguments)); }
|
|
3931
|
+
catch(e) { return Promise.reject(e); }
|
|
3932
|
+
};
|
|
3933
|
+
})(orig[m]);
|
|
3934
|
+
}
|
|
3935
|
+
// Override promises.readFile to match Node.js behavior (Buffer vs string)
|
|
3936
|
+
_fs.promises.readFile = function(path, opts) {
|
|
3937
|
+
var encoding = typeof opts === 'string' ? opts : (opts && opts.encoding);
|
|
3938
|
+
try {
|
|
3939
|
+
if (encoding) return Promise.resolve(orig.readFile(path));
|
|
3940
|
+
return Promise.resolve(Buffer.from(orig.readFileBuffer(path)));
|
|
3941
|
+
} catch(e) { return Promise.reject(e); }
|
|
3942
|
+
};
|
|
3943
|
+
_fs.promises.unlink = _fs.promises.rm;
|
|
3944
|
+
_fs.promises.rmdir = _fs.promises.rm;
|
|
3945
|
+
_fs.promises.access = function(p) {
|
|
3946
|
+
return orig.exists(p) ? Promise.resolve() : Promise.reject(new Error('ENOENT: no such file or directory: ' + p));
|
|
3947
|
+
};
|
|
3948
|
+
|
|
3949
|
+
// process enhancements
|
|
3950
|
+
var _p = globalThis.process;
|
|
3951
|
+
_p.env = globalThis.env;
|
|
3952
|
+
_p.platform = 'linux';
|
|
3953
|
+
_p.arch = 'x64';
|
|
3954
|
+
_p.versions = { node: '22.0.0', quickjs: '2024' };
|
|
3955
|
+
_p.version = 'v22.0.0';
|
|
3956
|
+
|
|
3957
|
+
// Initialize path module on globalThis so require('path') works
|
|
3958
|
+
${PATH_MODULE_SOURCE}
|
|
3959
|
+
|
|
3960
|
+
// Initialize fetch polyfill (URL, Headers, Request, Response, fetch)
|
|
3961
|
+
${FETCH_POLYFILL_SOURCE}
|
|
3962
|
+
|
|
3963
|
+
// Initialize additional module shims
|
|
3964
|
+
${EVENTS_MODULE_SOURCE}
|
|
3965
|
+
${OS_MODULE_SOURCE}
|
|
3966
|
+
${URL_MODULE_SOURCE}
|
|
3967
|
+
${ASSERT_MODULE_SOURCE}
|
|
3968
|
+
${UTIL_MODULE_SOURCE}
|
|
3969
|
+
${BUFFER_MODULE_SOURCE}
|
|
3970
|
+
${STREAM_MODULE_SOURCE}
|
|
3971
|
+
${STRING_DECODER_MODULE_SOURCE}
|
|
3972
|
+
${QUERYSTRING_MODULE_SOURCE}
|
|
3973
|
+
|
|
3974
|
+
// Wrap console methods to auto-stringify Buffer arguments.
|
|
3975
|
+
// In Node.js, console.log(buffer) calls util.inspect \u2192 toString().
|
|
3976
|
+
(function() {
|
|
3977
|
+
var _cl = console.log;
|
|
3978
|
+
var _ce = console.error;
|
|
3979
|
+
var _cw = console.warn;
|
|
3980
|
+
function fix(a) { return a instanceof Buffer ? a.toString() : a; }
|
|
3981
|
+
function wrap(fn) {
|
|
3982
|
+
return function() {
|
|
3983
|
+
var a = [];
|
|
3984
|
+
for (var i = 0; i < arguments.length; i++) a.push(fix(arguments[i]));
|
|
3985
|
+
return fn.apply(console, a);
|
|
3986
|
+
};
|
|
3987
|
+
}
|
|
3988
|
+
console.log = wrap(_cl);
|
|
3989
|
+
console.error = wrap(_ce);
|
|
3990
|
+
console.warn = wrap(_cw);
|
|
3991
|
+
})();
|
|
3992
|
+
|
|
3993
|
+
// require() shim for CommonJS compatibility
|
|
3994
|
+
var _execFn = globalThis[Symbol.for('jb:exec')];
|
|
3995
|
+
var _execArgsFn = globalThis[Symbol.for('jb:execArgs')];
|
|
3996
|
+
var _childProcess = {
|
|
3997
|
+
exec: function(cmd, opts) { return _execFn(cmd, opts); },
|
|
3998
|
+
execSync: function(cmd, opts) {
|
|
3999
|
+
var r = _execFn(cmd, opts);
|
|
4000
|
+
if (r.exitCode !== 0) {
|
|
4001
|
+
var e = new Error('Command failed: ' + cmd);
|
|
4002
|
+
e.status = r.exitCode;
|
|
4003
|
+
e.stderr = r.stderr;
|
|
4004
|
+
e.stdout = r.stdout;
|
|
4005
|
+
throw e;
|
|
4006
|
+
}
|
|
4007
|
+
return r.stdout;
|
|
4008
|
+
},
|
|
4009
|
+
spawnSync: function(cmd, args, opts) {
|
|
4010
|
+
var r = _execArgsFn(cmd, args || []);
|
|
4011
|
+
return { stdout: r.stdout, stderr: r.stderr, status: r.exitCode };
|
|
4012
|
+
}
|
|
4013
|
+
};
|
|
4014
|
+
|
|
4015
|
+
var _modules = Object.create(null);
|
|
4016
|
+
_modules.fs = _fs;
|
|
4017
|
+
_modules.path = globalThis[Symbol.for('jb:path')];
|
|
4018
|
+
_modules.child_process = _childProcess;
|
|
4019
|
+
_modules.process = _p;
|
|
4020
|
+
_modules.console = globalThis.console;
|
|
4021
|
+
_modules.os = globalThis[Symbol.for('jb:os')];
|
|
4022
|
+
_modules.url = globalThis[Symbol.for('jb:url')];
|
|
4023
|
+
_modules.assert = globalThis[Symbol.for('jb:assert')];
|
|
4024
|
+
_modules.util = globalThis[Symbol.for('jb:util')];
|
|
4025
|
+
_modules.events = globalThis[Symbol.for('jb:events')];
|
|
4026
|
+
_modules.buffer = globalThis[Symbol.for('jb:buffer')];
|
|
4027
|
+
_modules.stream = globalThis[Symbol.for('jb:stream')];
|
|
4028
|
+
_modules.string_decoder = globalThis[Symbol.for('jb:string_decoder')];
|
|
4029
|
+
_modules.querystring = globalThis[Symbol.for('jb:querystring')];
|
|
4030
|
+
|
|
4031
|
+
var _unsupported = Object.create(null);
|
|
4032
|
+
var _unsupportedRaw = ${JSON.stringify(UNSUPPORTED_MODULES)};
|
|
4033
|
+
Object.keys(_unsupportedRaw).forEach(function(_key) {
|
|
4034
|
+
_unsupported[_key] = _unsupportedRaw[_key];
|
|
4035
|
+
});
|
|
4036
|
+
|
|
4037
|
+
globalThis.require = function(name) {
|
|
4038
|
+
if (name.startsWith('node:')) name = name.slice(5);
|
|
4039
|
+
if (Object.prototype.hasOwnProperty.call(_modules, name)) {
|
|
4040
|
+
return _modules[name];
|
|
4041
|
+
}
|
|
4042
|
+
if (Object.prototype.hasOwnProperty.call(_unsupported, name)) {
|
|
4043
|
+
var hint = _unsupported[name];
|
|
4044
|
+
throw new Error("Module '" + name + "' is not available in the js-exec sandbox. " + hint + " Run 'js-exec --help' for available modules.");
|
|
4045
|
+
}
|
|
4046
|
+
throw new Error("Cannot find module '" + name + "'. Run 'js-exec --help' for available modules.");
|
|
4047
|
+
};
|
|
4048
|
+
globalThis.require.resolve = function(name) { return name; };
|
|
4049
|
+
})();`,
|
|
4050
|
+
"<compat>"
|
|
4051
|
+
);
|
|
4052
|
+
if (compatResult.error) {
|
|
4053
|
+
compatResult.error.dispose();
|
|
4054
|
+
} else {
|
|
4055
|
+
compatResult.value.dispose();
|
|
4056
|
+
}
|
|
4057
|
+
}
|
|
4058
|
+
var originalProcessExit = process.exit.bind(process);
|
|
4059
|
+
process.on("uncaughtException", () => {
|
|
4060
|
+
originalProcessExit(1);
|
|
4061
|
+
});
|
|
4062
|
+
var defense = null;
|
|
4063
|
+
async function initializeWithDefense() {
|
|
4064
|
+
await getQuickJSModule();
|
|
4065
|
+
try {
|
|
4066
|
+
stripTypeScriptTypes("const x = 1;");
|
|
4067
|
+
} catch {
|
|
4068
|
+
}
|
|
4069
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
4070
|
+
defense = new WorkerDefenseInDepth({
|
|
4071
|
+
excludeViolationTypes: [
|
|
4072
|
+
// SharedArrayBuffer/Atomics: Used by sync-backend for synchronous
|
|
4073
|
+
// filesystem communication between the worker and main thread.
|
|
4074
|
+
"shared_array_buffer",
|
|
4075
|
+
"atomics",
|
|
4076
|
+
// process.stdout/stderr: Emscripten (quickjs-emscripten) routes WASM
|
|
4077
|
+
// stdout/stderr through Node.js console which uses process.stdout/stderr.
|
|
4078
|
+
// User code runs inside QuickJS with no access to Node.js process.
|
|
4079
|
+
"process_stdout",
|
|
4080
|
+
"process_stderr"
|
|
4081
|
+
]
|
|
4082
|
+
});
|
|
4083
|
+
}
|
|
4084
|
+
async function executeCode(input) {
|
|
4085
|
+
const qjs = await getQuickJSModule();
|
|
4086
|
+
const backend = new SyncBackend(input.sharedBuffer, input.timeoutMs);
|
|
4087
|
+
let runtime;
|
|
4088
|
+
let context;
|
|
4089
|
+
try {
|
|
4090
|
+
runtime = qjs.newRuntime();
|
|
4091
|
+
runtime.setMemoryLimit(MEMORY_LIMIT);
|
|
4092
|
+
let interruptCount = 0;
|
|
4093
|
+
runtime.setInterruptHandler(() => {
|
|
4094
|
+
interruptCount++;
|
|
4095
|
+
return interruptCount > INTERRUPT_CYCLES;
|
|
4096
|
+
});
|
|
4097
|
+
context = runtime.newContext();
|
|
4098
|
+
setupContext(context, backend, input);
|
|
4099
|
+
{
|
|
4100
|
+
const initResult = context.evalCode(
|
|
4101
|
+
`{
|
|
4102
|
+
// --- Block dynamic code compilation ---
|
|
4103
|
+
// @banned-pattern-ignore: intentional sandbox hardening \u2014 removes eval/Function inside QuickJS guest, not the host
|
|
4104
|
+
Object.defineProperty(globalThis, 'eval', {
|
|
4105
|
+
value: undefined,
|
|
4106
|
+
writable: false,
|
|
4107
|
+
configurable: false,
|
|
4108
|
+
});
|
|
4109
|
+
const BlockedFunction = function () {
|
|
4110
|
+
throw new TypeError('Function constructor is not allowed');
|
|
4111
|
+
};
|
|
4112
|
+
const OrigFunction = Function;
|
|
4113
|
+
BlockedFunction.prototype = OrigFunction.prototype;
|
|
4114
|
+
|
|
4115
|
+
// Capture function-type constructors before we patch them
|
|
4116
|
+
const AsyncFunction = (async function(){}).constructor;
|
|
4117
|
+
const GeneratorFunction = (function*(){}).constructor;
|
|
4118
|
+
const AsyncGeneratorFunction = (async function*(){}).constructor;
|
|
4119
|
+
|
|
4120
|
+
// Patch .constructor on all function-type prototypes
|
|
4121
|
+
for (const proto of [
|
|
4122
|
+
OrigFunction.prototype,
|
|
4123
|
+
AsyncFunction.prototype,
|
|
4124
|
+
GeneratorFunction.prototype,
|
|
4125
|
+
AsyncGeneratorFunction.prototype,
|
|
4126
|
+
]) {
|
|
4127
|
+
Object.defineProperty(proto, 'constructor', {
|
|
4128
|
+
value: BlockedFunction,
|
|
4129
|
+
writable: false,
|
|
4130
|
+
configurable: false,
|
|
4131
|
+
});
|
|
4132
|
+
}
|
|
4133
|
+
// @banned-pattern-ignore: intentional sandbox hardening \u2014 replaces Function constructor inside QuickJS guest
|
|
4134
|
+
Object.defineProperty(globalThis, 'Function', {
|
|
4135
|
+
value: BlockedFunction,
|
|
4136
|
+
writable: false,
|
|
4137
|
+
configurable: false,
|
|
4138
|
+
});
|
|
4139
|
+
|
|
4140
|
+
// --- Freeze all intrinsic prototypes ---
|
|
4141
|
+
// Prevents prototype pollution (e.g. Array.prototype.x = ...).
|
|
4142
|
+
// Only language intrinsics \u2014 not sandbox-injected objects
|
|
4143
|
+
// (process, console, require) which need to stay mutable.
|
|
4144
|
+
// Error prototypes are excluded: freezing them makes the inherited
|
|
4145
|
+
// "message" property non-writable, which prevents new Error instances
|
|
4146
|
+
// from having their own "message" set (JS spec OrdinarySet step 4).
|
|
4147
|
+
const g = globalThis;
|
|
4148
|
+
const toFreeze = [
|
|
4149
|
+
Object, Object.prototype,
|
|
4150
|
+
OrigFunction, OrigFunction.prototype,
|
|
4151
|
+
AsyncFunction, AsyncFunction.prototype,
|
|
4152
|
+
GeneratorFunction, GeneratorFunction.prototype,
|
|
4153
|
+
AsyncGeneratorFunction, AsyncGeneratorFunction.prototype,
|
|
4154
|
+
Array, Array.prototype,
|
|
4155
|
+
String, String.prototype,
|
|
4156
|
+
Number, Number.prototype,
|
|
4157
|
+
Boolean, Boolean.prototype,
|
|
4158
|
+
g.Symbol, g.Symbol && g.Symbol.prototype,
|
|
4159
|
+
RegExp, RegExp.prototype,
|
|
4160
|
+
Date, Date.prototype,
|
|
4161
|
+
Map, Map.prototype,
|
|
4162
|
+
Set, Set.prototype,
|
|
4163
|
+
WeakMap, WeakMap.prototype,
|
|
4164
|
+
WeakSet, WeakSet.prototype,
|
|
4165
|
+
g.WeakRef, g.WeakRef && g.WeakRef.prototype,
|
|
4166
|
+
Promise, Promise.prototype,
|
|
4167
|
+
ArrayBuffer, ArrayBuffer.prototype,
|
|
4168
|
+
g.SharedArrayBuffer, g.SharedArrayBuffer && g.SharedArrayBuffer.prototype,
|
|
4169
|
+
g.DataView, g.DataView && g.DataView.prototype,
|
|
4170
|
+
JSON, Math, g.Reflect, g.Proxy, g.Atomics,
|
|
4171
|
+
g.BigInt, g.BigInt && g.BigInt.prototype,
|
|
4172
|
+
BlockedFunction,
|
|
4173
|
+
];
|
|
4174
|
+
// TypedArrays (guard against missing globals in QuickJS)
|
|
4175
|
+
for (const name of [
|
|
4176
|
+
'Int8Array','Uint8Array','Uint8ClampedArray',
|
|
4177
|
+
'Int16Array','Uint16Array','Int32Array','Uint32Array',
|
|
4178
|
+
'Float32Array','Float64Array',
|
|
4179
|
+
'BigInt64Array','BigUint64Array',
|
|
4180
|
+
]) {
|
|
4181
|
+
if (g[name]) {
|
|
4182
|
+
toFreeze.push(g[name], g[name].prototype);
|
|
4183
|
+
}
|
|
4184
|
+
}
|
|
4185
|
+
// %TypedArray% intrinsic (shared base)
|
|
4186
|
+
if (g.Uint8Array) {
|
|
4187
|
+
const taProto = Object.getPrototypeOf(g.Uint8Array.prototype);
|
|
4188
|
+
if (taProto && taProto !== Object.prototype) toFreeze.push(taProto);
|
|
4189
|
+
const taCtor = Object.getPrototypeOf(g.Uint8Array);
|
|
4190
|
+
if (taCtor && taCtor !== OrigFunction.prototype) toFreeze.push(taCtor);
|
|
4191
|
+
}
|
|
4192
|
+
// Iterator prototypes
|
|
4193
|
+
try {
|
|
4194
|
+
const arrIterProto = Object.getPrototypeOf(
|
|
4195
|
+
Object.getPrototypeOf([][Symbol.iterator]())
|
|
4196
|
+
);
|
|
4197
|
+
if (arrIterProto) {
|
|
4198
|
+
toFreeze.push(arrIterProto);
|
|
4199
|
+
const iterProto = Object.getPrototypeOf(arrIterProto);
|
|
4200
|
+
if (iterProto) toFreeze.push(iterProto);
|
|
4201
|
+
}
|
|
4202
|
+
} catch {}
|
|
4203
|
+
try {
|
|
4204
|
+
toFreeze.push(Object.getPrototypeOf(new Map()[Symbol.iterator]()));
|
|
4205
|
+
} catch {}
|
|
4206
|
+
try {
|
|
4207
|
+
toFreeze.push(Object.getPrototypeOf(new Set()[Symbol.iterator]()));
|
|
4208
|
+
} catch {}
|
|
4209
|
+
try {
|
|
4210
|
+
toFreeze.push(Object.getPrototypeOf(''[Symbol.iterator]()));
|
|
4211
|
+
} catch {}
|
|
4212
|
+
try {
|
|
4213
|
+
const genObj = (function*(){})();
|
|
4214
|
+
toFreeze.push(Object.getPrototypeOf(genObj));
|
|
4215
|
+
toFreeze.push(Object.getPrototypeOf(Object.getPrototypeOf(genObj)));
|
|
4216
|
+
} catch {}
|
|
4217
|
+
try {
|
|
4218
|
+
const asyncGenObj = (async function*(){})();
|
|
4219
|
+
toFreeze.push(Object.getPrototypeOf(asyncGenObj));
|
|
4220
|
+
toFreeze.push(Object.getPrototypeOf(Object.getPrototypeOf(asyncGenObj)));
|
|
4221
|
+
} catch {}
|
|
4222
|
+
|
|
4223
|
+
for (const obj of toFreeze) {
|
|
4224
|
+
if (obj != null) {
|
|
4225
|
+
try { Object.freeze(obj); } catch {}
|
|
4226
|
+
}
|
|
4227
|
+
}
|
|
4228
|
+
}`,
|
|
4229
|
+
"<sandbox-init>"
|
|
4230
|
+
);
|
|
4231
|
+
if (initResult.error) {
|
|
4232
|
+
const errVal = context.dump(initResult.error);
|
|
4233
|
+
initResult.error.dispose();
|
|
4234
|
+
const msg = typeof errVal === "object" && errVal !== null && "message" in errVal ? errVal.message : String(errVal);
|
|
4235
|
+
backend.writeStderr(`js-exec: sandbox hardening failed: ${msg}
|
|
4236
|
+
`);
|
|
4237
|
+
backend.exit(1);
|
|
4238
|
+
return { success: true };
|
|
4239
|
+
}
|
|
4240
|
+
initResult.value.dispose();
|
|
4241
|
+
}
|
|
4242
|
+
if (input.isModule) {
|
|
4243
|
+
runtime.setModuleLoader(
|
|
4244
|
+
(moduleName) => {
|
|
4245
|
+
if (Object.hasOwn(VIRTUAL_MODULES, moduleName)) {
|
|
4246
|
+
return VIRTUAL_MODULES[moduleName];
|
|
4247
|
+
}
|
|
4248
|
+
try {
|
|
4249
|
+
const data = backend.readFile(moduleName);
|
|
4250
|
+
let source = new TextDecoder().decode(data);
|
|
4251
|
+
if (moduleName.endsWith(".ts") || moduleName.endsWith(".mts")) {
|
|
4252
|
+
source = stripTypeScriptTypes(source);
|
|
4253
|
+
}
|
|
4254
|
+
return source;
|
|
4255
|
+
} catch (e) {
|
|
4256
|
+
return {
|
|
4257
|
+
error: new Error(
|
|
4258
|
+
`Cannot find module '${moduleName}': ${e.message}`
|
|
4259
|
+
)
|
|
4260
|
+
};
|
|
4261
|
+
}
|
|
4262
|
+
},
|
|
4263
|
+
(baseModuleName, requestedName) => {
|
|
4264
|
+
if (requestedName.startsWith("node:")) {
|
|
4265
|
+
requestedName = requestedName.slice(5);
|
|
4266
|
+
}
|
|
4267
|
+
if (!requestedName.startsWith("./") && !requestedName.startsWith("../") && !requestedName.startsWith("/")) {
|
|
4268
|
+
return requestedName;
|
|
4269
|
+
}
|
|
4270
|
+
const fromFile = baseModuleName === "<eval>" ? void 0 : baseModuleName;
|
|
4271
|
+
return resolveModulePath(requestedName, fromFile, input.cwd);
|
|
4272
|
+
}
|
|
4273
|
+
);
|
|
4274
|
+
}
|
|
4275
|
+
if (input.bootstrapCode) {
|
|
4276
|
+
const bootstrapResult = context.evalCode(
|
|
4277
|
+
input.bootstrapCode,
|
|
4278
|
+
"bootstrap.js"
|
|
4279
|
+
);
|
|
4280
|
+
if (bootstrapResult.error) {
|
|
4281
|
+
const errorVal = context.dump(bootstrapResult.error);
|
|
4282
|
+
bootstrapResult.error.dispose();
|
|
4283
|
+
const errorMsg = formatError(errorVal);
|
|
4284
|
+
backend.writeStderr(`js-exec: bootstrap error: ${errorMsg}
|
|
4285
|
+
`);
|
|
4286
|
+
backend.exit(1);
|
|
4287
|
+
return { success: true };
|
|
4288
|
+
}
|
|
4289
|
+
bootstrapResult.value.dispose();
|
|
4290
|
+
}
|
|
4291
|
+
const filename = input.scriptPath || "<eval>";
|
|
4292
|
+
let jsCode = input.jsCode;
|
|
4293
|
+
if (input.stripTypes) {
|
|
4294
|
+
jsCode = stripTypeScriptTypes(jsCode);
|
|
4295
|
+
}
|
|
4296
|
+
const result = input.isModule ? context.evalCode(jsCode, filename, { type: "module" }) : context.evalCode(jsCode, filename);
|
|
4297
|
+
if (result.error) {
|
|
4298
|
+
const errorVal = context.dump(result.error);
|
|
4299
|
+
result.error.dispose();
|
|
4300
|
+
const rawMsg = typeof errorVal === "object" && errorVal !== null && "message" in errorVal ? errorVal.message : String(errorVal);
|
|
4301
|
+
if (rawMsg === "__EXIT__") {
|
|
4302
|
+
return { success: true };
|
|
4303
|
+
}
|
|
4304
|
+
const errorMsg = formatError(errorVal);
|
|
4305
|
+
try {
|
|
4306
|
+
backend.writeStderr(`${errorMsg}
|
|
4307
|
+
`);
|
|
4308
|
+
} catch {
|
|
4309
|
+
}
|
|
4310
|
+
backend.exit(1);
|
|
4311
|
+
return { success: true };
|
|
4312
|
+
}
|
|
4313
|
+
{
|
|
4314
|
+
const pendingResult = runtime.executePendingJobs();
|
|
4315
|
+
if ("error" in pendingResult && pendingResult.error) {
|
|
4316
|
+
const errorVal = context.dump(pendingResult.error);
|
|
4317
|
+
pendingResult.error.dispose();
|
|
4318
|
+
const rawPendingMsg = typeof errorVal === "object" && errorVal !== null && "message" in errorVal ? errorVal.message : String(errorVal);
|
|
4319
|
+
if (rawPendingMsg !== "__EXIT__") {
|
|
4320
|
+
const errorMsg = formatError(errorVal);
|
|
4321
|
+
try {
|
|
4322
|
+
backend.writeStderr(`${errorMsg}
|
|
4323
|
+
`);
|
|
4324
|
+
} catch {
|
|
4325
|
+
}
|
|
4326
|
+
backend.exit(1);
|
|
4327
|
+
return { success: true };
|
|
4328
|
+
}
|
|
4329
|
+
return { success: true };
|
|
4330
|
+
}
|
|
4331
|
+
}
|
|
4332
|
+
result.value.dispose();
|
|
4333
|
+
backend.exit(0);
|
|
4334
|
+
return {
|
|
4335
|
+
success: true,
|
|
4336
|
+
defenseStats: defense?.getStats()
|
|
4337
|
+
};
|
|
4338
|
+
} catch (e) {
|
|
4339
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
4340
|
+
try {
|
|
4341
|
+
backend.writeStderr(`js-exec: ${message}
|
|
4342
|
+
`);
|
|
4343
|
+
} catch {
|
|
4344
|
+
}
|
|
4345
|
+
try {
|
|
4346
|
+
backend.exit(1);
|
|
4347
|
+
} catch {
|
|
4348
|
+
return { success: false, error: message };
|
|
4349
|
+
}
|
|
4350
|
+
return { success: true };
|
|
4351
|
+
} finally {
|
|
4352
|
+
context?.dispose();
|
|
4353
|
+
runtime?.dispose();
|
|
4354
|
+
}
|
|
4355
|
+
}
|
|
4356
|
+
var initPromise = initializeWithDefense().catch((e) => {
|
|
4357
|
+
parentPort?.postMessage({
|
|
4358
|
+
success: false,
|
|
4359
|
+
// @banned-pattern-ignore: worker-internal init error; message stays within worker protocol, sanitized by js-exec.ts before user output
|
|
4360
|
+
error: e.message,
|
|
4361
|
+
defenseStats: defense?.getStats()
|
|
4362
|
+
});
|
|
4363
|
+
});
|
|
4364
|
+
parentPort?.on("message", async (input) => {
|
|
4365
|
+
try {
|
|
4366
|
+
await initPromise;
|
|
4367
|
+
const result = await executeCode(input);
|
|
4368
|
+
result.defenseStats = defense?.getStats();
|
|
4369
|
+
result.protocolToken = input.protocolToken;
|
|
4370
|
+
parentPort?.postMessage(result);
|
|
4371
|
+
} catch (e) {
|
|
4372
|
+
parentPort?.postMessage({
|
|
4373
|
+
protocolToken: input.protocolToken,
|
|
4374
|
+
success: false,
|
|
4375
|
+
// @banned-pattern-ignore: worker-internal error; message stays within worker protocol, sanitized by js-exec.ts before user output
|
|
4376
|
+
error: e.message,
|
|
4377
|
+
defenseStats: defense?.getStats()
|
|
4378
|
+
});
|
|
4379
|
+
}
|
|
4380
|
+
});
|