tuturuuu 0.27.0 → 0.28.1-dev.10.83523f0
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/bin/ttr.cjs +13 -0
- package/dist/_portable/internal-api/client.d.ts +56 -0
- package/dist/_portable/internal-api/client.d.ts.map +1 -0
- package/dist/_portable/internal-api/client.js +601 -0
- package/dist/_portable/internal-api/client.js.map +1 -0
- package/dist/_portable/internal-api/external-projects.d.ts +620 -0
- package/dist/_portable/internal-api/external-projects.d.ts.map +1 -0
- package/dist/_portable/internal-api/external-projects.js +652 -0
- package/dist/_portable/internal-api/external-projects.js.map +1 -0
- package/dist/_portable/internal-api/hidden-workspaces.d.ts +10 -0
- package/dist/_portable/internal-api/hidden-workspaces.d.ts.map +1 -0
- package/dist/_portable/internal-api/hidden-workspaces.js +17 -0
- package/dist/_portable/internal-api/hidden-workspaces.js.map +1 -0
- package/dist/_portable/internal-api/internal-api-error.d.ts +7 -0
- package/dist/_portable/internal-api/internal-api-error.d.ts.map +1 -0
- package/dist/_portable/internal-api/internal-api-error.js +53 -0
- package/dist/_portable/internal-api/internal-api-error.js.map +1 -0
- package/dist/_portable/internal-api/product-feedback.d.ts +58 -0
- package/dist/_portable/internal-api/product-feedback.d.ts.map +1 -0
- package/dist/_portable/internal-api/product-feedback.js +76 -0
- package/dist/_portable/internal-api/product-feedback.js.map +1 -0
- package/dist/_portable/internal-api/profile-banner.d.ts +13 -0
- package/dist/_portable/internal-api/profile-banner.d.ts.map +1 -0
- package/dist/_portable/internal-api/profile-banner.js +76 -0
- package/dist/_portable/internal-api/profile-banner.js.map +1 -0
- package/dist/_portable/internal-api/profile-media-optimize.d.ts +12 -0
- package/dist/_portable/internal-api/profile-media-optimize.d.ts.map +1 -0
- package/dist/_portable/internal-api/profile-media-optimize.js +64 -0
- package/dist/_portable/internal-api/profile-media-optimize.js.map +1 -0
- package/dist/_portable/internal-api/profile-media.d.ts +21 -0
- package/dist/_portable/internal-api/profile-media.d.ts.map +1 -0
- package/dist/_portable/internal-api/profile-media.js +80 -0
- package/dist/_portable/internal-api/profile-media.js.map +1 -0
- package/dist/_portable/internal-api/request-headers.d.ts +2 -0
- package/dist/_portable/internal-api/request-headers.d.ts.map +1 -0
- package/dist/_portable/internal-api/request-headers.js +22 -0
- package/dist/_portable/internal-api/request-headers.js.map +1 -0
- package/dist/_portable/internal-api/storage.d.ts +210 -0
- package/dist/_portable/internal-api/storage.d.ts.map +1 -0
- package/dist/_portable/internal-api/storage.js +418 -0
- package/dist/_portable/internal-api/storage.js.map +1 -0
- package/dist/_portable/internal-api/task-list-options.d.ts +41 -0
- package/dist/_portable/internal-api/task-list-options.d.ts.map +1 -0
- package/dist/_portable/internal-api/task-list-options.js +3 -0
- package/dist/_portable/internal-api/task-list-options.js.map +1 -0
- package/dist/_portable/internal-api/task-media-filename.d.ts +2 -0
- package/dist/_portable/internal-api/task-media-filename.d.ts.map +1 -0
- package/dist/_portable/internal-api/task-media-filename.js +34 -0
- package/dist/_portable/internal-api/task-media-filename.js.map +1 -0
- package/dist/_portable/internal-api/tasks-dashboard.d.ts +21 -0
- package/dist/_portable/internal-api/tasks-dashboard.d.ts.map +1 -0
- package/dist/_portable/internal-api/tasks-dashboard.js +34 -0
- package/dist/_portable/internal-api/tasks-dashboard.js.map +1 -0
- package/dist/_portable/internal-api/tasks.d.ts +936 -0
- package/dist/_portable/internal-api/tasks.d.ts.map +1 -0
- package/dist/_portable/internal-api/tasks.js +937 -0
- package/dist/_portable/internal-api/tasks.js.map +1 -0
- package/dist/_portable/internal-api/user-config-types.d.ts +7 -0
- package/dist/_portable/internal-api/user-config-types.d.ts.map +1 -0
- package/dist/_portable/internal-api/user-config-types.js +3 -0
- package/dist/_portable/internal-api/user-config-types.js.map +1 -0
- package/dist/_portable/internal-api/user-profile-types.d.ts +22 -0
- package/dist/_portable/internal-api/user-profile-types.d.ts.map +1 -0
- package/dist/_portable/internal-api/user-profile-types.js +3 -0
- package/dist/_portable/internal-api/user-profile-types.js.map +1 -0
- package/dist/_portable/internal-api/users.d.ts +378 -0
- package/dist/_portable/internal-api/users.d.ts.map +1 -0
- package/dist/_portable/internal-api/users.js +556 -0
- package/dist/_portable/internal-api/users.js.map +1 -0
- package/dist/_portable/internal-api/workspaces.d.ts +176 -0
- package/dist/_portable/internal-api/workspaces.d.ts.map +1 -0
- package/dist/_portable/internal-api/workspaces.js +275 -0
- package/dist/_portable/internal-api/workspaces.js.map +1 -0
- package/dist/_portable/utils/playground-schema.d.ts +92 -0
- package/dist/_portable/utils/playground-schema.d.ts.map +1 -0
- package/dist/_portable/utils/playground-schema.js +140 -0
- package/dist/_portable/utils/playground-schema.js.map +1 -0
- package/dist/_portable/utils/task-description-codec.d.ts +31 -0
- package/dist/_portable/utils/task-description-codec.d.ts.map +1 -0
- package/dist/_portable/utils/task-description-codec.js +435 -0
- package/dist/_portable/utils/task-description-codec.js.map +1 -0
- package/dist/_portable/utils/task-description-content.d.ts +7 -0
- package/dist/_portable/utils/task-description-content.d.ts.map +1 -0
- package/dist/_portable/utils/task-description-content.js +227 -0
- package/dist/_portable/utils/task-description-content.js.map +1 -0
- package/dist/_portable/utils/text-helper.d.ts +33 -0
- package/dist/_portable/utils/text-helper.d.ts.map +1 -0
- package/dist/_portable/utils/text-helper.js +423 -0
- package/dist/_portable/utils/text-helper.js.map +1 -0
- package/dist/_portable/utils/yjs-helper.d.ts +5 -0
- package/dist/_portable/utils/yjs-helper.d.ts.map +1 -0
- package/dist/_portable/utils/yjs-helper.js +186 -0
- package/dist/_portable/utils/yjs-helper.js.map +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/atomic-file.d.ts +8 -0
- package/dist/cli/atomic-file.d.ts.map +1 -0
- package/dist/cli/atomic-file.js +103 -0
- package/dist/cli/atomic-file.js.map +1 -0
- package/dist/cli/auth.d.ts +1 -1
- package/dist/cli/auth.d.ts.map +1 -1
- package/dist/cli/auth.js +14 -6
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/browser.d.ts.map +1 -1
- package/dist/cli/browser.js.map +1 -1
- package/dist/cli/build-identity.d.ts +11 -0
- package/dist/cli/build-identity.d.ts.map +1 -0
- package/dist/cli/build-identity.js +31 -0
- package/dist/cli/build-identity.js.map +1 -0
- package/dist/cli/calendar-admin.d.ts +1 -1
- package/dist/cli/calendar-admin.d.ts.map +1 -1
- package/dist/cli/calendar-admin.js +21 -21
- package/dist/cli/calendar-admin.js.map +1 -1
- package/dist/cli/calendar-feedback-dispatch.d.ts +9 -0
- package/dist/cli/calendar-feedback-dispatch.d.ts.map +1 -0
- package/dist/cli/calendar-feedback-dispatch.js +23 -0
- package/dist/cli/calendar-feedback-dispatch.js.map +1 -0
- package/dist/cli/calendar-integrations.d.ts +1 -1
- package/dist/cli/calendar-integrations.d.ts.map +1 -1
- package/dist/cli/calendar-integrations.js +21 -21
- package/dist/cli/calendar-integrations.js.map +1 -1
- package/dist/cli/calendar-payloads.d.ts +3 -3
- package/dist/cli/calendar-payloads.d.ts.map +1 -1
- package/dist/cli/calendar-payloads.js +3 -3
- package/dist/cli/calendar-payloads.js.map +1 -1
- package/dist/cli/calendar.d.ts +1 -1
- package/dist/cli/calendar.d.ts.map +1 -1
- package/dist/cli/calendar.js +15 -15
- package/dist/cli/calendar.js.map +1 -1
- package/dist/cli/command-config.d.ts +3 -0
- package/dist/cli/command-config.d.ts.map +1 -0
- package/dist/cli/command-config.js +28 -0
- package/dist/cli/command-config.js.map +1 -0
- package/dist/cli/commands.d.ts +5 -5
- package/dist/cli/commands.d.ts.map +1 -1
- package/dist/cli/commands.js +242 -255
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/delegated-commands.d.ts +3 -0
- package/dist/cli/delegated-commands.d.ts.map +1 -0
- package/dist/cli/delegated-commands.js +15 -0
- package/dist/cli/delegated-commands.js.map +1 -0
- package/dist/cli/devbox-agent-capabilities.d.ts +1 -1
- package/dist/cli/devbox-agent-capabilities.d.ts.map +1 -1
- package/dist/cli/devbox-agent-capabilities.js +33 -6
- package/dist/cli/devbox-agent-capabilities.js.map +1 -1
- package/dist/cli/devbox-agent-network.d.ts +22 -0
- package/dist/cli/devbox-agent-network.d.ts.map +1 -0
- package/dist/cli/devbox-agent-network.js +68 -0
- package/dist/cli/devbox-agent-network.js.map +1 -0
- package/dist/cli/devbox-agent.d.ts +5 -1
- package/dist/cli/devbox-agent.d.ts.map +1 -1
- package/dist/cli/devbox-agent.js +124 -27
- package/dist/cli/devbox-agent.js.map +1 -1
- package/dist/cli/devbox-auto-upgrade.d.ts.map +1 -1
- package/dist/cli/devbox-auto-upgrade.js +6 -6
- package/dist/cli/devbox-auto-upgrade.js.map +1 -1
- package/dist/cli/devbox-command-templates.d.ts +1 -1
- package/dist/cli/devbox-command-templates.d.ts.map +1 -1
- package/dist/cli/devbox-command-templates.js +10 -10
- package/dist/cli/devbox-command-templates.js.map +1 -1
- package/dist/cli/devbox-commit-run.d.ts +28 -0
- package/dist/cli/devbox-commit-run.d.ts.map +1 -0
- package/dist/cli/devbox-commit-run.js +147 -0
- package/dist/cli/devbox-commit-run.js.map +1 -0
- package/dist/cli/devbox-connect.d.ts +2 -2
- package/dist/cli/devbox-connect.d.ts.map +1 -1
- package/dist/cli/devbox-connect.js +18 -16
- package/dist/cli/devbox-connect.js.map +1 -1
- package/dist/cli/devbox-docker-metadata-diagnostic.d.ts +12 -0
- package/dist/cli/devbox-docker-metadata-diagnostic.d.ts.map +1 -0
- package/dist/cli/devbox-docker-metadata-diagnostic.js +110 -0
- package/dist/cli/devbox-docker-metadata-diagnostic.js.map +1 -0
- package/dist/cli/devbox-docker-metadata.d.ts.map +1 -1
- package/dist/cli/devbox-docker-metadata.js +20 -1
- package/dist/cli/devbox-docker-metadata.js.map +1 -1
- package/dist/cli/devbox-doctor.d.ts +1 -1
- package/dist/cli/devbox-doctor.d.ts.map +1 -1
- package/dist/cli/devbox-doctor.js +2 -2
- package/dist/cli/devbox-doctor.js.map +1 -1
- package/dist/cli/devbox-duration.d.ts.map +1 -1
- package/dist/cli/devbox-duration.js.map +1 -1
- package/dist/cli/devbox-fleet.d.ts +2 -2
- package/dist/cli/devbox-fleet.d.ts.map +1 -1
- package/dist/cli/devbox-fleet.js +35 -13
- package/dist/cli/devbox-fleet.js.map +1 -1
- package/dist/cli/devbox-host-protection.d.ts +1 -1
- package/dist/cli/devbox-host-protection.d.ts.map +1 -1
- package/dist/cli/devbox-host-protection.js.map +1 -1
- package/dist/cli/devbox-isolation-acl.d.ts +3 -0
- package/dist/cli/devbox-isolation-acl.d.ts.map +1 -0
- package/dist/cli/devbox-isolation-acl.js +106 -0
- package/dist/cli/devbox-isolation-acl.js.map +1 -0
- package/dist/cli/devbox-isolation-command.d.ts +13 -0
- package/dist/cli/devbox-isolation-command.d.ts.map +1 -0
- package/dist/cli/devbox-isolation-command.js +46 -0
- package/dist/cli/devbox-isolation-command.js.map +1 -0
- package/dist/cli/devbox-isolation-credential.d.ts +9 -0
- package/dist/cli/devbox-isolation-credential.d.ts.map +1 -0
- package/dist/cli/devbox-isolation-credential.js +164 -0
- package/dist/cli/devbox-isolation-credential.js.map +1 -0
- package/dist/cli/devbox-isolation.d.ts +61 -0
- package/dist/cli/devbox-isolation.d.ts.map +1 -0
- package/dist/cli/devbox-isolation.js +154 -0
- package/dist/cli/devbox-isolation.js.map +1 -0
- package/dist/cli/devbox-job-process.d.ts +23 -0
- package/dist/cli/devbox-job-process.d.ts.map +1 -0
- package/dist/cli/devbox-job-process.js +122 -0
- package/dist/cli/devbox-job-process.js.map +1 -0
- package/dist/cli/devbox-judge-case-batch.d.ts.map +1 -1
- package/dist/cli/devbox-judge-case-batch.js +2 -2
- package/dist/cli/devbox-judge-case-batch.js.map +1 -1
- package/dist/cli/devbox-judge-containers.d.ts +8 -0
- package/dist/cli/devbox-judge-containers.d.ts.map +1 -0
- package/dist/cli/devbox-judge-containers.js +68 -0
- package/dist/cli/devbox-judge-containers.js.map +1 -0
- package/dist/cli/devbox-judge-languages.d.ts.map +1 -1
- package/dist/cli/devbox-judge-languages.js.map +1 -1
- package/dist/cli/devbox-judge-sandbox.d.ts +2 -2
- package/dist/cli/devbox-judge-sandbox.d.ts.map +1 -1
- package/dist/cli/devbox-judge-sandbox.js +23 -20
- package/dist/cli/devbox-judge-sandbox.js.map +1 -1
- package/dist/cli/devbox-maintenance.d.ts +1 -1
- package/dist/cli/devbox-maintenance.d.ts.map +1 -1
- package/dist/cli/devbox-maintenance.js +5 -5
- package/dist/cli/devbox-maintenance.js.map +1 -1
- package/dist/cli/devbox-persisted-setting.d.ts.map +1 -1
- package/dist/cli/devbox-persisted-setting.js.map +1 -1
- package/dist/cli/devbox-playground-files.d.ts.map +1 -1
- package/dist/cli/devbox-playground-files.js.map +1 -1
- package/dist/cli/devbox-playground-runtime-diagnostics.d.ts +1 -1
- package/dist/cli/devbox-playground-runtime-diagnostics.d.ts.map +1 -1
- package/dist/cli/devbox-playground-runtime-diagnostics.js +2 -2
- package/dist/cli/devbox-playground-runtime-diagnostics.js.map +1 -1
- package/dist/cli/devbox-playground-sandbox.d.ts +1 -1
- package/dist/cli/devbox-playground-sandbox.d.ts.map +1 -1
- package/dist/cli/devbox-playground-sandbox.js +30 -30
- package/dist/cli/devbox-playground-sandbox.js.map +1 -1
- package/dist/cli/devbox-repair.d.ts +8 -5
- package/dist/cli/devbox-repair.d.ts.map +1 -1
- package/dist/cli/devbox-repair.js +42 -25
- package/dist/cli/devbox-repair.js.map +1 -1
- package/dist/cli/devbox-runner.d.ts +7 -2
- package/dist/cli/devbox-runner.d.ts.map +1 -1
- package/dist/cli/devbox-runner.js +154 -55
- package/dist/cli/devbox-runner.js.map +1 -1
- package/dist/cli/devbox-sandbox-pids.d.ts.map +1 -1
- package/dist/cli/devbox-sandbox-pids.js.map +1 -1
- package/dist/cli/devbox-sandbox-process.d.ts.map +1 -1
- package/dist/cli/devbox-sandbox-process.js.map +1 -1
- package/dist/cli/devbox-sandbox-slots.d.ts.map +1 -1
- package/dist/cli/devbox-sandbox-slots.js.map +1 -1
- package/dist/cli/devbox-service-mode-guard.d.ts +8 -0
- package/dist/cli/devbox-service-mode-guard.d.ts.map +1 -0
- package/dist/cli/devbox-service-mode-guard.js +65 -0
- package/dist/cli/devbox-service-mode-guard.js.map +1 -0
- package/dist/cli/devbox-session.d.ts +2 -2
- package/dist/cli/devbox-session.d.ts.map +1 -1
- package/dist/cli/devbox-session.js +2 -2
- package/dist/cli/devbox-session.js.map +1 -1
- package/dist/cli/devbox-setup-checkout.d.ts +1 -1
- package/dist/cli/devbox-setup-checkout.d.ts.map +1 -1
- package/dist/cli/devbox-setup-checkout.js.map +1 -1
- package/dist/cli/devbox-setup-command.d.ts.map +1 -1
- package/dist/cli/devbox-setup-command.js.map +1 -1
- package/dist/cli/devbox-setup-env.d.ts.map +1 -1
- package/dist/cli/devbox-setup-env.js.map +1 -1
- package/dist/cli/devbox-setup-service-templates.d.ts +11 -3
- package/dist/cli/devbox-setup-service-templates.d.ts.map +1 -1
- package/dist/cli/devbox-setup-service-templates.js +37 -9
- package/dist/cli/devbox-setup-service-templates.js.map +1 -1
- package/dist/cli/devbox-setup-service.d.ts +16 -10
- package/dist/cli/devbox-setup-service.d.ts.map +1 -1
- package/dist/cli/devbox-setup-service.js +81 -54
- package/dist/cli/devbox-setup-service.js.map +1 -1
- package/dist/cli/devbox-setup.d.ts +10 -8
- package/dist/cli/devbox-setup.d.ts.map +1 -1
- package/dist/cli/devbox-setup.js +29 -27
- package/dist/cli/devbox-setup.js.map +1 -1
- package/dist/cli/devbox-upgrade-lock.d.ts.map +1 -1
- package/dist/cli/devbox-upgrade-lock.js.map +1 -1
- package/dist/cli/devbox.d.ts +4 -4
- package/dist/cli/devbox.d.ts.map +1 -1
- package/dist/cli/devbox.js +53 -48
- package/dist/cli/devbox.js.map +1 -1
- package/dist/cli/external-admin.d.ts +2 -2
- package/dist/cli/external-admin.d.ts.map +1 -1
- package/dist/cli/external-admin.js +8 -8
- package/dist/cli/external-admin.js.map +1 -1
- package/dist/cli/external-projects.d.ts +2 -2
- package/dist/cli/external-projects.d.ts.map +1 -1
- package/dist/cli/external-projects.js +7 -6
- package/dist/cli/external-projects.js.map +1 -1
- package/dist/cli/feedback.d.ts +35 -0
- package/dist/cli/feedback.d.ts.map +1 -0
- package/dist/cli/feedback.js +262 -0
- package/dist/cli/feedback.js.map +1 -0
- package/dist/cli/finance-pagination.d.ts +1 -1
- package/dist/cli/finance-pagination.d.ts.map +1 -1
- package/dist/cli/finance-pagination.js.map +1 -1
- package/dist/cli/finance-payloads.d.ts +2 -2
- package/dist/cli/finance-payloads.d.ts.map +1 -1
- package/dist/cli/finance-payloads.js +18 -18
- package/dist/cli/finance-payloads.js.map +1 -1
- package/dist/cli/finance-recurring.d.ts +1 -1
- package/dist/cli/finance-recurring.d.ts.map +1 -1
- package/dist/cli/finance-recurring.js +9 -9
- package/dist/cli/finance-recurring.js.map +1 -1
- package/dist/cli/finance-resources.d.ts.map +1 -1
- package/dist/cli/finance-resources.js.map +1 -1
- package/dist/cli/finance.d.ts +2 -2
- package/dist/cli/finance.d.ts.map +1 -1
- package/dist/cli/finance.js +48 -48
- package/dist/cli/finance.js.map +1 -1
- package/dist/cli/help-devbox.d.ts.map +1 -1
- package/dist/cli/help-devbox.js +9 -1
- package/dist/cli/help-devbox.js.map +1 -1
- package/dist/cli/help-format.d.ts +9 -0
- package/dist/cli/help-format.d.ts.map +1 -0
- package/dist/cli/help-format.js +26 -0
- package/dist/cli/help-format.js.map +1 -0
- package/dist/cli/help-global.d.ts.map +1 -1
- package/dist/cli/help-global.js +2 -0
- package/dist/cli/help-global.js.map +1 -1
- package/dist/cli/help.d.ts +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +16 -35
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +20 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/operational-cli.d.ts +3 -0
- package/dist/cli/operational-cli.d.ts.map +1 -0
- package/dist/cli/operational-cli.js +272 -0
- package/dist/cli/operational-cli.js.map +1 -0
- package/dist/cli/operational-domain.d.ts +156 -0
- package/dist/cli/operational-domain.d.ts.map +1 -0
- package/dist/cli/operational-domain.js +159 -0
- package/dist/cli/operational-domain.js.map +1 -0
- package/dist/cli/operational-evidence.d.ts +13 -0
- package/dist/cli/operational-evidence.d.ts.map +1 -0
- package/dist/cli/operational-evidence.js +57 -0
- package/dist/cli/operational-evidence.js.map +1 -0
- package/dist/cli/operational-files.d.ts +6 -0
- package/dist/cli/operational-files.d.ts.map +1 -0
- package/dist/cli/operational-files.js +70 -0
- package/dist/cli/operational-files.js.map +1 -0
- package/dist/cli/operational-graph.d.ts +2 -0
- package/dist/cli/operational-graph.d.ts.map +1 -0
- package/dist/cli/operational-graph.js +118 -0
- package/dist/cli/operational-graph.js.map +1 -0
- package/dist/cli/operational-receipts.d.ts +609 -0
- package/dist/cli/operational-receipts.d.ts.map +1 -0
- package/dist/cli/operational-receipts.js +218 -0
- package/dist/cli/operational-receipts.js.map +1 -0
- package/dist/cli/operational-schema.d.ts +274 -0
- package/dist/cli/operational-schema.d.ts.map +1 -0
- package/dist/cli/operational-schema.js +180 -0
- package/dist/cli/operational-schema.js.map +1 -0
- package/dist/cli/operational-search.d.ts +228 -0
- package/dist/cli/operational-search.d.ts.map +1 -0
- package/dist/cli/operational-search.js +291 -0
- package/dist/cli/operational-search.js.map +1 -0
- package/dist/cli/operational-store.d.ts +121 -0
- package/dist/cli/operational-store.d.ts.map +1 -0
- package/dist/cli/operational-store.js +321 -0
- package/dist/cli/operational-store.js.map +1 -0
- package/dist/cli/operational-transfer.d.ts +289 -0
- package/dist/cli/operational-transfer.d.ts.map +1 -0
- package/dist/cli/operational-transfer.js +254 -0
- package/dist/cli/operational-transfer.js.map +1 -0
- package/dist/cli/render.d.ts.map +1 -1
- package/dist/cli/render.js +8 -8
- package/dist/cli/render.js.map +1 -1
- package/dist/cli/resources-activity.d.ts +32 -0
- package/dist/cli/resources-activity.d.ts.map +1 -0
- package/dist/cli/resources-activity.js +150 -0
- package/dist/cli/resources-activity.js.map +1 -0
- package/dist/cli/resources-adaptive.d.ts +41 -0
- package/dist/cli/resources-adaptive.d.ts.map +1 -0
- package/dist/cli/resources-adaptive.js +109 -0
- package/dist/cli/resources-adaptive.js.map +1 -0
- package/dist/cli/resources-box-offload.d.ts +45 -0
- package/dist/cli/resources-box-offload.d.ts.map +1 -0
- package/dist/cli/resources-box-offload.js +335 -0
- package/dist/cli/resources-box-offload.js.map +1 -0
- package/dist/cli/resources-budget.d.ts +102 -0
- package/dist/cli/resources-budget.d.ts.map +1 -0
- package/dist/cli/resources-budget.js +337 -0
- package/dist/cli/resources-budget.js.map +1 -0
- package/dist/cli/resources-command.d.ts +15 -1
- package/dist/cli/resources-command.d.ts.map +1 -1
- package/dist/cli/resources-command.js +418 -13
- package/dist/cli/resources-command.js.map +1 -1
- package/dist/cli/resources-compatibility.d.ts +4 -0
- package/dist/cli/resources-compatibility.d.ts.map +1 -0
- package/dist/cli/resources-compatibility.js +71 -0
- package/dist/cli/resources-compatibility.js.map +1 -0
- package/dist/cli/resources-config.d.ts +40 -9
- package/dist/cli/resources-config.d.ts.map +1 -1
- package/dist/cli/resources-config.js +173 -12
- package/dist/cli/resources-config.js.map +1 -1
- package/dist/cli/resources-diagnostics.d.ts.map +1 -1
- package/dist/cli/resources-diagnostics.js.map +1 -1
- package/dist/cli/resources-disk-gate.d.ts +16 -0
- package/dist/cli/resources-disk-gate.d.ts.map +1 -0
- package/dist/cli/resources-disk-gate.js +110 -0
- package/dist/cli/resources-disk-gate.js.map +1 -0
- package/dist/cli/resources-entry.d.ts.map +1 -1
- package/dist/cli/resources-entry.js +2 -2
- package/dist/cli/resources-entry.js.map +1 -1
- package/dist/cli/resources-hosts-cli.d.ts +14 -0
- package/dist/cli/resources-hosts-cli.d.ts.map +1 -0
- package/dist/cli/resources-hosts-cli.js +141 -0
- package/dist/cli/resources-hosts-cli.js.map +1 -0
- package/dist/cli/resources-hosts-config.d.ts +136 -0
- package/dist/cli/resources-hosts-config.d.ts.map +1 -0
- package/dist/cli/resources-hosts-config.js +149 -0
- package/dist/cli/resources-hosts-config.js.map +1 -0
- package/dist/cli/resources-hosts-dispatch.d.ts +51 -0
- package/dist/cli/resources-hosts-dispatch.d.ts.map +1 -0
- package/dist/cli/resources-hosts-dispatch.js +208 -0
- package/dist/cli/resources-hosts-dispatch.js.map +1 -0
- package/dist/cli/resources-hosts-ledger.d.ts +97 -0
- package/dist/cli/resources-hosts-ledger.d.ts.map +1 -0
- package/dist/cli/resources-hosts-ledger.js +343 -0
- package/dist/cli/resources-hosts-ledger.js.map +1 -0
- package/dist/cli/resources-hosts-plan.d.ts +53 -0
- package/dist/cli/resources-hosts-plan.d.ts.map +1 -0
- package/dist/cli/resources-hosts-plan.js +158 -0
- package/dist/cli/resources-hosts-plan.js.map +1 -0
- package/dist/cli/resources-hosts-sim.d.ts +42 -0
- package/dist/cli/resources-hosts-sim.d.ts.map +1 -0
- package/dist/cli/resources-hosts-sim.js +182 -0
- package/dist/cli/resources-hosts-sim.js.map +1 -0
- package/dist/cli/resources-hosts-trust.d.ts +15 -0
- package/dist/cli/resources-hosts-trust.d.ts.map +1 -0
- package/dist/cli/resources-hosts-trust.js +106 -0
- package/dist/cli/resources-hosts-trust.js.map +1 -0
- package/dist/cli/resources-offload-control.d.ts +35 -0
- package/dist/cli/resources-offload-control.d.ts.map +1 -0
- package/dist/cli/resources-offload-control.js +81 -0
- package/dist/cli/resources-offload-control.js.map +1 -0
- package/dist/cli/resources-queue.d.ts +110 -16
- package/dist/cli/resources-queue.d.ts.map +1 -1
- package/dist/cli/resources-queue.js +345 -152
- package/dist/cli/resources-queue.js.map +1 -1
- package/dist/cli/resources-setup.d.ts +44 -7
- package/dist/cli/resources-setup.d.ts.map +1 -1
- package/dist/cli/resources-setup.js +246 -56
- package/dist/cli/resources-setup.js.map +1 -1
- package/dist/cli/resources-slots.d.ts +123 -0
- package/dist/cli/resources-slots.d.ts.map +1 -0
- package/dist/cli/resources-slots.js +575 -0
- package/dist/cli/resources-slots.js.map +1 -0
- package/dist/cli/resources-status.d.ts +54 -0
- package/dist/cli/resources-status.d.ts.map +1 -0
- package/dist/cli/resources-status.js +83 -0
- package/dist/cli/resources-status.js.map +1 -0
- package/dist/cli/resources-turbo-summary.d.ts +38 -0
- package/dist/cli/resources-turbo-summary.d.ts.map +1 -0
- package/dist/cli/resources-turbo-summary.js +174 -0
- package/dist/cli/resources-turbo-summary.js.map +1 -0
- package/dist/cli/resources.d.ts +11 -0
- package/dist/cli/resources.d.ts.map +1 -1
- package/dist/cli/resources.js +342 -39
- package/dist/cli/resources.js.map +1 -1
- package/dist/cli/select.d.ts.map +1 -1
- package/dist/cli/select.js.map +1 -1
- package/dist/cli/selection.d.ts +6 -6
- package/dist/cli/selection.d.ts.map +1 -1
- package/dist/cli/selection.js +32 -32
- package/dist/cli/selection.js.map +1 -1
- package/dist/cli/storage-analyze.d.ts +66 -0
- package/dist/cli/storage-analyze.d.ts.map +1 -0
- package/dist/cli/storage-analyze.js +298 -0
- package/dist/cli/storage-analyze.js.map +1 -0
- package/dist/cli/storage-docker-local.d.ts +15 -0
- package/dist/cli/storage-docker-local.d.ts.map +1 -0
- package/dist/cli/storage-docker-local.js +57 -0
- package/dist/cli/storage-docker-local.js.map +1 -0
- package/dist/cli/storage-headroom.d.ts +74 -0
- package/dist/cli/storage-headroom.d.ts.map +1 -0
- package/dist/cli/storage-headroom.js +212 -0
- package/dist/cli/storage-headroom.js.map +1 -0
- package/dist/cli/storage-holds.d.ts +31 -0
- package/dist/cli/storage-holds.d.ts.map +1 -0
- package/dist/cli/storage-holds.js +112 -0
- package/dist/cli/storage-holds.js.map +1 -0
- package/dist/cli/storage-liveness.d.ts +106 -0
- package/dist/cli/storage-liveness.d.ts.map +1 -0
- package/dist/cli/storage-liveness.js +251 -0
- package/dist/cli/storage-liveness.js.map +1 -0
- package/dist/cli/storage-measure.d.ts +32 -0
- package/dist/cli/storage-measure.d.ts.map +1 -0
- package/dist/cli/storage-measure.js +185 -0
- package/dist/cli/storage-measure.js.map +1 -0
- package/dist/cli/storage-privacy.d.ts +26 -0
- package/dist/cli/storage-privacy.d.ts.map +1 -0
- package/dist/cli/storage-privacy.js +92 -0
- package/dist/cli/storage-privacy.js.map +1 -0
- package/dist/cli/storage-prune-checkouts.d.ts +7 -0
- package/dist/cli/storage-prune-checkouts.d.ts.map +1 -0
- package/dist/cli/storage-prune-checkouts.js +274 -0
- package/dist/cli/storage-prune-checkouts.js.map +1 -0
- package/dist/cli/storage-prune-machine.d.ts +15 -0
- package/dist/cli/storage-prune-machine.d.ts.map +1 -0
- package/dist/cli/storage-prune-machine.js +376 -0
- package/dist/cli/storage-prune-machine.js.map +1 -0
- package/dist/cli/storage-prune.d.ts +124 -0
- package/dist/cli/storage-prune.d.ts.map +1 -0
- package/dist/cli/storage-prune.js +246 -0
- package/dist/cli/storage-prune.js.map +1 -0
- package/dist/cli/storage-safe-remove.d.ts +45 -0
- package/dist/cli/storage-safe-remove.d.ts.map +1 -0
- package/dist/cli/storage-safe-remove.js +132 -0
- package/dist/cli/storage-safe-remove.js.map +1 -0
- package/dist/cli/storage-scratch.d.ts +27 -0
- package/dist/cli/storage-scratch.d.ts.map +1 -0
- package/dist/cli/storage-scratch.js +85 -0
- package/dist/cli/storage-scratch.js.map +1 -0
- package/dist/cli/storage-suggest.d.ts +25 -0
- package/dist/cli/storage-suggest.d.ts.map +1 -0
- package/dist/cli/storage-suggest.js +294 -0
- package/dist/cli/storage-suggest.js.map +1 -0
- package/dist/cli/storage-targets.d.ts +81 -0
- package/dist/cli/storage-targets.d.ts.map +1 -0
- package/dist/cli/storage-targets.js +319 -0
- package/dist/cli/storage-targets.js.map +1 -0
- package/dist/cli/storage-worktrees.d.ts +99 -0
- package/dist/cli/storage-worktrees.d.ts.map +1 -0
- package/dist/cli/storage-worktrees.js +368 -0
- package/dist/cli/storage-worktrees.js.map +1 -0
- package/dist/cli/storage.d.ts +29 -0
- package/dist/cli/storage.d.ts.map +1 -0
- package/dist/cli/storage.js +286 -0
- package/dist/cli/storage.js.map +1 -0
- package/dist/cli/task-description.d.ts +5 -5
- package/dist/cli/task-description.d.ts.map +1 -1
- package/dist/cli/task-description.js +28 -28
- package/dist/cli/task-description.js.map +1 -1
- package/dist/cli/task-template-command.d.ts +6 -6
- package/dist/cli/task-template-command.d.ts.map +1 -1
- package/dist/cli/task-template-command.js +34 -34
- package/dist/cli/task-template-command.js.map +1 -1
- package/dist/cli/task-templates.d.ts +1 -1
- package/dist/cli/task-templates.d.ts.map +1 -1
- package/dist/cli/task-templates.js +4 -3
- package/dist/cli/task-templates.js.map +1 -1
- package/dist/cli/timezone.d.ts +1 -1
- package/dist/cli/timezone.d.ts.map +1 -1
- package/dist/cli/timezone.js.map +1 -1
- package/dist/cli/tiptap.d.ts +1 -1
- package/dist/cli/tiptap.d.ts.map +1 -1
- package/dist/cli/tiptap.js +22 -22
- package/dist/cli/tiptap.js.map +1 -1
- package/dist/cli/update.d.ts +3 -2
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +4 -2
- package/dist/cli/update.js.map +1 -1
- package/dist/cli/upgrade.d.ts.map +1 -1
- package/dist/cli/upgrade.js.map +1 -1
- package/dist/cms-site.d.ts.map +1 -1
- package/dist/cms-site.js.map +1 -1
- package/dist/devbox-fleet-types.d.ts +74 -0
- package/dist/devbox-fleet-types.d.ts.map +1 -0
- package/dist/devbox-fleet-types.js +84 -0
- package/dist/devbox-fleet-types.js.map +1 -0
- package/dist/epm.d.ts +1 -1
- package/dist/epm.d.ts.map +1 -1
- package/dist/epm.js +12 -12
- package/dist/epm.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/external-projects-public-assets-node.d.ts +5 -5
- package/dist/external-projects-public-assets-node.d.ts.map +1 -1
- package/dist/external-projects-public-assets-node.js +11 -11
- package/dist/external-projects-public-assets-node.js.map +1 -1
- package/dist/external-projects-public-assets.d.ts +1 -1
- package/dist/external-projects-public-assets.d.ts.map +1 -1
- package/dist/external-projects-public-assets.js.map +1 -1
- package/dist/external-projects.d.ts +5 -5
- package/dist/external-projects.d.ts.map +1 -1
- package/dist/external-projects.js +14 -14
- package/dist/external-projects.js.map +1 -1
- package/dist/index.d.ts +25 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -68
- package/dist/index.js.map +1 -1
- package/dist/operational-graph/contracts.d.ts +461 -0
- package/dist/operational-graph/contracts.d.ts.map +1 -0
- package/dist/operational-graph/contracts.js +144 -0
- package/dist/operational-graph/contracts.js.map +1 -0
- package/dist/operational-graph/domain.d.ts +181 -0
- package/dist/operational-graph/domain.d.ts.map +1 -0
- package/dist/operational-graph/domain.js +166 -0
- package/dist/operational-graph/domain.js.map +1 -0
- package/dist/operational-graph/duplicate.d.ts +218 -0
- package/dist/operational-graph/duplicate.d.ts.map +1 -0
- package/dist/operational-graph/duplicate.js +161 -0
- package/dist/operational-graph/duplicate.js.map +1 -0
- package/dist/operational-graph/projection.d.ts +5 -0
- package/dist/operational-graph/projection.d.ts.map +1 -0
- package/dist/operational-graph/projection.js +111 -0
- package/dist/operational-graph/projection.js.map +1 -0
- package/dist/operational-graph/reader.d.ts +333 -0
- package/dist/operational-graph/reader.d.ts.map +1 -0
- package/dist/operational-graph/reader.js +52 -0
- package/dist/operational-graph/reader.js.map +1 -0
- package/dist/operational-graph/store.d.ts +118 -0
- package/dist/operational-graph/store.d.ts.map +1 -0
- package/dist/operational-graph/store.js +58 -0
- package/dist/operational-graph/store.js.map +1 -0
- package/dist/operational-planner/assignment.d.ts +14 -0
- package/dist/operational-planner/assignment.d.ts.map +1 -0
- package/dist/operational-planner/assignment.js +146 -0
- package/dist/operational-planner/assignment.js.map +1 -0
- package/dist/operational-planner/contracts.d.ts +563 -0
- package/dist/operational-planner/contracts.d.ts.map +1 -0
- package/dist/operational-planner/contracts.js +127 -0
- package/dist/operational-planner/contracts.js.map +1 -0
- package/dist/operational-planner/planner.d.ts +24 -0
- package/dist/operational-planner/planner.d.ts.map +1 -0
- package/dist/operational-planner/planner.js +96 -0
- package/dist/operational-planner/planner.js.map +1 -0
- package/dist/operational-search/artifact.d.ts +70 -0
- package/dist/operational-search/artifact.d.ts.map +1 -0
- package/dist/operational-search/artifact.js +97 -0
- package/dist/operational-search/artifact.js.map +1 -0
- package/dist/operational-search/cache.d.ts +46 -0
- package/dist/operational-search/cache.d.ts.map +1 -0
- package/dist/operational-search/cache.js +248 -0
- package/dist/operational-search/cache.js.map +1 -0
- package/dist/operational-search/download.d.ts +17 -0
- package/dist/operational-search/download.d.ts.map +1 -0
- package/dist/operational-search/download.js +283 -0
- package/dist/operational-search/download.js.map +1 -0
- package/dist/operational-search/index.d.ts +58 -0
- package/dist/operational-search/index.d.ts.map +1 -0
- package/dist/operational-search/index.js +156 -0
- package/dist/operational-search/index.js.map +1 -0
- package/dist/operational-search/lexical.d.ts +28 -0
- package/dist/operational-search/lexical.d.ts.map +1 -0
- package/dist/operational-search/lexical.js +88 -0
- package/dist/operational-search/lexical.js.map +1 -0
- package/dist/operational-search/python-adapter-code.d.ts +58 -0
- package/dist/operational-search/python-adapter-code.d.ts.map +1 -0
- package/dist/operational-search/python-adapter-code.js +12 -0
- package/dist/operational-search/python-adapter-code.js.map +1 -0
- package/dist/operational-search/python-runtime.d.ts +65 -0
- package/dist/operational-search/python-runtime.d.ts.map +1 -0
- package/dist/operational-search/python-runtime.js +348 -0
- package/dist/operational-search/python-runtime.js.map +1 -0
- package/dist/operational-search/query.d.ts +42 -0
- package/dist/operational-search/query.d.ts.map +1 -0
- package/dist/operational-search/query.js +89 -0
- package/dist/operational-search/query.js.map +1 -0
- package/dist/operational-search/runtime.d.ts +6 -0
- package/dist/operational-search/runtime.d.ts.map +1 -0
- package/dist/operational-search/runtime.js +13 -0
- package/dist/operational-search/runtime.js.map +1 -0
- package/dist/operational-sync/engine.d.ts +9 -0
- package/dist/operational-sync/engine.d.ts.map +1 -0
- package/dist/operational-sync/engine.js +191 -0
- package/dist/operational-sync/engine.js.map +1 -0
- package/dist/operational-sync/protocol.d.ts +985 -0
- package/dist/operational-sync/protocol.d.ts.map +1 -0
- package/dist/operational-sync/protocol.js +212 -0
- package/dist/operational-sync/protocol.js.map +1 -0
- package/dist/operational-sync/replica.d.ts +595 -0
- package/dist/operational-sync/replica.d.ts.map +1 -0
- package/dist/operational-sync/replica.js +214 -0
- package/dist/operational-sync/replica.js.map +1 -0
- package/dist/platform-calendar-types.d.ts +1 -1
- package/dist/platform-calendar-types.d.ts.map +1 -1
- package/dist/platform-calendar-types.js.map +1 -1
- package/dist/platform-calendar.d.ts +3 -3
- package/dist/platform-calendar.d.ts.map +1 -1
- package/dist/platform-calendar.js +23 -23
- package/dist/platform-calendar.js.map +1 -1
- package/dist/platform-devbox-fleet.d.ts +21 -36
- package/dist/platform-devbox-fleet.d.ts.map +1 -1
- package/dist/platform-devbox-fleet.js +42 -5
- package/dist/platform-devbox-fleet.js.map +1 -1
- package/dist/platform-devbox.d.ts +42 -9
- package/dist/platform-devbox.d.ts.map +1 -1
- package/dist/platform-devbox.js +37 -16
- package/dist/platform-devbox.js.map +1 -1
- package/dist/platform-external-admin.d.ts +2 -2
- package/dist/platform-external-admin.d.ts.map +1 -1
- package/dist/platform-external-admin.js +6 -6
- package/dist/platform-external-admin.js.map +1 -1
- package/dist/platform-finance-pagination.d.ts.map +1 -1
- package/dist/platform-finance-pagination.js.map +1 -1
- package/dist/platform-finance.d.ts +3 -3
- package/dist/platform-finance.d.ts.map +1 -1
- package/dist/platform-finance.js +46 -46
- package/dist/platform-finance.js.map +1 -1
- package/dist/platform-sdk-auth.d.ts.map +1 -1
- package/dist/platform-sdk-auth.js.map +1 -1
- package/dist/platform.d.ts +46 -46
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +90 -90
- package/dist/platform.js.map +1 -1
- package/dist/portable-sources.json +25 -0
- package/dist/query.d.ts +2 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js.map +1 -1
- package/dist/storage.d.ts +3 -3
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +43 -43
- package/dist/storage.js.map +1 -1
- package/dist/task-templates.d.ts +1 -1
- package/dist/task-templates.d.ts.map +1 -1
- package/dist/task-templates.js +13 -13
- package/dist/task-templates.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +27 -15
- package/dist/cli/devbox-playground-runtime.acceptance.d.ts +0 -2
- package/dist/cli/devbox-playground-runtime.acceptance.d.ts.map +0 -1
- package/dist/cli/devbox-playground-runtime.acceptance.js +0 -216
- package/dist/cli/devbox-playground-runtime.acceptance.js.map +0 -1
package/bin/ttr.cjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
|
|
3
|
+
const { existsSync } = require('node:fs');
|
|
4
|
+
const { join } = require('node:path');
|
|
5
|
+
|
|
6
|
+
if (existsSync(join(__dirname, '../src/cli/index.ts'))) {
|
|
7
|
+
console.error(
|
|
8
|
+
'Workspace ttr bin is disabled: its dist may be stale. Use ~/.bun/bin/ttr or bun ttr. For source development run bun packages/sdk/src/cli/index.ts from the repo root with a disposable TTR_RESOURCES_HOME.'
|
|
9
|
+
);
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
} else {
|
|
12
|
+
require(join(__dirname, '../dist/cli/index.js'));
|
|
13
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export type InternalApiQueryValue = string | number | boolean | null | undefined;
|
|
2
|
+
export type InternalApiQuery = Record<string, InternalApiQueryValue>;
|
|
3
|
+
export type InternalApiFetchInit = Omit<RequestInit, 'headers'> & {
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
headers?: HeadersInit;
|
|
6
|
+
query?: InternalApiQuery;
|
|
7
|
+
};
|
|
8
|
+
export type InternalApiClientOptions = {
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
defaultHeaders?: HeadersInit;
|
|
11
|
+
fetch?: typeof fetch;
|
|
12
|
+
};
|
|
13
|
+
type HeaderAccessor = Pick<Headers, 'get'>;
|
|
14
|
+
export { InternalApiError } from "./internal-api-error.js";
|
|
15
|
+
export declare function encodePathSegment(value: string): string;
|
|
16
|
+
export declare function getConfiguredInternalApiBaseUrl(): string;
|
|
17
|
+
export declare function getConfiguredTasksApiBaseUrl(): string;
|
|
18
|
+
export declare function withTaskApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
|
|
19
|
+
export declare function getConfiguredMailApiBaseUrl(): string;
|
|
20
|
+
export declare function withMailApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
|
|
21
|
+
export declare function getConfiguredLearnApiBaseUrl(): string;
|
|
22
|
+
export declare function withLearnApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
|
|
23
|
+
export declare function getConfiguredTeachApiBaseUrl(): string;
|
|
24
|
+
export declare function withTeachApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
|
|
25
|
+
export declare function getConfiguredPayApiBaseUrl(): string;
|
|
26
|
+
export declare function withPayApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
|
|
27
|
+
export declare function getConfiguredContactsApiBaseUrl(): string;
|
|
28
|
+
export declare function withContactsApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
|
|
29
|
+
/**
|
|
30
|
+
* `/api/v1/tulearn/bootstrap` is owned by apps/learn but is also consumed by
|
|
31
|
+
* apps/teach. Pin the call to the CALLING app's own origin so its app-session
|
|
32
|
+
* audience (learn or teach) matches — never cross-pin teach → learn (learn's
|
|
33
|
+
* proxy would reject a teach-audience session).
|
|
34
|
+
*/
|
|
35
|
+
export declare function withEducationBootstrapBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
|
|
36
|
+
export declare function getConfiguredFinanceApiBaseUrl(): string;
|
|
37
|
+
export declare function withFinanceApiBaseUrl(options?: InternalApiClientOptions): InternalApiClientOptions;
|
|
38
|
+
export declare function resolveInternalApiUrl(path: string, baseUrl?: string): string;
|
|
39
|
+
export declare function createInternalApiClient(options?: InternalApiClientOptions): {
|
|
40
|
+
fetch: (path: string, init?: InternalApiFetchInit) => Promise<Response>;
|
|
41
|
+
json<T>(path: string, init?: InternalApiFetchInit): Promise<T>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Creates Internal API client options that forward auth-relevant headers
|
|
45
|
+
* from an incoming request context (for example `next/headers()` in RSC).
|
|
46
|
+
*/
|
|
47
|
+
export declare function withForwardedInternalApiAuth(requestHeaders: HeaderAccessor, options?: InternalApiClientOptions): InternalApiClientOptions;
|
|
48
|
+
export declare const internalApiClient: {
|
|
49
|
+
fetch: (path: string, init?: InternalApiFetchInit) => Promise<Response>;
|
|
50
|
+
json<T>(path: string, init?: InternalApiFetchInit): Promise<T>;
|
|
51
|
+
};
|
|
52
|
+
export declare function getInternalApiClient(options?: InternalApiClientOptions): {
|
|
53
|
+
fetch: (path: string, init?: InternalApiFetchInit) => Promise<Response>;
|
|
54
|
+
json<T>(path: string, init?: InternalApiFetchInit): Promise<T>;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../node_modules/.cache/sdk-portable-boUk2G/src/_portable/internal-api/client.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,CAAC;AACd,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;AACrE,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB,CAAC;AAEF,KAAK,cAAc,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AA0D3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAwE3D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,UAE9C;AAiDD,wBAAgB,+BAA+B,WAY9C;AA+BD,wBAAgB,4BAA4B,WAW3C;AAED,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AAED,wBAAgB,2BAA2B,WAS1C;AAED,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AA8CD,wBAAgB,4BAA4B,WAS3C;AAED,wBAAgB,mBAAmB,CACjC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AAED,wBAAgB,4BAA4B,WAS3C;AAED,wBAAgB,mBAAmB,CACjC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AASD,wBAAgB,0BAA0B,WASzC;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AAWD,wBAAgB,+BAA+B,WAS9C;AAED,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAgB1B;AASD,wBAAgB,8BAA8B,WAS7C;AAED,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAS1B;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,UAkBnE;AAqGD,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,wBAA6B;IAgBpC,KAAK,SAdgB,MAAM,SAAQ,oBAAoB;IAgBjD,IAAI,CAAC,CAAC,QAAQ,MAAM,SAAQ,oBAAoB,GAAQ,OAAO,CAAC,CAAC,CAAC;EAY3E;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,cAAc,EAC9B,OAAO,GAAE,wBAA6B,GACrC,wBAAwB,CAgJ1B;AAED,eAAO,MAAM,iBAAiB;kBAvLL,MAAM,SAAQ,oBAAoB;SAgB5C,CAAC,QAAQ,MAAM,SAAQ,oBAAoB,GAAQ,OAAO,CAAC,CAAC,CAAC;CAuKlB,CAAC;AAE3D,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,wBAAwB;kBAzL9C,MAAM,SAAQ,oBAAoB;SAgB5C,CAAC,QAAQ,MAAM,SAAQ,oBAAoB,GAAQ,OAAO,CAAC,CAAC,CAAC;EA2K3E"}
|
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.internalApiClient = exports.InternalApiError = void 0;
|
|
4
|
+
exports.encodePathSegment = encodePathSegment;
|
|
5
|
+
exports.getConfiguredInternalApiBaseUrl = getConfiguredInternalApiBaseUrl;
|
|
6
|
+
exports.getConfiguredTasksApiBaseUrl = getConfiguredTasksApiBaseUrl;
|
|
7
|
+
exports.withTaskApiBaseUrl = withTaskApiBaseUrl;
|
|
8
|
+
exports.getConfiguredMailApiBaseUrl = getConfiguredMailApiBaseUrl;
|
|
9
|
+
exports.withMailApiBaseUrl = withMailApiBaseUrl;
|
|
10
|
+
exports.getConfiguredLearnApiBaseUrl = getConfiguredLearnApiBaseUrl;
|
|
11
|
+
exports.withLearnApiBaseUrl = withLearnApiBaseUrl;
|
|
12
|
+
exports.getConfiguredTeachApiBaseUrl = getConfiguredTeachApiBaseUrl;
|
|
13
|
+
exports.withTeachApiBaseUrl = withTeachApiBaseUrl;
|
|
14
|
+
exports.getConfiguredPayApiBaseUrl = getConfiguredPayApiBaseUrl;
|
|
15
|
+
exports.withPayApiBaseUrl = withPayApiBaseUrl;
|
|
16
|
+
exports.getConfiguredContactsApiBaseUrl = getConfiguredContactsApiBaseUrl;
|
|
17
|
+
exports.withContactsApiBaseUrl = withContactsApiBaseUrl;
|
|
18
|
+
exports.withEducationBootstrapBaseUrl = withEducationBootstrapBaseUrl;
|
|
19
|
+
exports.getConfiguredFinanceApiBaseUrl = getConfiguredFinanceApiBaseUrl;
|
|
20
|
+
exports.withFinanceApiBaseUrl = withFinanceApiBaseUrl;
|
|
21
|
+
exports.resolveInternalApiUrl = resolveInternalApiUrl;
|
|
22
|
+
exports.createInternalApiClient = createInternalApiClient;
|
|
23
|
+
exports.withForwardedInternalApiAuth = withForwardedInternalApiAuth;
|
|
24
|
+
exports.getInternalApiClient = getInternalApiClient;
|
|
25
|
+
const internal_api_error_js_1 = require("./internal-api-error.js");
|
|
26
|
+
const request_headers_js_1 = require("./request-headers.js");
|
|
27
|
+
const APP_SESSION_COOKIE_NAME = 'tuturuuu_app_session';
|
|
28
|
+
const SUPABASE_AUTH_COOKIE_PATTERN = /^sb-[a-z0-9-]+-auth-token(?:\.\d+)?$/i;
|
|
29
|
+
const KNOWN_CUSTOM_SATELLITE_HOSTS = new Set(['nova.ai.vn', 'rewise.me']);
|
|
30
|
+
const KNOWN_NON_PLATFORM_TUTURUUU_HOSTS = new Set([
|
|
31
|
+
'apps.tuturuuu.com',
|
|
32
|
+
'cms.tuturuuu.com',
|
|
33
|
+
'calendar.tuturuuu.com',
|
|
34
|
+
'chat.tuturuuu.com',
|
|
35
|
+
'drive.tuturuuu.com',
|
|
36
|
+
'mail.tuturuuu.com',
|
|
37
|
+
'meet.tuturuuu.com',
|
|
38
|
+
'qr.tuturuuu.com',
|
|
39
|
+
'mira.tuturuuu.com',
|
|
40
|
+
'tasks.tuturuuu.com',
|
|
41
|
+
'finance.tuturuuu.com',
|
|
42
|
+
'inventory.tuturuuu.com',
|
|
43
|
+
'storefront.tuturuuu.com',
|
|
44
|
+
'tanstack.tuturuuu.com',
|
|
45
|
+
'track.tuturuuu.com',
|
|
46
|
+
'learn.tuturuuu.com',
|
|
47
|
+
'teach.tuturuuu.com',
|
|
48
|
+
'pay.tuturuuu.com',
|
|
49
|
+
'contacts.tuturuuu.com',
|
|
50
|
+
'forms.tuturuuu.com',
|
|
51
|
+
'lettin.tuturuuu.com',
|
|
52
|
+
'git.tuturuuu.com',
|
|
53
|
+
'hive.tuturuuu.com',
|
|
54
|
+
'mind.tuturuuu.com',
|
|
55
|
+
]);
|
|
56
|
+
const KNOWN_NON_PLATFORM_LOCALHOST_PORTS = new Set([
|
|
57
|
+
'7804',
|
|
58
|
+
'7805',
|
|
59
|
+
'7806',
|
|
60
|
+
'7807',
|
|
61
|
+
'7808',
|
|
62
|
+
'7809',
|
|
63
|
+
'7810',
|
|
64
|
+
'7811',
|
|
65
|
+
'7812',
|
|
66
|
+
'7813',
|
|
67
|
+
'7814',
|
|
68
|
+
'7815',
|
|
69
|
+
'7816',
|
|
70
|
+
'7817',
|
|
71
|
+
'7818',
|
|
72
|
+
'7819',
|
|
73
|
+
'7820',
|
|
74
|
+
'7821',
|
|
75
|
+
'7822',
|
|
76
|
+
'7824',
|
|
77
|
+
'7826',
|
|
78
|
+
'7827',
|
|
79
|
+
'7828',
|
|
80
|
+
'7830',
|
|
81
|
+
'7833',
|
|
82
|
+
]);
|
|
83
|
+
var internal_api_error_js_2 = require("./internal-api-error.js");
|
|
84
|
+
Object.defineProperty(exports, "InternalApiError", { enumerable: true, get: function () { return internal_api_error_js_2.InternalApiError; } });
|
|
85
|
+
function tryParseAbsoluteUrl(value) {
|
|
86
|
+
try {
|
|
87
|
+
return new URL(value);
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function resolveConfiguredOrigin(value) {
|
|
94
|
+
if (!value) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
const [firstValue] = value
|
|
98
|
+
.split(/[,\n]/u)
|
|
99
|
+
.map((entry) => entry.trim())
|
|
100
|
+
.filter(Boolean);
|
|
101
|
+
if (!firstValue) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
const normalized = /^[a-z]+:\/\//iu.test(firstValue)
|
|
105
|
+
? firstValue
|
|
106
|
+
: `https://${firstValue}`;
|
|
107
|
+
return tryParseAbsoluteUrl(normalized)?.origin ?? null;
|
|
108
|
+
}
|
|
109
|
+
function isKnownNonPlatformSatelliteOrigin(origin) {
|
|
110
|
+
const url = tryParseAbsoluteUrl(origin);
|
|
111
|
+
if (!url) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
const hostname = url.hostname.toLowerCase();
|
|
115
|
+
if (KNOWN_CUSTOM_SATELLITE_HOSTS.has(hostname)) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
if (KNOWN_NON_PLATFORM_TUTURUUU_HOSTS.has(hostname)) {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
if (hostname.endsWith('.tuturuuu.localhost')) {
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
if (['localhost', '127.0.0.1', '::1', '[::1]'].includes(hostname) &&
|
|
125
|
+
KNOWN_NON_PLATFORM_LOCALHOST_PORTS.has(url.port)) {
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
function resolveNextPublicAppUrlAsWebOrigin() {
|
|
131
|
+
const origin = resolveConfiguredOrigin(process.env.NEXT_PUBLIC_APP_URL);
|
|
132
|
+
if (!origin || isKnownNonPlatformSatelliteOrigin(origin)) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
return origin;
|
|
136
|
+
}
|
|
137
|
+
function encodePathSegment(value) {
|
|
138
|
+
return encodeURIComponent(value);
|
|
139
|
+
}
|
|
140
|
+
function normalizeBaseUrl(baseUrl) {
|
|
141
|
+
let end = baseUrl.length;
|
|
142
|
+
while (end > 0 && baseUrl.charCodeAt(end - 1) === 47) {
|
|
143
|
+
end -= 1;
|
|
144
|
+
}
|
|
145
|
+
return end === baseUrl.length ? baseUrl : baseUrl.slice(0, end);
|
|
146
|
+
}
|
|
147
|
+
function isProductionDeployment() {
|
|
148
|
+
if (process.env.VERCEL_ENV) {
|
|
149
|
+
return process.env.VERCEL_ENV === 'production';
|
|
150
|
+
}
|
|
151
|
+
return process.env.NODE_ENV === 'production';
|
|
152
|
+
}
|
|
153
|
+
function normalizePath(path) {
|
|
154
|
+
if (/^https?:\/\//.test(path)) {
|
|
155
|
+
return path;
|
|
156
|
+
}
|
|
157
|
+
return path.startsWith('/') ? path : `/${path}`;
|
|
158
|
+
}
|
|
159
|
+
function appendQuery(path, query) {
|
|
160
|
+
if (!query || Object.keys(query).length === 0) {
|
|
161
|
+
return path;
|
|
162
|
+
}
|
|
163
|
+
const normalizedPath = normalizePath(path);
|
|
164
|
+
const isAbsoluteUrl = /^https?:\/\//.test(normalizedPath);
|
|
165
|
+
const url = isAbsoluteUrl
|
|
166
|
+
? new URL(normalizedPath)
|
|
167
|
+
: new URL(normalizedPath, 'http://internal-api.local');
|
|
168
|
+
for (const [key, value] of Object.entries(query)) {
|
|
169
|
+
if (value === undefined || value === null) {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
url.searchParams.set(key, String(value));
|
|
173
|
+
}
|
|
174
|
+
return isAbsoluteUrl ? url.toString() : `${url.pathname}${url.search}`;
|
|
175
|
+
}
|
|
176
|
+
function getConfiguredInternalApiBaseUrl() {
|
|
177
|
+
return normalizeBaseUrl(resolveConfiguredOrigin(process.env.INTERNAL_WEB_API_ORIGIN) ||
|
|
178
|
+
resolveConfiguredOrigin(process.env.WEB_APP_URL) ||
|
|
179
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_WEB_APP_URL) ||
|
|
180
|
+
resolveNextPublicAppUrlAsWebOrigin() ||
|
|
181
|
+
resolveConfiguredOrigin(process.env.COOLIFY_URL) ||
|
|
182
|
+
resolveConfiguredOrigin(process.env.COOLIFY_FQDN) ||
|
|
183
|
+
(isProductionDeployment()
|
|
184
|
+
? 'https://tuturuuu.com'
|
|
185
|
+
: 'https://tuturuuu.localhost'));
|
|
186
|
+
}
|
|
187
|
+
function isTasksApiProxyBrowserRuntime() {
|
|
188
|
+
const runtimeLocation = typeof globalThis === 'object' && 'location' in globalThis
|
|
189
|
+
? globalThis.location
|
|
190
|
+
: undefined;
|
|
191
|
+
const hostname = runtimeLocation?.hostname?.toLowerCase();
|
|
192
|
+
return /^(?:tasks|calendar)\.tuturuuu\.(?:com|localhost)$/u.test(hostname ?? '');
|
|
193
|
+
}
|
|
194
|
+
function isMailAppRuntime() {
|
|
195
|
+
if (typeof process === 'undefined') {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
const packageName = process.env.npm_package_name;
|
|
199
|
+
if (packageName === '@tuturuuu/mail') {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
try {
|
|
203
|
+
return process.cwd().replace(/\\/gu, '/').endsWith('/apps/mail');
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function getConfiguredTasksApiBaseUrl() {
|
|
210
|
+
return normalizeBaseUrl(resolveConfiguredOrigin(process.env.TASKS_APP_URL) ||
|
|
211
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_TASKS_APP_URL) ||
|
|
212
|
+
resolveConfiguredOrigin(process.env.TUTURUUU_TASKS_BASE_URL) ||
|
|
213
|
+
resolveConfiguredOrigin(process.env.TUDO_APP_URL) ||
|
|
214
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_TUDO_APP_URL) ||
|
|
215
|
+
(isProductionDeployment()
|
|
216
|
+
? 'https://tasks.tuturuuu.com'
|
|
217
|
+
: 'https://tasks.tuturuuu.localhost'));
|
|
218
|
+
}
|
|
219
|
+
function withTaskApiBaseUrl(options = {}) {
|
|
220
|
+
if (options.baseUrl || isTasksApiProxyBrowserRuntime()) {
|
|
221
|
+
return options;
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
...options,
|
|
225
|
+
baseUrl: getConfiguredTasksApiBaseUrl(),
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function getConfiguredMailApiBaseUrl() {
|
|
229
|
+
return normalizeBaseUrl(resolveConfiguredOrigin(process.env.MAIL_APP_URL) ||
|
|
230
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_MAIL_APP_URL) ||
|
|
231
|
+
resolveConfiguredOrigin(process.env.TUTURUUU_MAIL_BASE_URL) ||
|
|
232
|
+
(isProductionDeployment()
|
|
233
|
+
? 'https://mail.tuturuuu.com'
|
|
234
|
+
: 'https://mail.tuturuuu.localhost'));
|
|
235
|
+
}
|
|
236
|
+
function withMailApiBaseUrl(options = {}) {
|
|
237
|
+
if (options.baseUrl || isMailAppRuntime()) {
|
|
238
|
+
return options;
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
...options,
|
|
242
|
+
baseUrl: getConfiguredMailApiBaseUrl(),
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
function isCurrentBrowserHostname(...hostnames) {
|
|
246
|
+
const runtimeLocation = typeof globalThis === 'object' && 'location' in globalThis
|
|
247
|
+
? globalThis.location
|
|
248
|
+
: undefined;
|
|
249
|
+
const hostname = runtimeLocation?.hostname?.toLowerCase();
|
|
250
|
+
return hostname !== undefined && hostnames.includes(hostname);
|
|
251
|
+
}
|
|
252
|
+
function isCurrentAppServerRuntime(packageName, appDir) {
|
|
253
|
+
if (typeof process === 'undefined') {
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
if (process.env.npm_package_name === packageName) {
|
|
257
|
+
return true;
|
|
258
|
+
}
|
|
259
|
+
try {
|
|
260
|
+
return process.cwd().replace(/\\/gu, '/').endsWith(appDir);
|
|
261
|
+
}
|
|
262
|
+
catch {
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function isLearnAppRuntime() {
|
|
267
|
+
return (isCurrentBrowserHostname('learn.tuturuuu.com', 'learn.tuturuuu.localhost') || isCurrentAppServerRuntime('@tuturuuu/learn', '/apps/learn'));
|
|
268
|
+
}
|
|
269
|
+
function isTeachAppRuntime() {
|
|
270
|
+
return (isCurrentBrowserHostname('teach.tuturuuu.com', 'teach.tuturuuu.localhost') || isCurrentAppServerRuntime('@tuturuuu/teach', '/apps/teach'));
|
|
271
|
+
}
|
|
272
|
+
function getConfiguredLearnApiBaseUrl() {
|
|
273
|
+
return normalizeBaseUrl(resolveConfiguredOrigin(process.env.LEARN_APP_URL) ||
|
|
274
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_LEARN_APP_URL) ||
|
|
275
|
+
resolveConfiguredOrigin(process.env.TUTURUUU_LEARN_BASE_URL) ||
|
|
276
|
+
(isProductionDeployment()
|
|
277
|
+
? 'https://learn.tuturuuu.com'
|
|
278
|
+
: 'https://learn.tuturuuu.localhost'));
|
|
279
|
+
}
|
|
280
|
+
function withLearnApiBaseUrl(options = {}) {
|
|
281
|
+
if (options.baseUrl || isLearnAppRuntime()) {
|
|
282
|
+
return options;
|
|
283
|
+
}
|
|
284
|
+
return {
|
|
285
|
+
...options,
|
|
286
|
+
baseUrl: getConfiguredLearnApiBaseUrl(),
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
function getConfiguredTeachApiBaseUrl() {
|
|
290
|
+
return normalizeBaseUrl(resolveConfiguredOrigin(process.env.TEACH_APP_URL) ||
|
|
291
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_TEACH_APP_URL) ||
|
|
292
|
+
resolveConfiguredOrigin(process.env.TUTURUUU_TEACH_BASE_URL) ||
|
|
293
|
+
(isProductionDeployment()
|
|
294
|
+
? 'https://teach.tuturuuu.com'
|
|
295
|
+
: 'https://teach.tuturuuu.localhost'));
|
|
296
|
+
}
|
|
297
|
+
function withTeachApiBaseUrl(options = {}) {
|
|
298
|
+
if (options.baseUrl || isTeachAppRuntime()) {
|
|
299
|
+
return options;
|
|
300
|
+
}
|
|
301
|
+
return {
|
|
302
|
+
...options,
|
|
303
|
+
baseUrl: getConfiguredTeachApiBaseUrl(),
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
function isPayAppRuntime() {
|
|
307
|
+
return (isCurrentBrowserHostname('pay.tuturuuu.com', 'pay.tuturuuu.localhost') ||
|
|
308
|
+
isCurrentAppServerRuntime('@tuturuuu/pay', '/apps/pay'));
|
|
309
|
+
}
|
|
310
|
+
function getConfiguredPayApiBaseUrl() {
|
|
311
|
+
return normalizeBaseUrl(resolveConfiguredOrigin(process.env.PAY_APP_URL) ||
|
|
312
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_PAY_APP_URL) ||
|
|
313
|
+
resolveConfiguredOrigin(process.env.TUTURUUU_PAY_BASE_URL) ||
|
|
314
|
+
(isProductionDeployment()
|
|
315
|
+
? 'https://pay.tuturuuu.com'
|
|
316
|
+
: 'https://pay.tuturuuu.localhost'));
|
|
317
|
+
}
|
|
318
|
+
function withPayApiBaseUrl(options = {}) {
|
|
319
|
+
if (options.baseUrl || isPayAppRuntime()) {
|
|
320
|
+
return options;
|
|
321
|
+
}
|
|
322
|
+
return {
|
|
323
|
+
...options,
|
|
324
|
+
baseUrl: getConfiguredPayApiBaseUrl(),
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
function isContactsAppRuntime() {
|
|
328
|
+
return (isCurrentBrowserHostname('contacts.tuturuuu.com', 'contacts.tuturuuu.localhost') || isCurrentAppServerRuntime('@tuturuuu/contacts', '/apps/contacts'));
|
|
329
|
+
}
|
|
330
|
+
function getConfiguredContactsApiBaseUrl() {
|
|
331
|
+
return normalizeBaseUrl(resolveConfiguredOrigin(process.env.CONTACTS_APP_URL) ||
|
|
332
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_CONTACTS_APP_URL) ||
|
|
333
|
+
resolveConfiguredOrigin(process.env.TUTURUUU_CONTACTS_BASE_URL) ||
|
|
334
|
+
(isProductionDeployment()
|
|
335
|
+
? 'https://contacts.tuturuuu.com'
|
|
336
|
+
: 'https://contacts.tuturuuu.localhost'));
|
|
337
|
+
}
|
|
338
|
+
function withContactsApiBaseUrl(options = {}) {
|
|
339
|
+
if (options.baseUrl || isContactsAppRuntime()) {
|
|
340
|
+
return options;
|
|
341
|
+
}
|
|
342
|
+
return {
|
|
343
|
+
...options,
|
|
344
|
+
baseUrl: getConfiguredContactsApiBaseUrl(),
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* `/api/v1/tulearn/bootstrap` is owned by apps/learn but is also consumed by
|
|
349
|
+
* apps/teach. Pin the call to the CALLING app's own origin so its app-session
|
|
350
|
+
* audience (learn or teach) matches — never cross-pin teach → learn (learn's
|
|
351
|
+
* proxy would reject a teach-audience session).
|
|
352
|
+
*/
|
|
353
|
+
function withEducationBootstrapBaseUrl(options = {}) {
|
|
354
|
+
if (options.baseUrl) {
|
|
355
|
+
return options;
|
|
356
|
+
}
|
|
357
|
+
if (isTeachAppRuntime()) {
|
|
358
|
+
return {
|
|
359
|
+
...options,
|
|
360
|
+
baseUrl: getConfiguredTeachApiBaseUrl(),
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
...options,
|
|
365
|
+
baseUrl: getConfiguredLearnApiBaseUrl(),
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
function isFinanceBrowserRuntime() {
|
|
369
|
+
return isCurrentBrowserHostname('finance.tuturuuu.com', 'finance.tuturuuu.localhost');
|
|
370
|
+
}
|
|
371
|
+
function getConfiguredFinanceApiBaseUrl() {
|
|
372
|
+
return normalizeBaseUrl(resolveConfiguredOrigin(process.env.FINANCE_APP_URL) ||
|
|
373
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_FINANCE_APP_URL) ||
|
|
374
|
+
resolveConfiguredOrigin(process.env.TUTURUUU_FINANCE_BASE_URL) ||
|
|
375
|
+
(isProductionDeployment()
|
|
376
|
+
? 'https://finance.tuturuuu.com'
|
|
377
|
+
: 'https://finance.tuturuuu.localhost'));
|
|
378
|
+
}
|
|
379
|
+
function withFinanceApiBaseUrl(options = {}) {
|
|
380
|
+
if (options.baseUrl || isFinanceBrowserRuntime()) {
|
|
381
|
+
return options;
|
|
382
|
+
}
|
|
383
|
+
return {
|
|
384
|
+
...options,
|
|
385
|
+
baseUrl: getConfiguredFinanceApiBaseUrl(),
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
function resolveInternalApiUrl(path, baseUrl) {
|
|
389
|
+
const normalizedPath = normalizePath(path);
|
|
390
|
+
if (/^https?:\/\//.test(normalizedPath)) {
|
|
391
|
+
return normalizedPath;
|
|
392
|
+
}
|
|
393
|
+
const resolvedBaseUrl = baseUrl
|
|
394
|
+
? normalizeBaseUrl(baseUrl)
|
|
395
|
+
: typeof window === 'undefined'
|
|
396
|
+
? getConfiguredInternalApiBaseUrl()
|
|
397
|
+
: undefined;
|
|
398
|
+
if (!resolvedBaseUrl) {
|
|
399
|
+
return normalizedPath;
|
|
400
|
+
}
|
|
401
|
+
return new URL(normalizedPath, resolvedBaseUrl).toString();
|
|
402
|
+
}
|
|
403
|
+
function getCookieName(cookiePart) {
|
|
404
|
+
return cookiePart.trim().split('=')[0]?.trim() ?? '';
|
|
405
|
+
}
|
|
406
|
+
function hasAppSessionCookie(cookieHeader) {
|
|
407
|
+
return cookieHeader
|
|
408
|
+
.split(';')
|
|
409
|
+
.some((part) => getCookieName(part) === APP_SESSION_COOKIE_NAME);
|
|
410
|
+
}
|
|
411
|
+
function getSupabaseAuthStorageKey(url) {
|
|
412
|
+
return `sb-${new URL(url).hostname.split('.')[0]}-auth-token`;
|
|
413
|
+
}
|
|
414
|
+
function getConfiguredSupabaseAuthStorageKeys() {
|
|
415
|
+
return [
|
|
416
|
+
process.env.NEXT_PUBLIC_SUPABASE_URL,
|
|
417
|
+
process.env.SUPABASE_SERVER_URL,
|
|
418
|
+
process.env.SUPABASE_URL,
|
|
419
|
+
]
|
|
420
|
+
.flatMap((url) => {
|
|
421
|
+
if (!url) {
|
|
422
|
+
return [];
|
|
423
|
+
}
|
|
424
|
+
try {
|
|
425
|
+
return [getSupabaseAuthStorageKey(url)];
|
|
426
|
+
}
|
|
427
|
+
catch {
|
|
428
|
+
return [];
|
|
429
|
+
}
|
|
430
|
+
})
|
|
431
|
+
.filter((value, index, values) => values.indexOf(value) === index);
|
|
432
|
+
}
|
|
433
|
+
function isSupabaseAuthCookieChunkForStorageKey(cookieName, storageKey) {
|
|
434
|
+
if (cookieName === storageKey) {
|
|
435
|
+
return true;
|
|
436
|
+
}
|
|
437
|
+
if (!cookieName.startsWith(`${storageKey}.`)) {
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
return /^\d+$/u.test(cookieName.slice(storageKey.length + 1));
|
|
441
|
+
}
|
|
442
|
+
function isSharedSupabaseCookieHostname(hostname) {
|
|
443
|
+
return (hostname === 'tuturuuu.com' ||
|
|
444
|
+
hostname.endsWith('.tuturuuu.com') ||
|
|
445
|
+
hostname === 'tuturuuu.localhost' ||
|
|
446
|
+
hostname.endsWith('.tuturuuu.localhost'));
|
|
447
|
+
}
|
|
448
|
+
function shouldPreserveSupabaseAuthCookie(cookieName, targetOrigin) {
|
|
449
|
+
if (!targetOrigin) {
|
|
450
|
+
return false;
|
|
451
|
+
}
|
|
452
|
+
const targetUrl = tryParseAbsoluteUrl(targetOrigin);
|
|
453
|
+
if (!targetUrl || !isSharedSupabaseCookieHostname(targetUrl.hostname)) {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
return getConfiguredSupabaseAuthStorageKeys().some((storageKey) => isSupabaseAuthCookieChunkForStorageKey(cookieName, storageKey));
|
|
457
|
+
}
|
|
458
|
+
function sanitizeForwardedCookieHeader(cookieHeader, targetOrigin) {
|
|
459
|
+
if (!cookieHeader || !hasAppSessionCookie(cookieHeader)) {
|
|
460
|
+
return cookieHeader;
|
|
461
|
+
}
|
|
462
|
+
const cookies = cookieHeader
|
|
463
|
+
.split(';')
|
|
464
|
+
.map((part) => part.trim())
|
|
465
|
+
.filter(Boolean)
|
|
466
|
+
.filter((part) => {
|
|
467
|
+
const cookieName = getCookieName(part);
|
|
468
|
+
return (!SUPABASE_AUTH_COOKIE_PATTERN.test(cookieName) ||
|
|
469
|
+
shouldPreserveSupabaseAuthCookie(cookieName, targetOrigin));
|
|
470
|
+
});
|
|
471
|
+
return cookies.length > 0 ? cookies.join('; ') : null;
|
|
472
|
+
}
|
|
473
|
+
function createInternalApiClient(options = {}) {
|
|
474
|
+
const doFetch = (path, init = {}) => {
|
|
475
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
476
|
+
const { baseUrl, headers: requestHeaders, query, ...requestInit } = init;
|
|
477
|
+
const requestPath = appendQuery(path, query);
|
|
478
|
+
const url = resolveInternalApiUrl(requestPath, baseUrl || options.baseUrl);
|
|
479
|
+
const headers = (0, request_headers_js_1.mergeHeaders)(options.defaultHeaders, requestHeaders);
|
|
480
|
+
return fetchImpl(url, {
|
|
481
|
+
...requestInit,
|
|
482
|
+
headers,
|
|
483
|
+
});
|
|
484
|
+
};
|
|
485
|
+
return {
|
|
486
|
+
fetch: doFetch,
|
|
487
|
+
async json(path, init = {}) {
|
|
488
|
+
const response = await doFetch(path, init);
|
|
489
|
+
if (!response.ok)
|
|
490
|
+
throw await (0, internal_api_error_js_1.parseInternalApiError)(response);
|
|
491
|
+
if (response.status === 204) {
|
|
492
|
+
return undefined;
|
|
493
|
+
}
|
|
494
|
+
return (await response.json());
|
|
495
|
+
},
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Creates Internal API client options that forward auth-relevant headers
|
|
500
|
+
* from an incoming request context (for example `next/headers()` in RSC).
|
|
501
|
+
*/
|
|
502
|
+
function withForwardedInternalApiAuth(requestHeaders, options = {}) {
|
|
503
|
+
const authorizationHeader = requestHeaders.get('authorization');
|
|
504
|
+
const allowedOrigins = new Set();
|
|
505
|
+
if (options.baseUrl) {
|
|
506
|
+
const parsed = tryParseAbsoluteUrl(normalizeBaseUrl(options.baseUrl));
|
|
507
|
+
if (parsed) {
|
|
508
|
+
allowedOrigins.add(parsed.origin);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
const configuredBaseUrl = tryParseAbsoluteUrl(getConfiguredInternalApiBaseUrl());
|
|
512
|
+
if (configuredBaseUrl) {
|
|
513
|
+
allowedOrigins.add(configuredBaseUrl.origin);
|
|
514
|
+
}
|
|
515
|
+
const configuredTasksBaseUrl = tryParseAbsoluteUrl(getConfiguredTasksApiBaseUrl());
|
|
516
|
+
if (configuredTasksBaseUrl) {
|
|
517
|
+
allowedOrigins.add(configuredTasksBaseUrl.origin);
|
|
518
|
+
}
|
|
519
|
+
const configuredMailBaseUrl = tryParseAbsoluteUrl(getConfiguredMailApiBaseUrl());
|
|
520
|
+
if (configuredMailBaseUrl) {
|
|
521
|
+
allowedOrigins.add(configuredMailBaseUrl.origin);
|
|
522
|
+
}
|
|
523
|
+
const configuredLearnBaseUrl = tryParseAbsoluteUrl(getConfiguredLearnApiBaseUrl());
|
|
524
|
+
if (configuredLearnBaseUrl) {
|
|
525
|
+
allowedOrigins.add(configuredLearnBaseUrl.origin);
|
|
526
|
+
}
|
|
527
|
+
const configuredTeachBaseUrl = tryParseAbsoluteUrl(getConfiguredTeachApiBaseUrl());
|
|
528
|
+
if (configuredTeachBaseUrl) {
|
|
529
|
+
allowedOrigins.add(configuredTeachBaseUrl.origin);
|
|
530
|
+
}
|
|
531
|
+
const configuredFinanceBaseUrl = tryParseAbsoluteUrl(getConfiguredFinanceApiBaseUrl());
|
|
532
|
+
if (configuredFinanceBaseUrl) {
|
|
533
|
+
allowedOrigins.add(configuredFinanceBaseUrl.origin);
|
|
534
|
+
}
|
|
535
|
+
const configuredPayBaseUrl = tryParseAbsoluteUrl(getConfiguredPayApiBaseUrl());
|
|
536
|
+
if (configuredPayBaseUrl) {
|
|
537
|
+
allowedOrigins.add(configuredPayBaseUrl.origin);
|
|
538
|
+
}
|
|
539
|
+
const configuredContactsBaseUrl = tryParseAbsoluteUrl(getConfiguredContactsApiBaseUrl());
|
|
540
|
+
if (configuredContactsBaseUrl) {
|
|
541
|
+
allowedOrigins.add(configuredContactsBaseUrl.origin);
|
|
542
|
+
}
|
|
543
|
+
const targetOrigin = (options.baseUrl
|
|
544
|
+
? tryParseAbsoluteUrl(normalizeBaseUrl(options.baseUrl))?.origin
|
|
545
|
+
: null) ??
|
|
546
|
+
configuredBaseUrl?.origin ??
|
|
547
|
+
null;
|
|
548
|
+
const cookieHeader = sanitizeForwardedCookieHeader(requestHeaders.get('cookie'), targetOrigin);
|
|
549
|
+
if (!cookieHeader && !authorizationHeader) {
|
|
550
|
+
return options;
|
|
551
|
+
}
|
|
552
|
+
const runtimeLocation = typeof globalThis === 'object' && 'location' in globalThis
|
|
553
|
+
? globalThis.location
|
|
554
|
+
: undefined;
|
|
555
|
+
if (runtimeLocation?.origin) {
|
|
556
|
+
allowedOrigins.add(runtimeLocation.origin);
|
|
557
|
+
}
|
|
558
|
+
const baseFetch = options.fetch || globalThis.fetch;
|
|
559
|
+
const forwardedFetch = async (input, init) => {
|
|
560
|
+
const requestUrl = typeof input === 'string'
|
|
561
|
+
? input
|
|
562
|
+
: input instanceof URL
|
|
563
|
+
? input.toString()
|
|
564
|
+
: input.url;
|
|
565
|
+
const isRelativeRequest = typeof requestUrl === 'string' && requestUrl.startsWith('/');
|
|
566
|
+
const parsedRequestUrl = isRelativeRequest
|
|
567
|
+
? null
|
|
568
|
+
: tryParseAbsoluteUrl(requestUrl);
|
|
569
|
+
const shouldForwardAuth = isRelativeRequest ||
|
|
570
|
+
(parsedRequestUrl ? allowedOrigins.has(parsedRequestUrl.origin) : false);
|
|
571
|
+
if (!shouldForwardAuth) {
|
|
572
|
+
return baseFetch(input, init);
|
|
573
|
+
}
|
|
574
|
+
const headers = new Headers(input instanceof Request ? input.headers : undefined);
|
|
575
|
+
if (init?.headers) {
|
|
576
|
+
const initHeaders = new Headers(init.headers);
|
|
577
|
+
initHeaders.forEach((value, key) => {
|
|
578
|
+
headers.set(key, value);
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
if (cookieHeader && !headers.has('cookie')) {
|
|
582
|
+
headers.set('cookie', cookieHeader);
|
|
583
|
+
}
|
|
584
|
+
if (authorizationHeader && !headers.has('authorization')) {
|
|
585
|
+
headers.set('authorization', authorizationHeader);
|
|
586
|
+
}
|
|
587
|
+
return baseFetch(input, {
|
|
588
|
+
...init,
|
|
589
|
+
headers,
|
|
590
|
+
});
|
|
591
|
+
};
|
|
592
|
+
return {
|
|
593
|
+
...options,
|
|
594
|
+
fetch: forwardedFetch,
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
exports.internalApiClient = createInternalApiClient();
|
|
598
|
+
function getInternalApiClient(options) {
|
|
599
|
+
return options ? createInternalApiClient(options) : exports.internalApiClient;
|
|
600
|
+
}
|
|
601
|
+
//# sourceMappingURL=client.js.map
|