create-qpq-app 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/lib/commonjs/bin/createQpqApp.d.ts +2 -0
- package/lib/commonjs/bin/createQpqApp.js +9 -0
- package/lib/commonjs/bin/createQpqApp.js.map +1 -0
- package/lib/commonjs/cli/runCreateQpqApp.d.ts +1 -0
- package/lib/commonjs/cli/runCreateQpqApp.js +75 -0
- package/lib/commonjs/cli/runCreateQpqApp.js.map +1 -0
- package/lib/commonjs/index.d.ts +3 -0
- package/lib/commonjs/index.js +20 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lib/args.d.ts +2 -0
- package/lib/commonjs/lib/args.js +21 -0
- package/lib/commonjs/lib/args.js.map +1 -0
- package/lib/commonjs/lib/files.d.ts +5 -0
- package/lib/commonjs/lib/files.js +65 -0
- package/lib/commonjs/lib/files.js.map +1 -0
- package/lib/commonjs/lib/packageRoot.d.ts +2 -0
- package/lib/commonjs/lib/packageRoot.js +26 -0
- package/lib/commonjs/lib/packageRoot.js.map +1 -0
- package/lib/commonjs/lib/prompts.d.ts +1 -0
- package/lib/commonjs/lib/prompts.js +53 -0
- package/lib/commonjs/lib/prompts.js.map +1 -0
- package/lib/commonjs/lib/runCommand.d.ts +4 -0
- package/lib/commonjs/lib/runCommand.js +24 -0
- package/lib/commonjs/lib/runCommand.js.map +1 -0
- package/lib/commonjs/steps/001_preflight.d.ts +2 -0
- package/lib/commonjs/steps/001_preflight.js +36 -0
- package/lib/commonjs/steps/001_preflight.js.map +1 -0
- package/lib/commonjs/steps/002_copyTemplate.d.ts +2 -0
- package/lib/commonjs/steps/002_copyTemplate.js +29 -0
- package/lib/commonjs/steps/002_copyTemplate.js.map +1 -0
- package/lib/commonjs/steps/003_deleteDocusaurus.d.ts +2 -0
- package/lib/commonjs/steps/003_deleteDocusaurus.js +32 -0
- package/lib/commonjs/steps/003_deleteDocusaurus.js.map +1 -0
- package/lib/commonjs/steps/004_deleteQpqjsApp.d.ts +2 -0
- package/lib/commonjs/steps/004_deleteQpqjsApp.js +26 -0
- package/lib/commonjs/steps/004_deleteQpqjsApp.js.map +1 -0
- package/lib/commonjs/steps/005_applyAppIdentity.d.ts +2 -0
- package/lib/commonjs/steps/005_applyAppIdentity.js +51 -0
- package/lib/commonjs/steps/005_applyAppIdentity.js.map +1 -0
- package/lib/commonjs/steps/006_applyDomain.d.ts +2 -0
- package/lib/commonjs/steps/006_applyDomain.js +31 -0
- package/lib/commonjs/steps/006_applyDomain.js.map +1 -0
- package/lib/commonjs/steps/007_pinRegistryVersions.d.ts +2 -0
- package/lib/commonjs/steps/007_pinRegistryVersions.js +37 -0
- package/lib/commonjs/steps/007_pinRegistryVersions.js.map +1 -0
- package/lib/commonjs/steps/008_transpileToJavaScript.d.ts +2 -0
- package/lib/commonjs/steps/008_transpileToJavaScript.js +24 -0
- package/lib/commonjs/steps/008_transpileToJavaScript.js.map +1 -0
- package/lib/commonjs/steps/009_restoreGitignore.d.ts +2 -0
- package/lib/commonjs/steps/009_restoreGitignore.js +31 -0
- package/lib/commonjs/steps/009_restoreGitignore.js.map +1 -0
- package/lib/commonjs/steps/010_gitInit.d.ts +2 -0
- package/lib/commonjs/steps/010_gitInit.js +30 -0
- package/lib/commonjs/steps/010_gitInit.js.map +1 -0
- package/lib/commonjs/steps/011_npmInstall.d.ts +2 -0
- package/lib/commonjs/steps/011_npmInstall.js +21 -0
- package/lib/commonjs/steps/011_npmInstall.js.map +1 -0
- package/lib/commonjs/steps/012_buildWorkspaces.d.ts +2 -0
- package/lib/commonjs/steps/012_buildWorkspaces.js +24 -0
- package/lib/commonjs/steps/012_buildWorkspaces.js.map +1 -0
- package/lib/commonjs/steps/013_printNextSteps.d.ts +2 -0
- package/lib/commonjs/steps/013_printNextSteps.js +33 -0
- package/lib/commonjs/steps/013_printNextSteps.js.map +1 -0
- package/lib/commonjs/steps/index.d.ts +16 -0
- package/lib/commonjs/steps/index.js +48 -0
- package/lib/commonjs/steps/index.js.map +1 -0
- package/lib/commonjs/types.d.ts +22 -0
- package/lib/commonjs/types.js +9 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/esm/bin/createQpqApp.d.ts +2 -0
- package/lib/esm/bin/createQpqApp.js +7 -0
- package/lib/esm/bin/createQpqApp.js.map +1 -0
- package/lib/esm/cli/runCreateQpqApp.d.ts +1 -0
- package/lib/esm/cli/runCreateQpqApp.js +57 -0
- package/lib/esm/cli/runCreateQpqApp.js.map +1 -0
- package/lib/esm/index.d.ts +3 -0
- package/lib/esm/index.js +4 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/lib/args.d.ts +2 -0
- package/lib/esm/lib/args.js +16 -0
- package/lib/esm/lib/args.js.map +1 -0
- package/lib/esm/lib/files.d.ts +5 -0
- package/lib/esm/lib/files.js +54 -0
- package/lib/esm/lib/files.js.map +1 -0
- package/lib/esm/lib/packageRoot.d.ts +2 -0
- package/lib/esm/lib/packageRoot.js +18 -0
- package/lib/esm/lib/packageRoot.js.map +1 -0
- package/lib/esm/lib/prompts.d.ts +1 -0
- package/lib/esm/lib/prompts.js +7 -0
- package/lib/esm/lib/prompts.js.map +1 -0
- package/lib/esm/lib/runCommand.d.ts +4 -0
- package/lib/esm/lib/runCommand.js +19 -0
- package/lib/esm/lib/runCommand.js.map +1 -0
- package/lib/esm/steps/001_preflight.d.ts +2 -0
- package/lib/esm/steps/001_preflight.js +21 -0
- package/lib/esm/steps/001_preflight.js.map +1 -0
- package/lib/esm/steps/002_copyTemplate.d.ts +2 -0
- package/lib/esm/steps/002_copyTemplate.js +14 -0
- package/lib/esm/steps/002_copyTemplate.js.map +1 -0
- package/lib/esm/steps/003_deleteDocusaurus.d.ts +2 -0
- package/lib/esm/steps/003_deleteDocusaurus.js +16 -0
- package/lib/esm/steps/003_deleteDocusaurus.js.map +1 -0
- package/lib/esm/steps/004_deleteQpqjsApp.d.ts +2 -0
- package/lib/esm/steps/004_deleteQpqjsApp.js +11 -0
- package/lib/esm/steps/004_deleteQpqjsApp.js.map +1 -0
- package/lib/esm/steps/005_applyAppIdentity.d.ts +2 -0
- package/lib/esm/steps/005_applyAppIdentity.js +36 -0
- package/lib/esm/steps/005_applyAppIdentity.js.map +1 -0
- package/lib/esm/steps/006_applyDomain.d.ts +2 -0
- package/lib/esm/steps/006_applyDomain.js +16 -0
- package/lib/esm/steps/006_applyDomain.js.map +1 -0
- package/lib/esm/steps/007_pinRegistryVersions.d.ts +2 -0
- package/lib/esm/steps/007_pinRegistryVersions.js +22 -0
- package/lib/esm/steps/007_pinRegistryVersions.js.map +1 -0
- package/lib/esm/steps/008_transpileToJavaScript.d.ts +2 -0
- package/lib/esm/steps/008_transpileToJavaScript.js +12 -0
- package/lib/esm/steps/008_transpileToJavaScript.js.map +1 -0
- package/lib/esm/steps/009_restoreGitignore.d.ts +2 -0
- package/lib/esm/steps/009_restoreGitignore.js +16 -0
- package/lib/esm/steps/009_restoreGitignore.js.map +1 -0
- package/lib/esm/steps/010_gitInit.d.ts +2 -0
- package/lib/esm/steps/010_gitInit.js +18 -0
- package/lib/esm/steps/010_gitInit.js.map +1 -0
- package/lib/esm/steps/011_npmInstall.d.ts +2 -0
- package/lib/esm/steps/011_npmInstall.js +9 -0
- package/lib/esm/steps/011_npmInstall.js.map +1 -0
- package/lib/esm/steps/012_buildWorkspaces.d.ts +2 -0
- package/lib/esm/steps/012_buildWorkspaces.js +12 -0
- package/lib/esm/steps/012_buildWorkspaces.js.map +1 -0
- package/lib/esm/steps/013_printNextSteps.d.ts +2 -0
- package/lib/esm/steps/013_printNextSteps.js +21 -0
- package/lib/esm/steps/013_printNextSteps.js.map +1 -0
- package/lib/esm/steps/index.d.ts +16 -0
- package/lib/esm/steps/index.js +33 -0
- package/lib/esm/steps/index.js.map +1 -0
- package/lib/esm/types.d.ts +22 -0
- package/lib/esm/types.js +6 -0
- package/lib/esm/types.js.map +1 -0
- package/package.json +57 -0
- package/template/.nvmrc +1 -0
- package/template/.prettierignore +4 -0
- package/template/.prettierrc +4 -0
- package/template/.vscode/extensions.json +3 -0
- package/template/.vscode/settings.json +14 -0
- package/template/README.md +150 -0
- package/template/apps/qpqjs/account.qpq.ts +39 -0
- package/template/apps/qpqjs/bootstrap.qpq.ts +36 -0
- package/template/apps/qpqjs/deploy.config.json +24 -0
- package/template/apps/qpqjs/packages/config/package.json +22 -0
- package/template/apps/qpqjs/packages/config/src/index.ts +2 -0
- package/template/apps/qpqjs/packages/config/tsconfig.json +18 -0
- package/template/apps/qpqjs/packages/config/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/packages/constants/package.json +22 -0
- package/template/apps/qpqjs/packages/constants/src/QpqjsServiceEnum.ts +11 -0
- package/template/apps/qpqjs/packages/constants/src/domain.ts +1 -0
- package/template/apps/qpqjs/packages/constants/src/index.ts +3 -0
- package/template/apps/qpqjs/packages/constants/src/userDirectory.ts +3 -0
- package/template/apps/qpqjs/packages/constants/tsconfig.json +18 -0
- package/template/apps/qpqjs/packages/constants/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/packages/service-utils/package.json +24 -0
- package/template/apps/qpqjs/packages/service-utils/src/defineQpqjsService.ts +148 -0
- package/template/apps/qpqjs/packages/service-utils/src/index.ts +1 -0
- package/template/apps/qpqjs/packages/service-utils/tsconfig.json +18 -0
- package/template/apps/qpqjs/packages/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/config/package.json +22 -0
- package/template/apps/qpqjs/services/admin/config/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/config/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/config/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/models/package.json +22 -0
- package/template/apps/qpqjs/services/admin/models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/service/package.json +9 -0
- package/template/apps/qpqjs/services/admin/service/src/infrastructure.ts +15 -0
- package/template/apps/qpqjs/services/admin/service/tsconfig.app.json +17 -0
- package/template/apps/qpqjs/services/admin/service/tsconfig.json +8 -0
- package/template/apps/qpqjs/services/admin/service-utils/package.json +22 -0
- package/template/apps/qpqjs/services/admin/service-utils/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/service-utils/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/shared-logic/package.json +22 -0
- package/template/apps/qpqjs/services/admin/shared-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/shared-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/views/package.json +8 -0
- package/template/apps/qpqjs/services/admin/views/src/app/app.tsx +39 -0
- package/template/apps/qpqjs/services/admin/views/src/assets/.gitkeep +0 -0
- package/template/apps/qpqjs/services/admin/views/src/bootstrap.tsx +14 -0
- package/template/apps/qpqjs/services/admin/views/src/components/AdminGrid/AdminGrid.tsx +80 -0
- package/template/apps/qpqjs/services/admin/views/src/components/AdminGrid/index.ts +1 -0
- package/template/apps/qpqjs/services/admin/views/src/components/AdminGrid/styles.ts +41 -0
- package/template/apps/qpqjs/services/admin/views/src/components/AdminGrid/types/AdminGridProps.ts +6 -0
- package/template/apps/qpqjs/services/admin/views/src/components/index.ts +1 -0
- package/template/apps/qpqjs/services/admin/views/src/favicon.ico +0 -0
- package/template/apps/qpqjs/services/admin/views/src/hooks/index.ts +1 -0
- package/template/apps/qpqjs/services/admin/views/src/hooks/useAdminNetworkRequest/index.ts +1 -0
- package/template/apps/qpqjs/services/admin/views/src/hooks/useAdminNetworkRequest/logic/getBaseUrlFromAdminWebHost.ts +7 -0
- package/template/apps/qpqjs/services/admin/views/src/hooks/useAdminNetworkRequest/types/AdminNetworkRequestPayload.ts +10 -0
- package/template/apps/qpqjs/services/admin/views/src/hooks/useAdminNetworkRequest/useAdminNetworkRequest.ts +18 -0
- package/template/apps/qpqjs/services/admin/views/src/index.html +23 -0
- package/template/apps/qpqjs/services/admin/views/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/views/src/main.ts +1 -0
- package/template/apps/qpqjs/services/admin/views/tsconfig.app.json +20 -0
- package/template/apps/qpqjs/services/admin/views/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/x-logic/package.json +22 -0
- package/template/apps/qpqjs/services/admin/x-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/x-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/x-models/package.json +22 -0
- package/template/apps/qpqjs/services/admin/x-models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/x-models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/x-models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/config/package.json +22 -0
- package/template/apps/qpqjs/services/design/config/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/config/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/config/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/models/package.json +22 -0
- package/template/apps/qpqjs/services/design/models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/service/package.json +9 -0
- package/template/apps/qpqjs/services/design/service/src/infrastructure.ts +15 -0
- package/template/apps/qpqjs/services/design/service/tsconfig.app.json +17 -0
- package/template/apps/qpqjs/services/design/service/tsconfig.json +8 -0
- package/template/apps/qpqjs/services/design/service-utils/package.json +22 -0
- package/template/apps/qpqjs/services/design/service-utils/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/service-utils/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/shared-logic/package.json +22 -0
- package/template/apps/qpqjs/services/design/shared-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/shared-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/views/package.json +8 -0
- package/template/apps/qpqjs/services/design/views/src/app.tsx +7 -0
- package/template/apps/qpqjs/services/design/views/src/bootstrap.tsx +14 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/LandingPage.tsx +20 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/CodeWindow.tsx +77 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/Features.tsx +83 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/Footer.tsx +45 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/Hero.tsx +60 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/InstallChip.tsx +27 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/NavBar.tsx +72 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/Packages.tsx +63 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/Pipeline.tsx +58 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/TronGrid.tsx +587 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/YieldLoop.tsx +361 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/landing.css +1170 -0
- package/template/apps/qpqjs/services/design/views/src/components/WelcomeScreen/WelcomeScreen.tsx +85 -0
- package/template/apps/qpqjs/services/design/views/src/index.html +12 -0
- package/template/apps/qpqjs/services/design/views/src/index.ts +1 -0
- package/template/apps/qpqjs/services/design/views/src/main.ts +1 -0
- package/template/apps/qpqjs/services/design/views/tsconfig.app.json +20 -0
- package/template/apps/qpqjs/services/design/views/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/x-logic/package.json +22 -0
- package/template/apps/qpqjs/services/design/x-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/x-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/x-models/package.json +22 -0
- package/template/apps/qpqjs/services/design/x-models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/x-models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/x-models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/config/package.json +22 -0
- package/template/apps/qpqjs/services/shell/config/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/config/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/config/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/models/package.json +22 -0
- package/template/apps/qpqjs/services/shell/models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/service/package.json +9 -0
- package/template/apps/qpqjs/services/shell/service/src/entry/controller/health/health.ts +21 -0
- package/template/apps/qpqjs/services/shell/service/src/entry/controller/health/index.ts +1 -0
- package/template/apps/qpqjs/services/shell/service/src/entry/controller/index.ts +1 -0
- package/template/apps/qpqjs/services/shell/service/src/infrastructure.ts +91 -0
- package/template/apps/qpqjs/services/shell/service/tsconfig.app.json +17 -0
- package/template/apps/qpqjs/services/shell/service/tsconfig.json +8 -0
- package/template/apps/qpqjs/services/shell/service-utils/package.json +22 -0
- package/template/apps/qpqjs/services/shell/service-utils/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/service-utils/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/shared-logic/package.json +22 -0
- package/template/apps/qpqjs/services/shell/shared-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/shared-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/views/package.json +8 -0
- package/template/apps/qpqjs/services/shell/views/src/app.tsx +6 -0
- package/template/apps/qpqjs/services/shell/views/src/bootstrap.tsx +14 -0
- package/template/apps/qpqjs/services/shell/views/src/index.html +25 -0
- package/template/apps/qpqjs/services/shell/views/src/index.ts +1 -0
- package/template/apps/qpqjs/services/shell/views/src/main.ts +1 -0
- package/template/apps/qpqjs/services/shell/views/tsconfig.app.json +20 -0
- package/template/apps/qpqjs/services/shell/views/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/x-logic/package.json +22 -0
- package/template/apps/qpqjs/services/shell/x-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/x-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/x-models/package.json +22 -0
- package/template/apps/qpqjs/services/shell/x-models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/x-models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/x-models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/tsconfig.federated.json +13 -0
- package/template/apps/todo/deploy.config.json +12 -0
- package/template/apps/todo/packages/config/package.json +22 -0
- package/template/apps/todo/packages/config/src/index.ts +2 -0
- package/template/apps/todo/packages/config/tsconfig.json +18 -0
- package/template/apps/todo/packages/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/packages/constants/package.json +22 -0
- package/template/apps/todo/packages/constants/src/TodoServiceEnum.ts +12 -0
- package/template/apps/todo/packages/constants/src/domain.ts +1 -0
- package/template/apps/todo/packages/constants/src/index.ts +3 -0
- package/template/apps/todo/packages/constants/src/userDirectory.ts +3 -0
- package/template/apps/todo/packages/constants/tsconfig.json +18 -0
- package/template/apps/todo/packages/constants/tsconfig.lib.json +19 -0
- package/template/apps/todo/packages/service-utils/package.json +24 -0
- package/template/apps/todo/packages/service-utils/src/defineTodoService.ts +128 -0
- package/template/apps/todo/packages/service-utils/src/index.ts +1 -0
- package/template/apps/todo/packages/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/packages/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/config/package.json +22 -0
- package/template/apps/todo/services/admin/config/src/index.ts +2 -0
- package/template/apps/todo/services/admin/config/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/models/package.json +22 -0
- package/template/apps/todo/services/admin/models/src/index.ts +2 -0
- package/template/apps/todo/services/admin/models/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/service/package.json +9 -0
- package/template/apps/todo/services/admin/service/src/infrastructure.ts +15 -0
- package/template/apps/todo/services/admin/service/tsconfig.app.json +17 -0
- package/template/apps/todo/services/admin/service/tsconfig.json +8 -0
- package/template/apps/todo/services/admin/service-utils/package.json +22 -0
- package/template/apps/todo/services/admin/service-utils/src/index.ts +2 -0
- package/template/apps/todo/services/admin/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/shared-logic/package.json +22 -0
- package/template/apps/todo/services/admin/shared-logic/src/index.ts +2 -0
- package/template/apps/todo/services/admin/shared-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/views/package.json +8 -0
- package/template/apps/todo/services/admin/views/src/app/app.tsx +39 -0
- package/template/apps/todo/services/admin/views/src/assets/.gitkeep +0 -0
- package/template/apps/todo/services/admin/views/src/bootstrap.tsx +14 -0
- package/template/apps/todo/services/admin/views/src/components/AdminGrid/AdminGrid.tsx +80 -0
- package/template/apps/todo/services/admin/views/src/components/AdminGrid/index.ts +1 -0
- package/template/apps/todo/services/admin/views/src/components/AdminGrid/styles.ts +41 -0
- package/template/apps/todo/services/admin/views/src/components/AdminGrid/types/AdminGridProps.ts +6 -0
- package/template/apps/todo/services/admin/views/src/components/index.ts +1 -0
- package/template/apps/todo/services/admin/views/src/favicon.ico +0 -0
- package/template/apps/todo/services/admin/views/src/hooks/index.ts +1 -0
- package/template/apps/todo/services/admin/views/src/hooks/useAdminNetworkRequest/index.ts +1 -0
- package/template/apps/todo/services/admin/views/src/hooks/useAdminNetworkRequest/logic/getBaseUrlFromAdminWebHost.ts +7 -0
- package/template/apps/todo/services/admin/views/src/hooks/useAdminNetworkRequest/types/AdminNetworkRequestPayload.ts +10 -0
- package/template/apps/todo/services/admin/views/src/hooks/useAdminNetworkRequest/useAdminNetworkRequest.ts +18 -0
- package/template/apps/todo/services/admin/views/src/index.html +23 -0
- package/template/apps/todo/services/admin/views/src/index.ts +2 -0
- package/template/apps/todo/services/admin/views/src/main.ts +1 -0
- package/template/apps/todo/services/admin/views/tsconfig.app.json +20 -0
- package/template/apps/todo/services/admin/views/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/x-logic/package.json +22 -0
- package/template/apps/todo/services/admin/x-logic/src/index.ts +2 -0
- package/template/apps/todo/services/admin/x-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/x-models/package.json +22 -0
- package/template/apps/todo/services/admin/x-models/src/index.ts +2 -0
- package/template/apps/todo/services/admin/x-models/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/x-models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/config/package.json +22 -0
- package/template/apps/todo/services/auth/config/src/index.ts +2 -0
- package/template/apps/todo/services/auth/config/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/models/package.json +22 -0
- package/template/apps/todo/services/auth/models/src/index.ts +2 -0
- package/template/apps/todo/services/auth/models/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/service/package.json +9 -0
- package/template/apps/todo/services/auth/service/src/infrastructure.ts +15 -0
- package/template/apps/todo/services/auth/service/tsconfig.app.json +17 -0
- package/template/apps/todo/services/auth/service/tsconfig.json +8 -0
- package/template/apps/todo/services/auth/service-utils/package.json +22 -0
- package/template/apps/todo/services/auth/service-utils/src/index.ts +2 -0
- package/template/apps/todo/services/auth/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/shared-logic/package.json +22 -0
- package/template/apps/todo/services/auth/shared-logic/src/index.ts +2 -0
- package/template/apps/todo/services/auth/shared-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/x-logic/package.json +22 -0
- package/template/apps/todo/services/auth/x-logic/src/index.ts +2 -0
- package/template/apps/todo/services/auth/x-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/x-models/package.json +22 -0
- package/template/apps/todo/services/auth/x-models/src/index.ts +2 -0
- package/template/apps/todo/services/auth/x-models/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/x-models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/config/package.json +22 -0
- package/template/apps/todo/services/design/config/src/index.ts +2 -0
- package/template/apps/todo/services/design/config/tsconfig.json +18 -0
- package/template/apps/todo/services/design/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/models/package.json +22 -0
- package/template/apps/todo/services/design/models/src/index.ts +2 -0
- package/template/apps/todo/services/design/models/tsconfig.json +18 -0
- package/template/apps/todo/services/design/models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/service/package.json +9 -0
- package/template/apps/todo/services/design/service/src/infrastructure.ts +15 -0
- package/template/apps/todo/services/design/service/tsconfig.app.json +17 -0
- package/template/apps/todo/services/design/service/tsconfig.json +8 -0
- package/template/apps/todo/services/design/service-utils/package.json +22 -0
- package/template/apps/todo/services/design/service-utils/src/index.ts +2 -0
- package/template/apps/todo/services/design/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/services/design/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/shared-logic/package.json +22 -0
- package/template/apps/todo/services/design/shared-logic/src/index.ts +2 -0
- package/template/apps/todo/services/design/shared-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/design/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/views/package.json +8 -0
- package/template/apps/todo/services/design/views/src/app.tsx +7 -0
- package/template/apps/todo/services/design/views/src/bootstrap.tsx +14 -0
- package/template/apps/todo/services/design/views/src/components/WelcomeScreen/WelcomeScreen.tsx +85 -0
- package/template/apps/todo/services/design/views/src/index.html +12 -0
- package/template/apps/todo/services/design/views/src/index.ts +1 -0
- package/template/apps/todo/services/design/views/src/main.ts +1 -0
- package/template/apps/todo/services/design/views/tsconfig.app.json +20 -0
- package/template/apps/todo/services/design/views/tsconfig.json +18 -0
- package/template/apps/todo/services/design/x-logic/package.json +22 -0
- package/template/apps/todo/services/design/x-logic/src/index.ts +2 -0
- package/template/apps/todo/services/design/x-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/design/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/x-models/package.json +22 -0
- package/template/apps/todo/services/design/x-models/src/index.ts +2 -0
- package/template/apps/todo/services/design/x-models/tsconfig.json +18 -0
- package/template/apps/todo/services/design/x-models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/config/package.json +22 -0
- package/template/apps/todo/services/shell/config/src/index.ts +2 -0
- package/template/apps/todo/services/shell/config/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/models/package.json +22 -0
- package/template/apps/todo/services/shell/models/src/index.ts +2 -0
- package/template/apps/todo/services/shell/models/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/service/package.json +9 -0
- package/template/apps/todo/services/shell/service/src/entry/controller/health/health.ts +21 -0
- package/template/apps/todo/services/shell/service/src/entry/controller/health/index.ts +1 -0
- package/template/apps/todo/services/shell/service/src/entry/controller/index.ts +1 -0
- package/template/apps/todo/services/shell/service/src/infrastructure.ts +75 -0
- package/template/apps/todo/services/shell/service/tsconfig.app.json +17 -0
- package/template/apps/todo/services/shell/service/tsconfig.json +8 -0
- package/template/apps/todo/services/shell/service-utils/package.json +22 -0
- package/template/apps/todo/services/shell/service-utils/src/index.ts +2 -0
- package/template/apps/todo/services/shell/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/shared-logic/package.json +22 -0
- package/template/apps/todo/services/shell/shared-logic/src/index.ts +2 -0
- package/template/apps/todo/services/shell/shared-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/views/package.json +8 -0
- package/template/apps/todo/services/shell/views/src/app.tsx +6 -0
- package/template/apps/todo/services/shell/views/src/bootstrap.tsx +14 -0
- package/template/apps/todo/services/shell/views/src/index.html +19 -0
- package/template/apps/todo/services/shell/views/src/index.ts +1 -0
- package/template/apps/todo/services/shell/views/src/main.ts +1 -0
- package/template/apps/todo/services/shell/views/tsconfig.app.json +20 -0
- package/template/apps/todo/services/shell/views/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/x-logic/package.json +22 -0
- package/template/apps/todo/services/shell/x-logic/src/index.ts +2 -0
- package/template/apps/todo/services/shell/x-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/x-models/package.json +22 -0
- package/template/apps/todo/services/shell/x-models/src/index.ts +2 -0
- package/template/apps/todo/services/shell/x-models/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/x-models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/config/package.json +22 -0
- package/template/apps/todo/services/todo/config/src/index.ts +2 -0
- package/template/apps/todo/services/todo/config/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/models/package.json +22 -0
- package/template/apps/todo/services/todo/models/src/index.ts +2 -0
- package/template/apps/todo/services/todo/models/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/service/package.json +9 -0
- package/template/apps/todo/services/todo/service/src/infrastructure.ts +15 -0
- package/template/apps/todo/services/todo/service/tsconfig.app.json +17 -0
- package/template/apps/todo/services/todo/service/tsconfig.json +8 -0
- package/template/apps/todo/services/todo/service-utils/package.json +22 -0
- package/template/apps/todo/services/todo/service-utils/src/index.ts +2 -0
- package/template/apps/todo/services/todo/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/shared-logic/package.json +22 -0
- package/template/apps/todo/services/todo/shared-logic/src/index.ts +2 -0
- package/template/apps/todo/services/todo/shared-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/views/package.json +8 -0
- package/template/apps/todo/services/todo/views/src/app.tsx +7 -0
- package/template/apps/todo/services/todo/views/src/bootstrap.tsx +14 -0
- package/template/apps/todo/services/todo/views/src/components/TodoList/TodoList.tsx +132 -0
- package/template/apps/todo/services/todo/views/src/index.html +11 -0
- package/template/apps/todo/services/todo/views/src/index.ts +1 -0
- package/template/apps/todo/services/todo/views/src/main.ts +1 -0
- package/template/apps/todo/services/todo/views/tsconfig.app.json +20 -0
- package/template/apps/todo/services/todo/views/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/x-logic/package.json +22 -0
- package/template/apps/todo/services/todo/x-logic/src/index.ts +2 -0
- package/template/apps/todo/services/todo/x-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/x-models/package.json +22 -0
- package/template/apps/todo/services/todo/x-models/src/index.ts +2 -0
- package/template/apps/todo/services/todo/x-models/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/x-models/tsconfig.lib.json +19 -0
- package/template/apps/todo/tsconfig.federated.json +13 -0
- package/template/docusaurus/DOCUMENTATION_CHECKLIST.md +499 -0
- package/template/docusaurus/README.md +41 -0
- package/template/docusaurus/blog/2019-05-28-first-blog-post.md +12 -0
- package/template/docusaurus/blog/2019-05-29-long-blog-post.md +44 -0
- package/template/docusaurus/blog/2021-08-01-mdx-blog-post.mdx +24 -0
- package/template/docusaurus/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
- package/template/docusaurus/blog/2021-08-26-welcome/index.md +29 -0
- package/template/docusaurus/blog/authors.yml +25 -0
- package/template/docusaurus/blog/tags.yml +19 -0
- package/template/docusaurus/docs/actions/core/_category_.json +8 -0
- package/template/docusaurus/docs/actions/core/ai/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/ai/ask-ai-prompt-stream.md +96 -0
- package/template/docusaurus/docs/actions/core/ai/ask-ai-prompt.md +121 -0
- package/template/docusaurus/docs/actions/core/array/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/array/ask-array-some.md +54 -0
- package/template/docusaurus/docs/actions/core/array/ask-filter.md +54 -0
- package/template/docusaurus/docs/actions/core/array/ask-flat-map-parallel-batch.md +68 -0
- package/template/docusaurus/docs/actions/core/array/ask-flat-map.md +56 -0
- package/template/docusaurus/docs/actions/core/array/ask-map-parallel-batch.md +67 -0
- package/template/docusaurus/docs/actions/core/array/ask-map-parallel.md +57 -0
- package/template/docusaurus/docs/actions/core/array/ask-map.md +58 -0
- package/template/docusaurus/docs/actions/core/array/ask-reduce.md +57 -0
- package/template/docusaurus/docs/actions/core/binary-data/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/binary-data/ask-create-text-qpq-binary-data.md +86 -0
- package/template/docusaurus/docs/actions/core/claude-ai/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/claude-ai/ask-claude-ai-messages-api.md +70 -0
- package/template/docusaurus/docs/actions/core/config/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-get-application-info.md +42 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-get-global.md +52 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-get-parameter.md +52 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-get-parameters.md +49 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-get-secret.md +54 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-list-parameters.md +46 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-set-parameter.md +51 -0
- package/template/docusaurus/docs/actions/core/config/ask-get-application-version.md +39 -0
- package/template/docusaurus/docs/actions/core/context/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/context/ask-context-provide-value.md +78 -0
- package/template/docusaurus/docs/actions/core/context/ask-context-read.md +96 -0
- package/template/docusaurus/docs/actions/core/date/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/date/ask-date-now.md +50 -0
- package/template/docusaurus/docs/actions/core/date/ask-get-current-epoch-ms.md +45 -0
- package/template/docusaurus/docs/actions/core/date/ask-get-current-epoch.md +45 -0
- package/template/docusaurus/docs/actions/core/date/ask-get-epoch-start-time.md +40 -0
- package/template/docusaurus/docs/actions/core/date/ask-seconds-elapsed-from.md +52 -0
- package/template/docusaurus/docs/actions/core/date/date-time-math.md +112 -0
- package/template/docusaurus/docs/actions/core/error/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/error/ask-throw-error.md +115 -0
- package/template/docusaurus/docs/actions/core/event/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/event/ask-process-event.md +77 -0
- package/template/docusaurus/docs/actions/core/event-bus/_category_.json +1 -0
- package/template/docusaurus/docs/actions/core/event-bus/ask-event-bus-send-messages.md +104 -0
- package/template/docusaurus/docs/actions/core/file/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-delete.md +69 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-exists.md +68 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-generate-temporary-secure-url.md +75 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-generate-temporary-upload-secure-url.md +91 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-is-cold-storage.md +72 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-list-directory.md +97 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-read-binary-contents.md +78 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-read-object-json.md +72 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-read-text-contents.md +69 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-stream-open.md +102 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-write-binary-contents.md +98 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-write-object-json.md +83 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-write-text-contents.md +69 -0
- package/template/docusaurus/docs/actions/core/graph-database/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/graph-database/ask-graph-database-execute-open-cypher-query.md +164 -0
- package/template/docusaurus/docs/actions/core/graph-database/ask-graph-database-internal-field-names.md +64 -0
- package/template/docusaurus/docs/actions/core/guid/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/guid/ask-new-guid.md +45 -0
- package/template/docusaurus/docs/actions/core/guid/ask-new-sortable-guid.md +49 -0
- package/template/docusaurus/docs/actions/core/inline-function/_category_.json +1 -0
- package/template/docusaurus/docs/actions/core/inline-function/ask-inline-function-execute.md +66 -0
- package/template/docusaurus/docs/actions/core/json/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/json/ask-decode-json.md +76 -0
- package/template/docusaurus/docs/actions/core/key-value-store/_category_.json +1 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-delete.md +57 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-get-all.md +60 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-get.md +73 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-query-all.md +58 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-query-single.md +62 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-query.md +129 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-scan-all.md +56 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-scan.md +71 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-update-partial-properties.md +75 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-update.md +106 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-upsert-with-retry.md +65 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-upsert.md +71 -0
- package/template/docusaurus/docs/actions/core/log/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/log/ask-log-create.md +64 -0
- package/template/docusaurus/docs/actions/core/log/ask-log-disable-event-history.md +53 -0
- package/template/docusaurus/docs/actions/core/log/ask-log-template-literal.md +55 -0
- package/template/docusaurus/docs/actions/core/math/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/math/ask-random-number.md +46 -0
- package/template/docusaurus/docs/actions/core/metric/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/metric/ask-metric-put.md +67 -0
- package/template/docusaurus/docs/actions/core/network/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/network/ask-network-request.md +95 -0
- package/template/docusaurus/docs/actions/core/platform/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/platform/ask-delay.md +48 -0
- package/template/docusaurus/docs/actions/core/queue/_category_.json +1 -0
- package/template/docusaurus/docs/actions/core/queue/ask-queue-send-messages.md +89 -0
- package/template/docusaurus/docs/actions/core/state/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/state/ask-reduce-state.md +160 -0
- package/template/docusaurus/docs/actions/core/state/ask-state-dispatch.md +87 -0
- package/template/docusaurus/docs/actions/core/state/ask-state-read.md +45 -0
- package/template/docusaurus/docs/actions/core/stream/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/stream/ask-stream-close.md +56 -0
- package/template/docusaurus/docs/actions/core/stream/ask-stream-map.md +73 -0
- package/template/docusaurus/docs/actions/core/stream/ask-stream-process.md +57 -0
- package/template/docusaurus/docs/actions/core/stream/ask-stream-read.md +140 -0
- package/template/docusaurus/docs/actions/core/system/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/system/ask-batch.md +55 -0
- package/template/docusaurus/docs/actions/core/system/ask-catch.md +85 -0
- package/template/docusaurus/docs/actions/core/system/ask-execute-if.md +51 -0
- package/template/docusaurus/docs/actions/core/system/ask-execute-story.md +56 -0
- package/template/docusaurus/docs/actions/core/system/ask-get-runtime-correlation.md +46 -0
- package/template/docusaurus/docs/actions/core/system/ask-override-actions.md +76 -0
- package/template/docusaurus/docs/actions/core/system/ask-parallel-deprecated.md +55 -0
- package/template/docusaurus/docs/actions/core/system/ask-retry.md +72 -0
- package/template/docusaurus/docs/actions/core/system/ask-run-parallel.md +62 -0
- package/template/docusaurus/docs/actions/core/user-directory/_category_.json +1 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-associate-software-token.md +73 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-authenticate-user.md +124 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-change-password.md +55 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-confirm-email-verification.md +52 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-confirm-forgot-password.md +58 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-create-user.md +72 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-decode-access-token.md +73 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-forgot-password.md +66 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-get-user-attributes-by-user-id.md +53 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-get-user-attributes.md +78 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-get-users-by-attribute.md +59 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-get-users.md +71 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-read-access-token.md +52 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-refresh-token.md +53 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-request-email-verification.md +53 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-respond-to-auth-challenge.md +124 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-set-access-token.md +52 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-set-password.md +55 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-set-user-attributes.md +60 -0
- package/template/docusaurus/docs/actions/features/_category_.json +1 -0
- package/template/docusaurus/docs/actions/features/event-doc/_category_.json +1 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-append-server-event.md +65 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-create.md +112 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-event-append.md +97 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-event-list.md +116 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-event-write.md +50 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-generate-asset-upload-url.md +127 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-get-by-code.md +97 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-get-by-id.md +121 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-get-draft.md +109 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-list.md +53 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-provide-store.md +160 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-resolve-actor.md +107 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-soft-delete.md +69 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/_category_.json +1 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/active-chat-state.md +153 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-attachments-validate.md +63 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-chat-history-load.md +95 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-chat-list.md +91 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-chat-requests.md +93 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-context-read.md +84 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-load-chats.md +37 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-new-chat.md +43 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-process-send.md +70 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-select-chat.md +42 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-send-message.md +52 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-service-request.md +53 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/chat-list-state.md +179 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/streaming-and-status-state.md +168 -0
- package/template/docusaurus/docs/actions/features/validation/_category_.json +1 -0
- package/template/docusaurus/docs/actions/features/validation/ask-validate-model-or-throw-error.md +73 -0
- package/template/docusaurus/docs/actions/webserver/_category_.json +8 -0
- package/template/docusaurus/docs/actions/webserver/admin/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/admin/ask-admin-get-log-metadata-children.md +62 -0
- package/template/docusaurus/docs/actions/webserver/admin/ask-admin-get-log-metadata.md +67 -0
- package/template/docusaurus/docs/actions/webserver/admin/ask-admin-get-log.md +84 -0
- package/template/docusaurus/docs/actions/webserver/admin/ask-admin-get-logs.md +96 -0
- package/template/docusaurus/docs/actions/webserver/api-key-validation/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/api-key-validation/ask-api-key-validation-validate.md +63 -0
- package/template/docusaurus/docs/actions/webserver/dns/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/dns/ask-dns-list.md +37 -0
- package/template/docusaurus/docs/actions/webserver/generic-data-resource/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/generic-data-resource/ask-put-generic-data-resource.md +48 -0
- package/template/docusaurus/docs/actions/webserver/generic-data-resource/ask-scan-generic-data-resource.md +49 -0
- package/template/docusaurus/docs/actions/webserver/open-api-spec/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/open-api-spec/ask-get-open-api-spec.md +43 -0
- package/template/docusaurus/docs/actions/webserver/route-auth-validation/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/route-auth-validation/ask-route-auth-validation-decode.md +65 -0
- package/template/docusaurus/docs/actions/webserver/service/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/service/ask-service-request.md +69 -0
- package/template/docusaurus/docs/actions/webserver/service-function/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/service-function/ask-service-function-execute.md +58 -0
- package/template/docusaurus/docs/actions/webserver/web-entry/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/web-entry/ask-web-entry-invalidate-cache.md +53 -0
- package/template/docusaurus/docs/actions/webserver/websocket/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/websocket/ask-websocket-send-message.md +71 -0
- package/template/docusaurus/docs/actions/xstate/_category_.json +1 -0
- package/template/docusaurus/docs/actions/xstate/ask-state-machine-create.md +60 -0
- package/template/docusaurus/docs/actions/xstate/ask-state-machine-get-state.md +65 -0
- package/template/docusaurus/docs/actions/xstate/ask-state-machine-get.md +57 -0
- package/template/docusaurus/docs/actions/xstate/ask-state-machine-send-event.md +69 -0
- package/template/docusaurus/docs/api/index.md +17 -0
- package/template/docusaurus/docs/architecture-overview.md +690 -0
- package/template/docusaurus/docs/config/config-aws/_category_.json +1 -0
- package/template/docusaurus/docs/config/config-aws/account-budget.md +117 -0
- package/template/docusaurus/docs/config/config-aws/account-cloud-trail.md +75 -0
- package/template/docusaurus/docs/config/config-aws/account-security-services.md +91 -0
- package/template/docusaurus/docs/config/config-aws/aws-alarm.md +142 -0
- package/template/docusaurus/docs/config/config-aws/aws-data-store-removal-policy.md +68 -0
- package/template/docusaurus/docs/config/config-aws/aws-dyanmo-override-for-kvs.md +70 -0
- package/template/docusaurus/docs/config/config-aws/aws-kms-key.md +100 -0
- package/template/docusaurus/docs/config/config-aws/aws-service-account-info.md +114 -0
- package/template/docusaurus/docs/config/config-aws/aws-service-dashboard.md +61 -0
- package/template/docusaurus/docs/config/config-aws/aws-virtual-network-settings.md +88 -0
- package/template/docusaurus/docs/config/config-aws/bootstrap-aws-organization.md +80 -0
- package/template/docusaurus/docs/config/config-aws/bootstrap-waf.md +106 -0
- package/template/docusaurus/docs/config/config-aws/domain-certificate.md +69 -0
- package/template/docusaurus/docs/config/config-aws/event-bus-quick-subscription.md +84 -0
- package/template/docusaurus/docs/config/config-aws/waf-protection.md +45 -0
- package/template/docusaurus/docs/config/core/_category_.json +8 -0
- package/template/docusaurus/docs/config/core/action-processors.md +65 -0
- package/template/docusaurus/docs/config/core/ai.md +80 -0
- package/template/docusaurus/docs/config/core/api-build-path.md +40 -0
- package/template/docusaurus/docs/config/core/application-module.md +58 -0
- package/template/docusaurus/docs/config/core/application-name.md +66 -0
- package/template/docusaurus/docs/config/core/application-version.md +58 -0
- package/template/docusaurus/docs/config/core/claude-ai.md +52 -0
- package/template/docusaurus/docs/config/core/config-value.md +38 -0
- package/template/docusaurus/docs/config/core/deploy-event.md +94 -0
- package/template/docusaurus/docs/config/core/environment-settings.md +67 -0
- package/template/docusaurus/docs/config/core/event-bus.md +88 -0
- package/template/docusaurus/docs/config/core/federated-module-store.md +61 -0
- package/template/docusaurus/docs/config/core/global.md +43 -0
- package/template/docusaurus/docs/config/core/graph-database.md +72 -0
- package/template/docusaurus/docs/config/core/inline-function.md +61 -0
- package/template/docusaurus/docs/config/core/javascript-runtime.md +79 -0
- package/template/docusaurus/docs/config/core/key-value-store.md +135 -0
- package/template/docusaurus/docs/config/core/module-name.md +46 -0
- package/template/docusaurus/docs/config/core/notify-error.md +97 -0
- package/template/docusaurus/docs/config/core/parameter.md +53 -0
- package/template/docusaurus/docs/config/core/promise-mode.md +39 -0
- package/template/docusaurus/docs/config/core/queue.md +112 -0
- package/template/docusaurus/docs/config/core/recurring-schedule.md +117 -0
- package/template/docusaurus/docs/config/core/secret.md +51 -0
- package/template/docusaurus/docs/config/core/service-settings.md +49 -0
- package/template/docusaurus/docs/config/core/storage-drive.md +142 -0
- package/template/docusaurus/docs/config/core/user-directory.md +189 -0
- package/template/docusaurus/docs/config/core/virtual-network.md +60 -0
- package/template/docusaurus/docs/config/features/_category_.json +1 -0
- package/template/docusaurus/docs/config/features/admin-session-event-doc.md +47 -0
- package/template/docusaurus/docs/config/features/admin-settings.md +106 -0
- package/template/docusaurus/docs/config/features/admin-user-directory.md +57 -0
- package/template/docusaurus/docs/config/features/event-doc-ai.md +104 -0
- package/template/docusaurus/docs/config/features/event-doc-routes.md +100 -0
- package/template/docusaurus/docs/config/features/event-doc-summary.md +59 -0
- package/template/docusaurus/docs/config/features/event-doc.md +75 -0
- package/template/docusaurus/docs/config/features/versioned-route.md +85 -0
- package/template/docusaurus/docs/config/neo4j/_category_.json +1 -0
- package/template/docusaurus/docs/config/neo4j/graph-database-neo4j.md +122 -0
- package/template/docusaurus/docs/config/webserver/_category_.json +8 -0
- package/template/docusaurus/docs/config/webserver/api-key.md +87 -0
- package/template/docusaurus/docs/config/webserver/api.md +75 -0
- package/template/docusaurus/docs/config/webserver/auth-system.md +110 -0
- package/template/docusaurus/docs/config/webserver/cache.md +94 -0
- package/template/docusaurus/docs/config/webserver/certificate.md +64 -0
- package/template/docusaurus/docs/config/webserver/default-route-options.md +77 -0
- package/template/docusaurus/docs/config/webserver/dns.md +57 -0
- package/template/docusaurus/docs/config/webserver/domain-proxy.md +109 -0
- package/template/docusaurus/docs/config/webserver/file-upload-settings.md +63 -0
- package/template/docusaurus/docs/config/webserver/migration.md +83 -0
- package/template/docusaurus/docs/config/webserver/open-api.md +36 -0
- package/template/docusaurus/docs/config/webserver/route.md +109 -0
- package/template/docusaurus/docs/config/webserver/seed.md +61 -0
- package/template/docusaurus/docs/config/webserver/seo.md +72 -0
- package/template/docusaurus/docs/config/webserver/service-function.md +69 -0
- package/template/docusaurus/docs/config/webserver/state-dispatch-over-websockets.md +42 -0
- package/template/docusaurus/docs/config/webserver/storage-drive-cors-settings.md +73 -0
- package/template/docusaurus/docs/config/webserver/subdomain-redirect.md +80 -0
- package/template/docusaurus/docs/config/webserver/web-entry.md +150 -0
- package/template/docusaurus/docs/config/webserver/web-socket-queue.md +88 -0
- package/template/docusaurus/docs/config/webserver/websocket.md +110 -0
- package/template/docusaurus/docs/config/xstate/_category_.json +1 -0
- package/template/docusaurus/docs/config/xstate/state-machine.md +201 -0
- package/template/docusaurus/docs/core-concepts.md +23 -0
- package/template/docusaurus/docs/getting-started.md +806 -0
- package/template/docusaurus/docs/index.md +211 -0
- package/template/docusaurus/docs/intro.md +47 -0
- package/template/docusaurus/docs/tutorial-basics/_category_.json +8 -0
- package/template/docusaurus/docs/tutorial-basics/congratulations.md +23 -0
- package/template/docusaurus/docs/tutorial-basics/create-a-blog-post.md +34 -0
- package/template/docusaurus/docs/tutorial-basics/create-a-document.md +57 -0
- package/template/docusaurus/docs/tutorial-basics/create-a-page.md +43 -0
- package/template/docusaurus/docs/tutorial-basics/deploy-your-site.md +31 -0
- package/template/docusaurus/docs/tutorial-basics/markdown-features.mdx +152 -0
- package/template/docusaurus/docs/tutorial-extras/_category_.json +7 -0
- package/template/docusaurus/docs/tutorial-extras/img/docsVersionDropdown.png +0 -0
- package/template/docusaurus/docs/tutorial-extras/img/localeDropdown.png +0 -0
- package/template/docusaurus/docs/tutorial-extras/manage-docs-versions.md +55 -0
- package/template/docusaurus/docs/tutorial-extras/translate-your-site.md +88 -0
- package/template/docusaurus/docs/use-cases.md +455 -0
- package/template/docusaurus/docusaurus.config.ts +181 -0
- package/template/docusaurus/gitignore +20 -0
- package/template/docusaurus/package.json +49 -0
- package/template/docusaurus/sidebars.ts +27 -0
- package/template/docusaurus/src/components/HomepageFeatures/index.tsx +72 -0
- package/template/docusaurus/src/components/HomepageFeatures/styles.module.css +11 -0
- package/template/docusaurus/src/css/custom.css +423 -0
- package/template/docusaurus/src/pages/index.module.css +23 -0
- package/template/docusaurus/static/.nojekyll +0 -0
- package/template/docusaurus/static/img/docusaurus-social-card.jpg +0 -0
- package/template/docusaurus/static/img/docusaurus.png +0 -0
- package/template/docusaurus/static/img/favicon.ico +0 -0
- package/template/docusaurus/static/img/favicon.svg +4 -0
- package/template/docusaurus/static/img/logo.svg +1 -0
- package/template/docusaurus/static/img/qpq-logo.svg +4 -0
- package/template/docusaurus/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/template/docusaurus/static/img/undraw_docusaurus_react.svg +170 -0
- package/template/docusaurus/static/img/undraw_docusaurus_tree.svg +40 -0
- package/template/docusaurus/tsconfig.json +8 -0
- package/template/eslint.config.mjs +3 -0
- package/template/gitignore +116 -0
- package/template/package.json +126 -0
- package/template/tsconfig.base.json +23 -0
- package/template/tsconfig.json +16 -0
- package/template/types/assets.d.ts +3 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askQueueSendMessages
|
|
3
|
+
description: Enqueue one or more messages onto a queue for its consumer stories to process asynchronously.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askQueueSendMessages
|
|
7
|
+
|
|
8
|
+
Enqueues one or more messages onto a [queue](../../../config/core/queue.md). Each message is delivered asynchronously to the consumer story whose processor pattern matches the message's `type`. Sending is fire-and-forget — the action returns once the messages are accepted, not when they are processed.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `QueueActionType.SendMessages`
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { askQueueSendMessages } from 'quidproquo-core';
|
|
14
|
+
|
|
15
|
+
export function* scheduleWelcomeEmail(user: { id: string; email: string }) {
|
|
16
|
+
yield* askQueueSendMessages('emails',
|
|
17
|
+
{ type: 'email.welcome', payload: { userId: user.id, to: user.email } },
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Signature
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
function* askQueueSendMessages<T extends QueueMessage<any>>(
|
|
26
|
+
queueName: string,
|
|
27
|
+
...queueMessages: T[]
|
|
28
|
+
): AskResponse<void>;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Parameters
|
|
32
|
+
|
|
33
|
+
| Parameter | Type | Description |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `queueName` | `string` | Name of the queue to send to — must match a queue declared with [defineQueue](../../../config/core/queue.md) (or one shared via its `owner` option). |
|
|
36
|
+
| `...queueMessages` | `QueueMessage<T>[]` | One or more messages to enqueue, passed as rest arguments. |
|
|
37
|
+
|
|
38
|
+
### `QueueMessage<T>`
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
export type QueueMessage<T> = {
|
|
42
|
+
type: string;
|
|
43
|
+
payload: T;
|
|
44
|
+
groupId?: string;
|
|
45
|
+
deduplicationId?: string;
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
| Property | Type | Description |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| `type` | `string` | The message type. The queue matches this against its processor patterns (from [defineQueue](../../../config/core/queue.md)) to pick the consumer story. |
|
|
52
|
+
| `payload` | `T` | The message body, serialized as JSON on the wire. |
|
|
53
|
+
| `groupId` | `string` (optional) | **FIFO queues only.** Messages sharing a group are processed in order. Defaults to the queue name (global ordering). Ignored on non-FIFO queues. |
|
|
54
|
+
| `deduplicationId` | `string` (optional) | **FIFO queues only.** Suppresses duplicate sends within SQS's 5-minute window. Defaults to a generated uuid (no deduplication). Ignored on non-FIFO queues. |
|
|
55
|
+
|
|
56
|
+
## Returns
|
|
57
|
+
|
|
58
|
+
`void` — the action completes once the messages are accepted by the queue. It does not wait for the consumer stories.
|
|
59
|
+
|
|
60
|
+
## Errors
|
|
61
|
+
|
|
62
|
+
| Error | Meaning |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| `QueueSendMessagesErrorTypeEnum.AccessDenied` | The caller lacks permission to send to the queue. |
|
|
65
|
+
| `QueueSendMessagesErrorTypeEnum.QueueNotFound` | The underlying queue does not exist. |
|
|
66
|
+
| `QueueSendMessagesErrorTypeEnum.ServiceUnavailable` | Internal error or throttling from the messaging service. |
|
|
67
|
+
|
|
68
|
+
Errors thrown by actions can be caught with `askCatch` from quidproquo-core. It returns an `EitherActionResult` — `{ success: true, result }` on success, or `{ success: false, error }` on failure:
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
const outcome = yield* askCatch(
|
|
72
|
+
askQueueSendMessages('emails', { type: 'email.welcome', payload: { userId } }),
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
if (!outcome.success) {
|
|
76
|
+
// outcome.error.errorType / outcome.error.errorText
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Notes
|
|
81
|
+
|
|
82
|
+
- Messages are sent with the caller's story session attached, which the pipeline restores when the consumer story runs.
|
|
83
|
+
- For FIFO ordering, set `groupId` per message to control which messages must stay ordered relative to each other.
|
|
84
|
+
|
|
85
|
+
## Related
|
|
86
|
+
|
|
87
|
+
- [defineQueue](../../../config/core/queue.md) — declares the queue this action sends to and maps message types to consumer stories.
|
|
88
|
+
- [askEventBusSendMessages](../event-bus/ask-event-bus-send-messages.md) — publish to an event bus (fan-out to many queues) instead of one queue.
|
|
89
|
+
- [askProcessEvent](../event/ask-process-event.md) — the pipeline that matches each delivered message to a consumer story and preserves FIFO group ordering.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askReduceState
|
|
3
|
+
description: Run a story purely for its dispatched effects and return the reduced state.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askReduceState
|
|
7
|
+
|
|
8
|
+
Runs an inner story purely for its state effects and returns the computed state. Every [askStateDispatch](./ask-state-dispatch.md) the inner story yields is captured here (it never reaches the outer runtime), fed through your `reducer`, and accumulated. Any [askStateRead](./ask-state-read.md) the story issues returns the current accumulated state. When the inner story finishes, `askReduceState` returns the final state. This is the pure-logic, backend counterpart to the React `useQPQ` reducer hooks: it lets any story run the same dispatch/read logic without a live State processor.
|
|
9
|
+
|
|
10
|
+
- **Built from:** `askOverrideActions` — it intercepts the inner story's `StateActionType.Dispatch` and `StateActionType.Read` actions, handling each with your `reducer` and the accumulated state instead of letting them bubble to the runtime.
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import {
|
|
14
|
+
askReduceState,
|
|
15
|
+
askStateDispatch,
|
|
16
|
+
askStateDispatchEffect,
|
|
17
|
+
askStateRead,
|
|
18
|
+
buildMutableEffectReducer,
|
|
19
|
+
Effect,
|
|
20
|
+
} from 'quidproquo-core';
|
|
21
|
+
|
|
22
|
+
// 1. Model the state and the effects that change it.
|
|
23
|
+
interface CounterState {
|
|
24
|
+
count: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type IncrementEffect = Effect<'counter/Increment'>;
|
|
28
|
+
type AddEffect = Effect<'counter/Add', number>;
|
|
29
|
+
type CounterEffects = IncrementEffect | AddEffect;
|
|
30
|
+
|
|
31
|
+
// 2. Define a reducer: one handler per effect type.
|
|
32
|
+
const counterReducer = buildMutableEffectReducer<CounterState, CounterEffects>({
|
|
33
|
+
'counter/Increment': (state) => {
|
|
34
|
+
state.count += 1;
|
|
35
|
+
},
|
|
36
|
+
'counter/Add': (state, amount) => {
|
|
37
|
+
state.count += amount;
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// 3. Write a story that dispatches effects (and can read state mid-flight).
|
|
42
|
+
function* countingLogic() {
|
|
43
|
+
yield* askStateDispatch<CounterEffects>({ type: 'counter/Increment', payload: undefined });
|
|
44
|
+
yield* askStateDispatchEffect<AddEffect>('counter/Add', 5);
|
|
45
|
+
|
|
46
|
+
const soFar = yield* askStateRead<CounterState>();
|
|
47
|
+
// soFar === { count: 6 }
|
|
48
|
+
|
|
49
|
+
yield* askStateDispatch<CounterEffects>({ type: 'counter/Increment', payload: undefined });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// 4. Reduce the story into a final state.
|
|
53
|
+
export function* askComputeCount() {
|
|
54
|
+
const finalState = yield* askReduceState<CounterState, CounterEffects>(
|
|
55
|
+
{ count: 0 },
|
|
56
|
+
counterReducer,
|
|
57
|
+
countingLogic,
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
return finalState.count; // 7
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Signature
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
function* askReduceState<State, Effect>(
|
|
68
|
+
initialState: State,
|
|
69
|
+
reducer: QpqReducer<State, Effect>,
|
|
70
|
+
story: () => AskResponse<void>,
|
|
71
|
+
): AskResponse<State>;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Parameters
|
|
75
|
+
|
|
76
|
+
| Parameter | Type | Description |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| `initialState` | `State` | The starting state. Dispatched effects are reduced onto this value. |
|
|
79
|
+
| `reducer` | `QpqReducer<State, Effect>` | A reducer that maps `(state, effect)` to `[nextState, handled]` — see [reducers](#reducers) below. Usually built with [`buildEffectReducer`](#buildeffectreducer--buildmutableeffectreducer) or `buildMutableEffectReducer`. |
|
|
80
|
+
| `story` | `() => AskResponse<void>` | A **factory** that returns the inner story to run. Its `askStateDispatch` / `askStateRead` actions are intercepted; every other action bubbles through to the outer runtime unchanged. |
|
|
81
|
+
|
|
82
|
+
## Returns
|
|
83
|
+
|
|
84
|
+
`State` — the accumulated state after the inner story runs to completion. Reads inside the story see the state as-of that point; the returned value is the final state.
|
|
85
|
+
|
|
86
|
+
## Reducers
|
|
87
|
+
|
|
88
|
+
A quidproquo reducer is a plain function that returns a tuple of `[nextState, handled]`:
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
type QpqReducer<State, Effect> = (state: State, effect: Effect) => [State, boolean];
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The second element, `handled`, is what makes effects composable: `true` means this reducer owned the effect and `nextState` is authoritative; `false` means it ignored the effect (and returned `state` unchanged). Inside `askReduceState`, an unhandled effect (`false`) is **relayed outward** — to a parent `askReduceState` or the runtime — rather than dropped, so nested reducers can each own their own slice of effects.
|
|
95
|
+
|
|
96
|
+
### `buildEffectReducer` / `buildMutableEffectReducer`
|
|
97
|
+
|
|
98
|
+
You rarely write the tuple by hand. Both helpers turn a map of `{ [effectType]: handler }` into a `QpqReducer`, returning `[handledState, true]` when a handler matches the effect's `type` and `[state, false]` otherwise:
|
|
99
|
+
|
|
100
|
+
- **`buildEffectReducer`** — handlers are **immutable**: each returns the next state. Good for simple, flat state.
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
const counterReducer = buildEffectReducer<CounterState, CounterEffects>({
|
|
104
|
+
'counter/Increment': (state) => ({ ...state, count: state.count + 1 }),
|
|
105
|
+
'counter/Add': (state, amount) => ({ ...state, count: state.count + amount }),
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- **`buildMutableEffectReducer`** — handlers **mutate a draft** and return nothing; it wraps them in [Immer](https://immerjs.github.io/immer/)'s `produce`, so you get immutable updates while writing imperative code. Best for deeply nested state.
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
const counterReducer = buildMutableEffectReducer<CounterState, CounterEffects>({
|
|
113
|
+
'counter/Increment': (state) => { state.count += 1; },
|
|
114
|
+
'counter/Add': (state, amount) => { state.count += amount; },
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
In both, each handler receives `(state, payload)` — the effect's `payload` is passed directly, already narrowed to the type for that effect case.
|
|
119
|
+
|
|
120
|
+
### `combineQpqReducers`
|
|
121
|
+
|
|
122
|
+
Composes two reducers into one that handles the **union** of their effects. It tries the first reducer; if that returns `handled: true` it wins, otherwise the (possibly-updated) state is passed to the second:
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
import { combineQpqReducers } from 'quidproquo-core';
|
|
126
|
+
|
|
127
|
+
const appReducer = combineQpqReducers(counterReducer, markReducer);
|
|
128
|
+
// handles CounterEffects | MarkEffects
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Chain calls to combine more than two. The result is a `QpqReducer` you can pass straight to `askReduceState`.
|
|
132
|
+
|
|
133
|
+
## `replayEffects`
|
|
134
|
+
|
|
135
|
+
`askReduceState` reduces effects **live** as a story dispatches them. `replayEffects` is its synchronous, event-sourcing counterpart: given a stored **array** of effects, it reduces them into state with no story and no generator involved:
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
import { replayEffects } from 'quidproquo-core';
|
|
139
|
+
|
|
140
|
+
const state = replayEffects({ count: 0 }, counterReducer, [
|
|
141
|
+
{ type: 'counter/Add', payload: 5 },
|
|
142
|
+
{ type: 'counter/Increment', payload: undefined },
|
|
143
|
+
]);
|
|
144
|
+
// { count: 6 }
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Effects the reducer doesn't handle leave the state unchanged and are skipped. Use it to rebuild current state from a persisted effect log.
|
|
148
|
+
|
|
149
|
+
## Notes
|
|
150
|
+
|
|
151
|
+
- The inner story runs with **no live State runtime**: because every state action is captured here, a `story` that only dispatches/reads state completes synchronously (the generator finishes on the first `next()`).
|
|
152
|
+
- Non-state actions are **not** captured — they bubble to the outer runtime as normal, so a story can freely mix state dispatches with other actions like `askRandomNumber` or `askNetworkRequest`.
|
|
153
|
+
- `askReduceState` nests: an inner call owns its own state and reducer, and effects its reducer doesn't handle bubble up to the enclosing `askReduceState`. Reads always resolve against the nearest enclosing call's state.
|
|
154
|
+
- Dispatch and read outcomes are correctly shaped for `askCatch` (they wrap exactly once), so wrapping `askStateDispatch`/`askStateRead` in `askCatch` behaves as expected.
|
|
155
|
+
|
|
156
|
+
## Related
|
|
157
|
+
|
|
158
|
+
- [askStateDispatch](./ask-state-dispatch.md) — dispatch the effects this story reduces.
|
|
159
|
+
- [askStateRead](./ask-state-read.md) — read the accumulated state mid-story.
|
|
160
|
+
- [defineStateDispatchOverWebsockets](../../../config/webserver/state-dispatch-over-websockets.md) — stream reduced dispatches to a WebSocket client.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askStateDispatch
|
|
3
|
+
description: Dispatch an action (effect) into the surrounding reducer to update in-story state.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askStateDispatch
|
|
7
|
+
|
|
8
|
+
Dispatches an action — an **effect** — into the state reducer that surrounds the story, Redux-style. The dispatch itself carries no return value; it exists to update the accumulated state, which you later read back with [askStateRead](./ask-state-read.md). What actually consumes the dispatch depends on the runtime: [askReduceState](./ask-reduce-state.md) captures it and runs it through your reducer, while the React `useQPQ` hooks forward it to a `React.Dispatch`.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `StateActionType.Dispatch`
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { askStateDispatch } from 'quidproquo-core';
|
|
14
|
+
|
|
15
|
+
// CounterEffects is your effect union, e.g. Effect<'counter/Add', number>
|
|
16
|
+
export function* askAddToCounter(amount: number) {
|
|
17
|
+
yield* askStateDispatch<CounterEffects>({ type: 'counter/Add', payload: amount });
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Signature
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
function* askStateDispatch<T>(action: T): AskResponse<void>;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Description |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| `action` | `T` | The action/effect to dispatch. In practice `T` is an [`Effect`](#effect-and-askstatedispatcheffect) — a `{ type, payload }` object — matching one of the cases your reducer handles. |
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`void` — a dispatch produces no value. It updates the surrounding state as a side effect; use [askStateRead](./ask-state-read.md) to observe the result.
|
|
36
|
+
|
|
37
|
+
## `Effect` and `askStateDispatchEffect`
|
|
38
|
+
|
|
39
|
+
An **effect** is the unit of state change dispatched here. It is just a typed, tagged payload:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
type Effect<TType extends string, TPayload = undefined> = {
|
|
43
|
+
type: TType;
|
|
44
|
+
payload: TPayload;
|
|
45
|
+
};
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
You typically model your effects as a union of `Effect<...>` types and give each a reducer case:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import { Effect } from 'quidproquo-core';
|
|
52
|
+
|
|
53
|
+
type IncrementEffect = Effect<'counter/Increment'>; // payload: undefined
|
|
54
|
+
type AddEffect = Effect<'counter/Add', number>; // payload: number
|
|
55
|
+
type CounterEffects = IncrementEffect | AddEffect;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`askStateDispatchEffect` is a thin convenience wrapper over `askStateDispatch` that builds the `{ type, payload }` object for you from the type and payload arguments — handy for effects, especially payload-less ones:
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import { askStateDispatchEffect } from 'quidproquo-core';
|
|
62
|
+
|
|
63
|
+
export function* askBumpCounter() {
|
|
64
|
+
yield* askStateDispatchEffect<IncrementEffect>('counter/Increment'); // payload defaults to undefined
|
|
65
|
+
yield* askStateDispatchEffect<AddEffect>('counter/Add', 5);
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Its signature is:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
function* askStateDispatchEffect<E extends Effect<any, any>>(
|
|
73
|
+
type: E['type'],
|
|
74
|
+
payload?: E['payload'],
|
|
75
|
+
): AskResponse<void>;
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Notes
|
|
79
|
+
|
|
80
|
+
- Dispatch is fire-and-forget from the story's point of view — there is no acknowledgement value, only the state mutation it triggers.
|
|
81
|
+
- When [askReduceState](./ask-reduce-state.md) surrounds the story and its reducer does **not** handle a dispatched effect, the effect bubbles outward to a parent `askReduceState` (or the outer runtime) instead of being silently dropped.
|
|
82
|
+
|
|
83
|
+
## Related
|
|
84
|
+
|
|
85
|
+
- [askStateRead](./ask-state-read.md) — read the state that dispatches accumulate into.
|
|
86
|
+
- [askReduceState](./ask-reduce-state.md) — run a story purely for its dispatched effects and return the reduced state.
|
|
87
|
+
- [defineStateDispatchOverWebsockets](../../../config/webserver/state-dispatch-over-websockets.md) — redirect these dispatches to a connected WebSocket client.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askStateRead
|
|
3
|
+
description: Read the current in-story state accumulated from dispatched effects.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askStateRead
|
|
7
|
+
|
|
8
|
+
Reads the current state that surrounds the story — the value accumulated from every [askStateDispatch](./ask-state-dispatch.md) processed so far. It is the read side of quidproquo's Redux-style in-story state: dispatch mutates, `askStateRead` observes. Under [askReduceState](./ask-reduce-state.md) it returns the whole reduced state; under the React `useQPQ` runtime it returns the current store state.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `StateActionType.Read`
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { askStateRead } from 'quidproquo-core';
|
|
14
|
+
|
|
15
|
+
export function* askGetCount() {
|
|
16
|
+
const state = yield* askStateRead<CounterState>();
|
|
17
|
+
return state.count;
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Signature
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
function* askStateRead<R>(path?: string): AskResponse<R>;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Description |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| `path` | `string` | Optional. Reserved for reading a sub-path of the state. **Path reads are not supported by any current runtime** — the whole state is always returned regardless of `path`. |
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`R` — the current accumulated state. The generic `R` is the shape you expect the state to have; it is returned as-is, so it is your responsibility to type it correctly.
|
|
36
|
+
|
|
37
|
+
## Notes
|
|
38
|
+
|
|
39
|
+
- The value reflects the state **at the point of the read** — reads issued between dispatches see the partially-accumulated state, not the final one.
|
|
40
|
+
- Under [askReduceState](./ask-reduce-state.md), a read always returns that call's own accumulated state — a nested `askReduceState` reads its inner state, not the parent's.
|
|
41
|
+
|
|
42
|
+
## Related
|
|
43
|
+
|
|
44
|
+
- [askStateDispatch](./ask-state-dispatch.md) — dispatch effects that update the state this reads.
|
|
45
|
+
- [askReduceState](./ask-reduce-state.md) — run a story purely for its dispatched effects and return the reduced state.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askStreamClose
|
|
3
|
+
description: Release an open stream handle and free its underlying source.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askStreamClose
|
|
7
|
+
|
|
8
|
+
Releases an open stream, freeing the underlying source (a file body, a model response, etc.) held by the runtime's stream registry. Call it once you have finished reading — including on early exit, before the stream reports `done`.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `StreamActionType.Close`
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { askFileStreamOpen, askStreamRead, askStreamClose } from 'quidproquo-core';
|
|
14
|
+
|
|
15
|
+
export function* askReadFirstChunk(filepath: string) {
|
|
16
|
+
const handle = yield* askFileStreamOpen('logs', filepath, 'text');
|
|
17
|
+
|
|
18
|
+
const chunk = yield* askStreamRead(handle);
|
|
19
|
+
|
|
20
|
+
// We only wanted the first chunk — release the rest of the stream.
|
|
21
|
+
yield* askStreamClose(handle);
|
|
22
|
+
|
|
23
|
+
return chunk.data ?? '';
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Signature
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
function* askStreamClose(
|
|
31
|
+
handle: StreamHandle,
|
|
32
|
+
): AskResponse<void>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Description |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `handle` | `StreamHandle` | The handle returned by the action that opened the stream. Only its `id` is used to locate and release the stream. |
|
|
40
|
+
|
|
41
|
+
## Returns
|
|
42
|
+
|
|
43
|
+
`void` — the story resumes once the stream has been released.
|
|
44
|
+
|
|
45
|
+
## Notes
|
|
46
|
+
|
|
47
|
+
- Closing a stream that has already been closed (or that finished and was released automatically) is a no-op — it does not throw.
|
|
48
|
+
- The stream stories [askStreamProcess](./ask-stream-process.md) and [askStreamMap](./ask-stream-map.md) close the handle for you after they finish reading, so you only call `askStreamClose` directly when you drive the read loop yourself or bail out early.
|
|
49
|
+
|
|
50
|
+
## Related
|
|
51
|
+
|
|
52
|
+
- [askStreamRead](./ask-stream-read.md) — pull chunks from the handle before closing it.
|
|
53
|
+
- [askStreamProcess](./ask-stream-process.md) — reads to completion and closes for you.
|
|
54
|
+
- [askStreamMap](./ask-stream-map.md) — collects into an array and closes for you.
|
|
55
|
+
- [askFileStreamOpen](../file/ask-file-stream-open.md) — opens the stream this action releases.
|
|
56
|
+
- [askAiPromptStream](../ai/ask-ai-prompt-stream.md) — opens a model-response stream.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askStreamMap
|
|
3
|
+
description: Read an open stream to completion, transform each chunk, collect the results into an array, then close it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askStreamMap
|
|
7
|
+
|
|
8
|
+
Drives an open stream to completion and collects it into an array. It reads chunk after chunk, runs an optional transform callback on each one, pushes the result, and closes the stream when it reports `done`. Use it when you want the *whole* stream materialised as a list — e.g. gather every event of a model response, or turn a streamed file's chunks into an array of parsed records.
|
|
9
|
+
|
|
10
|
+
`askStreamMap` is not a distinct action; it is a story composed of [askStreamRead](./ask-stream-read.md) and [askStreamClose](./ask-stream-close.md). It reads in the default blocking mode, skips any chunk whose `data` is `undefined` or that is marked `skipped`, stops on `done`, and always closes the handle before returning the collected array. When no callback is supplied, the chunks are collected as-is.
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { askAiPromptStream, askStreamMap, AiModel } from 'quidproquo-core';
|
|
14
|
+
|
|
15
|
+
export function* askCollectStreamedParts(prompt: string) {
|
|
16
|
+
const stream = yield* askAiPromptStream(AiModel.ClaudeSonnet46, prompt);
|
|
17
|
+
|
|
18
|
+
// No callback — collect every AiStreamPart into an array.
|
|
19
|
+
const parts = yield* askStreamMap(stream);
|
|
20
|
+
|
|
21
|
+
return parts;
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
With a transform callback, map each chunk to a value of your choosing:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { askFileStreamOpen, askStreamMap } from 'quidproquo-core';
|
|
29
|
+
|
|
30
|
+
export function* askChunkLengths(filepath: string) {
|
|
31
|
+
const handle = yield* askFileStreamOpen('logs', filepath, 'text');
|
|
32
|
+
|
|
33
|
+
const lengths = yield* askStreamMap(handle, function* (chunk, index) {
|
|
34
|
+
return chunk.length;
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
return lengths;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Signature
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
function* askStreamMap<E extends StreamEncoding, T, R = StreamDataType<E, T>>(
|
|
45
|
+
handle: StreamHandle<E, T>,
|
|
46
|
+
askCallback?: (item: StreamDataType<E, T>, index: number) => AskResponse<R>,
|
|
47
|
+
): AskResponse<R[]>;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Parameters
|
|
51
|
+
|
|
52
|
+
| Parameter | Type | Description |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| `handle` | `StreamHandle<E, T>` | The handle returned by the action that opened the stream, e.g. [askFileStreamOpen](../file/ask-file-stream-open.md) or [askAiPromptStream](../ai/ask-ai-prompt-stream.md). |
|
|
55
|
+
| `askCallback` | `(item, index) => AskResponse<R>` | Optional story (generator) run once per delivered chunk to transform it. `item` is the decoded chunk; `index` is its 0-based position among delivered chunks. Defaults to a pass-through that collects the chunks unchanged. Skipped / empty chunks are not passed to it. |
|
|
56
|
+
|
|
57
|
+
## Returns
|
|
58
|
+
|
|
59
|
+
`R[]` — an array of the callback's results in stream order (or the raw chunks when no callback is given). Resolves once the stream is exhausted and closed.
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
|
|
63
|
+
- The `index` counts only chunks handed to your callback — chunks that are `skipped` or carry no `data` are dropped and do not advance it.
|
|
64
|
+
- The handle is closed for you when the loop ends.
|
|
65
|
+
- Because it buffers the entire stream in memory, prefer [askStreamProcess](./ask-stream-process.md) when you only need to react to each chunk and don't need the full list.
|
|
66
|
+
|
|
67
|
+
## Related
|
|
68
|
+
|
|
69
|
+
- [askStreamProcess](./ask-stream-process.md) — the per-chunk counterpart; returns `void`.
|
|
70
|
+
- [askStreamRead](./ask-stream-read.md) / [askStreamClose](./ask-stream-close.md) — the actions this story is built from.
|
|
71
|
+
- [askAiPromptStream](../ai/ask-ai-prompt-stream.md) — collect a model response into an array of events.
|
|
72
|
+
- [askFileStreamOpen](../file/ask-file-stream-open.md) — stream a large file chunk by chunk.
|
|
73
|
+
- [askEventDocAiProcessSend](../../features/event-doc-ai/ask-event-doc-ai-process-send.md) — uses this to dispatch each AI stream part to the chat UI.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askStreamProcess
|
|
3
|
+
description: Read an open stream to completion, running a callback for each chunk, then close it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askStreamProcess
|
|
7
|
+
|
|
8
|
+
Drives an open stream to completion: it reads chunk after chunk, invokes your callback for each one, and closes the stream when the stream reports `done`. Use it when you want to *react* to each chunk as it arrives — forwarding tokens to a client, tallying a running total — without accumulating a result.
|
|
9
|
+
|
|
10
|
+
`askStreamProcess` is not a distinct action; it is a story composed of [askStreamRead](./ask-stream-read.md) and [askStreamClose](./ask-stream-close.md). It reads in the default blocking mode, skips any chunk whose `data` is `undefined` or that is marked `skipped`, stops on `done`, and always closes the handle before returning.
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { askAiPromptStream, askStreamProcess, AiModel, AiStreamPartType } from 'quidproquo-core';
|
|
14
|
+
|
|
15
|
+
export function* askAnswerStreamed(prompt: string) {
|
|
16
|
+
const stream = yield* askAiPromptStream(AiModel.ClaudeSonnet46, prompt);
|
|
17
|
+
|
|
18
|
+
yield* askStreamProcess(stream, function* (part, index) {
|
|
19
|
+
if (part.type === AiStreamPartType.TextDelta) {
|
|
20
|
+
// forward part.text to the client...
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Signature
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
function* askStreamProcess<E extends StreamEncoding, T>(
|
|
30
|
+
handle: StreamHandle<E, T>,
|
|
31
|
+
askCallback: (item: StreamDataType<E, T>, index: number) => AskResponse<void>,
|
|
32
|
+
): AskResponse<void>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Description |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `handle` | `StreamHandle<E, T>` | The handle returned by the action that opened the stream, e.g. [askFileStreamOpen](../file/ask-file-stream-open.md) or [askAiPromptStream](../ai/ask-ai-prompt-stream.md). |
|
|
40
|
+
| `askCallback` | `(item, index) => AskResponse<void>` | A story (generator) run once per delivered chunk. `item` is the decoded chunk (`string`, `Uint8Array`, or the parsed object, per the handle's encoding); `index` is its 0-based position among delivered chunks. Skipped / empty chunks are not passed to it. |
|
|
41
|
+
|
|
42
|
+
## Returns
|
|
43
|
+
|
|
44
|
+
`void` — resolves once the stream is exhausted and closed.
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
|
|
48
|
+
- The `index` counts only chunks handed to your callback — chunks that are `skipped` or carry no `data` are dropped and do not advance it.
|
|
49
|
+
- The handle is closed for you when the loop ends. If you need finer control — reading only part of a stream, or polling with `noWait` — drive [askStreamRead](./ask-stream-read.md) / [askStreamClose](./ask-stream-close.md) directly instead.
|
|
50
|
+
- To build up a result rather than react to each chunk, use [askStreamMap](./ask-stream-map.md).
|
|
51
|
+
|
|
52
|
+
## Related
|
|
53
|
+
|
|
54
|
+
- [askStreamMap](./ask-stream-map.md) — the collecting counterpart; returns an array.
|
|
55
|
+
- [askStreamRead](./ask-stream-read.md) / [askStreamClose](./ask-stream-close.md) — the actions this story is built from.
|
|
56
|
+
- [askAiPromptStream](../ai/ask-ai-prompt-stream.md) — a common source of streams to process.
|
|
57
|
+
- [askFileStreamOpen](../file/ask-file-stream-open.md) — stream a large file chunk by chunk.
|