@igstack/app-catalog-backend-core 6.11.0 → 6.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/prisma/client.mjs.map +1 -1
- package/dist/generated/prisma/internal/class.d.mts +12 -0
- package/dist/generated/prisma/internal/class.d.mts.map +1 -1
- package/dist/generated/prisma/internal/class.mjs +4 -4
- package/dist/generated/prisma/internal/class.mjs.map +1 -1
- package/dist/generated/prisma/internal/prismaNamespace.d.mts +90 -3
- package/dist/generated/prisma/internal/prismaNamespace.d.mts.map +1 -1
- package/dist/generated/prisma/models/DbCommunityTool.d.mts +289 -4
- package/dist/generated/prisma/models/DbCommunityTool.d.mts.map +1 -1
- package/dist/generated/prisma/models/DbCommunityToolOpen.d.mts +1171 -0
- package/dist/generated/prisma/models/DbCommunityToolOpen.d.mts.map +1 -0
- package/dist/generated/prisma/models.d.mts +2 -1
- package/dist/modules/communityTools/capture.d.mts +8 -1
- package/dist/modules/communityTools/capture.d.mts.map +1 -1
- package/dist/modules/communityTools/capture.mjs +40 -14
- package/dist/modules/communityTools/capture.mjs.map +1 -1
- package/dist/modules/communityTools/healthJob.mjs +3 -2
- package/dist/modules/communityTools/healthJob.mjs.map +1 -1
- package/dist/modules/communityTools/router.d.mts +14 -1
- package/dist/modules/communityTools/router.mjs +7 -2
- package/dist/modules/communityTools/router.mjs.map +1 -1
- package/dist/modules/communityTools/service.mjs +39 -82
- package/dist/modules/communityTools/service.mjs.map +1 -1
- package/dist/modules/communityTools/toView.mjs +7 -2
- package/dist/modules/communityTools/toView.mjs.map +1 -1
- package/dist/modules/communityTools/writeService.mjs +1 -0
- package/dist/modules/communityTools/writeService.mjs.map +1 -1
- package/dist/server/controller.d.mts +9 -0
- package/dist/server/controller.d.mts.map +1 -1
- package/package.json +4 -4
- package/prisma/schema.prisma +25 -2
- package/src/__tests__/communityTools.test.ts +106 -42
- package/src/__tests__/communityToolsCapture.test.ts +34 -0
- package/src/__tests__/communityToolsHealth.test.ts +62 -0
- package/src/__tests__/communityToolsWrite.test.ts +6 -1
- package/src/generated/prisma/browser.ts +6 -1
- package/src/generated/prisma/client.ts +6 -1
- package/src/generated/prisma/internal/class.ts +14 -4
- package/src/generated/prisma/internal/prismaNamespace.ts +90 -1
- package/src/generated/prisma/internal/prismaNamespaceBrowser.ts +14 -0
- package/src/generated/prisma/models/DbCommunityTool.ts +299 -2
- package/src/generated/prisma/models/DbCommunityToolOpen.ts +1383 -0
- package/src/generated/prisma/models/DbCommunityToolView.ts +1 -1
- package/src/generated/prisma/models.ts +1 -0
- package/src/modules/communityTools/capture.ts +54 -18
- package/src/modules/communityTools/healthJob.ts +7 -1
- package/src/modules/communityTools/router.ts +26 -1
- package/src/modules/communityTools/service.ts +52 -92
- package/src/modules/communityTools/toView.ts +9 -0
- package/src/modules/communityTools/writeService.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DbCommunityToolOpen.d.mts","names":[],"sources":["../../../../src/generated/prisma/models/DbCommunityToolOpen.ts"],"mappings":";;;;;;;KAsBY,4BAAA;EACV,MAAA,EAAQ,2CAAA;EACR,IAAA,EAAM,yCAAA;EACN,IAAA,EAAM,yCAAA;AAAA;AAAA,KAGI,yCAAA;EACV,EAAA;EACA,MAAA;EACA,IAAA;EACA,SAAA;EACA,MAAA;EACA,EAAA,EAAI,IAAA;AAAA;AAAA,KAGM,yCAAA;EACV,EAAA;EACA,MAAA;EACA,IAAA;EACA,SAAA;EACA,MAAA;EACA,EAAA,EAAI,IAAA;AAAA;AAAA,KAGM,2CAAA;EACV,EAAA;EACA,MAAA;EACA,IAAA;EACA,SAAA;EACA,MAAA;EACA,EAAA;EACA,IAAA;AAAA;AAAA,KAIU,wCAAA;EACV,EAAA;EACA,MAAA;EACA,IAAA;EACA,SAAA;EACA,MAAA;EACA,EAAA;AAAA;AAAA,KAGU,wCAAA;EACV,EAAA;EACA,MAAA;EACA,IAAA;EACA,SAAA;EACA,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;;EAu6BA,MAAA,GAAS,yBAAA,CAAiC,OAAA;EAt6BlC;;;EA06BR,IAAA,GAAO,uBAAA,CAA+B,OAAA;EA16B+B;;;EA86BrE,OAAA,GAAU,0BAAA,CAAkC,OAAA;EA36BlC;;;EA+6BV,KAAA,EAAO,mCAAA;AAAA;;;;KAMG,iCAAA,iBAAkD,OAAA,CAAQ,KAAA,CAAM,UAAA,CAAW,YAAA,GAAe,OAAA,CAAQ,KAAA,CAAM,UAAA,CAAW,WAAA;EAn7B7H;;;EAu7BA,KAAA,GAAQ,6BAAA;EAp7B0D;;;EAw7BlE,KAAA;AAAA"}
|
|
@@ -13,11 +13,12 @@ import { $DbAppTagDefinitionPayload, AggregateDbAppTagDefinition, DbAppTagDefini
|
|
|
13
13
|
import { $DbAssetPayload, AggregateDbAsset, DbAssetAggregateArgs, DbAssetAvgAggregateInputType, DbAssetAvgAggregateOutputType, DbAssetAvgOrderByAggregateInput, DbAssetCountAggregateInputType, DbAssetCountAggregateOutputType, DbAssetCountArgs, DbAssetCountOrderByAggregateInput, DbAssetCreateArgs, DbAssetCreateInput, DbAssetCreateManyAndReturnArgs, DbAssetCreateManyArgs, DbAssetCreateManyInput, DbAssetDelegate, DbAssetDeleteArgs, DbAssetDeleteManyArgs, DbAssetFieldRefs, DbAssetFindFirstArgs, DbAssetFindFirstOrThrowArgs, DbAssetFindManyArgs, DbAssetFindUniqueArgs, DbAssetFindUniqueOrThrowArgs, DbAssetGroupByArgs, DbAssetGroupByOutputType, DbAssetMaxAggregateInputType, DbAssetMaxAggregateOutputType, DbAssetMaxOrderByAggregateInput, DbAssetMinAggregateInputType, DbAssetMinAggregateOutputType, DbAssetMinOrderByAggregateInput, DbAssetOmit, DbAssetOrderByWithAggregationInput, DbAssetOrderByWithRelationInput, DbAssetScalarWhereWithAggregatesInput, DbAssetSelect, DbAssetSelectCreateManyAndReturn, DbAssetSelectUpdateManyAndReturn, DbAssetSumAggregateInputType, DbAssetSumAggregateOutputType, DbAssetSumOrderByAggregateInput, DbAssetUncheckedCreateInput, DbAssetUncheckedUpdateInput, DbAssetUncheckedUpdateManyInput, DbAssetUpdateArgs, DbAssetUpdateInput, DbAssetUpdateManyAndReturnArgs, DbAssetUpdateManyArgs, DbAssetUpdateManyMutationInput, DbAssetUpsertArgs, DbAssetWhereInput, DbAssetWhereUniqueInput, EnumAssetTypeFieldUpdateOperationsInput, GetDbAssetAggregateType, Prisma__DbAssetClient } from "./models/DbAsset.mjs";
|
|
14
14
|
import { $SourcePayload, AggregateSource, GetSourceAggregateType, Prisma__SourceClient, Source$referencesArgs, SourceAggregateArgs, SourceCountAggregateInputType, SourceCountAggregateOutputType, SourceCountArgs, SourceCountOrderByAggregateInput, SourceCountOutputTypeCountReferencesArgs, SourceCountOutputTypeDefaultArgs, SourceCountOutputTypeSelect, SourceCreateArgs, SourceCreateInput, SourceCreateManyAndReturnArgs, SourceCreateManyArgs, SourceCreateManyInput, SourceCreateNestedOneWithoutReferencesInput, SourceCreateOrConnectWithoutReferencesInput, SourceCreateWithoutReferencesInput, SourceDefaultArgs, SourceDelegate, SourceDeleteArgs, SourceDeleteManyArgs, SourceFieldRefs, SourceFindFirstArgs, SourceFindFirstOrThrowArgs, SourceFindManyArgs, SourceFindUniqueArgs, SourceFindUniqueOrThrowArgs, SourceGroupByArgs, SourceGroupByOutputType, SourceInclude, SourceMaxAggregateInputType, SourceMaxAggregateOutputType, SourceMaxOrderByAggregateInput, SourceMinAggregateInputType, SourceMinAggregateOutputType, SourceMinOrderByAggregateInput, SourceOmit, SourceOrderByWithAggregationInput, SourceOrderByWithRelationInput, SourceScalarRelationFilter, SourceScalarWhereWithAggregatesInput, SourceSelect, SourceSelectCreateManyAndReturn, SourceSelectUpdateManyAndReturn, SourceUncheckedCreateInput, SourceUncheckedCreateWithoutReferencesInput, SourceUncheckedUpdateInput, SourceUncheckedUpdateManyInput, SourceUncheckedUpdateWithoutReferencesInput, SourceUpdateArgs, SourceUpdateInput, SourceUpdateManyAndReturnArgs, SourceUpdateManyArgs, SourceUpdateManyMutationInput, SourceUpdateOneRequiredWithoutReferencesNestedInput, SourceUpdateToOneWithWhereWithoutReferencesInput, SourceUpdateWithoutReferencesInput, SourceUpsertArgs, SourceUpsertWithoutReferencesInput, SourceWhereInput, SourceWhereUniqueInput } from "./models/Source.mjs";
|
|
15
15
|
import { $SourceReferencePayload, AggregateSourceReference, GetSourceReferenceAggregateType, Prisma__SourceReferenceClient, SourceReferenceAggregateArgs, SourceReferenceAvgAggregateInputType, SourceReferenceAvgAggregateOutputType, SourceReferenceAvgOrderByAggregateInput, SourceReferenceCountAggregateInputType, SourceReferenceCountAggregateOutputType, SourceReferenceCountArgs, SourceReferenceCountOrderByAggregateInput, SourceReferenceCreateArgs, SourceReferenceCreateInput, SourceReferenceCreateManyAndReturnArgs, SourceReferenceCreateManyArgs, SourceReferenceCreateManyInput, SourceReferenceCreateManyResourceInput, SourceReferenceCreateManyResourceInputEnvelope, SourceReferenceCreateManySourceInput, SourceReferenceCreateManySourceInputEnvelope, SourceReferenceCreateNestedManyWithoutResourceInput, SourceReferenceCreateNestedManyWithoutSourceInput, SourceReferenceCreateOrConnectWithoutResourceInput, SourceReferenceCreateOrConnectWithoutSourceInput, SourceReferenceCreateWithoutResourceInput, SourceReferenceCreateWithoutSourceInput, SourceReferenceCreateexcerptsInput, SourceReferenceDelegate, SourceReferenceDeleteArgs, SourceReferenceDeleteManyArgs, SourceReferenceFieldRefs, SourceReferenceFindFirstArgs, SourceReferenceFindFirstOrThrowArgs, SourceReferenceFindManyArgs, SourceReferenceFindUniqueArgs, SourceReferenceFindUniqueOrThrowArgs, SourceReferenceGroupByArgs, SourceReferenceGroupByOutputType, SourceReferenceInclude, SourceReferenceIncludeCreateManyAndReturn, SourceReferenceIncludeUpdateManyAndReturn, SourceReferenceListRelationFilter, SourceReferenceMaxAggregateInputType, SourceReferenceMaxAggregateOutputType, SourceReferenceMaxOrderByAggregateInput, SourceReferenceMinAggregateInputType, SourceReferenceMinAggregateOutputType, SourceReferenceMinOrderByAggregateInput, SourceReferenceOmit, SourceReferenceOrderByRelationAggregateInput, SourceReferenceOrderByWithAggregationInput, SourceReferenceOrderByWithRelationInput, SourceReferenceResourceIdUrlCompoundUniqueInput, SourceReferenceScalarWhereInput, SourceReferenceScalarWhereWithAggregatesInput, SourceReferenceSelect, SourceReferenceSelectCreateManyAndReturn, SourceReferenceSelectUpdateManyAndReturn, SourceReferenceSumAggregateInputType, SourceReferenceSumAggregateOutputType, SourceReferenceSumOrderByAggregateInput, SourceReferenceUncheckedCreateInput, SourceReferenceUncheckedCreateNestedManyWithoutResourceInput, SourceReferenceUncheckedCreateNestedManyWithoutSourceInput, SourceReferenceUncheckedCreateWithoutResourceInput, SourceReferenceUncheckedCreateWithoutSourceInput, SourceReferenceUncheckedUpdateInput, SourceReferenceUncheckedUpdateManyInput, SourceReferenceUncheckedUpdateManyWithoutResourceInput, SourceReferenceUncheckedUpdateManyWithoutResourceNestedInput, SourceReferenceUncheckedUpdateManyWithoutSourceInput, SourceReferenceUncheckedUpdateManyWithoutSourceNestedInput, SourceReferenceUncheckedUpdateWithoutResourceInput, SourceReferenceUncheckedUpdateWithoutSourceInput, SourceReferenceUpdateArgs, SourceReferenceUpdateInput, SourceReferenceUpdateManyAndReturnArgs, SourceReferenceUpdateManyArgs, SourceReferenceUpdateManyMutationInput, SourceReferenceUpdateManyWithWhereWithoutResourceInput, SourceReferenceUpdateManyWithWhereWithoutSourceInput, SourceReferenceUpdateManyWithoutResourceNestedInput, SourceReferenceUpdateManyWithoutSourceNestedInput, SourceReferenceUpdateWithWhereUniqueWithoutResourceInput, SourceReferenceUpdateWithWhereUniqueWithoutSourceInput, SourceReferenceUpdateWithoutResourceInput, SourceReferenceUpdateWithoutSourceInput, SourceReferenceUpdateexcerptsInput, SourceReferenceUpsertArgs, SourceReferenceUpsertWithWhereUniqueWithoutResourceInput, SourceReferenceUpsertWithWhereUniqueWithoutSourceInput, SourceReferenceWhereInput, SourceReferenceWhereUniqueInput } from "./models/SourceReference.mjs";
|
|
16
|
-
import { $DbCommunityToolPayload, AggregateDbCommunityTool, DbCommunityTool$feedbackArgs, DbCommunityTool$likesArgs, DbCommunityTool$namedOwnersArgs, DbCommunityTool$ownersArgs, DbCommunityTool$pinsArgs, DbCommunityTool$tagsArgs, DbCommunityTool$viewsArgs, DbCommunityToolAggregateArgs, DbCommunityToolCountAggregateInputType, DbCommunityToolCountAggregateOutputType, DbCommunityToolCountArgs, DbCommunityToolCountOrderByAggregateInput, DbCommunityToolCountOutputTypeCountFeedbackArgs, DbCommunityToolCountOutputTypeCountLikesArgs, DbCommunityToolCountOutputTypeCountNamedOwnersArgs, DbCommunityToolCountOutputTypeCountOwnersArgs, DbCommunityToolCountOutputTypeCountPinsArgs, DbCommunityToolCountOutputTypeCountTagsArgs, DbCommunityToolCountOutputTypeCountViewsArgs, DbCommunityToolCountOutputTypeDefaultArgs, DbCommunityToolCountOutputTypeSelect, DbCommunityToolCreateArgs, DbCommunityToolCreateInput, DbCommunityToolCreateManyAndReturnArgs, DbCommunityToolCreateManyArgs, DbCommunityToolCreateManyInput, DbCommunityToolCreateNestedOneWithoutFeedbackInput, DbCommunityToolCreateNestedOneWithoutLikesInput, DbCommunityToolCreateNestedOneWithoutNamedOwnersInput, DbCommunityToolCreateNestedOneWithoutOwnersInput, DbCommunityToolCreateNestedOneWithoutPinsInput, DbCommunityToolCreateNestedOneWithoutTagsInput, DbCommunityToolCreateNestedOneWithoutViewsInput, DbCommunityToolCreateOrConnectWithoutFeedbackInput, DbCommunityToolCreateOrConnectWithoutLikesInput, DbCommunityToolCreateOrConnectWithoutNamedOwnersInput, DbCommunityToolCreateOrConnectWithoutOwnersInput, DbCommunityToolCreateOrConnectWithoutPinsInput, DbCommunityToolCreateOrConnectWithoutTagsInput, DbCommunityToolCreateOrConnectWithoutViewsInput, DbCommunityToolCreateWithoutFeedbackInput, DbCommunityToolCreateWithoutLikesInput, DbCommunityToolCreateWithoutNamedOwnersInput, DbCommunityToolCreateWithoutOwnersInput, DbCommunityToolCreateWithoutPinsInput, DbCommunityToolCreateWithoutTagsInput, DbCommunityToolCreateWithoutViewsInput, DbCommunityToolDefaultArgs, DbCommunityToolDelegate, DbCommunityToolDeleteArgs, DbCommunityToolDeleteManyArgs, DbCommunityToolFieldRefs, DbCommunityToolFindFirstArgs, DbCommunityToolFindFirstOrThrowArgs, DbCommunityToolFindManyArgs, DbCommunityToolFindUniqueArgs, DbCommunityToolFindUniqueOrThrowArgs, DbCommunityToolGroupByArgs, DbCommunityToolGroupByOutputType, DbCommunityToolInclude, DbCommunityToolMaxAggregateInputType, DbCommunityToolMaxAggregateOutputType, DbCommunityToolMaxOrderByAggregateInput, DbCommunityToolMinAggregateInputType, DbCommunityToolMinAggregateOutputType, DbCommunityToolMinOrderByAggregateInput, DbCommunityToolNullableScalarRelationFilter, DbCommunityToolOmit, DbCommunityToolOrderByWithAggregationInput, DbCommunityToolOrderByWithRelationInput, DbCommunityToolScalarRelationFilter, DbCommunityToolScalarWhereWithAggregatesInput, DbCommunityToolSelect, DbCommunityToolSelectCreateManyAndReturn, DbCommunityToolSelectUpdateManyAndReturn, DbCommunityToolUncheckedCreateInput, DbCommunityToolUncheckedCreateWithoutFeedbackInput, DbCommunityToolUncheckedCreateWithoutLikesInput, DbCommunityToolUncheckedCreateWithoutNamedOwnersInput, DbCommunityToolUncheckedCreateWithoutOwnersInput, DbCommunityToolUncheckedCreateWithoutPinsInput, DbCommunityToolUncheckedCreateWithoutTagsInput, DbCommunityToolUncheckedCreateWithoutViewsInput, DbCommunityToolUncheckedUpdateInput, DbCommunityToolUncheckedUpdateManyInput, DbCommunityToolUncheckedUpdateWithoutFeedbackInput, DbCommunityToolUncheckedUpdateWithoutLikesInput, DbCommunityToolUncheckedUpdateWithoutNamedOwnersInput, DbCommunityToolUncheckedUpdateWithoutOwnersInput, DbCommunityToolUncheckedUpdateWithoutPinsInput, DbCommunityToolUncheckedUpdateWithoutTagsInput, DbCommunityToolUncheckedUpdateWithoutViewsInput, DbCommunityToolUpdateArgs, DbCommunityToolUpdateInput, DbCommunityToolUpdateManyAndReturnArgs, DbCommunityToolUpdateManyArgs, DbCommunityToolUpdateManyMutationInput, DbCommunityToolUpdateOneRequiredWithoutLikesNestedInput, DbCommunityToolUpdateOneRequiredWithoutNamedOwnersNestedInput, DbCommunityToolUpdateOneRequiredWithoutOwnersNestedInput, DbCommunityToolUpdateOneRequiredWithoutPinsNestedInput, DbCommunityToolUpdateOneRequiredWithoutTagsNestedInput, DbCommunityToolUpdateOneRequiredWithoutViewsNestedInput, DbCommunityToolUpdateOneWithoutFeedbackNestedInput, DbCommunityToolUpdateToOneWithWhereWithoutFeedbackInput, DbCommunityToolUpdateToOneWithWhereWithoutLikesInput, DbCommunityToolUpdateToOneWithWhereWithoutNamedOwnersInput, DbCommunityToolUpdateToOneWithWhereWithoutOwnersInput, DbCommunityToolUpdateToOneWithWhereWithoutPinsInput, DbCommunityToolUpdateToOneWithWhereWithoutTagsInput, DbCommunityToolUpdateToOneWithWhereWithoutViewsInput, DbCommunityToolUpdateWithoutFeedbackInput, DbCommunityToolUpdateWithoutLikesInput, DbCommunityToolUpdateWithoutNamedOwnersInput, DbCommunityToolUpdateWithoutOwnersInput, DbCommunityToolUpdateWithoutPinsInput, DbCommunityToolUpdateWithoutTagsInput, DbCommunityToolUpdateWithoutViewsInput, DbCommunityToolUpsertArgs, DbCommunityToolUpsertWithoutFeedbackInput, DbCommunityToolUpsertWithoutLikesInput, DbCommunityToolUpsertWithoutNamedOwnersInput, DbCommunityToolUpsertWithoutOwnersInput, DbCommunityToolUpsertWithoutPinsInput, DbCommunityToolUpsertWithoutTagsInput, DbCommunityToolUpsertWithoutViewsInput, DbCommunityToolWhereInput, DbCommunityToolWhereUniqueInput, GetDbCommunityToolAggregateType, Prisma__DbCommunityToolClient } from "./models/DbCommunityTool.mjs";
|
|
16
|
+
import { $DbCommunityToolPayload, AggregateDbCommunityTool, DbCommunityTool$feedbackArgs, DbCommunityTool$likesArgs, DbCommunityTool$namedOwnersArgs, DbCommunityTool$opensArgs, DbCommunityTool$ownersArgs, DbCommunityTool$pinsArgs, DbCommunityTool$tagsArgs, DbCommunityTool$viewsArgs, DbCommunityToolAggregateArgs, DbCommunityToolCountAggregateInputType, DbCommunityToolCountAggregateOutputType, DbCommunityToolCountArgs, DbCommunityToolCountOrderByAggregateInput, DbCommunityToolCountOutputTypeCountFeedbackArgs, DbCommunityToolCountOutputTypeCountLikesArgs, DbCommunityToolCountOutputTypeCountNamedOwnersArgs, DbCommunityToolCountOutputTypeCountOpensArgs, DbCommunityToolCountOutputTypeCountOwnersArgs, DbCommunityToolCountOutputTypeCountPinsArgs, DbCommunityToolCountOutputTypeCountTagsArgs, DbCommunityToolCountOutputTypeCountViewsArgs, DbCommunityToolCountOutputTypeDefaultArgs, DbCommunityToolCountOutputTypeSelect, DbCommunityToolCreateArgs, DbCommunityToolCreateInput, DbCommunityToolCreateManyAndReturnArgs, DbCommunityToolCreateManyArgs, DbCommunityToolCreateManyInput, DbCommunityToolCreateNestedOneWithoutFeedbackInput, DbCommunityToolCreateNestedOneWithoutLikesInput, DbCommunityToolCreateNestedOneWithoutNamedOwnersInput, DbCommunityToolCreateNestedOneWithoutOpensInput, DbCommunityToolCreateNestedOneWithoutOwnersInput, DbCommunityToolCreateNestedOneWithoutPinsInput, DbCommunityToolCreateNestedOneWithoutTagsInput, DbCommunityToolCreateNestedOneWithoutViewsInput, DbCommunityToolCreateOrConnectWithoutFeedbackInput, DbCommunityToolCreateOrConnectWithoutLikesInput, DbCommunityToolCreateOrConnectWithoutNamedOwnersInput, DbCommunityToolCreateOrConnectWithoutOpensInput, DbCommunityToolCreateOrConnectWithoutOwnersInput, DbCommunityToolCreateOrConnectWithoutPinsInput, DbCommunityToolCreateOrConnectWithoutTagsInput, DbCommunityToolCreateOrConnectWithoutViewsInput, DbCommunityToolCreateWithoutFeedbackInput, DbCommunityToolCreateWithoutLikesInput, DbCommunityToolCreateWithoutNamedOwnersInput, DbCommunityToolCreateWithoutOpensInput, DbCommunityToolCreateWithoutOwnersInput, DbCommunityToolCreateWithoutPinsInput, DbCommunityToolCreateWithoutTagsInput, DbCommunityToolCreateWithoutViewsInput, DbCommunityToolDefaultArgs, DbCommunityToolDelegate, DbCommunityToolDeleteArgs, DbCommunityToolDeleteManyArgs, DbCommunityToolFieldRefs, DbCommunityToolFindFirstArgs, DbCommunityToolFindFirstOrThrowArgs, DbCommunityToolFindManyArgs, DbCommunityToolFindUniqueArgs, DbCommunityToolFindUniqueOrThrowArgs, DbCommunityToolGroupByArgs, DbCommunityToolGroupByOutputType, DbCommunityToolInclude, DbCommunityToolMaxAggregateInputType, DbCommunityToolMaxAggregateOutputType, DbCommunityToolMaxOrderByAggregateInput, DbCommunityToolMinAggregateInputType, DbCommunityToolMinAggregateOutputType, DbCommunityToolMinOrderByAggregateInput, DbCommunityToolNullableScalarRelationFilter, DbCommunityToolOmit, DbCommunityToolOrderByWithAggregationInput, DbCommunityToolOrderByWithRelationInput, DbCommunityToolScalarRelationFilter, DbCommunityToolScalarWhereWithAggregatesInput, DbCommunityToolSelect, DbCommunityToolSelectCreateManyAndReturn, DbCommunityToolSelectUpdateManyAndReturn, DbCommunityToolUncheckedCreateInput, DbCommunityToolUncheckedCreateWithoutFeedbackInput, DbCommunityToolUncheckedCreateWithoutLikesInput, DbCommunityToolUncheckedCreateWithoutNamedOwnersInput, DbCommunityToolUncheckedCreateWithoutOpensInput, DbCommunityToolUncheckedCreateWithoutOwnersInput, DbCommunityToolUncheckedCreateWithoutPinsInput, DbCommunityToolUncheckedCreateWithoutTagsInput, DbCommunityToolUncheckedCreateWithoutViewsInput, DbCommunityToolUncheckedUpdateInput, DbCommunityToolUncheckedUpdateManyInput, DbCommunityToolUncheckedUpdateWithoutFeedbackInput, DbCommunityToolUncheckedUpdateWithoutLikesInput, DbCommunityToolUncheckedUpdateWithoutNamedOwnersInput, DbCommunityToolUncheckedUpdateWithoutOpensInput, DbCommunityToolUncheckedUpdateWithoutOwnersInput, DbCommunityToolUncheckedUpdateWithoutPinsInput, DbCommunityToolUncheckedUpdateWithoutTagsInput, DbCommunityToolUncheckedUpdateWithoutViewsInput, DbCommunityToolUpdateArgs, DbCommunityToolUpdateInput, DbCommunityToolUpdateManyAndReturnArgs, DbCommunityToolUpdateManyArgs, DbCommunityToolUpdateManyMutationInput, DbCommunityToolUpdateOneRequiredWithoutLikesNestedInput, DbCommunityToolUpdateOneRequiredWithoutNamedOwnersNestedInput, DbCommunityToolUpdateOneRequiredWithoutOpensNestedInput, DbCommunityToolUpdateOneRequiredWithoutOwnersNestedInput, DbCommunityToolUpdateOneRequiredWithoutPinsNestedInput, DbCommunityToolUpdateOneRequiredWithoutTagsNestedInput, DbCommunityToolUpdateOneRequiredWithoutViewsNestedInput, DbCommunityToolUpdateOneWithoutFeedbackNestedInput, DbCommunityToolUpdateToOneWithWhereWithoutFeedbackInput, DbCommunityToolUpdateToOneWithWhereWithoutLikesInput, DbCommunityToolUpdateToOneWithWhereWithoutNamedOwnersInput, DbCommunityToolUpdateToOneWithWhereWithoutOpensInput, DbCommunityToolUpdateToOneWithWhereWithoutOwnersInput, DbCommunityToolUpdateToOneWithWhereWithoutPinsInput, DbCommunityToolUpdateToOneWithWhereWithoutTagsInput, DbCommunityToolUpdateToOneWithWhereWithoutViewsInput, DbCommunityToolUpdateWithoutFeedbackInput, DbCommunityToolUpdateWithoutLikesInput, DbCommunityToolUpdateWithoutNamedOwnersInput, DbCommunityToolUpdateWithoutOpensInput, DbCommunityToolUpdateWithoutOwnersInput, DbCommunityToolUpdateWithoutPinsInput, DbCommunityToolUpdateWithoutTagsInput, DbCommunityToolUpdateWithoutViewsInput, DbCommunityToolUpsertArgs, DbCommunityToolUpsertWithoutFeedbackInput, DbCommunityToolUpsertWithoutLikesInput, DbCommunityToolUpsertWithoutNamedOwnersInput, DbCommunityToolUpsertWithoutOpensInput, DbCommunityToolUpsertWithoutOwnersInput, DbCommunityToolUpsertWithoutPinsInput, DbCommunityToolUpsertWithoutTagsInput, DbCommunityToolUpsertWithoutViewsInput, DbCommunityToolWhereInput, DbCommunityToolWhereUniqueInput, GetDbCommunityToolAggregateType, Prisma__DbCommunityToolClient } from "./models/DbCommunityTool.mjs";
|
|
17
17
|
import { $DbCommunityToolOwnerPayload, AggregateDbCommunityToolOwner, DbCommunityToolOwnerAggregateArgs, DbCommunityToolOwnerCountAggregateInputType, DbCommunityToolOwnerCountAggregateOutputType, DbCommunityToolOwnerCountArgs, DbCommunityToolOwnerCountOrderByAggregateInput, DbCommunityToolOwnerCreateArgs, DbCommunityToolOwnerCreateInput, DbCommunityToolOwnerCreateManyAndReturnArgs, DbCommunityToolOwnerCreateManyArgs, DbCommunityToolOwnerCreateManyInput, DbCommunityToolOwnerCreateManyToolInput, DbCommunityToolOwnerCreateManyToolInputEnvelope, DbCommunityToolOwnerCreateNestedManyWithoutToolInput, DbCommunityToolOwnerCreateOrConnectWithoutToolInput, DbCommunityToolOwnerCreateWithoutToolInput, DbCommunityToolOwnerDelegate, DbCommunityToolOwnerDeleteArgs, DbCommunityToolOwnerDeleteManyArgs, DbCommunityToolOwnerFieldRefs, DbCommunityToolOwnerFindFirstArgs, DbCommunityToolOwnerFindFirstOrThrowArgs, DbCommunityToolOwnerFindManyArgs, DbCommunityToolOwnerFindUniqueArgs, DbCommunityToolOwnerFindUniqueOrThrowArgs, DbCommunityToolOwnerGroupByArgs, DbCommunityToolOwnerGroupByOutputType, DbCommunityToolOwnerInclude, DbCommunityToolOwnerIncludeCreateManyAndReturn, DbCommunityToolOwnerIncludeUpdateManyAndReturn, DbCommunityToolOwnerListRelationFilter, DbCommunityToolOwnerMaxAggregateInputType, DbCommunityToolOwnerMaxAggregateOutputType, DbCommunityToolOwnerMaxOrderByAggregateInput, DbCommunityToolOwnerMinAggregateInputType, DbCommunityToolOwnerMinAggregateOutputType, DbCommunityToolOwnerMinOrderByAggregateInput, DbCommunityToolOwnerOmit, DbCommunityToolOwnerOrderByRelationAggregateInput, DbCommunityToolOwnerOrderByWithAggregationInput, DbCommunityToolOwnerOrderByWithRelationInput, DbCommunityToolOwnerScalarWhereInput, DbCommunityToolOwnerScalarWhereWithAggregatesInput, DbCommunityToolOwnerSelect, DbCommunityToolOwnerSelectCreateManyAndReturn, DbCommunityToolOwnerSelectUpdateManyAndReturn, DbCommunityToolOwnerToolIdPersonSlugCompoundUniqueInput, DbCommunityToolOwnerUncheckedCreateInput, DbCommunityToolOwnerUncheckedCreateNestedManyWithoutToolInput, DbCommunityToolOwnerUncheckedCreateWithoutToolInput, DbCommunityToolOwnerUncheckedUpdateInput, DbCommunityToolOwnerUncheckedUpdateManyInput, DbCommunityToolOwnerUncheckedUpdateManyWithoutToolInput, DbCommunityToolOwnerUncheckedUpdateManyWithoutToolNestedInput, DbCommunityToolOwnerUncheckedUpdateWithoutToolInput, DbCommunityToolOwnerUpdateArgs, DbCommunityToolOwnerUpdateInput, DbCommunityToolOwnerUpdateManyAndReturnArgs, DbCommunityToolOwnerUpdateManyArgs, DbCommunityToolOwnerUpdateManyMutationInput, DbCommunityToolOwnerUpdateManyWithWhereWithoutToolInput, DbCommunityToolOwnerUpdateManyWithoutToolNestedInput, DbCommunityToolOwnerUpdateWithWhereUniqueWithoutToolInput, DbCommunityToolOwnerUpdateWithoutToolInput, DbCommunityToolOwnerUpsertArgs, DbCommunityToolOwnerUpsertWithWhereUniqueWithoutToolInput, DbCommunityToolOwnerWhereInput, DbCommunityToolOwnerWhereUniqueInput, GetDbCommunityToolOwnerAggregateType, Prisma__DbCommunityToolOwnerClient } from "./models/DbCommunityToolOwner.mjs";
|
|
18
18
|
import { $DbCommunityToolLikePayload, AggregateDbCommunityToolLike, DbCommunityToolLikeAggregateArgs, DbCommunityToolLikeCountAggregateInputType, DbCommunityToolLikeCountAggregateOutputType, DbCommunityToolLikeCountArgs, DbCommunityToolLikeCountOrderByAggregateInput, DbCommunityToolLikeCreateArgs, DbCommunityToolLikeCreateInput, DbCommunityToolLikeCreateManyAndReturnArgs, DbCommunityToolLikeCreateManyArgs, DbCommunityToolLikeCreateManyInput, DbCommunityToolLikeCreateManyToolInput, DbCommunityToolLikeCreateManyToolInputEnvelope, DbCommunityToolLikeCreateNestedManyWithoutToolInput, DbCommunityToolLikeCreateOrConnectWithoutToolInput, DbCommunityToolLikeCreateWithoutToolInput, DbCommunityToolLikeDelegate, DbCommunityToolLikeDeleteArgs, DbCommunityToolLikeDeleteManyArgs, DbCommunityToolLikeFieldRefs, DbCommunityToolLikeFindFirstArgs, DbCommunityToolLikeFindFirstOrThrowArgs, DbCommunityToolLikeFindManyArgs, DbCommunityToolLikeFindUniqueArgs, DbCommunityToolLikeFindUniqueOrThrowArgs, DbCommunityToolLikeGroupByArgs, DbCommunityToolLikeGroupByOutputType, DbCommunityToolLikeInclude, DbCommunityToolLikeIncludeCreateManyAndReturn, DbCommunityToolLikeIncludeUpdateManyAndReturn, DbCommunityToolLikeListRelationFilter, DbCommunityToolLikeMaxAggregateInputType, DbCommunityToolLikeMaxAggregateOutputType, DbCommunityToolLikeMaxOrderByAggregateInput, DbCommunityToolLikeMinAggregateInputType, DbCommunityToolLikeMinAggregateOutputType, DbCommunityToolLikeMinOrderByAggregateInput, DbCommunityToolLikeOmit, DbCommunityToolLikeOrderByRelationAggregateInput, DbCommunityToolLikeOrderByWithAggregationInput, DbCommunityToolLikeOrderByWithRelationInput, DbCommunityToolLikeScalarWhereInput, DbCommunityToolLikeScalarWhereWithAggregatesInput, DbCommunityToolLikeSelect, DbCommunityToolLikeSelectCreateManyAndReturn, DbCommunityToolLikeSelectUpdateManyAndReturn, DbCommunityToolLikeToolIdUserIdCompoundUniqueInput, DbCommunityToolLikeUncheckedCreateInput, DbCommunityToolLikeUncheckedCreateNestedManyWithoutToolInput, DbCommunityToolLikeUncheckedCreateWithoutToolInput, DbCommunityToolLikeUncheckedUpdateInput, DbCommunityToolLikeUncheckedUpdateManyInput, DbCommunityToolLikeUncheckedUpdateManyWithoutToolInput, DbCommunityToolLikeUncheckedUpdateManyWithoutToolNestedInput, DbCommunityToolLikeUncheckedUpdateWithoutToolInput, DbCommunityToolLikeUpdateArgs, DbCommunityToolLikeUpdateInput, DbCommunityToolLikeUpdateManyAndReturnArgs, DbCommunityToolLikeUpdateManyArgs, DbCommunityToolLikeUpdateManyMutationInput, DbCommunityToolLikeUpdateManyWithWhereWithoutToolInput, DbCommunityToolLikeUpdateManyWithoutToolNestedInput, DbCommunityToolLikeUpdateWithWhereUniqueWithoutToolInput, DbCommunityToolLikeUpdateWithoutToolInput, DbCommunityToolLikeUpsertArgs, DbCommunityToolLikeUpsertWithWhereUniqueWithoutToolInput, DbCommunityToolLikeWhereInput, DbCommunityToolLikeWhereUniqueInput, GetDbCommunityToolLikeAggregateType, Prisma__DbCommunityToolLikeClient } from "./models/DbCommunityToolLike.mjs";
|
|
19
19
|
import { $DbCommunityToolNamedOwnerPayload, AggregateDbCommunityToolNamedOwner, DbCommunityToolNamedOwnerAggregateArgs, DbCommunityToolNamedOwnerCountAggregateInputType, DbCommunityToolNamedOwnerCountAggregateOutputType, DbCommunityToolNamedOwnerCountArgs, DbCommunityToolNamedOwnerCountOrderByAggregateInput, DbCommunityToolNamedOwnerCreateArgs, DbCommunityToolNamedOwnerCreateInput, DbCommunityToolNamedOwnerCreateManyAndReturnArgs, DbCommunityToolNamedOwnerCreateManyArgs, DbCommunityToolNamedOwnerCreateManyInput, DbCommunityToolNamedOwnerCreateManyToolInput, DbCommunityToolNamedOwnerCreateManyToolInputEnvelope, DbCommunityToolNamedOwnerCreateNestedManyWithoutToolInput, DbCommunityToolNamedOwnerCreateOrConnectWithoutToolInput, DbCommunityToolNamedOwnerCreateWithoutToolInput, DbCommunityToolNamedOwnerDelegate, DbCommunityToolNamedOwnerDeleteArgs, DbCommunityToolNamedOwnerDeleteManyArgs, DbCommunityToolNamedOwnerFieldRefs, DbCommunityToolNamedOwnerFindFirstArgs, DbCommunityToolNamedOwnerFindFirstOrThrowArgs, DbCommunityToolNamedOwnerFindManyArgs, DbCommunityToolNamedOwnerFindUniqueArgs, DbCommunityToolNamedOwnerFindUniqueOrThrowArgs, DbCommunityToolNamedOwnerGroupByArgs, DbCommunityToolNamedOwnerGroupByOutputType, DbCommunityToolNamedOwnerInclude, DbCommunityToolNamedOwnerIncludeCreateManyAndReturn, DbCommunityToolNamedOwnerIncludeUpdateManyAndReturn, DbCommunityToolNamedOwnerListRelationFilter, DbCommunityToolNamedOwnerMaxAggregateInputType, DbCommunityToolNamedOwnerMaxAggregateOutputType, DbCommunityToolNamedOwnerMaxOrderByAggregateInput, DbCommunityToolNamedOwnerMinAggregateInputType, DbCommunityToolNamedOwnerMinAggregateOutputType, DbCommunityToolNamedOwnerMinOrderByAggregateInput, DbCommunityToolNamedOwnerOmit, DbCommunityToolNamedOwnerOrderByRelationAggregateInput, DbCommunityToolNamedOwnerOrderByWithAggregationInput, DbCommunityToolNamedOwnerOrderByWithRelationInput, DbCommunityToolNamedOwnerScalarWhereInput, DbCommunityToolNamedOwnerScalarWhereWithAggregatesInput, DbCommunityToolNamedOwnerSelect, DbCommunityToolNamedOwnerSelectCreateManyAndReturn, DbCommunityToolNamedOwnerSelectUpdateManyAndReturn, DbCommunityToolNamedOwnerToolIdNameCompoundUniqueInput, DbCommunityToolNamedOwnerUncheckedCreateInput, DbCommunityToolNamedOwnerUncheckedCreateNestedManyWithoutToolInput, DbCommunityToolNamedOwnerUncheckedCreateWithoutToolInput, DbCommunityToolNamedOwnerUncheckedUpdateInput, DbCommunityToolNamedOwnerUncheckedUpdateManyInput, DbCommunityToolNamedOwnerUncheckedUpdateManyWithoutToolInput, DbCommunityToolNamedOwnerUncheckedUpdateManyWithoutToolNestedInput, DbCommunityToolNamedOwnerUncheckedUpdateWithoutToolInput, DbCommunityToolNamedOwnerUpdateArgs, DbCommunityToolNamedOwnerUpdateInput, DbCommunityToolNamedOwnerUpdateManyAndReturnArgs, DbCommunityToolNamedOwnerUpdateManyArgs, DbCommunityToolNamedOwnerUpdateManyMutationInput, DbCommunityToolNamedOwnerUpdateManyWithWhereWithoutToolInput, DbCommunityToolNamedOwnerUpdateManyWithoutToolNestedInput, DbCommunityToolNamedOwnerUpdateWithWhereUniqueWithoutToolInput, DbCommunityToolNamedOwnerUpdateWithoutToolInput, DbCommunityToolNamedOwnerUpsertArgs, DbCommunityToolNamedOwnerUpsertWithWhereUniqueWithoutToolInput, DbCommunityToolNamedOwnerWhereInput, DbCommunityToolNamedOwnerWhereUniqueInput, GetDbCommunityToolNamedOwnerAggregateType, Prisma__DbCommunityToolNamedOwnerClient } from "./models/DbCommunityToolNamedOwner.mjs";
|
|
20
20
|
import { $DbCommunityToolTagPayload, AggregateDbCommunityToolTag, DbCommunityToolTagAggregateArgs, DbCommunityToolTagCountAggregateInputType, DbCommunityToolTagCountAggregateOutputType, DbCommunityToolTagCountArgs, DbCommunityToolTagCountOrderByAggregateInput, DbCommunityToolTagCreateArgs, DbCommunityToolTagCreateInput, DbCommunityToolTagCreateManyAndReturnArgs, DbCommunityToolTagCreateManyArgs, DbCommunityToolTagCreateManyInput, DbCommunityToolTagCreateManyToolInput, DbCommunityToolTagCreateManyToolInputEnvelope, DbCommunityToolTagCreateNestedManyWithoutToolInput, DbCommunityToolTagCreateOrConnectWithoutToolInput, DbCommunityToolTagCreateWithoutToolInput, DbCommunityToolTagDelegate, DbCommunityToolTagDeleteArgs, DbCommunityToolTagDeleteManyArgs, DbCommunityToolTagFieldRefs, DbCommunityToolTagFindFirstArgs, DbCommunityToolTagFindFirstOrThrowArgs, DbCommunityToolTagFindManyArgs, DbCommunityToolTagFindUniqueArgs, DbCommunityToolTagFindUniqueOrThrowArgs, DbCommunityToolTagGroupByArgs, DbCommunityToolTagGroupByOutputType, DbCommunityToolTagInclude, DbCommunityToolTagIncludeCreateManyAndReturn, DbCommunityToolTagIncludeUpdateManyAndReturn, DbCommunityToolTagListRelationFilter, DbCommunityToolTagMaxAggregateInputType, DbCommunityToolTagMaxAggregateOutputType, DbCommunityToolTagMaxOrderByAggregateInput, DbCommunityToolTagMinAggregateInputType, DbCommunityToolTagMinAggregateOutputType, DbCommunityToolTagMinOrderByAggregateInput, DbCommunityToolTagOmit, DbCommunityToolTagOrderByRelationAggregateInput, DbCommunityToolTagOrderByWithAggregationInput, DbCommunityToolTagOrderByWithRelationInput, DbCommunityToolTagScalarWhereInput, DbCommunityToolTagScalarWhereWithAggregatesInput, DbCommunityToolTagSelect, DbCommunityToolTagSelectCreateManyAndReturn, DbCommunityToolTagSelectUpdateManyAndReturn, DbCommunityToolTagToolIdKindValueCompoundUniqueInput, DbCommunityToolTagUncheckedCreateInput, DbCommunityToolTagUncheckedCreateNestedManyWithoutToolInput, DbCommunityToolTagUncheckedCreateWithoutToolInput, DbCommunityToolTagUncheckedUpdateInput, DbCommunityToolTagUncheckedUpdateManyInput, DbCommunityToolTagUncheckedUpdateManyWithoutToolInput, DbCommunityToolTagUncheckedUpdateManyWithoutToolNestedInput, DbCommunityToolTagUncheckedUpdateWithoutToolInput, DbCommunityToolTagUpdateArgs, DbCommunityToolTagUpdateInput, DbCommunityToolTagUpdateManyAndReturnArgs, DbCommunityToolTagUpdateManyArgs, DbCommunityToolTagUpdateManyMutationInput, DbCommunityToolTagUpdateManyWithWhereWithoutToolInput, DbCommunityToolTagUpdateManyWithoutToolNestedInput, DbCommunityToolTagUpdateWithWhereUniqueWithoutToolInput, DbCommunityToolTagUpdateWithoutToolInput, DbCommunityToolTagUpsertArgs, DbCommunityToolTagUpsertWithWhereUniqueWithoutToolInput, DbCommunityToolTagWhereInput, DbCommunityToolTagWhereUniqueInput, EnumCommunityTagKindFieldUpdateOperationsInput, GetDbCommunityToolTagAggregateType, Prisma__DbCommunityToolTagClient } from "./models/DbCommunityToolTag.mjs";
|
|
21
|
+
import { $DbCommunityToolOpenPayload, AggregateDbCommunityToolOpen, DbCommunityToolOpenAggregateArgs, DbCommunityToolOpenCountAggregateInputType, DbCommunityToolOpenCountAggregateOutputType, DbCommunityToolOpenCountArgs, DbCommunityToolOpenCountOrderByAggregateInput, DbCommunityToolOpenCreateArgs, DbCommunityToolOpenCreateInput, DbCommunityToolOpenCreateManyAndReturnArgs, DbCommunityToolOpenCreateManyArgs, DbCommunityToolOpenCreateManyInput, DbCommunityToolOpenCreateManyToolInput, DbCommunityToolOpenCreateManyToolInputEnvelope, DbCommunityToolOpenCreateNestedManyWithoutToolInput, DbCommunityToolOpenCreateOrConnectWithoutToolInput, DbCommunityToolOpenCreateWithoutToolInput, DbCommunityToolOpenDelegate, DbCommunityToolOpenDeleteArgs, DbCommunityToolOpenDeleteManyArgs, DbCommunityToolOpenFieldRefs, DbCommunityToolOpenFindFirstArgs, DbCommunityToolOpenFindFirstOrThrowArgs, DbCommunityToolOpenFindManyArgs, DbCommunityToolOpenFindUniqueArgs, DbCommunityToolOpenFindUniqueOrThrowArgs, DbCommunityToolOpenGroupByArgs, DbCommunityToolOpenGroupByOutputType, DbCommunityToolOpenInclude, DbCommunityToolOpenIncludeCreateManyAndReturn, DbCommunityToolOpenIncludeUpdateManyAndReturn, DbCommunityToolOpenListRelationFilter, DbCommunityToolOpenMaxAggregateInputType, DbCommunityToolOpenMaxAggregateOutputType, DbCommunityToolOpenMaxOrderByAggregateInput, DbCommunityToolOpenMinAggregateInputType, DbCommunityToolOpenMinAggregateOutputType, DbCommunityToolOpenMinOrderByAggregateInput, DbCommunityToolOpenOmit, DbCommunityToolOpenOrderByRelationAggregateInput, DbCommunityToolOpenOrderByWithAggregationInput, DbCommunityToolOpenOrderByWithRelationInput, DbCommunityToolOpenScalarWhereInput, DbCommunityToolOpenScalarWhereWithAggregatesInput, DbCommunityToolOpenSelect, DbCommunityToolOpenSelectCreateManyAndReturn, DbCommunityToolOpenSelectUpdateManyAndReturn, DbCommunityToolOpenUncheckedCreateInput, DbCommunityToolOpenUncheckedCreateNestedManyWithoutToolInput, DbCommunityToolOpenUncheckedCreateWithoutToolInput, DbCommunityToolOpenUncheckedUpdateInput, DbCommunityToolOpenUncheckedUpdateManyInput, DbCommunityToolOpenUncheckedUpdateManyWithoutToolInput, DbCommunityToolOpenUncheckedUpdateManyWithoutToolNestedInput, DbCommunityToolOpenUncheckedUpdateWithoutToolInput, DbCommunityToolOpenUpdateArgs, DbCommunityToolOpenUpdateInput, DbCommunityToolOpenUpdateManyAndReturnArgs, DbCommunityToolOpenUpdateManyArgs, DbCommunityToolOpenUpdateManyMutationInput, DbCommunityToolOpenUpdateManyWithWhereWithoutToolInput, DbCommunityToolOpenUpdateManyWithoutToolNestedInput, DbCommunityToolOpenUpdateWithWhereUniqueWithoutToolInput, DbCommunityToolOpenUpdateWithoutToolInput, DbCommunityToolOpenUpsertArgs, DbCommunityToolOpenUpsertWithWhereUniqueWithoutToolInput, DbCommunityToolOpenWhereInput, DbCommunityToolOpenWhereUniqueInput, GetDbCommunityToolOpenAggregateType, Prisma__DbCommunityToolOpenClient } from "./models/DbCommunityToolOpen.mjs";
|
|
21
22
|
import { $DbCommunityToolViewPayload, AggregateDbCommunityToolView, DbCommunityToolViewAggregateArgs, DbCommunityToolViewCountAggregateInputType, DbCommunityToolViewCountAggregateOutputType, DbCommunityToolViewCountArgs, DbCommunityToolViewCountOrderByAggregateInput, DbCommunityToolViewCreateArgs, DbCommunityToolViewCreateInput, DbCommunityToolViewCreateManyAndReturnArgs, DbCommunityToolViewCreateManyArgs, DbCommunityToolViewCreateManyInput, DbCommunityToolViewCreateManyToolInput, DbCommunityToolViewCreateManyToolInputEnvelope, DbCommunityToolViewCreateNestedManyWithoutToolInput, DbCommunityToolViewCreateOrConnectWithoutToolInput, DbCommunityToolViewCreateWithoutToolInput, DbCommunityToolViewDelegate, DbCommunityToolViewDeleteArgs, DbCommunityToolViewDeleteManyArgs, DbCommunityToolViewFieldRefs, DbCommunityToolViewFindFirstArgs, DbCommunityToolViewFindFirstOrThrowArgs, DbCommunityToolViewFindManyArgs, DbCommunityToolViewFindUniqueArgs, DbCommunityToolViewFindUniqueOrThrowArgs, DbCommunityToolViewGroupByArgs, DbCommunityToolViewGroupByOutputType, DbCommunityToolViewInclude, DbCommunityToolViewIncludeCreateManyAndReturn, DbCommunityToolViewIncludeUpdateManyAndReturn, DbCommunityToolViewListRelationFilter, DbCommunityToolViewMaxAggregateInputType, DbCommunityToolViewMaxAggregateOutputType, DbCommunityToolViewMaxOrderByAggregateInput, DbCommunityToolViewMinAggregateInputType, DbCommunityToolViewMinAggregateOutputType, DbCommunityToolViewMinOrderByAggregateInput, DbCommunityToolViewOmit, DbCommunityToolViewOrderByRelationAggregateInput, DbCommunityToolViewOrderByWithAggregationInput, DbCommunityToolViewOrderByWithRelationInput, DbCommunityToolViewScalarWhereInput, DbCommunityToolViewScalarWhereWithAggregatesInput, DbCommunityToolViewSelect, DbCommunityToolViewSelectCreateManyAndReturn, DbCommunityToolViewSelectUpdateManyAndReturn, DbCommunityToolViewToolIdActorHashDayCompoundUniqueInput, DbCommunityToolViewUncheckedCreateInput, DbCommunityToolViewUncheckedCreateNestedManyWithoutToolInput, DbCommunityToolViewUncheckedCreateWithoutToolInput, DbCommunityToolViewUncheckedUpdateInput, DbCommunityToolViewUncheckedUpdateManyInput, DbCommunityToolViewUncheckedUpdateManyWithoutToolInput, DbCommunityToolViewUncheckedUpdateManyWithoutToolNestedInput, DbCommunityToolViewUncheckedUpdateWithoutToolInput, DbCommunityToolViewUpdateArgs, DbCommunityToolViewUpdateInput, DbCommunityToolViewUpdateManyAndReturnArgs, DbCommunityToolViewUpdateManyArgs, DbCommunityToolViewUpdateManyMutationInput, DbCommunityToolViewUpdateManyWithWhereWithoutToolInput, DbCommunityToolViewUpdateManyWithoutToolNestedInput, DbCommunityToolViewUpdateWithWhereUniqueWithoutToolInput, DbCommunityToolViewUpdateWithoutToolInput, DbCommunityToolViewUpsertArgs, DbCommunityToolViewUpsertWithWhereUniqueWithoutToolInput, DbCommunityToolViewWhereInput, DbCommunityToolViewWhereUniqueInput, GetDbCommunityToolViewAggregateType, Prisma__DbCommunityToolViewClient } from "./models/DbCommunityToolView.mjs";
|
|
22
23
|
import { $DbCommunityToolPinPayload, AggregateDbCommunityToolPin, DbCommunityToolPinAggregateArgs, DbCommunityToolPinAvgAggregateInputType, DbCommunityToolPinAvgAggregateOutputType, DbCommunityToolPinAvgOrderByAggregateInput, DbCommunityToolPinCountAggregateInputType, DbCommunityToolPinCountAggregateOutputType, DbCommunityToolPinCountArgs, DbCommunityToolPinCountOrderByAggregateInput, DbCommunityToolPinCreateArgs, DbCommunityToolPinCreateInput, DbCommunityToolPinCreateManyAndReturnArgs, DbCommunityToolPinCreateManyArgs, DbCommunityToolPinCreateManyInput, DbCommunityToolPinCreateManyToolInput, DbCommunityToolPinCreateManyToolInputEnvelope, DbCommunityToolPinCreateNestedManyWithoutToolInput, DbCommunityToolPinCreateOrConnectWithoutToolInput, DbCommunityToolPinCreateWithoutToolInput, DbCommunityToolPinDelegate, DbCommunityToolPinDeleteArgs, DbCommunityToolPinDeleteManyArgs, DbCommunityToolPinFieldRefs, DbCommunityToolPinFindFirstArgs, DbCommunityToolPinFindFirstOrThrowArgs, DbCommunityToolPinFindManyArgs, DbCommunityToolPinFindUniqueArgs, DbCommunityToolPinFindUniqueOrThrowArgs, DbCommunityToolPinGroupByArgs, DbCommunityToolPinGroupByOutputType, DbCommunityToolPinInclude, DbCommunityToolPinIncludeCreateManyAndReturn, DbCommunityToolPinIncludeUpdateManyAndReturn, DbCommunityToolPinListRelationFilter, DbCommunityToolPinMaxAggregateInputType, DbCommunityToolPinMaxAggregateOutputType, DbCommunityToolPinMaxOrderByAggregateInput, DbCommunityToolPinMinAggregateInputType, DbCommunityToolPinMinAggregateOutputType, DbCommunityToolPinMinOrderByAggregateInput, DbCommunityToolPinOmit, DbCommunityToolPinOrderByRelationAggregateInput, DbCommunityToolPinOrderByWithAggregationInput, DbCommunityToolPinOrderByWithRelationInput, DbCommunityToolPinScalarWhereInput, DbCommunityToolPinScalarWhereWithAggregatesInput, DbCommunityToolPinSelect, DbCommunityToolPinSelectCreateManyAndReturn, DbCommunityToolPinSelectUpdateManyAndReturn, DbCommunityToolPinSumAggregateInputType, DbCommunityToolPinSumAggregateOutputType, DbCommunityToolPinSumOrderByAggregateInput, DbCommunityToolPinUncheckedCreateInput, DbCommunityToolPinUncheckedCreateNestedManyWithoutToolInput, DbCommunityToolPinUncheckedCreateWithoutToolInput, DbCommunityToolPinUncheckedUpdateInput, DbCommunityToolPinUncheckedUpdateManyInput, DbCommunityToolPinUncheckedUpdateManyWithoutToolInput, DbCommunityToolPinUncheckedUpdateManyWithoutToolNestedInput, DbCommunityToolPinUncheckedUpdateWithoutToolInput, DbCommunityToolPinUpdateArgs, DbCommunityToolPinUpdateInput, DbCommunityToolPinUpdateManyAndReturnArgs, DbCommunityToolPinUpdateManyArgs, DbCommunityToolPinUpdateManyMutationInput, DbCommunityToolPinUpdateManyWithWhereWithoutToolInput, DbCommunityToolPinUpdateManyWithoutToolNestedInput, DbCommunityToolPinUpdateWithWhereUniqueWithoutToolInput, DbCommunityToolPinUpdateWithoutToolInput, DbCommunityToolPinUpsertArgs, DbCommunityToolPinUpsertWithWhereUniqueWithoutToolInput, DbCommunityToolPinUserIdToolIdCompoundUniqueInput, DbCommunityToolPinWhereInput, DbCommunityToolPinWhereUniqueInput, GetDbCommunityToolPinAggregateType, Prisma__DbCommunityToolPinClient } from "./models/DbCommunityToolPin.mjs";
|
|
23
24
|
import { BoolFilter, BoolWithAggregatesFilter, BytesFilter, BytesWithAggregatesFilter, DateTimeFilter, DateTimeNullableFilter, DateTimeNullableWithAggregatesFilter, DateTimeWithAggregatesFilter, EnumApprovalMethodTypeFilter, EnumApprovalMethodTypeWithAggregatesFilter, EnumAssetTypeFilter, EnumAssetTypeWithAggregatesFilter, EnumCommentStatusNullableFilter, EnumCommentStatusNullableWithAggregatesFilter, EnumCommunityTagKindFilter, EnumCommunityTagKindWithAggregatesFilter, IntFilter, IntNullableFilter, IntNullableWithAggregatesFilter, IntWithAggregatesFilter, JsonFilter, JsonFilterBase, JsonNullableFilter, JsonNullableFilterBase, JsonNullableWithAggregatesFilter, JsonNullableWithAggregatesFilterBase, JsonWithAggregatesFilter, JsonWithAggregatesFilterBase, NestedBoolFilter, NestedBoolWithAggregatesFilter, NestedBytesFilter, NestedBytesWithAggregatesFilter, NestedDateTimeFilter, NestedDateTimeNullableFilter, NestedDateTimeNullableWithAggregatesFilter, NestedDateTimeWithAggregatesFilter, NestedEnumApprovalMethodTypeFilter, NestedEnumApprovalMethodTypeWithAggregatesFilter, NestedEnumAssetTypeFilter, NestedEnumAssetTypeWithAggregatesFilter, NestedEnumCommentStatusNullableFilter, NestedEnumCommentStatusNullableWithAggregatesFilter, NestedEnumCommunityTagKindFilter, NestedEnumCommunityTagKindWithAggregatesFilter, NestedFloatFilter, NestedFloatNullableFilter, NestedIntFilter, NestedIntNullableFilter, NestedIntNullableWithAggregatesFilter, NestedIntWithAggregatesFilter, NestedJsonFilter, NestedJsonFilterBase, NestedJsonNullableFilter, NestedJsonNullableFilterBase, NestedStringFilter, NestedStringNullableFilter, NestedStringNullableWithAggregatesFilter, NestedStringWithAggregatesFilter, SortOrderInput, StringFilter, StringNullableFilter, StringNullableWithAggregatesFilter, StringWithAggregatesFilter } from "./commonInputTypes.mjs";
|
|
@@ -8,12 +8,19 @@ type CaptureResult = {
|
|
|
8
8
|
} | {
|
|
9
9
|
ok: false;
|
|
10
10
|
error: string;
|
|
11
|
+
/**
|
|
12
|
+
* No answer at all (a timeout, a refused connection), which may be the
|
|
13
|
+
* server's own network. Absent for a definitive failure: an HTTP error
|
|
14
|
+
* status, or a name that does not resolve.
|
|
15
|
+
*/
|
|
16
|
+
unreachable?: true;
|
|
11
17
|
};
|
|
12
18
|
/**
|
|
13
19
|
* Visits a page and photographs it, reaching only `allowedHosts`.
|
|
14
20
|
*
|
|
15
21
|
* Resolves `{ ok: false }` when the page itself failed (no response, an error status, a
|
|
16
|
-
* timeout, a redirect off the list) — that is the tool's health
|
|
22
|
+
* timeout, a redirect off the list) — that is the tool's health; `unreachable` when
|
|
23
|
+
* it never answered. Throws when the
|
|
17
24
|
* browser could not be started, which is ours: the health job must not mark every tool
|
|
18
25
|
* broken because Chromium is missing on one pod.
|
|
19
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture.d.mts","names":[],"sources":["../../../src/modules/communityTools/capture.ts"],"mappings":";KAGY,aAAA;EAEN,EAAA;EACA,GAAA,EAAK,MAAA;EACL,KAAA;EACA,OAAA,EAAS,MAAA,SAAA;EAET,YAAA,EAAc,IAAA;AAAA;
|
|
1
|
+
{"version":3,"file":"capture.d.mts","names":[],"sources":["../../../src/modules/communityTools/capture.ts"],"mappings":";KAGY,aAAA;EAEN,EAAA;EACA,GAAA,EAAK,MAAA;EACL,KAAA;EACA,OAAA,EAAS,MAAA,SAAA;EAET,YAAA,EAAc,IAAA;AAAA;EAGd,EAAA;EACA,KAAA;EARA;;;;;EAcA,WAAA;AAAA;;;;;;AAYN;;;;UAAiB,kBAAA;EACf,OAAA,GAAU,GAAA,UAAa,YAAA,eAA2B,OAAA,CAAQ,aAAA;EAAnC;EAEvB,OAAA;AAAA"}
|
|
@@ -90,7 +90,8 @@ async function capturePage(page, url, allowedHosts) {
|
|
|
90
90
|
};
|
|
91
91
|
if (!response || !response.ok()) return {
|
|
92
92
|
ok: false,
|
|
93
|
-
error: response ? `HTTP ${response.status()}` : "No response"
|
|
93
|
+
error: response ? `HTTP ${response.status()}` : "No response",
|
|
94
|
+
...!response && { unreachable: true }
|
|
94
95
|
};
|
|
95
96
|
const idleBudget = deadline - Date.now() - SETTLE_MS;
|
|
96
97
|
if (idleBudget > 0) await page.waitForLoadState("networkidle", { timeout: idleBudget }).catch(() => void 0);
|
|
@@ -116,6 +117,21 @@ async function capturePage(page, url, allowedHosts) {
|
|
|
116
117
|
lastModified: httpDate(response.headers()["last-modified"])
|
|
117
118
|
};
|
|
118
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* A capture that threw, from the browser or the network under it. Only a name
|
|
122
|
+
* that does not resolve is definitive; anything else got no answer at all.
|
|
123
|
+
*/
|
|
124
|
+
function failureOf(error) {
|
|
125
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
126
|
+
return /ENOTFOUND|ERR_NAME_NOT_RESOLVED/.test(message) ? {
|
|
127
|
+
ok: false,
|
|
128
|
+
error: message
|
|
129
|
+
} : {
|
|
130
|
+
ok: false,
|
|
131
|
+
error: message,
|
|
132
|
+
unreachable: true
|
|
133
|
+
};
|
|
134
|
+
}
|
|
119
135
|
/** An HTTP date header as a Date; null when absent or unreadable. */
|
|
120
136
|
function httpDate(value) {
|
|
121
137
|
if (!value) return null;
|
|
@@ -160,27 +176,37 @@ function createPlaywrightCapturer() {
|
|
|
160
176
|
viewport: VIEWPORT,
|
|
161
177
|
serviceWorkers: "block"
|
|
162
178
|
});
|
|
179
|
+
let navigationError = null;
|
|
163
180
|
await context.route("**/*", (route) => fenceRoute({
|
|
164
181
|
url: route.request().url(),
|
|
165
182
|
abort: (code) => route.abort(code),
|
|
166
183
|
continue: () => route.continue(),
|
|
167
|
-
fetch: (hop, mode) =>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
184
|
+
fetch: async (hop, mode) => {
|
|
185
|
+
try {
|
|
186
|
+
return await (mode === "get" ? context.request.get(hop, {
|
|
187
|
+
maxRedirects: 0,
|
|
188
|
+
timeout: HOP_TIMEOUT_MS
|
|
189
|
+
}) : route.fetch({
|
|
190
|
+
url: hop,
|
|
191
|
+
maxRedirects: 0,
|
|
192
|
+
timeout: HOP_TIMEOUT_MS
|
|
193
|
+
}));
|
|
194
|
+
} catch (error) {
|
|
195
|
+
if (route.request().isNavigationRequest()) navigationError ??= error;
|
|
196
|
+
throw error;
|
|
197
|
+
}
|
|
198
|
+
},
|
|
175
199
|
fulfill: (response) => route.fulfill({ response })
|
|
176
200
|
}, allowedHosts));
|
|
177
201
|
await context.routeWebSocket(/.*/, (ws) => ws.close());
|
|
178
|
-
|
|
202
|
+
const page = await context.newPage();
|
|
203
|
+
try {
|
|
204
|
+
return await capturePage(page, url, allowedHosts);
|
|
205
|
+
} catch (error) {
|
|
206
|
+
return failureOf(navigationError ?? error);
|
|
207
|
+
}
|
|
179
208
|
} catch (error) {
|
|
180
|
-
return
|
|
181
|
-
ok: false,
|
|
182
|
-
error: error instanceof Error ? error.message : String(error)
|
|
183
|
-
};
|
|
209
|
+
return failureOf(error);
|
|
184
210
|
} finally {
|
|
185
211
|
await browser.close();
|
|
186
212
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture.mjs","names":[],"sources":["../../../src/modules/communityTools/capture.ts"],"sourcesContent":["import { createRequire } from 'node:module'\nimport { isCaptureAllowed } from '@igstack/app-catalog-shared-core'\n\nexport type CaptureResult =\n | {\n ok: true\n png: Buffer\n title: string | null\n favicon: Buffer | null\n /** The page's `Last-Modified`: a static host sets it on each deploy. */\n lastModified: Date | null\n }\n | { ok: false; error: string }\n\n/**\n * Visits a page and photographs it, reaching only `allowedHosts`.\n *\n * Resolves `{ ok: false }` when the page itself failed (no response, an error status, a\n * timeout, a redirect off the list) — that is the tool's health. Throws when the\n * browser could not be started, which is ours: the health job must not mark every tool\n * broken because Chromium is missing on one pod.\n */\nexport interface ScreenshotCapturer {\n capture: (url: string, allowedHosts: string[]) => Promise<CaptureResult>\n /** Captures queued and not started yet; a capturer without a queue leaves it out. */\n waiting?: () => number\n}\n\n/** The part of a playwright `Page` a capture uses, so it can be tested without a browser. */\nexport interface CapturePage {\n setDefaultTimeout: (ms: number) => void\n goto: (\n url: string,\n options: { timeout: number; waitUntil: 'load' },\n ) => Promise<{\n ok: () => boolean\n status: () => number\n headers: () => Record<string, string>\n } | null>\n waitForLoadState: (\n state: 'networkidle',\n options: { timeout: number },\n ) => Promise<void>\n waitForTimeout: (ms: number) => Promise<void>\n url: () => string\n screenshot: (options: { type: 'png' }) => Promise<Buffer>\n title: () => Promise<string>\n evaluate: (expression: string) => Promise<unknown>\n request: {\n get: (\n url: string,\n options: { timeout: number; maxRedirects: number },\n ) => Promise<{ ok: () => boolean; body: () => Promise<Buffer> }>\n }\n}\n\nconst VIEWPORT = { width: 1280, height: 800 }\nconst TIMEOUT_MS = 20_000\n/** After the network goes quiet, for the page to render what it fetched. */\nconst SETTLE_MS = 1_500\n\n/**\n * Whether the browser may load this URL: navigations, redirects and subresources alike.\n * Inline `data:`/`blob:` URLs reach no host, and pages need them to render.\n */\nexport function allowRequest(url: string, allowedHosts: string[]): boolean {\n return (\n url.startsWith('data:') ||\n url.startsWith('blob:') ||\n isCaptureAllowed(url, allowedHosts)\n )\n}\n\nconst MAX_REDIRECTS = 5\nconst HOP_TIMEOUT_MS = 10_000\n/** Hops a browser repeats as a bodyless GET; 307 and 308 keep the method and body. */\nconst REDIRECTS_TO_GET = [301, 302, 303]\n\n/** `same` repeats the original method and body; `get` is a bodyless GET. */\nexport type HopMode = 'same' | 'get'\n\n/**\n * Fetches a URL, following redirects only while every hop stays on the allowed hosts.\n * Null when a hop leaves them, or after too many hops; the off-list hop is never requested.\n *\n * Done by hand because Chromium follows a redirect, even one answered through\n * `route.fulfill`, without consulting the route again (measured against a real browser).\n */\nexport async function followWithinHosts<\n TResponse extends {\n status: () => number\n headers: () => Record<string, string>\n },\n>(\n fetch: (url: string, mode: HopMode) => Promise<TResponse>,\n url: string,\n allowedHosts: string[],\n): Promise<TResponse | null> {\n let hop = url\n let mode: HopMode = 'same'\n for (let hops = 0; ; hops++) {\n const response = await fetch(hop, mode)\n const location = response.headers()['location']\n const status = response.status()\n if (status < 300 || status >= 400 || !location) return response\n if (REDIRECTS_TO_GET.includes(status)) mode = 'get'\n hop = new URL(location, hop).href\n if (hops >= MAX_REDIRECTS || !isCaptureAllowed(hop, allowedHosts)) {\n return null\n }\n }\n}\n\n/** The parts of a playwright `Route` the fence uses, so it can be tested without a browser. */\nexport interface FenceRoute<TResponse> {\n url: string\n abort: (code: 'blockedbyclient' | 'failed') => Promise<void>\n continue: () => Promise<void>\n fetch: (url: string, mode: HopMode) => Promise<TResponse>\n fulfill: (response: TResponse) => Promise<void>\n}\n\n/**\n * Answers one browser request: off-list is aborted, on-list is fetched hop by hop.\n *\n * Never rejects. A rejection in a route handler surfaces as an unhandledRejection and\n * exits Node (measured), so one dead image on a tool's page would take the pod down.\n */\nexport async function fenceRoute<\n TResponse extends {\n status: () => number\n headers: () => Record<string, string>\n },\n>(route: FenceRoute<TResponse>, allowedHosts: string[]): Promise<void> {\n try {\n if (!allowRequest(route.url, allowedHosts)) {\n await route.abort('blockedbyclient')\n } else if (route.url.startsWith('data:') || route.url.startsWith('blob:')) {\n await route.continue()\n } else {\n const response = await followWithinHosts(\n route.fetch,\n route.url,\n allowedHosts,\n )\n if (response) await route.fulfill(response)\n else await route.abort('blockedbyclient')\n }\n } catch {\n await route.abort('failed').catch(() => undefined)\n }\n}\n\n/**\n * Chromium flags that fence the network stack itself, below anything a page can reach:\n * every name but the capture hosts fails to resolve (IP literals included), which also\n * covers worker fetches and sockets that `route` never sees; WebRTC gets no direct UDP.\n * A host that is not a plain name is dropped, so config cannot inject resolver rules.\n */\nexport function chromiumFenceArgs(allowedHosts: string[]): string[] {\n const rules = [\n 'MAP * ~NOTFOUND',\n ...allowedHosts\n .filter((host) => /^[a-z0-9.-]+$/i.test(host))\n .flatMap((host) => [`EXCLUDE *.${host}`, `EXCLUDE ${host}`]),\n ]\n return [\n `--host-resolver-rules=${rules.join(', ')}`,\n '--force-webrtc-ip-handling-policy=disable_non_proxied_udp',\n '--webrtc-ip-handling-policy=disable_non_proxied_udp',\n ]\n}\n\n/** Navigates an already-fenced page and collects the screenshot, title and favicon. */\nexport async function capturePage(\n page: CapturePage,\n url: string,\n allowedHosts: string[],\n): Promise<CaptureResult> {\n page.setDefaultTimeout(TIMEOUT_MS)\n const deadline = Date.now() + TIMEOUT_MS\n const response = await page.goto(url, {\n timeout: TIMEOUT_MS,\n waitUntil: 'load',\n })\n // The route fence aborts an off-list redirect, but the result must not depend on it.\n if (!isCaptureAllowed(page.url(), allowedHosts)) {\n return { ok: false, error: 'redirected off the allowed hosts' }\n }\n if (!response || !response.ok()) {\n return {\n ok: false,\n error: response ? `HTTP ${response.status()}` : 'No response',\n }\n }\n // `load` is only the HTML and its assets: a page that fetches its data after\n // that would be photographed saying \"Loading…\". So wait for the network to go\n // quiet, then a moment for it to render, all inside the one timeout. A page\n // that never goes quiet (polling, a live feed) is photographed as it is.\n const idleBudget = deadline - Date.now() - SETTLE_MS\n if (idleBudget > 0) {\n await page\n .waitForLoadState('networkidle', { timeout: idleBudget })\n .catch(() => undefined)\n }\n const settle = Math.min(SETTLE_MS, deadline - Date.now())\n if (settle > 0) await page.waitForTimeout(settle)\n const png = await page.screenshot({ type: 'png' })\n const title = (await page.title()).trim() || null\n\n // A string, so this file needs no DOM types.\n const iconHref = await page.evaluate(\n `document.querySelector('link[rel~=\"icon\"]')?.href ?? null`,\n )\n const iconUrl =\n typeof iconHref === 'string'\n ? iconHref\n : new URL('/favicon.ico', page.url()).href\n let favicon: Buffer | null = null\n // `page.request` bypasses the route fence, so the href the page chose is checked here,\n // and a redirect is not followed anywhere.\n if (isCaptureAllowed(iconUrl, allowedHosts)) {\n try {\n const icon = await page.request.get(iconUrl, {\n timeout: 5_000,\n maxRedirects: 0,\n })\n if (icon.ok()) favicon = await icon.body()\n } catch {\n // No favicon is fine: the card falls back to a monogram.\n }\n }\n\n return {\n ok: true,\n png,\n title,\n favicon,\n lastModified: httpDate(response.headers()['last-modified']),\n }\n}\n\n/** An HTTP date header as a Date; null when absent or unreadable. */\nexport function httpDate(value: string | undefined): Date | null {\n if (!value) return null\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? null : date\n}\n\n/** Runs captures one at a time, so concurrent previews cannot start a browser each. */\nexport function oneAtATime(\n capture: ScreenshotCapturer['capture'],\n): Required<ScreenshotCapturer> {\n let queue: Promise<unknown> = Promise.resolve()\n let waiting = 0\n return {\n waiting: () => waiting,\n capture: (url, allowedHosts) => {\n waiting++\n const run = queue.then(() => {\n waiting--\n return capture(url, allowedHosts)\n })\n queue = run.catch(() => undefined)\n return run\n },\n }\n}\n\n/**\n * A capturer backed by the optional `playwright-core` peer, or null when it is not\n * installed — the feature then works without screenshots.\n */\nexport function createPlaywrightCapturer(): ScreenshotCapturer | null {\n try {\n createRequire(import.meta.url).resolve('playwright-core')\n } catch {\n return null\n }\n\n return oneAtATime(async (url, allowedHosts) => {\n const { chromium } = await import('playwright-core')\n // Launched per capture because the fence flags depend on the hosts; the queue\n // keeps that to one browser at a time.\n const browser = await chromium.launch({\n executablePath:\n process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH || undefined,\n args: chromiumFenceArgs(allowedHosts),\n })\n try {\n // A service worker could answer requests the route never sees.\n const context = await browser.newContext({\n viewport: VIEWPORT,\n serviceWorkers: 'block',\n })\n // Second layer under the resolver fence: per-request and per-hop checks.\n await context.route('**/*', (route) =>\n fenceRoute(\n {\n url: route.request().url(),\n abort: (code) => route.abort(code),\n continue: () => route.continue(),\n fetch: (hop, mode) =>\n mode === 'get'\n ? context.request.get(hop, {\n maxRedirects: 0,\n timeout: HOP_TIMEOUT_MS,\n })\n : route.fetch({\n url: hop,\n maxRedirects: 0,\n timeout: HOP_TIMEOUT_MS,\n }),\n fulfill: (response) => route.fulfill({ response }),\n },\n allowedHosts,\n ),\n )\n // A screenshot needs no live socket, and `route` does not see them.\n await context.routeWebSocket(/.*/, (ws) => ws.close())\n const page = await context.newPage()\n return await capturePage(page, url, allowedHosts)\n } catch (error) {\n return {\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n }\n } finally {\n await browser.close()\n }\n })\n}\n"],"mappings":";;;;AAwDA,MAAM,WAAW;CAAE,OAAO;CAAM,QAAQ;CAAK;AAC7C,MAAM,aAAa;;AAEnB,MAAM,YAAY;;;;;AAMlB,SAAgB,aAAa,KAAa,cAAiC;AACzE,QACE,IAAI,WAAW,QAAQ,IACvB,IAAI,WAAW,QAAQ,IACvB,iBAAi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M,UAAU,OAAO,MAAM;IAC9D;YACO;AACR,SAAM,QAAQ,OAAO;;GAEvB"}
|
|
1
|
+
{"version":3,"file":"capture.mjs","names":[],"sources":["../../../src/modules/communityTools/capture.ts"],"sourcesContent":["import { createRequire } from 'node:module'\nimport { isCaptureAllowed } from '@igstack/app-catalog-shared-core'\n\nexport type CaptureResult =\n | {\n ok: true\n png: Buffer\n title: string | null\n favicon: Buffer | null\n /** The page's `Last-Modified`: a static host sets it on each deploy. */\n lastModified: Date | null\n }\n | {\n ok: false\n error: string\n /**\n * No answer at all (a timeout, a refused connection), which may be the\n * server's own network. Absent for a definitive failure: an HTTP error\n * status, or a name that does not resolve.\n */\n unreachable?: true\n }\n\n/**\n * Visits a page and photographs it, reaching only `allowedHosts`.\n *\n * Resolves `{ ok: false }` when the page itself failed (no response, an error status, a\n * timeout, a redirect off the list) — that is the tool's health; `unreachable` when\n * it never answered. Throws when the\n * browser could not be started, which is ours: the health job must not mark every tool\n * broken because Chromium is missing on one pod.\n */\nexport interface ScreenshotCapturer {\n capture: (url: string, allowedHosts: string[]) => Promise<CaptureResult>\n /** Captures queued and not started yet; a capturer without a queue leaves it out. */\n waiting?: () => number\n}\n\n/** The part of a playwright `Page` a capture uses, so it can be tested without a browser. */\nexport interface CapturePage {\n setDefaultTimeout: (ms: number) => void\n goto: (\n url: string,\n options: { timeout: number; waitUntil: 'load' },\n ) => Promise<{\n ok: () => boolean\n status: () => number\n headers: () => Record<string, string>\n } | null>\n waitForLoadState: (\n state: 'networkidle',\n options: { timeout: number },\n ) => Promise<void>\n waitForTimeout: (ms: number) => Promise<void>\n url: () => string\n screenshot: (options: { type: 'png' }) => Promise<Buffer>\n title: () => Promise<string>\n evaluate: (expression: string) => Promise<unknown>\n request: {\n get: (\n url: string,\n options: { timeout: number; maxRedirects: number },\n ) => Promise<{ ok: () => boolean; body: () => Promise<Buffer> }>\n }\n}\n\nconst VIEWPORT = { width: 1280, height: 800 }\nconst TIMEOUT_MS = 20_000\n/** After the network goes quiet, for the page to render what it fetched. */\nconst SETTLE_MS = 1_500\n\n/**\n * Whether the browser may load this URL: navigations, redirects and subresources alike.\n * Inline `data:`/`blob:` URLs reach no host, and pages need them to render.\n */\nexport function allowRequest(url: string, allowedHosts: string[]): boolean {\n return (\n url.startsWith('data:') ||\n url.startsWith('blob:') ||\n isCaptureAllowed(url, allowedHosts)\n )\n}\n\nconst MAX_REDIRECTS = 5\nconst HOP_TIMEOUT_MS = 10_000\n/** Hops a browser repeats as a bodyless GET; 307 and 308 keep the method and body. */\nconst REDIRECTS_TO_GET = [301, 302, 303]\n\n/** `same` repeats the original method and body; `get` is a bodyless GET. */\nexport type HopMode = 'same' | 'get'\n\n/**\n * Fetches a URL, following redirects only while every hop stays on the allowed hosts.\n * Null when a hop leaves them, or after too many hops; the off-list hop is never requested.\n *\n * Done by hand because Chromium follows a redirect, even one answered through\n * `route.fulfill`, without consulting the route again (measured against a real browser).\n */\nexport async function followWithinHosts<\n TResponse extends {\n status: () => number\n headers: () => Record<string, string>\n },\n>(\n fetch: (url: string, mode: HopMode) => Promise<TResponse>,\n url: string,\n allowedHosts: string[],\n): Promise<TResponse | null> {\n let hop = url\n let mode: HopMode = 'same'\n for (let hops = 0; ; hops++) {\n const response = await fetch(hop, mode)\n const location = response.headers()['location']\n const status = response.status()\n if (status < 300 || status >= 400 || !location) return response\n if (REDIRECTS_TO_GET.includes(status)) mode = 'get'\n hop = new URL(location, hop).href\n if (hops >= MAX_REDIRECTS || !isCaptureAllowed(hop, allowedHosts)) {\n return null\n }\n }\n}\n\n/** The parts of a playwright `Route` the fence uses, so it can be tested without a browser. */\nexport interface FenceRoute<TResponse> {\n url: string\n abort: (code: 'blockedbyclient' | 'failed') => Promise<void>\n continue: () => Promise<void>\n fetch: (url: string, mode: HopMode) => Promise<TResponse>\n fulfill: (response: TResponse) => Promise<void>\n}\n\n/**\n * Answers one browser request: off-list is aborted, on-list is fetched hop by hop.\n *\n * Never rejects. A rejection in a route handler surfaces as an unhandledRejection and\n * exits Node (measured), so one dead image on a tool's page would take the pod down.\n */\nexport async function fenceRoute<\n TResponse extends {\n status: () => number\n headers: () => Record<string, string>\n },\n>(route: FenceRoute<TResponse>, allowedHosts: string[]): Promise<void> {\n try {\n if (!allowRequest(route.url, allowedHosts)) {\n await route.abort('blockedbyclient')\n } else if (route.url.startsWith('data:') || route.url.startsWith('blob:')) {\n await route.continue()\n } else {\n const response = await followWithinHosts(\n route.fetch,\n route.url,\n allowedHosts,\n )\n if (response) await route.fulfill(response)\n else await route.abort('blockedbyclient')\n }\n } catch {\n await route.abort('failed').catch(() => undefined)\n }\n}\n\n/**\n * Chromium flags that fence the network stack itself, below anything a page can reach:\n * every name but the capture hosts fails to resolve (IP literals included), which also\n * covers worker fetches and sockets that `route` never sees; WebRTC gets no direct UDP.\n * A host that is not a plain name is dropped, so config cannot inject resolver rules.\n */\nexport function chromiumFenceArgs(allowedHosts: string[]): string[] {\n const rules = [\n 'MAP * ~NOTFOUND',\n ...allowedHosts\n .filter((host) => /^[a-z0-9.-]+$/i.test(host))\n .flatMap((host) => [`EXCLUDE *.${host}`, `EXCLUDE ${host}`]),\n ]\n return [\n `--host-resolver-rules=${rules.join(', ')}`,\n '--force-webrtc-ip-handling-policy=disable_non_proxied_udp',\n '--webrtc-ip-handling-policy=disable_non_proxied_udp',\n ]\n}\n\n/** Navigates an already-fenced page and collects the screenshot, title and favicon. */\nexport async function capturePage(\n page: CapturePage,\n url: string,\n allowedHosts: string[],\n): Promise<CaptureResult> {\n page.setDefaultTimeout(TIMEOUT_MS)\n const deadline = Date.now() + TIMEOUT_MS\n const response = await page.goto(url, {\n timeout: TIMEOUT_MS,\n waitUntil: 'load',\n })\n // The route fence aborts an off-list redirect, but the result must not depend on it.\n if (!isCaptureAllowed(page.url(), allowedHosts)) {\n return { ok: false, error: 'redirected off the allowed hosts' }\n }\n if (!response || !response.ok()) {\n return {\n ok: false,\n error: response ? `HTTP ${response.status()}` : 'No response',\n ...(!response && { unreachable: true as const }),\n }\n }\n // `load` is only the HTML and its assets: a page that fetches its data after\n // that would be photographed saying \"Loading…\". So wait for the network to go\n // quiet, then a moment for it to render, all inside the one timeout. A page\n // that never goes quiet (polling, a live feed) is photographed as it is.\n const idleBudget = deadline - Date.now() - SETTLE_MS\n if (idleBudget > 0) {\n await page\n .waitForLoadState('networkidle', { timeout: idleBudget })\n .catch(() => undefined)\n }\n const settle = Math.min(SETTLE_MS, deadline - Date.now())\n if (settle > 0) await page.waitForTimeout(settle)\n const png = await page.screenshot({ type: 'png' })\n const title = (await page.title()).trim() || null\n\n // A string, so this file needs no DOM types.\n const iconHref = await page.evaluate(\n `document.querySelector('link[rel~=\"icon\"]')?.href ?? null`,\n )\n const iconUrl =\n typeof iconHref === 'string'\n ? iconHref\n : new URL('/favicon.ico', page.url()).href\n let favicon: Buffer | null = null\n // `page.request` bypasses the route fence, so the href the page chose is checked here,\n // and a redirect is not followed anywhere.\n if (isCaptureAllowed(iconUrl, allowedHosts)) {\n try {\n const icon = await page.request.get(iconUrl, {\n timeout: 5_000,\n maxRedirects: 0,\n })\n if (icon.ok()) favicon = await icon.body()\n } catch {\n // No favicon is fine: the card falls back to a monogram.\n }\n }\n\n return {\n ok: true,\n png,\n title,\n favicon,\n lastModified: httpDate(response.headers()['last-modified']),\n }\n}\n\n/**\n * A capture that threw, from the browser or the network under it. Only a name\n * that does not resolve is definitive; anything else got no answer at all.\n */\nexport function failureOf(\n error: unknown,\n): Extract<CaptureResult, { ok: false }> {\n const message = error instanceof Error ? error.message : String(error)\n return /ENOTFOUND|ERR_NAME_NOT_RESOLVED/.test(message)\n ? { ok: false, error: message }\n : { ok: false, error: message, unreachable: true }\n}\n\n/** An HTTP date header as a Date; null when absent or unreadable. */\nexport function httpDate(value: string | undefined): Date | null {\n if (!value) return null\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? null : date\n}\n\n/** Runs captures one at a time, so concurrent previews cannot start a browser each. */\nexport function oneAtATime(\n capture: ScreenshotCapturer['capture'],\n): Required<ScreenshotCapturer> {\n let queue: Promise<unknown> = Promise.resolve()\n let waiting = 0\n return {\n waiting: () => waiting,\n capture: (url, allowedHosts) => {\n waiting++\n const run = queue.then(() => {\n waiting--\n return capture(url, allowedHosts)\n })\n queue = run.catch(() => undefined)\n return run\n },\n }\n}\n\n/**\n * A capturer backed by the optional `playwright-core` peer, or null when it is not\n * installed — the feature then works without screenshots.\n */\nexport function createPlaywrightCapturer(): ScreenshotCapturer | null {\n try {\n createRequire(import.meta.url).resolve('playwright-core')\n } catch {\n return null\n }\n\n return oneAtATime(async (url, allowedHosts) => {\n const { chromium } = await import('playwright-core')\n // Launched per capture because the fence flags depend on the hosts; the queue\n // keeps that to one browser at a time.\n const browser = await chromium.launch({\n executablePath:\n process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH || undefined,\n args: chromiumFenceArgs(allowedHosts),\n })\n try {\n // A service worker could answer requests the route never sees.\n const context = await browser.newContext({\n viewport: VIEWPORT,\n serviceWorkers: 'block',\n })\n // The fence answers the page itself, so the browser only sees that it\n // failed; why it failed (no such name, or no answer) is kept here.\n let navigationError: unknown = null\n // Second layer under the resolver fence: per-request and per-hop checks.\n await context.route('**/*', (route) =>\n fenceRoute(\n {\n url: route.request().url(),\n abort: (code) => route.abort(code),\n continue: () => route.continue(),\n fetch: async (hop, mode) => {\n try {\n return await (mode === 'get'\n ? context.request.get(hop, {\n maxRedirects: 0,\n timeout: HOP_TIMEOUT_MS,\n })\n : route.fetch({\n url: hop,\n maxRedirects: 0,\n timeout: HOP_TIMEOUT_MS,\n }))\n } catch (error) {\n if (route.request().isNavigationRequest()) {\n navigationError ??= error\n }\n throw error\n }\n },\n fulfill: (response) => route.fulfill({ response }),\n },\n allowedHosts,\n ),\n )\n // A screenshot needs no live socket, and `route` does not see them.\n await context.routeWebSocket(/.*/, (ws) => ws.close())\n const page = await context.newPage()\n try {\n return await capturePage(page, url, allowedHosts)\n } catch (error) {\n return failureOf(navigationError ?? error)\n }\n } cat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MAAM,SAAS,UAC3B,WACE;IACE,KAAK,MAAM,SAAS,CAAC,KAAK;IAC1B,QAAQ,SAAS,MAAM,MAAM,KAAK;IAClC,gBAAgB,MAAM,UAAU;IAChC,OAAO,OAAO,KAAK,SAAS;AAC1B,SAAI;AACF,aAAO,OAAO,SAAS,QACnB,QAAQ,QAAQ,IAAI,KAAK;OACvB,cAAc;OACd,SAAS;OACV,CAAC,GACF,MAAM,MAAM;OACV,KAAK;OACL,cAAc;OACd,SAAS;OACV,CAAC;cACC,OAAO;AACd,UAAI,MAAM,SAAS,CAAC,qBAAqB,CACvC,qBAAoB;AAEtB,YAAM;;;IAGV,UAAU,aAAa,MAAM,QAAQ,EAAE,UAAU,CAAC;IACnD,EACD,aACD,CACF;AAED,SAAM,QAAQ,eAAe,OAAO,OAAO,GAAG,OAAO,CAAC;GACtD,MAAM,OAAO,MAAM,QAAQ,SAAS;AACpC,OAAI;AACF,WAAO,MAAM,YAAY,MAAM,KAAK,aAAa;YAC1C,OAAO;AACd,WAAO,UAAU,mBAAmB,MAAM;;WAErC,OAAO;AACd,UAAO,UAAU,MAAM;YACf;AACR,SAAM,QAAQ,OAAO;;GAEvB"}
|
|
@@ -58,7 +58,7 @@ async function checkTool(tool, deps, now) {
|
|
|
58
58
|
where: { id: tool.id },
|
|
59
59
|
data: {
|
|
60
60
|
lastCheckAt: now,
|
|
61
|
-
...nextLifecycle(tool, result.ok, now),
|
|
61
|
+
...nextLifecycle(tool, result.ok ? "ok" : result.unreachable ? "unreachable" : "failed", now),
|
|
62
62
|
...result.ok && await storeCapture(tool.slug, result, now),
|
|
63
63
|
...result.ok && result.lastModified && { siteUpdatedAt: result.lastModified }
|
|
64
64
|
}
|
|
@@ -90,7 +90,8 @@ async function runHealthCheckOnce(deps, now, clock = Date.now) {
|
|
|
90
90
|
lastCheckAt: true,
|
|
91
91
|
failingSince: true,
|
|
92
92
|
archivedAt: true,
|
|
93
|
-
archivedBy: true
|
|
93
|
+
archivedBy: true,
|
|
94
|
+
unreachableSince: true
|
|
94
95
|
} })).filter((t) => !(t.archivedAt && t.archivedBy !== "auto") && (!t.lastCheckAt || t.lastCheckAt.getTime() < cutoff));
|
|
95
96
|
const startedAt = clock();
|
|
96
97
|
for (const tool of due) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"healthJob.mjs","names":[],"sources":["../../../src/modules/communityTools/healthJob.ts"],"sourcesContent":["import {\n isCaptureAllowed,\n nextLifecycle,\n} from '@igstack/app-catalog-shared-core'\nimport { getDbClient } from '../../db/client'\nimport { resizeImage } from '../assets/assetUtils'\nimport { upsertAsset } from '../assets/upsertAsset'\nimport type { CaptureResult, ScreenshotCapturer } from './capture'\n\nexport interface CaptureDeps {\n captureHosts: string[]\n capturer: ScreenshotCapturer | null\n}\n\nconst MINUTE_MS = 60 * 1000\nconst HOUR_MS = 60 * MINUTE_MS\nconst DAY_MS = 24 * HOUR_MS\n/** Wall time one run may spend; what is left is due again on the next tick. */\nconst RUN_BUDGET_MS = 40 * MINUTE_MS\n/** Past the budget plus one capture, and short of the next tick. */\nconst RUN_TRANSACTION_TIMEOUT_MS = 55 * MINUTE_MS\nconst FIRST_RUN_DELAY_MS = MINUTE_MS\n\ninterface CheckableTool {\n id: string\n slug: string\n url: string\n failingSince: Date | null\n archivedAt: Date | null\n archivedBy: string | null\n}\n\n/** Stores the screenshot and, when it decodes, the favicon as assets. */\nasync function storeCapture(\n slug: string,\n result: Extract<CaptureResult, { ok: true }>,\n now: Date,\n) {\n const prisma = getDbClient()\n const screenshotAssetId = await upsertAsset({\n prisma,\n buffer: result.png,\n name: `community-${slug}-screenshot`,\n originalFilename: `community-${slug}-screenshot.png`,\n assetType: 'screenshot',\n })\n\n let faviconAssetId: string | undefined\n if (result.favicon) {\n try {\n // ponytail: sharp cannot decode .ico, so those tools get no favicon; add an ico decoder if it matters\n const png = await resizeImage(result.favicon, 64, 64, 'png')\n faviconAssetId = await upsertAsset({\n prisma,\n buffer: png,\n name: `community-${slug}-icon`,\n originalFilename: `community-${slug}-icon.png`,\n assetType: 'icon',\n })\n } catch {\n // An undecodable favicon leaves the previous one, or none.\n }\n }\n\n return {\n screenshotAssetId,\n ...(faviconAssetId && { faviconAssetId }),\n capturedAt: now,\n }\n}\n\n/**\n * Visits one tool and records the result. Hosts outside the configured suffixes, and a\n * deployment without a capturer, are left untouched: no check means no state change.\n */\nexport async function checkTool(\n tool: CheckableTool,\n deps: CaptureDeps,\n now: Date,\n): Promise<void> {\n if (!deps.capturer || !isCaptureAllowed(tool.url, deps.captureHosts)) return\n\n let result: CaptureResult\n try {\n result = await deps.capturer.capture(tool.url, deps.captureHosts)\n } catch (error) {\n // A browser that would not start says nothing about the page, so the\n // lifecycle stays as it was. The attempt is still recorded: without it a\n // new tool reads \"capture pending\" forever and its open card keeps asking.\n await getDbClient().dbCommunityTool.update({\n where: { id: tool.id },\n data: { lastCheckAt: now },\n })\n throw error\n }\n await getDbClient().dbCommunityTool.update({\n where: { id: tool.id },\n data: {\n lastCheckAt: now,\n ...nextLifecycle(tool
|
|
1
|
+
{"version":3,"file":"healthJob.mjs","names":[],"sources":["../../../src/modules/communityTools/healthJob.ts"],"sourcesContent":["import {\n isCaptureAllowed,\n nextLifecycle,\n} from '@igstack/app-catalog-shared-core'\nimport { getDbClient } from '../../db/client'\nimport { resizeImage } from '../assets/assetUtils'\nimport { upsertAsset } from '../assets/upsertAsset'\nimport type { CaptureResult, ScreenshotCapturer } from './capture'\n\nexport interface CaptureDeps {\n captureHosts: string[]\n capturer: ScreenshotCapturer | null\n}\n\nconst MINUTE_MS = 60 * 1000\nconst HOUR_MS = 60 * MINUTE_MS\nconst DAY_MS = 24 * HOUR_MS\n/** Wall time one run may spend; what is left is due again on the next tick. */\nconst RUN_BUDGET_MS = 40 * MINUTE_MS\n/** Past the budget plus one capture, and short of the next tick. */\nconst RUN_TRANSACTION_TIMEOUT_MS = 55 * MINUTE_MS\nconst FIRST_RUN_DELAY_MS = MINUTE_MS\n\ninterface CheckableTool {\n id: string\n slug: string\n url: string\n failingSince: Date | null\n archivedAt: Date | null\n archivedBy: string | null\n unreachableSince: Date | null\n}\n\n/** Stores the screenshot and, when it decodes, the favicon as assets. */\nasync function storeCapture(\n slug: string,\n result: Extract<CaptureResult, { ok: true }>,\n now: Date,\n) {\n const prisma = getDbClient()\n const screenshotAssetId = await upsertAsset({\n prisma,\n buffer: result.png,\n name: `community-${slug}-screenshot`,\n originalFilename: `community-${slug}-screenshot.png`,\n assetType: 'screenshot',\n })\n\n let faviconAssetId: string | undefined\n if (result.favicon) {\n try {\n // ponytail: sharp cannot decode .ico, so those tools get no favicon; add an ico decoder if it matters\n const png = await resizeImage(result.favicon, 64, 64, 'png')\n faviconAssetId = await upsertAsset({\n prisma,\n buffer: png,\n name: `community-${slug}-icon`,\n originalFilename: `community-${slug}-icon.png`,\n assetType: 'icon',\n })\n } catch {\n // An undecodable favicon leaves the previous one, or none.\n }\n }\n\n return {\n screenshotAssetId,\n ...(faviconAssetId && { faviconAssetId }),\n capturedAt: now,\n }\n}\n\n/**\n * Visits one tool and records the result. Hosts outside the configured suffixes, and a\n * deployment without a capturer, are left untouched: no check means no state change.\n */\nexport async function checkTool(\n tool: CheckableTool,\n deps: CaptureDeps,\n now: Date,\n): Promise<void> {\n if (!deps.capturer || !isCaptureAllowed(tool.url, deps.captureHosts)) return\n\n let result: CaptureResult\n try {\n result = await deps.capturer.capture(tool.url, deps.captureHosts)\n } catch (error) {\n // A browser that would not start says nothing about the page, so the\n // lifecycle stays as it was. The attempt is still recorded: without it a\n // new tool reads \"capture pending\" forever and its open card keeps asking.\n await getDbClient().dbCommunityTool.update({\n where: { id: tool.id },\n data: { lastCheckAt: now },\n })\n throw error\n }\n await getDbClient().dbCommunityTool.update({\n where: { id: tool.id },\n data: {\n lastCheckAt: now,\n ...nextLifecycle(\n tool,\n result.ok ? 'ok' : result.unreachable ? 'unreachable' : 'failed',\n now,\n ),\n ...(result.ok && (await storeCapture(tool.slug, result, now))),\n // A visit without the header leaves the date it last had.\n ...(result.ok &&\n result.lastModified && {\n siteUpdatedAt: result.lastModified,\n }),\n },\n })\n}\n\n/**\n * One pass over every tool not checked in the last day.\n *\n * The transaction-scoped lock rather than `pg_try_advisory_lock`: a session lock is\n * held by whichever pooled connection ran the query, and the unlock may run on another,\n * leaving the lock stuck forever. The transaction pins one connection and releases the\n * lock when it ends, even if the pod dies mid-run.\n *\n * ponytail: one transaction holds the lock for the whole run, so a run is capped at\n * RUN_BUDGET_MS (about 90 tools at 25 s each); per-tool short transactions or a job\n * queue if the catalog outgrows that.\n */\nexport async function runHealthCheckOnce(\n deps: CaptureDeps,\n now: Date,\n clock: () => number = Date.now,\n): Promise<void> {\n const db = getDbClient()\n await db.$transaction(\n async (tx) => {\n const [row] = await tx.$queryRaw<{ locked: boolean }[]>`\n SELECT pg_try_advisory_xact_lock(hashtext('community-tools-health')) AS locked`\n if (!row?.locked) return\n\n const cutoff = now.getTime() - DAY_MS\n // ponytail: reads every tool each hour; move the filters into the query if the table grows large\n const tools = await db.dbCommunityTool.findMany({\n select: {\n id: true,\n slug: true,\n url: true,\n lastCheckAt: true,\n failingSince: true,\n archivedAt: true,\n archivedBy: true,\n unreachableSince: true,\n },\n })\n const due = tools.filter(\n (t) =>\n !(t.archivedAt && t.archivedBy !== 'auto') &&\n (!t.lastCheckAt || t.lastCheckAt.getTime() < cutoff),\n )\n\n const startedAt = clock()\n for (const tool of due) {\n if (clock() - startedAt >= RUN_BUDGET_MS) break\n try {\n await checkTool(tool, deps, now)\n } catch (error) {\n console.error(`[communityTools] health check of ${tool.slug}:`, error)\n }\n }\n },\n { maxWait: 10_000, timeout: RUN_TRANSACTION_TIMEOUT_MS },\n )\n}\n\n/**\n * Starts the pass a minute after boot, then hourly: a pod restarted more often than\n * hourly would otherwise never check. The lock keeps pods from overlapping.\n * Returns a stop function.\n */\nexport function startHealthJob(\n deps: CaptureDeps,\n now: () => Date = () => new Date(),\n): () => void {\n const run = () => {\n runHealthCheckOnce(deps, now()).catch((error: unknown) => {\n console.error('[communityTools] health run failed:', error)\n })\n }\n const first = setTimeout(run, FIRST_RUN_DELAY_MS)\n const timer = setInterval(run, HOUR_MS)\n // Neither keeps the process, or a test runner, alive.\n first.unref()\n timer.unref()\n return () => {\n clearTimeout(first)\n clearInterval(timer)\n }\n}\n"],"mappings":";;;;;;AAcA,MAAM,YAAY,KAAK;AACvB,MAAM,UAAU,KAAK;AACrB,MAAM,SAAS,KAAK;;AAEpB,MAAM,gBAAgB,KAAK;;AAE3B,MAAM,6BAA6B,KAAK;AACxC,MAAM,qBAAqB;;AAa3B,eAAe,aACb,MACA,QACA,KACA;CACA,MAAM,SAAS,aAAa;CAC5B,MAAM,oBAAoB,MAAM,YAAY;EAC1C;EACA,QAAQ,OAAO;EACf,MAAM,aAAa,KAAK;EACxB,kBAAkB,aAAa,KAAK;EACpC,WAAW;EACZ,CAAC;CAEF,IAAI;AACJ,KAAI,OAAO,QACT,KAAI;AAGF,mBAAiB,MAAM,YAAY;GACjC;GACA,QAHU,MAAM,YAAY,OAAO,SAAS,IAAI,IAAI,MAAM;GAI1D,MAAM,aAAa,KAAK;GACxB,kBAAkB,aAAa,KAAK;GACpC,WAAW;GACZ,CAAC;SACI;AAKV,QAAO;EACL;EACA,GAAI,kBAAkB,EAAE,gBAAgB;EACxC,YAAY;EACb;;;;;;AAOH,eAAsB,UACpB,MACA,MACA,KACe;AACf,KAAI,CAAC,KAAK,YAAY,CAAC,iBAAiB,KAAK,KAAK,KAAK,aAAa,CAAE;CAEtE,IAAI;AACJ,KAAI;AACF,WAAS,MAAM,KAAK,SAAS,QAAQ,KAAK,KAAK,KAAK,aAAa;UAC1D,OAAO;AAId,QAAM,aAAa,CAAC,gBAAgB,OAAO;GACzC,OAAO,EAAE,IAAI,KAAK,IAAI;GACtB,MAAM,EAAE,aAAa,KAAK;GAC3B,CAAC;AACF,QAAM;;AAER,OAAM,aAAa,CAAC,gBAAgB,OAAO;EACzC,OAAO,EAAE,IAAI,KAAK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KAAK,QAAQ;AAEvC,OAAM,OAAO;AACb,OAAM,OAAO;AACb,cAAa;AACX,eAAa,MAAM;AACnB,gBAAc,MAAM"}
|
|
@@ -38,7 +38,7 @@ declare function createCommunityToolsRouter(options?: CommunityToolsOptions): _t
|
|
|
38
38
|
};
|
|
39
39
|
output: _igstack_app_catalog_shared_core0.CommunityTool;
|
|
40
40
|
meta: object;
|
|
41
|
-
}>;
|
|
41
|
+
}>; /** The card opened. */
|
|
42
42
|
recordView: _trpc_server0.TRPCMutationProcedure<{
|
|
43
43
|
input: {
|
|
44
44
|
slug: string;
|
|
@@ -49,6 +49,19 @@ declare function createCommunityToolsRouter(options?: CommunityToolsOptions): _t
|
|
|
49
49
|
};
|
|
50
50
|
meta: object;
|
|
51
51
|
}>;
|
|
52
|
+
/**
|
|
53
|
+
* A click through to the site. The page leaves as it is sent, so the
|
|
54
|
+
* client posts it with `keepalive` rather than through the tRPC client.
|
|
55
|
+
*/
|
|
56
|
+
recordSiteOpen: _trpc_server0.TRPCMutationProcedure<{
|
|
57
|
+
input: {
|
|
58
|
+
slug: string;
|
|
59
|
+
};
|
|
60
|
+
output: {
|
|
61
|
+
ok: boolean;
|
|
62
|
+
};
|
|
63
|
+
meta: object;
|
|
64
|
+
}>;
|
|
52
65
|
pins: _trpc_server0.TRPCQueryProcedure<{
|
|
53
66
|
input: void;
|
|
54
67
|
output: _igstack_app_catalog_shared_core0.CommunityTool[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { adminProcedure, protectedProcedure, publicProcedure, router, t } from "../../server/trpcSetup.mjs";
|
|
2
|
-
import { countByApp, getTool, likeTool, listPins, listTools, pinTool,
|
|
2
|
+
import { countByApp, getTool, likeTool, listPins, listTools, pinTool, recordOpen, reorderPins, unlikeTool, unpinTool } from "./service.mjs";
|
|
3
3
|
import { addTool, approveTool, archiveTool, editTool, previewTool, toolInputSchema } from "./writeService.mjs";
|
|
4
4
|
import { TRPCError } from "@trpc/server";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -55,7 +55,12 @@ function createCommunityToolsRouter(options) {
|
|
|
55
55
|
}),
|
|
56
56
|
recordView: publicProcedure$1.input(z.object({ slug: z.string() })).mutation(({ input, ctx }) => {
|
|
57
57
|
const actor = requireActor(ctx.actor);
|
|
58
|
-
return
|
|
58
|
+
return recordOpen(input.slug, "card", actor, ctx.user, /* @__PURE__ */ new Date());
|
|
59
|
+
}),
|
|
60
|
+
recordSiteOpen: publicProcedure$1.input(z.object({ slug: z.string() })).mutation(async ({ input, ctx }) => {
|
|
61
|
+
const actor = requireActor(ctx.actor);
|
|
62
|
+
await recordOpen(input.slug, "site", actor, ctx.user, /* @__PURE__ */ new Date());
|
|
63
|
+
return { ok: true };
|
|
59
64
|
}),
|
|
60
65
|
pins: protectedProcedure$1.query(({ ctx }) => {
|
|
61
66
|
return listPins(ctx.user.id, ctx.user, ctx.isAdmin, /* @__PURE__ */ new Date(), deps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.mjs","names":["publicProcedure","publicBase","protectedProcedure","protectedBase","adminProcedure","adminBase","service.listTools","service.countByApp","service.getTool","service.
|
|
1
|
+
{"version":3,"file":"router.mjs","names":["publicProcedure","publicBase","protectedProcedure","protectedBase","adminProcedure","adminBase","service.listTools","service.countByApp","service.getTool","service.recordOpen","service.listPins","service.pinTool","service.likeTool","service.unlikeTool","service.unpinTool","service.reorderPins","write.previewTool","write.toolInputSchema","write.addTool","write.editTool","write.archiveTool","write.approveTool"],"sources":["../../../src/modules/communityTools/router.ts"],"sourcesContent":["import { TRPCError } from '@trpc/server'\nimport { z } from 'zod'\nimport type { User } from 'better-auth/types'\nimport type { CommunityToolsOptions } from '../../middleware/types'\nimport {\n adminProcedure as adminBase,\n protectedProcedure as protectedBase,\n publicProcedure as publicBase,\n router,\n t,\n} from '../../server/trpcSetup'\nimport type { Actor } from '../visitor/visitorIdentity'\nimport * as service from './service'\nimport * as write from './writeService'\n\nfunction requireActor(actor: Actor | null): Actor {\n if (!actor) {\n throw new TRPCError({\n code: 'PRECONDITION_FAILED',\n message: 'This action needs cookies enabled',\n })\n }\n return actor\n}\n\nfunction writerOf(ctx: {\n user: User\n isAdmin: boolean\n actor: Actor | null\n}): write.Writer {\n return {\n user: ctx.user,\n isAdmin: ctx.isAdmin,\n actor: requireActor(ctx.actor),\n }\n}\n\n/**\n * `options.capturer` is used as given: resolving the playwright default is the caller's\n * job (`createAcMiddleware`), so a router built directly never launches a browser.\n */\nexport function createCommunityToolsRouter(options?: CommunityToolsOptions) {\n const enabled = options?.enabled ?? false\n const deps = {\n captureHosts: options?.captureHosts ?? [],\n capturer: options?.capturer ?? null,\n }\n\n // One router shape whether enabled or not, so clients see every procedure in the\n // type; when disabled every procedure but `config` answers NOT_FOUND.\n const whenEnabled = t.middleware(({ next }) => {\n if (!enabled) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: 'Community tools are disabled',\n })\n }\n return next()\n })\n const publicProcedure = publicBase.use(whenEnabled)\n const protectedProcedure = protectedBase.use(whenEnabled)\n const adminProcedure = adminBase.use(whenEnabled)\n\n return router({\n config: publicBase.query(() => ({ enabled })),\n\n list: publicProcedure.query(({ ctx }) => {\n return service.listTools(ctx.user, ctx.isAdmin, new Date(), deps)\n }),\n\n countByApp: publicProcedure.query(() => service.countByApp()),\n\n get: publicProcedure\n .input(z.object({ slug: z.string() }))\n .query(async ({ input, ctx }) => {\n const tool = await service.getTool(\n input.slug,\n ctx.user,\n ctx.isAdmin,\n new Date(),\n deps,\n )\n if (!tool) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: 'Tool not found',\n })\n }\n return tool\n }),\n\n /** The card opened. */\n recordView: publicProcedure\n .input(z.object({ slug: z.string() }))\n .mutation(({ input, ctx }) => {\n const actor = requireActor(ctx.actor)\n return service.recordOpen(\n input.slug,\n 'card',\n actor,\n ctx.user,\n new Date(),\n )\n }),\n\n /**\n * A click through to the site. The page leaves as it is sent, so the\n * client posts it with `keepalive` rather than through the tRPC client.\n */\n recordSiteOpen: publicProcedure\n .input(z.object({ slug: z.string() }))\n .mutation(async ({ input, ctx }) => {\n const actor = requireActor(ctx.actor)\n await service.recordOpen(\n input.slug,\n 'site',\n actor,\n ctx.user,\n new Date(),\n )\n return { ok: true }\n }),\n\n pins: protectedProcedure.query(({ ctx }) => {\n return service.listPins(\n ctx.user.id,\n ctx.user,\n ctx.isAdmin,\n new Date(),\n deps,\n )\n }),\n\n pin: protectedProcedure\n .input(z.object({ slug: z.string() }))\n .mutation(({ input, ctx }) => {\n return service.pinTool(input.slug, ctx.user.id)\n }),\n\n like: protectedProcedure\n .input(z.object({ slug: z.string() }))\n .mutation(({ input, ctx }) => {\n return service.likeTool(input.slug, ctx.user)\n }),\n\n unlike: protectedProcedure\n .input(z.object({ slug: z.string() }))\n .mutation(({ input, ctx }) => {\n return service.unlikeTool(input.slug, ctx.user.id)\n }),\n\n unpin: protectedProcedure\n .input(z.object({ slug: z.string() }))\n .mutation(({ input, ctx }) => {\n return service.unpinTool(input.slug, ctx.user.id)\n }),\n\n reorderPins: protectedProcedure\n .input(z.object({ slugs: z.array(z.string()) }))\n .mutation(({ input, ctx }) => {\n return service.reorderPins(input.slugs, ctx.user.id)\n }),\n\n preview: protectedProcedure\n .input(z.object({ url: z.string().max(2000) }))\n .mutation(({ input }) => write.previewTool(input.url, deps)),\n\n add: protectedProcedure\n .input(write.toolInputSchema)\n .mutation(({ input, ctx }) =>\n write.addTool(input, writerOf(ctx), deps, new Date()),\n ),\n\n edit: protectedProcedure\n .input(write.toolInputSchema.extend({ slug: z.string() }))\n .mutation(({ input, ctx }) =>\n write.editTool(input, writerOf(ctx), deps, new Date()),\n ),\n\n archive: protectedProcedure\n .input(\n z.object({\n slug: z.string(),\n reason: z.string().trim().min(1).max(500),\n }),\n )\n .mutation(({ input, ctx }) =>\n write.archiveTool(input.slug, input.reason, writerOf(ctx), new Date()),\n ),\n\n approve: adminProcedure\n .input(z.object({ slug: z.string() }))\n .mutation(({ input, ct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