@geekmidas/cli 10.0.0-alpha.179 → 10.0.0-alpha.180
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/{EndpointGenerator-DMq6ameY.mjs → EndpointGenerator-CBKH87_b.mjs} +3 -3
- package/dist/{EndpointGenerator-DMq6ameY.mjs.map → EndpointGenerator-CBKH87_b.mjs.map} +1 -1
- package/dist/{EndpointGenerator-yx7_SoXT.cjs → EndpointGenerator-iyA3HkOH.cjs} +3 -3
- package/dist/{EndpointGenerator-yx7_SoXT.cjs.map → EndpointGenerator-iyA3HkOH.cjs.map} +1 -1
- package/dist/{LegacyStateStore-BzUlIHvz.mjs → LegacyStateStore-B7pQA25B.mjs} +2 -2
- package/dist/{LegacyStateStore-BzUlIHvz.mjs.map → LegacyStateStore-B7pQA25B.mjs.map} +1 -1
- package/dist/{LegacyStateStore-C7FFaVce.cjs → LegacyStateStore-l0hBdv-E.cjs} +2 -2
- package/dist/{LegacyStateStore-C7FFaVce.cjs.map → LegacyStateStore-l0hBdv-E.cjs.map} +1 -1
- package/dist/{LocalStateStore-BvI8RUtS.mjs → LocalStateStore-CP0UHL85.mjs} +2 -2
- package/dist/{LocalStateStore-BvI8RUtS.mjs.map → LocalStateStore-CP0UHL85.mjs.map} +1 -1
- package/dist/{LocalStateStore-BJQvLCrg.cjs → LocalStateStore-DEE0Kc_s.cjs} +2 -2
- package/dist/{LocalStateStore-BJQvLCrg.cjs.map → LocalStateStore-DEE0Kc_s.cjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-C_JqxkWt.mjs → OpenApiTsGenerator-CoVA3Ykv.mjs} +2 -2
- package/dist/{OpenApiTsGenerator-C_JqxkWt.mjs.map → OpenApiTsGenerator-CoVA3Ykv.mjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-gM70-7qw.cjs → OpenApiTsGenerator-vy-fOJgs.cjs} +2 -2
- package/dist/{OpenApiTsGenerator-gM70-7qw.cjs.map → OpenApiTsGenerator-vy-fOJgs.cjs.map} +1 -1
- package/dist/{S3StateStore-C1ZX1w5v.cjs → S3StateStore-DE0BNuXc.cjs} +4 -4
- package/dist/{S3StateStore-C1ZX1w5v.cjs.map → S3StateStore-DE0BNuXc.cjs.map} +1 -1
- package/dist/{S3StateStore-DYQSxiVw.mjs → S3StateStore-vmxZWMKh.mjs} +4 -4
- package/dist/{S3StateStore-DYQSxiVw.mjs.map → S3StateStore-vmxZWMKh.mjs.map} +1 -1
- package/dist/{SSMStateStore-DWQk17j8.mjs → SSMStateStore-DQyXnX2M.mjs} +2 -2
- package/dist/{SSMStateStore-DWQk17j8.mjs.map → SSMStateStore-DQyXnX2M.mjs.map} +1 -1
- package/dist/{SSMStateStore-tXnZSJxP.cjs → SSMStateStore-p4hBdTg3.cjs} +2 -2
- package/dist/{SSMStateStore-tXnZSJxP.cjs.map → SSMStateStore-p4hBdTg3.cjs.map} +1 -1
- package/dist/{SubscriberGenerator-NxcLNeDJ.mjs → SubscriberGenerator-B3jHf26s.mjs} +4 -4
- package/dist/{SubscriberGenerator-NxcLNeDJ.mjs.map → SubscriberGenerator-B3jHf26s.mjs.map} +1 -1
- package/dist/{SubscriberGenerator-DXh1Touk.cjs → SubscriberGenerator-JhwVlWBS.cjs} +4 -4
- package/dist/{SubscriberGenerator-DXh1Touk.cjs.map → SubscriberGenerator-JhwVlWBS.cjs.map} +1 -1
- package/dist/{add-D6GloVNz.cjs → add-DEdpKya-.cjs} +8 -8
- package/dist/{add-D6GloVNz.cjs.map → add-DEdpKya-.cjs.map} +1 -1
- package/dist/{add-nJBUo4fT.mjs → add-QBvDmVA-.mjs} +8 -8
- package/dist/{add-nJBUo4fT.mjs.map → add-QBvDmVA-.mjs.map} +1 -1
- package/dist/{apps-GDmO_v7v.mjs → apps-D0LULFmU.mjs} +15 -361
- package/dist/apps-D0LULFmU.mjs.map +1 -0
- package/dist/{apps-DPw1i9E7.cjs → apps-qJ5FPJGQ.cjs} +12 -389
- package/dist/apps-qJ5FPJGQ.cjs.map +1 -0
- package/dist/{aws-DKC2m3sT.cjs → aws-BXfiWNbi.cjs} +2 -2
- package/dist/{aws-DKC2m3sT.cjs.map → aws-BXfiWNbi.cjs.map} +1 -1
- package/dist/{aws-C5LAU_Ii.mjs → aws-BjvSTTcE.mjs} +2 -2
- package/dist/{aws-C5LAU_Ii.mjs.map → aws-BjvSTTcE.mjs.map} +1 -1
- package/dist/{awsStore-Bx5nCFnS.mjs → awsStore-BYYCmXiq.mjs} +2 -2
- package/dist/{awsStore-Bx5nCFnS.mjs.map → awsStore-BYYCmXiq.mjs.map} +1 -1
- package/dist/{awsStore-u3ehhMoY.cjs → awsStore-DKQUElJL.cjs} +2 -2
- package/dist/{awsStore-u3ehhMoY.cjs.map → awsStore-DKQUElJL.cjs.map} +1 -1
- package/dist/{bundler-DzN34D-8.cjs → bundler-BuBCXA0t.cjs} +6 -6
- package/dist/{bundler-DzN34D-8.cjs.map → bundler-BuBCXA0t.cjs.map} +1 -1
- package/dist/{bundler-BFGjH_mQ.mjs → bundler-DZKdVVKZ.mjs} +6 -6
- package/dist/{bundler-BFGjH_mQ.mjs.map → bundler-DZKdVVKZ.mjs.map} +1 -1
- package/dist/{cli-CVlkduxS.cjs → cli-BCGkzaR1.cjs} +5 -5
- package/dist/{cli-CVlkduxS.cjs.map → cli-BCGkzaR1.cjs.map} +1 -1
- package/dist/{cli-Ik7ar-Ux.mjs → cli-CgEbT00Q.mjs} +5 -5
- package/dist/{cli-Ik7ar-Ux.mjs.map → cli-CgEbT00Q.mjs.map} +1 -1
- package/dist/clientTelemetry-BAwj6MOf.d.cts +10 -0
- package/dist/clientTelemetry-BAwj6MOf.d.cts.map +1 -0
- package/dist/clientTelemetry-CvamPJj_.d.mts +10 -0
- package/dist/clientTelemetry-CvamPJj_.d.mts.map +1 -0
- package/dist/{compose-CE0Vi7zq.cjs → compose-AO8u4mBI.cjs} +51 -49
- package/dist/compose-AO8u4mBI.cjs.map +1 -0
- package/dist/{compose-BKLJMnDI.cjs → compose-C-yjexqX.cjs} +9 -37
- package/dist/compose-C-yjexqX.cjs.map +1 -0
- package/dist/{compose-pFnSi3Zf.mjs → compose-C23RpAaF.mjs} +15 -13
- package/dist/compose-C23RpAaF.mjs.map +1 -0
- package/dist/{compose-DH1ToGh2.mjs → compose-DtfoUChm.mjs} +10 -32
- package/dist/compose-DtfoUChm.mjs.map +1 -0
- package/dist/{config-CsCYzlVO.d.mts → config-BODxZemw.d.mts} +3 -3
- package/dist/{config-CsCYzlVO.d.mts.map → config-BODxZemw.d.mts.map} +1 -1
- package/dist/{config-D-gHQXhi.d.cts → config-C3U5HulX.d.cts} +3 -3
- package/dist/{config-D-gHQXhi.d.cts.map → config-C3U5HulX.d.cts.map} +1 -1
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +3 -3
- package/dist/{credentialSchemas-BzJiK1nQ.mjs → credentialSchemas-D_85KW2k.mjs} +3 -3
- package/dist/{credentialSchemas-BzJiK1nQ.mjs.map → credentialSchemas-D_85KW2k.mjs.map} +1 -1
- package/dist/{credentialSchemas-OVXofU-r.cjs → credentialSchemas-DjK6xKMk.cjs} +3 -3
- package/dist/{credentialSchemas-OVXofU-r.cjs.map → credentialSchemas-DjK6xKMk.cjs.map} +1 -1
- package/dist/{databases-SFnPaOGM.mjs → databases-CV22HzrI.mjs} +2 -2
- package/dist/{databases-SFnPaOGM.mjs.map → databases-CV22HzrI.mjs.map} +1 -1
- package/dist/{databases-BOuB-zg4.cjs → databases-DwYYH2mX.cjs} +2 -2
- package/dist/{databases-BOuB-zg4.cjs.map → databases-DwYYH2mX.cjs.map} +1 -1
- package/dist/{dbTunnel-BnacLKDV.cjs → dbTunnel-Bve0zBqT.cjs} +7 -7
- package/dist/{dbTunnel-BnacLKDV.cjs.map → dbTunnel-Bve0zBqT.cjs.map} +1 -1
- package/dist/{dbTunnel-CqDaxQig.mjs → dbTunnel-CnubkLBa.mjs} +7 -7
- package/dist/{dbTunnel-CqDaxQig.mjs.map → dbTunnel-CnubkLBa.mjs.map} +1 -1
- package/dist/{define-6poNqm5O.mjs → define-BfrNaY82.mjs} +2 -2
- package/dist/{define-6poNqm5O.mjs.map → define-BfrNaY82.mjs.map} +1 -1
- package/dist/{define-crmMcXFS.cjs → define-zKgLY65H.cjs} +2 -2
- package/dist/{define-crmMcXFS.cjs.map → define-zKgLY65H.cjs.map} +1 -1
- package/dist/deploy/public.cjs +15 -15
- package/dist/deploy/public.d.cts +5 -4
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +5 -4
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +15 -15
- package/dist/{deploy-l0Vc846k.cjs → deploy-C2MKxzm9.cjs} +20 -19
- package/dist/deploy-C2MKxzm9.cjs.map +1 -0
- package/dist/{deploy-CpAkrZ25.mjs → deploy-Qq41vtpm.mjs} +19 -18
- package/dist/deploy-Qq41vtpm.mjs.map +1 -0
- package/dist/{destroy-eeB_PrmN.mjs → destroy-Bg4IUf_Z.mjs} +11 -10
- package/dist/destroy-Bg4IUf_Z.mjs.map +1 -0
- package/dist/{destroy-DtAqmjGz.cjs → destroy-CCpnHI2v.cjs} +13 -12
- package/dist/destroy-CCpnHI2v.cjs.map +1 -0
- package/dist/{discover-B_PDDaVj.mjs → discover-Dfmn6HQ7.mjs} +2 -2
- package/dist/{discover-B_PDDaVj.mjs.map → discover-Dfmn6HQ7.mjs.map} +1 -1
- package/dist/{discover-39VKSE2i.cjs → discover-OXczlq08.cjs} +2 -2
- package/dist/{discover-39VKSE2i.cjs.map → discover-OXczlq08.cjs.map} +1 -1
- package/dist/{dns-B2vsk2Rc.mjs → dns-BAM8VH1v.mjs} +147 -179
- package/dist/dns-BAM8VH1v.mjs.map +1 -0
- package/dist/{dns-WneRa4VJ.cjs → dns-D_0z9Tm1.cjs} +145 -201
- package/dist/dns-D_0z9Tm1.cjs.map +1 -0
- package/dist/{docker-Dk6p33pD.cjs → docker-6EUbKrEl.cjs} +9 -9
- package/dist/{docker-Dk6p33pD.cjs.map → docker-6EUbKrEl.cjs.map} +1 -1
- package/dist/{docker-DyUpcwqy.mjs → docker-DQoE3Fr7.mjs} +9 -9
- package/dist/{docker-DyUpcwqy.mjs.map → docker-DQoE3Fr7.mjs.map} +1 -1
- package/dist/{dokploy-Byg0zr1O.cjs → dokploy-BD8NXy8y.cjs} +3 -3
- package/dist/{dokploy-Byg0zr1O.cjs.map → dokploy-BD8NXy8y.cjs.map} +1 -1
- package/dist/{dokploy-De5b47YI.mjs → dokploy-CU9iuc35.mjs} +3 -3
- package/dist/{dokploy-De5b47YI.mjs.map → dokploy-CU9iuc35.mjs.map} +1 -1
- package/dist/{eas-DAH6D89J.cjs → eas-BhTOdQrE.cjs} +4 -4
- package/dist/{eas-DAH6D89J.cjs.map → eas-BhTOdQrE.cjs.map} +1 -1
- package/dist/{eas-BnLaz86I.mjs → eas-iYyg7Xjy.mjs} +4 -4
- package/dist/{eas-BnLaz86I.mjs.map → eas-iYyg7Xjy.mjs.map} +1 -1
- package/dist/{encryption-IiDQJs6j.mjs → encryption-hgmnMZw0.mjs} +4 -4
- package/dist/{encryption-IiDQJs6j.mjs.map → encryption-hgmnMZw0.mjs.map} +1 -1
- package/dist/{encryption-D7u_SKqz.cjs → encryption-yROMpM67.cjs} +4 -4
- package/dist/{encryption-D7u_SKqz.cjs.map → encryption-yROMpM67.cjs.map} +1 -1
- package/dist/{engine-BhS-wyH0.mjs → engine-B4whsrrE.mjs} +12 -12
- package/dist/engine-B4whsrrE.mjs.map +1 -0
- package/dist/{engine-CaWo9tZO.cjs → engine-D0XYdIiE.cjs} +12 -12
- package/dist/engine-D0XYdIiE.cjs.map +1 -0
- package/dist/{errors-D8Gwp5kU.mjs → errors-C9uIyIDt.mjs} +7 -3
- package/dist/{errors-D8Gwp5kU.mjs.map → errors-C9uIyIDt.mjs.map} +1 -1
- package/dist/{errors-DMC4Umsb.cjs → errors-D1x8duqI.cjs} +7 -3
- package/dist/errors-D1x8duqI.cjs.map +1 -0
- package/dist/{github-BQCqBMZ9.mjs → github-CBkZF4PS.mjs} +11 -11
- package/dist/{github-BQCqBMZ9.mjs.map → github-CBkZF4PS.mjs.map} +1 -1
- package/dist/{github-Cz_LTqBn.cjs → github-D1-_OnGL.cjs} +11 -11
- package/dist/{github-Cz_LTqBn.cjs.map → github-D1-_OnGL.cjs.map} +1 -1
- package/dist/{googlePlay-DowNo3wp.mjs → googlePlay-Bwv8TVi8.mjs} +5 -5
- package/dist/{googlePlay-DowNo3wp.mjs.map → googlePlay-Bwv8TVi8.mjs.map} +1 -1
- package/dist/{googlePlay-CuqPxtno.cjs → googlePlay-s9dGfrrb.cjs} +5 -5
- package/dist/{googlePlay-CuqPxtno.cjs.map → googlePlay-s9dGfrrb.cjs.map} +1 -1
- package/dist/{iam-Cs2Ph5f2.mjs → iam-BzFyFf7T.mjs} +2 -2
- package/dist/{iam-Cs2Ph5f2.mjs.map → iam-BzFyFf7T.mjs.map} +1 -1
- package/dist/{iam-CGd_oEyz.cjs → iam-WIoKnLBp.cjs} +2 -2
- package/dist/{iam-CGd_oEyz.cjs.map → iam-WIoKnLBp.cjs.map} +1 -1
- package/dist/{index-QxGYzGEN.d.mts → index-BKgOlfK2.d.mts} +2 -2
- package/dist/{index-QxGYzGEN.d.mts.map → index-BKgOlfK2.d.mts.map} +1 -1
- package/dist/{index-tFzoro1V.d.cts → index-zPzigXh-.d.cts} +2 -2
- package/dist/{index-tFzoro1V.d.cts.map → index-zPzigXh-.d.cts.map} +1 -1
- package/dist/index.cjs +75 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +73 -71
- package/dist/index.mjs.map +1 -1
- package/dist/{local-CWNFE8Sg.cjs → local-CFnHQgWC.cjs} +3 -3
- package/dist/{local-CWNFE8Sg.cjs.map → local-CFnHQgWC.cjs.map} +1 -1
- package/dist/{local-BQQHvZ4q.mjs → local-JOnTFJA5.mjs} +3 -3
- package/dist/{local-BQQHvZ4q.mjs.map → local-JOnTFJA5.mjs.map} +1 -1
- package/dist/{migrate-D_7oRThu.mjs → migrate-BtnpQocG.mjs} +6 -6
- package/dist/{migrate-D_7oRThu.mjs.map → migrate-BtnpQocG.mjs.map} +1 -1
- package/dist/{migrate-8QGCWIqm.cjs → migrate-CGXrmZyV.cjs} +8 -8
- package/dist/{migrate-8QGCWIqm.cjs.map → migrate-CGXrmZyV.cjs.map} +1 -1
- package/dist/{migrate-CNrPM5zg.cjs → migrate-CxWXW-Lw.cjs} +6 -6
- package/dist/{migrate-CNrPM5zg.cjs.map → migrate-CxWXW-Lw.cjs.map} +1 -1
- package/dist/{migrate-CqiOiRvz.mjs → migrate-fLIgSpPB.mjs} +8 -8
- package/dist/{migrate-CqiOiRvz.mjs.map → migrate-fLIgSpPB.mjs.map} +1 -1
- package/dist/{notes-dD3gRvZw.cjs → notes-ChYPaRLu.cjs} +4 -4
- package/dist/{notes-dD3gRvZw.cjs.map → notes-ChYPaRLu.cjs.map} +1 -1
- package/dist/{notes-D2KWnUSL.mjs → notes-LATU2vLI.mjs} +4 -4
- package/dist/{notes-D2KWnUSL.mjs.map → notes-LATU2vLI.mjs.map} +1 -1
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.d.cts +3 -8
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +3 -8
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +3 -3
- package/dist/{projectBucket-BcTodL8A.cjs → projectBucket-BIeh2HTj.cjs} +3 -3
- package/dist/{projectBucket-BcTodL8A.cjs.map → projectBucket-BIeh2HTj.cjs.map} +1 -1
- package/dist/{projectBucket-BDytiu7A.mjs → projectBucket-D_4zb_oh.mjs} +3 -3
- package/dist/{projectBucket-BDytiu7A.mjs.map → projectBucket-D_4zb_oh.mjs.map} +1 -1
- package/dist/{provider-CEOKk8NS.mjs → provider-BvjDbsTR.mjs} +3 -3
- package/dist/{provider-CEOKk8NS.mjs.map → provider-BvjDbsTR.mjs.map} +1 -1
- package/dist/{provider-BqpjG9QM.cjs → provider-DLhgo-mB.cjs} +3 -3
- package/dist/{provider-BqpjG9QM.cjs.map → provider-DLhgo-mB.cjs.map} +1 -1
- package/dist/{publish-Da9gxP5Q.cjs → publish-Dc-1GQp8.cjs} +3 -3
- package/dist/{publish-Da9gxP5Q.cjs.map → publish-Dc-1GQp8.cjs.map} +1 -1
- package/dist/{publish-Cr8wv7nO.mjs → publish-DhzRYhVZ.mjs} +3 -3
- package/dist/{publish-Cr8wv7nO.mjs.map → publish-DhzRYhVZ.mjs.map} +1 -1
- package/dist/{ready-D1gctv-5.mjs → ready-BcV28QoW.mjs} +6 -6
- package/dist/{ready-D1gctv-5.mjs.map → ready-BcV28QoW.mjs.map} +1 -1
- package/dist/{ready-Bgj2cf4j.cjs → ready-ByQvw4-W.cjs} +6 -6
- package/dist/{ready-Bgj2cf4j.cjs.map → ready-ByQvw4-W.cjs.map} +1 -1
- package/dist/reconcile/public.cjs +1 -1
- package/dist/reconcile/public.d.cts +1 -1
- package/dist/reconcile/public.d.mts +1 -1
- package/dist/reconcile/public.mjs +1 -1
- package/dist/{resolve-Dyki9ZJX.mjs → resolve-CJvM2bUx.mjs} +6 -6
- package/dist/{resolve-Dyki9ZJX.mjs.map → resolve-CJvM2bUx.mjs.map} +1 -1
- package/dist/{resolve-DRldmRYb.cjs → resolve-DyUXmA0z.cjs} +6 -6
- package/dist/{resolve-DRldmRYb.cjs.map → resolve-DyUXmA0z.cjs.map} +1 -1
- package/dist/{rollback-Do0i6x3b.mjs → rollback-BO1asWkd.mjs} +8 -8
- package/dist/{rollback-Do0i6x3b.mjs.map → rollback-BO1asWkd.mjs.map} +1 -1
- package/dist/{rollback-R_j7f9cY.cjs → rollback-Op8Tc5N-.cjs} +8 -8
- package/dist/{rollback-R_j7f9cY.cjs.map → rollback-Op8Tc5N-.cjs.map} +1 -1
- package/dist/{runtime-BpGIXfYr.d.mts → runtime-CaejlcZt.d.mts} +2 -2
- package/dist/{runtime-BpGIXfYr.d.mts.map → runtime-CaejlcZt.d.mts.map} +1 -1
- package/dist/{runtime-DLV0CNZ4.d.cts → runtime-D3jD4Dvn.d.cts} +2 -2
- package/dist/{runtime-DLV0CNZ4.d.cts.map → runtime-D3jD4Dvn.d.cts.map} +1 -1
- package/dist/{s3-CYEU7r1x.mjs → s3-BbtwHSod.mjs} +5 -5
- package/dist/{s3-CYEU7r1x.mjs.map → s3-BbtwHSod.mjs.map} +1 -1
- package/dist/{s3-D9aPMh9u.cjs → s3-CwacPd8J.cjs} +5 -5
- package/dist/{s3-D9aPMh9u.cjs.map → s3-CwacPd8J.cjs.map} +1 -1
- package/dist/sandbox/credentials-worker.cjs +2 -2
- package/dist/sandbox/credentials-worker.mjs +2 -2
- package/dist/sandbox/discover-worker.cjs +1 -1
- package/dist/sandbox/discover-worker.mjs +1 -1
- package/dist/sandbox/migrate-worker.cjs +2 -2
- package/dist/sandbox/migrate-worker.mjs +2 -2
- package/dist/{secretsManager-CJyxFcBH.mjs → secretsManager-CjTo6CRq.mjs} +2 -2
- package/dist/{secretsManager-CJyxFcBH.mjs.map → secretsManager-CjTo6CRq.mjs.map} +1 -1
- package/dist/{secretsManager-D8on44WI.cjs → secretsManager-CvmBGjdM.cjs} +2 -2
- package/dist/{secretsManager-D8on44WI.cjs.map → secretsManager-CvmBGjdM.cjs.map} +1 -1
- package/dist/{serverSetup-BmPwcMQN.cjs → serverSetup-BFdzPTIT.cjs} +7 -7
- package/dist/{serverSetup-BmPwcMQN.cjs.map → serverSetup-BFdzPTIT.cjs.map} +1 -1
- package/dist/{serverSetup-Bw5gc57O.mjs → serverSetup-CSxaZ7ha.mjs} +7 -7
- package/dist/{serverSetup-Bw5gc57O.mjs.map → serverSetup-CSxaZ7ha.mjs.map} +1 -1
- package/dist/{sniffer-XsTiFI3l.mjs → sniffer-CwxpsSez.mjs} +9 -9
- package/dist/{sniffer-XsTiFI3l.mjs.map → sniffer-CwxpsSez.mjs.map} +1 -1
- package/dist/{sniffer-BPLYWu70.cjs → sniffer-D3gH7aJT.cjs} +9 -9
- package/dist/{sniffer-BPLYWu70.cjs.map → sniffer-D3gH7aJT.cjs.map} +1 -1
- package/dist/{snsSubscriptions-CATtZwGv.cjs → snsSubscriptions-B8tGxND5.cjs} +10 -8
- package/dist/snsSubscriptions-B8tGxND5.cjs.map +1 -0
- package/dist/{snsSubscriptions-D9Rm_Eug.mjs → snsSubscriptions-n3sjbrRM.mjs} +7 -5
- package/dist/snsSubscriptions-n3sjbrRM.mjs.map +1 -0
- package/dist/{sst-C56i2cst.cjs → sst-Cjocp7gi.cjs} +8 -8
- package/dist/{sst-C56i2cst.cjs.map → sst-Cjocp7gi.cjs.map} +1 -1
- package/dist/{sst-BCvYZtVF.mjs → sst-DeF0BfDA.mjs} +8 -8
- package/dist/{sst-BCvYZtVF.mjs.map → sst-DeF0BfDA.mjs.map} +1 -1
- package/dist/{stack-TttsEL7X.mjs → stack-CyoRqyPt.mjs} +16 -609
- package/dist/stack-CyoRqyPt.mjs.map +1 -0
- package/dist/{stack-Dal2Oq2D.cjs → stack-Dr2FSxGm.cjs} +28 -687
- package/dist/stack-Dr2FSxGm.cjs.map +1 -0
- package/dist/{stage--ixwLSTc.mjs → stage-TAx0Gcq8.mjs} +8 -8
- package/dist/{stage--ixwLSTc.mjs.map → stage-TAx0Gcq8.mjs.map} +1 -1
- package/dist/{stage-BLsuXUP_.cjs → stage-aTBLKonw.cjs} +8 -8
- package/dist/{stage-BLsuXUP_.cjs.map → stage-aTBLKonw.cjs.map} +1 -1
- package/dist/{stages-8izznWib.cjs → stages-BeSQQQ4z.cjs} +3 -3
- package/dist/{stages-8izznWib.cjs.map → stages-BeSQQQ4z.cjs.map} +1 -1
- package/dist/{stages-QPWgbm9P.mjs → stages-DjFKQv08.mjs} +3 -3
- package/dist/{stages-QPWgbm9P.mjs.map → stages-DjFKQv08.mjs.map} +1 -1
- package/dist/target/public.cjs +3 -3
- package/dist/target/public.d.cts +2 -2
- package/dist/target/public.d.mts +2 -2
- package/dist/target/public.mjs +3 -3
- package/dist/{terminal-gOLDmpW-.mjs → terminal-Bk4PjXWY.mjs} +4 -4
- package/dist/{terminal-gOLDmpW-.mjs.map → terminal-Bk4PjXWY.mjs.map} +1 -1
- package/dist/{terminal-Dy4zzTCA.cjs → terminal-DPf137EJ.cjs} +4 -4
- package/dist/{terminal-Dy4zzTCA.cjs.map → terminal-DPf137EJ.cjs.map} +1 -1
- package/dist/{types-CV4AzwC_.d.cts → types-CLxsw-QY.d.cts} +3 -16
- package/dist/types-CLxsw-QY.d.cts.map +1 -0
- package/dist/{types-Bj1A1wkS.d.mts → types-wLlwkSib.d.mts} +3 -16
- package/dist/types-wLlwkSib.d.mts.map +1 -0
- package/dist/vitest.cjs +1 -1
- package/dist/vitest.mjs +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-BBa1Ck5j.mjs → workspace-DJjhfAGf.mjs} +3 -3
- package/dist/{workspace-BBa1Ck5j.mjs.map → workspace-DJjhfAGf.mjs.map} +1 -1
- package/dist/{workspace-DirP2-ed.cjs → workspace-wTLnc1Ef.cjs} +3 -3
- package/dist/{workspace-DirP2-ed.cjs.map → workspace-wTLnc1Ef.cjs.map} +1 -1
- package/package.json +16 -15
- package/dist/GoDaddyProvider-B9AMLUHF.cjs +0 -412
- package/dist/GoDaddyProvider-B9AMLUHF.cjs.map +0 -1
- package/dist/GoDaddyProvider-DLVKx7er.mjs +0 -412
- package/dist/GoDaddyProvider-DLVKx7er.mjs.map +0 -1
- package/dist/HostingerProvider-DBPWhL_s.cjs +0 -257
- package/dist/HostingerProvider-DBPWhL_s.cjs.map +0 -1
- package/dist/HostingerProvider-kLQsBCjz.mjs +0 -257
- package/dist/HostingerProvider-kLQsBCjz.mjs.map +0 -1
- package/dist/Route53Provider-Di_SD9CF.mjs +0 -209
- package/dist/Route53Provider-Di_SD9CF.mjs.map +0 -1
- package/dist/Route53Provider-emLuQHVw.cjs +0 -209
- package/dist/Route53Provider-emLuQHVw.cjs.map +0 -1
- package/dist/apps-DPw1i9E7.cjs.map +0 -1
- package/dist/apps-GDmO_v7v.mjs.map +0 -1
- package/dist/compose-BKLJMnDI.cjs.map +0 -1
- package/dist/compose-CE0Vi7zq.cjs.map +0 -1
- package/dist/compose-DH1ToGh2.mjs.map +0 -1
- package/dist/compose-pFnSi3Zf.mjs.map +0 -1
- package/dist/deploy-CpAkrZ25.mjs.map +0 -1
- package/dist/deploy-l0Vc846k.cjs.map +0 -1
- package/dist/destroy-DtAqmjGz.cjs.map +0 -1
- package/dist/destroy-eeB_PrmN.mjs.map +0 -1
- package/dist/dns-B2vsk2Rc.mjs.map +0 -1
- package/dist/dns-WneRa4VJ.cjs.map +0 -1
- package/dist/engine-BhS-wyH0.mjs.map +0 -1
- package/dist/engine-CaWo9tZO.cjs.map +0 -1
- package/dist/errors-DMC4Umsb.cjs.map +0 -1
- package/dist/snsSubscriptions-CATtZwGv.cjs.map +0 -1
- package/dist/snsSubscriptions-D9Rm_Eug.mjs.map +0 -1
- package/dist/stack-Dal2Oq2D.cjs.map +0 -1
- package/dist/stack-TttsEL7X.mjs.map +0 -1
- package/dist/types-Bj1A1wkS.d.mts.map +0 -1
- package/dist/types-CV4AzwC_.d.cts.map +0 -1
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
const require_dns = require("./dns-WneRa4VJ.cjs");
|
|
2
|
-
//#region src/target/dokploy/dns/hostinger-api.ts
|
|
3
|
-
/**
|
|
4
|
-
* Hostinger DNS API client
|
|
5
|
-
*
|
|
6
|
-
* API Documentation: https://developers.hostinger.com/
|
|
7
|
-
* Authentication: Bearer token from hpanel.hostinger.com/profile/api
|
|
8
|
-
*/
|
|
9
|
-
const HOSTINGER_API_BASE = "https://developers.hostinger.com";
|
|
10
|
-
/**
|
|
11
|
-
* Hostinger API error
|
|
12
|
-
*/
|
|
13
|
-
var HostingerApiError = class extends Error {
|
|
14
|
-
status;
|
|
15
|
-
statusText;
|
|
16
|
-
errors;
|
|
17
|
-
constructor(message, status, statusText, errors) {
|
|
18
|
-
super(message);
|
|
19
|
-
this.status = status;
|
|
20
|
-
this.statusText = statusText;
|
|
21
|
-
this.errors = errors;
|
|
22
|
-
this.name = "HostingerApiError";
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Hostinger DNS API client
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const api = new HostingerApi(token);
|
|
31
|
-
*
|
|
32
|
-
* // Get all records for a domain
|
|
33
|
-
* const records = await api.getRecords('traflabs.io');
|
|
34
|
-
*
|
|
35
|
-
* // Create/update records
|
|
36
|
-
* await api.upsertRecords('traflabs.io', [
|
|
37
|
-
* { name: 'api.joemoer', type: 'A', ttl: 300, records: ['1.2.3.4'] }
|
|
38
|
-
* ]);
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
var HostingerApi = class {
|
|
42
|
-
token;
|
|
43
|
-
constructor(token) {
|
|
44
|
-
this.token = token;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Make a request to the Hostinger API
|
|
48
|
-
*/
|
|
49
|
-
async request(method, endpoint, body) {
|
|
50
|
-
const url = `${HOSTINGER_API_BASE}${endpoint}`;
|
|
51
|
-
const response = await fetch(url, {
|
|
52
|
-
method,
|
|
53
|
-
headers: {
|
|
54
|
-
"Content-Type": "application/json",
|
|
55
|
-
Authorization: `Bearer ${this.token}`
|
|
56
|
-
},
|
|
57
|
-
body: body ? JSON.stringify(body) : void 0
|
|
58
|
-
});
|
|
59
|
-
if (!response.ok) {
|
|
60
|
-
let errorMessage = `Hostinger API error: ${response.status} ${response.statusText}`;
|
|
61
|
-
let errors;
|
|
62
|
-
try {
|
|
63
|
-
const errorBody = await response.json();
|
|
64
|
-
if (errorBody.message) errorMessage = `Hostinger API error: ${errorBody.message}`;
|
|
65
|
-
errors = errorBody.errors;
|
|
66
|
-
} catch {}
|
|
67
|
-
throw new HostingerApiError(errorMessage, response.status, response.statusText, errors);
|
|
68
|
-
}
|
|
69
|
-
const text = await response.text();
|
|
70
|
-
if (!text || text.trim() === "") return;
|
|
71
|
-
return JSON.parse(text);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Get all DNS records for a domain
|
|
75
|
-
*
|
|
76
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
77
|
-
*/
|
|
78
|
-
async getRecords(domain) {
|
|
79
|
-
const response = await this.request("GET", `/api/dns/v1/zones/${domain}`);
|
|
80
|
-
if (Array.isArray(response)) return response;
|
|
81
|
-
return response?.data ?? [];
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Create or update DNS records
|
|
85
|
-
*
|
|
86
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
87
|
-
* @param records - Records to create/update
|
|
88
|
-
* @param overwrite - If true, replaces all existing records. If false, merges with existing.
|
|
89
|
-
*/
|
|
90
|
-
async upsertRecords(domain, records, overwrite = false) {
|
|
91
|
-
await this.request("PUT", `/api/dns/v1/zones/${domain}`, {
|
|
92
|
-
overwrite,
|
|
93
|
-
zone: records
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Validate DNS records before applying
|
|
98
|
-
*
|
|
99
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
100
|
-
* @param records - Records to validate
|
|
101
|
-
* @returns true if valid, throws if invalid
|
|
102
|
-
*/
|
|
103
|
-
async validateRecords(domain, records) {
|
|
104
|
-
await this.request("POST", `/api/dns/v1/zones/${domain}/validate`, {
|
|
105
|
-
overwrite: false,
|
|
106
|
-
zone: records
|
|
107
|
-
});
|
|
108
|
-
return true;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Delete specific DNS records
|
|
112
|
-
*
|
|
113
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
114
|
-
* @param filters - Filters to match records for deletion
|
|
115
|
-
*/
|
|
116
|
-
async deleteRecords(domain, filters) {
|
|
117
|
-
await this.request("DELETE", `/api/dns/v1/zones/${domain}`, { filters });
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Check if a specific record exists
|
|
121
|
-
*
|
|
122
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
123
|
-
* @param name - Subdomain name (e.g., 'api.joemoer')
|
|
124
|
-
* @param type - Record type (e.g., 'A')
|
|
125
|
-
*/
|
|
126
|
-
async recordExists(domain, name, type = "A") {
|
|
127
|
-
return (await this.getRecords(domain)).some((r) => r.name === name && r.type === type);
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Create a single A record if it doesn't exist
|
|
131
|
-
*
|
|
132
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
133
|
-
* @param subdomain - Subdomain name (e.g., 'api.joemoer')
|
|
134
|
-
* @param ip - IP address to point to
|
|
135
|
-
* @param ttl - TTL in seconds (default: 300)
|
|
136
|
-
* @returns true if created, false if already exists
|
|
137
|
-
*/
|
|
138
|
-
async createARecordIfNotExists(domain, subdomain, ip, ttl = 300) {
|
|
139
|
-
if (await this.recordExists(domain, subdomain, "A")) return false;
|
|
140
|
-
await this.upsertRecords(domain, [{
|
|
141
|
-
name: subdomain,
|
|
142
|
-
type: "A",
|
|
143
|
-
ttl,
|
|
144
|
-
records: [{ content: ip }]
|
|
145
|
-
}]);
|
|
146
|
-
return true;
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
//#endregion
|
|
150
|
-
//#region src/target/dokploy/dns/HostingerProvider.ts
|
|
151
|
-
/**
|
|
152
|
-
* Hostinger DNS Provider
|
|
153
|
-
*
|
|
154
|
-
* Implements DnsProvider interface using the Hostinger DNS API. A record's
|
|
155
|
-
* `content` is its zone-file value — an MX record's is `<priority> <host>`,
|
|
156
|
-
* Hostinger having no field of its own for the priority — so values pass
|
|
157
|
-
* through as they are. Each write replaces its one name and type
|
|
158
|
-
* (`overwrite: true`): without it Hostinger appends, and a record with
|
|
159
|
-
* another value would end up holding both.
|
|
160
|
-
*/
|
|
161
|
-
/** A value compared the way DNS does: case, a trailing dot and spacing aside. */
|
|
162
|
-
function normalize(value) {
|
|
163
|
-
return value.trim().replace(/\.$/, "").replace(/\s+/g, " ").toLowerCase();
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Hostinger DNS provider implementation.
|
|
167
|
-
*/
|
|
168
|
-
var HostingerProvider = class {
|
|
169
|
-
credential;
|
|
170
|
-
name = "hostinger";
|
|
171
|
-
api = null;
|
|
172
|
-
/** `credential`: the token, when the caller already has it. */
|
|
173
|
-
constructor(credential) {
|
|
174
|
-
this.credential = credential;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Get or create the Hostinger API client.
|
|
178
|
-
*/
|
|
179
|
-
async getApi() {
|
|
180
|
-
if (this.api) return this.api;
|
|
181
|
-
const token = this.credential?.token ?? await require_dns.getHostingerToken();
|
|
182
|
-
if (!token) throw new require_dns.MissingCredential("hostinger", void 0);
|
|
183
|
-
this.api = new HostingerApi(token);
|
|
184
|
-
return this.api;
|
|
185
|
-
}
|
|
186
|
-
async getRecords(domain) {
|
|
187
|
-
return (await (await this.getApi()).getRecords(domain)).map((r) => ({
|
|
188
|
-
name: r.name,
|
|
189
|
-
type: r.type,
|
|
190
|
-
ttl: r.ttl,
|
|
191
|
-
values: r.records.map((rec) => rec.content)
|
|
192
|
-
}));
|
|
193
|
-
}
|
|
194
|
-
async upsertRecords(domain, records) {
|
|
195
|
-
const api = await this.getApi();
|
|
196
|
-
const results = [];
|
|
197
|
-
const existingRecords = await api.getRecords(domain);
|
|
198
|
-
for (const record of records) {
|
|
199
|
-
const existing = existingRecords.find((r) => r.name === record.name && r.type === record.type);
|
|
200
|
-
const existingValue = existing?.records?.[0]?.content;
|
|
201
|
-
if (existing && existingValue !== void 0 && normalize(existingValue) === normalize(record.value)) {
|
|
202
|
-
results.push({
|
|
203
|
-
record,
|
|
204
|
-
created: false,
|
|
205
|
-
unchanged: true
|
|
206
|
-
});
|
|
207
|
-
continue;
|
|
208
|
-
}
|
|
209
|
-
await api.upsertRecords(domain, [{
|
|
210
|
-
name: record.name,
|
|
211
|
-
type: record.type,
|
|
212
|
-
ttl: record.ttl,
|
|
213
|
-
records: [{ content: record.value }]
|
|
214
|
-
}], true);
|
|
215
|
-
results.push({
|
|
216
|
-
record,
|
|
217
|
-
created: !existing,
|
|
218
|
-
unchanged: false
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
return results;
|
|
222
|
-
}
|
|
223
|
-
async deleteRecords(domain, records) {
|
|
224
|
-
const api = await this.getApi();
|
|
225
|
-
const results = [];
|
|
226
|
-
const existingRecords = await api.getRecords(domain);
|
|
227
|
-
const recordsToDelete = records.filter((record) => existingRecords.some((r) => r.name === record.name && r.type === record.type));
|
|
228
|
-
if (recordsToDelete.length > 0) try {
|
|
229
|
-
await api.deleteRecords(domain, recordsToDelete.map((r) => ({
|
|
230
|
-
name: r.name,
|
|
231
|
-
type: r.type
|
|
232
|
-
})));
|
|
233
|
-
for (const record of recordsToDelete) results.push({
|
|
234
|
-
record,
|
|
235
|
-
deleted: true,
|
|
236
|
-
notFound: false
|
|
237
|
-
});
|
|
238
|
-
} catch (error) {
|
|
239
|
-
for (const record of recordsToDelete) results.push({
|
|
240
|
-
record,
|
|
241
|
-
deleted: false,
|
|
242
|
-
notFound: false,
|
|
243
|
-
error: String(error)
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
for (const record of records) if (!existingRecords.find((r) => r.name === record.name && r.type === record.type)) results.push({
|
|
247
|
-
record,
|
|
248
|
-
deleted: false,
|
|
249
|
-
notFound: true
|
|
250
|
-
});
|
|
251
|
-
return results;
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
//#endregion
|
|
255
|
-
exports.HostingerProvider = HostingerProvider;
|
|
256
|
-
|
|
257
|
-
//# sourceMappingURL=HostingerProvider-DBPWhL_s.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HostingerProvider-DBPWhL_s.cjs","names":["getHostingerToken","MissingCredential"],"sources":["../src/target/dokploy/dns/hostinger-api.ts","../src/target/dokploy/dns/HostingerProvider.ts"],"sourcesContent":["/**\n * Hostinger DNS API client\n *\n * API Documentation: https://developers.hostinger.com/\n * Authentication: Bearer token from hpanel.hostinger.com/profile/api\n */\n\nconst HOSTINGER_API_BASE = 'https://developers.hostinger.com';\n\n/**\n * DNS record types supported by Hostinger\n */\nexport type DnsRecordType =\n\t| 'A'\n\t| 'AAAA'\n\t| 'CNAME'\n\t| 'MX'\n\t| 'TXT'\n\t| 'NS'\n\t| 'SRV'\n\t| 'CAA';\n\n/**\n * A single DNS record\n */\nexport interface DnsRecord {\n\t/** Subdomain name (e.g., 'api.joemoer' for api.joemoer.traflabs.io) */\n\tname: string;\n\t/** Record type */\n\ttype: DnsRecordType;\n\t/** TTL in seconds */\n\tttl: number;\n\t/** Record values */\n\trecords: Array<{ content: string }>;\n}\n\n/**\n * Filter for deleting specific records\n */\nexport interface DnsRecordFilter {\n\tname: string;\n\ttype: DnsRecordType;\n}\n\n/**\n * API error response\n */\nexport interface HostingerErrorResponse {\n\tmessage?: string;\n\terrors?: Record<string, string[]>;\n}\n\n/**\n * Hostinger API error\n */\nexport class HostingerApiError extends Error {\n\tconstructor(\n\t\tmessage: string,\n\t\tpublic status: number,\n\t\tpublic statusText: string,\n\t\tpublic errors?: Record<string, string[]>,\n\t) {\n\t\tsuper(message);\n\t\tthis.name = 'HostingerApiError';\n\t}\n}\n\n/**\n * Hostinger DNS API client\n *\n * @example\n * ```ts\n * const api = new HostingerApi(token);\n *\n * // Get all records for a domain\n * const records = await api.getRecords('traflabs.io');\n *\n * // Create/update records\n * await api.upsertRecords('traflabs.io', [\n * { name: 'api.joemoer', type: 'A', ttl: 300, records: ['1.2.3.4'] }\n * ]);\n * ```\n */\nexport class HostingerApi {\n\tprivate token: string;\n\n\tconstructor(token: string) {\n\t\tthis.token = token;\n\t}\n\n\t/**\n\t * Make a request to the Hostinger API\n\t */\n\tprivate async request<T>(\n\t\tmethod: 'GET' | 'POST' | 'PUT' | 'DELETE',\n\t\tendpoint: string,\n\t\tbody?: unknown,\n\t): Promise<T> {\n\t\tconst url = `${HOSTINGER_API_BASE}${endpoint}`;\n\n\t\tconst response = await fetch(url, {\n\t\t\tmethod,\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\tAuthorization: `Bearer ${this.token}`,\n\t\t\t},\n\t\t\tbody: body ? JSON.stringify(body) : undefined,\n\t\t});\n\n\t\tif (!response.ok) {\n\t\t\tlet errorMessage = `Hostinger API error: ${response.status} ${response.statusText}`;\n\t\t\tlet errors: Record<string, string[]> | undefined;\n\n\t\t\ttry {\n\t\t\t\tconst errorBody = (await response.json()) as HostingerErrorResponse;\n\t\t\t\tif (errorBody.message) {\n\t\t\t\t\terrorMessage = `Hostinger API error: ${errorBody.message}`;\n\t\t\t\t}\n\t\t\t\terrors = errorBody.errors;\n\t\t\t} catch {\n\t\t\t\t// Ignore JSON parse errors\n\t\t\t}\n\n\t\t\tthrow new HostingerApiError(\n\t\t\t\terrorMessage,\n\t\t\t\tresponse.status,\n\t\t\t\tresponse.statusText,\n\t\t\t\terrors,\n\t\t\t);\n\t\t}\n\n\t\t// Handle empty responses\n\t\tconst text = await response.text();\n\t\tif (!text || text.trim() === '') {\n\t\t\treturn undefined as T;\n\t\t}\n\t\treturn JSON.parse(text) as T;\n\t}\n\n\t/**\n\t * Get all DNS records for a domain\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t */\n\tasync getRecords(domain: string): Promise<DnsRecord[]> {\n\t\t// The zone comes back as a **bare array**, not `{ data: [...] }`.\n\t\t//\n\t\t// This read `response.data || []`, so every call returned zero records\n\t\t// against the real API while every mocked test passed. Silently: no error,\n\t\t// no warning, just an empty zone. `upsertRecords` uses this to decide what\n\t\t// already exists, so everything looked new and every write was reported as\n\t\t// a creation — harmless only because the PUT merges rather than replaces.\n\t\t//\n\t\t// Both shapes are accepted because one of them is a guess: the wrapper was\n\t\t// written against documentation and the array is what the API actually\n\t\t// sends, so tolerating an envelope costs a line and survives it appearing.\n\t\tconst response = await this.request<DnsRecord[] | { data?: DnsRecord[] }>(\n\t\t\t'GET',\n\t\t\t`/api/dns/v1/zones/${domain}`,\n\t\t);\n\n\t\tif (Array.isArray(response)) return response;\n\n\t\treturn response?.data ?? [];\n\t}\n\n\t/**\n\t * Create or update DNS records\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t * @param records - Records to create/update\n\t * @param overwrite - If true, replaces all existing records. If false, merges with existing.\n\t */\n\tasync upsertRecords(\n\t\tdomain: string,\n\t\trecords: DnsRecord[],\n\t\toverwrite = false,\n\t): Promise<void> {\n\t\tawait this.request('PUT', `/api/dns/v1/zones/${domain}`, {\n\t\t\toverwrite,\n\t\t\tzone: records,\n\t\t});\n\t}\n\n\t/**\n\t * Validate DNS records before applying\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t * @param records - Records to validate\n\t * @returns true if valid, throws if invalid\n\t */\n\tasync validateRecords(\n\t\tdomain: string,\n\t\trecords: DnsRecord[],\n\t): Promise<boolean> {\n\t\tawait this.request('POST', `/api/dns/v1/zones/${domain}/validate`, {\n\t\t\toverwrite: false,\n\t\t\tzone: records,\n\t\t});\n\t\treturn true;\n\t}\n\n\t/**\n\t * Delete specific DNS records\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t * @param filters - Filters to match records for deletion\n\t */\n\tasync deleteRecords(\n\t\tdomain: string,\n\t\tfilters: DnsRecordFilter[],\n\t): Promise<void> {\n\t\tawait this.request('DELETE', `/api/dns/v1/zones/${domain}`, {\n\t\t\tfilters,\n\t\t});\n\t}\n\n\t/**\n\t * Check if a specific record exists\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t * @param name - Subdomain name (e.g., 'api.joemoer')\n\t * @param type - Record type (e.g., 'A')\n\t */\n\tasync recordExists(\n\t\tdomain: string,\n\t\tname: string,\n\t\ttype: DnsRecordType = 'A',\n\t): Promise<boolean> {\n\t\tconst records = await this.getRecords(domain);\n\t\treturn records.some((r) => r.name === name && r.type === type);\n\t}\n\n\t/**\n\t * Create a single A record if it doesn't exist\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t * @param subdomain - Subdomain name (e.g., 'api.joemoer')\n\t * @param ip - IP address to point to\n\t * @param ttl - TTL in seconds (default: 300)\n\t * @returns true if created, false if already exists\n\t */\n\tasync createARecordIfNotExists(\n\t\tdomain: string,\n\t\tsubdomain: string,\n\t\tip: string,\n\t\tttl = 300,\n\t): Promise<boolean> {\n\t\tconst exists = await this.recordExists(domain, subdomain, 'A');\n\t\tif (exists) {\n\t\t\treturn false;\n\t\t}\n\n\t\tawait this.upsertRecords(domain, [\n\t\t\t{\n\t\t\t\tname: subdomain,\n\t\t\t\ttype: 'A',\n\t\t\t\tttl,\n\t\t\t\trecords: [{ content: ip }],\n\t\t\t},\n\t\t]);\n\n\t\treturn true;\n\t}\n}\n","/**\n * Hostinger DNS Provider\n *\n * Implements DnsProvider interface using the Hostinger DNS API. A record's\n * `content` is its zone-file value — an MX record's is `<priority> <host>`,\n * Hostinger having no field of its own for the priority — so values pass\n * through as they are. Each write replaces its one name and type\n * (`overwrite: true`): without it Hostinger appends, and a record with\n * another value would end up holding both.\n */\n\nimport { getHostingerToken } from '../../../auth/credentials';\nimport {\n\ttype HostingerCredential,\n\tMissingCredential,\n} from '../../../deploy/credentials';\nimport type {\n\tDeleteDnsRecord,\n\tDeleteResult,\n\tDnsProvider,\n\tDnsRecord,\n\tUpsertDnsRecord,\n\tUpsertResult,\n} from './DnsProvider';\nimport { HostingerApi } from './hostinger-api';\n\n/** A value compared the way DNS does: case, a trailing dot and spacing aside. */\nfunction normalize(value: string): string {\n\treturn value.trim().replace(/\\.$/, '').replace(/\\s+/g, ' ').toLowerCase();\n}\n\n/**\n * Hostinger DNS provider implementation.\n */\nexport class HostingerProvider implements DnsProvider {\n\treadonly name = 'hostinger';\n\tprivate api: HostingerApi | null = null;\n\n\t/** `credential`: the token, when the caller already has it. */\n\tconstructor(private readonly credential?: HostingerCredential) {}\n\n\t/**\n\t * Get or create the Hostinger API client.\n\t */\n\tprivate async getApi(): Promise<HostingerApi> {\n\t\tif (this.api) {\n\t\t\treturn this.api;\n\t\t}\n\n\t\tconst token = this.credential?.token ?? (await getHostingerToken());\n\t\tif (!token) throw new MissingCredential('hostinger', undefined);\n\n\t\tthis.api = new HostingerApi(token);\n\t\treturn this.api;\n\t}\n\n\tasync getRecords(domain: string): Promise<DnsRecord[]> {\n\t\tconst api = await this.getApi();\n\t\tconst records = await api.getRecords(domain);\n\n\t\treturn records.map((r) => ({\n\t\t\tname: r.name,\n\t\t\ttype: r.type,\n\t\t\tttl: r.ttl,\n\t\t\tvalues: r.records.map((rec) => rec.content),\n\t\t}));\n\t}\n\n\tasync upsertRecords(\n\t\tdomain: string,\n\t\trecords: UpsertDnsRecord[],\n\t): Promise<UpsertResult[]> {\n\t\tconst api = await this.getApi();\n\t\tconst results: UpsertResult[] = [];\n\n\t\t// Get existing records to check what already exists\n\t\tconst existingRecords = await api.getRecords(domain);\n\n\t\tfor (const record of records) {\n\t\t\tconst existing = existingRecords.find(\n\t\t\t\t(r) => r.name === record.name && r.type === record.type,\n\t\t\t);\n\n\t\t\tconst existingValue = existing?.records?.[0]?.content;\n\n\t\t\tif (\n\t\t\t\texisting &&\n\t\t\t\texistingValue !== undefined &&\n\t\t\t\tnormalize(existingValue) === normalize(record.value)\n\t\t\t) {\n\t\t\t\t// Record exists with same value - unchanged\n\t\t\t\tresults.push({\n\t\t\t\t\trecord,\n\t\t\t\t\tcreated: false,\n\t\t\t\t\tunchanged: true,\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Create the record, or replace this name's records of this type.\n\t\t\tawait api.upsertRecords(\n\t\t\t\tdomain,\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\tname: record.name,\n\t\t\t\t\t\ttype: record.type,\n\t\t\t\t\t\tttl: record.ttl,\n\t\t\t\t\t\trecords: [{ content: record.value }],\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\tresults.push({\n\t\t\t\trecord,\n\t\t\t\tcreated: !existing,\n\t\t\t\tunchanged: false,\n\t\t\t});\n\t\t}\n\n\t\treturn results;\n\t}\n\n\tasync deleteRecords(\n\t\tdomain: string,\n\t\trecords: DeleteDnsRecord[],\n\t): Promise<DeleteResult[]> {\n\t\tconst api = await this.getApi();\n\t\tconst results: DeleteResult[] = [];\n\n\t\t// Get existing records to check what exists\n\t\tconst existingRecords = await api.getRecords(domain);\n\n\t\t// Filter to only records that exist\n\t\tconst recordsToDelete = records.filter((record) =>\n\t\t\texistingRecords.some(\n\t\t\t\t(r) => r.name === record.name && r.type === record.type,\n\t\t\t),\n\t\t);\n\n\t\t// Delete existing records\n\t\tif (recordsToDelete.length > 0) {\n\t\t\ttry {\n\t\t\t\tawait api.deleteRecords(\n\t\t\t\t\tdomain,\n\t\t\t\t\trecordsToDelete.map((r) => ({\n\t\t\t\t\t\tname: r.name,\n\t\t\t\t\t\ttype: r.type as\n\t\t\t\t\t\t\t| 'A'\n\t\t\t\t\t\t\t| 'AAAA'\n\t\t\t\t\t\t\t| 'CNAME'\n\t\t\t\t\t\t\t| 'MX'\n\t\t\t\t\t\t\t| 'TXT'\n\t\t\t\t\t\t\t| 'SRV'\n\t\t\t\t\t\t\t| 'CAA',\n\t\t\t\t\t})),\n\t\t\t\t);\n\n\t\t\t\tfor (const record of recordsToDelete) {\n\t\t\t\t\tresults.push({\n\t\t\t\t\t\trecord,\n\t\t\t\t\t\tdeleted: true,\n\t\t\t\t\t\tnotFound: false,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t// If batch delete fails, report error for all records\n\t\t\t\tfor (const record of recordsToDelete) {\n\t\t\t\t\tresults.push({\n\t\t\t\t\t\trecord,\n\t\t\t\t\t\tdeleted: false,\n\t\t\t\t\t\tnotFound: false,\n\t\t\t\t\t\terror: String(error),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Mark non-existent records as not found\n\t\tfor (const record of records) {\n\t\t\tconst existing = existingRecords.find(\n\t\t\t\t(r) => r.name === record.name && r.type === record.type,\n\t\t\t);\n\t\t\tif (!existing) {\n\t\t\t\tresults.push({\n\t\t\t\t\trecord,\n\t\t\t\t\tdeleted: false,\n\t\t\t\t\tnotFound: true,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn results;\n\t}\n}\n"],"mappings":";;;;;;;;AAOA,MAAM,qBAAqB;;;;AAgD3B,IAAa,oBAAb,cAAuC,MAAM;CAGpC;CACA;CACA;CAJR,YACC,SACA,QACA,YACA,QACC;EACD,MAAM,OAAO;EAJN,KAAA,SAAA;EACA,KAAA,aAAA;EACA,KAAA,SAAA;EAGP,KAAK,OAAO;CACb;AACD;;;;;;;;;;;;;;;;;AAkBA,IAAa,eAAb,MAA0B;CACzB;CAEA,YAAY,OAAe;EAC1B,KAAK,QAAQ;CACd;;;;CAKA,MAAc,QACb,QACA,UACA,MACa;EACb,MAAM,MAAM,GAAG,qBAAqB;EAEpC,MAAM,WAAW,MAAM,MAAM,KAAK;GACjC;GACA,SAAS;IACR,gBAAgB;IAChB,eAAe,UAAU,KAAK;GAC/B;GACA,MAAM,OAAO,KAAK,UAAU,IAAI,IAAI,KAAA;EACrC,CAAC;EAED,IAAI,CAAC,SAAS,IAAI;GACjB,IAAI,eAAe,wBAAwB,SAAS,OAAO,GAAG,SAAS;GACvE,IAAI;GAEJ,IAAI;IACH,MAAM,YAAa,MAAM,SAAS,KAAK;IACvC,IAAI,UAAU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IACb,KAAK,OAAO;IACZ,SAAS,CAAC,EAAE,SAAS,OAAO,MAAM,CAAC;GACpC,CACD,GACA,IACD;GAEA,QAAQ,KAAK;IACZ;IACA,SAAS,CAAC;IACV,WAAW;GACZ,CAAC;EACF;EAEA,OAAO;CACR;CAEA,MAAM,cACL,QACA,SAC0B;EAC1B,MAAM,MAAM,MAAM,KAAK,OAAO;EAC9B,MAAM,UAA0B,CAAC;EAGjC,MAAM,kBAAkB,MAAM,IAAI,WAAW,MAAM;EAGnD,MAAM,kBAAkB,QAAQ,QAAQ,WACvC,gBAAgB,MACd,MAAM,EAAE,SAAS,OAAO,QAAQ,EAAE,SAAS,OAAO,IACpD,CACD;EAGA,IAAI,gBAAgB,SAAS,GAC5B,IAAI;GACH,MAAM,IAAI,cACT,QACA,gBAAgB,KAAK,OAAO;IAC3B,MAAM,EAAE;IACR,MAAM,EAAE;GAQT,EAAE,CACH;GAEA,KAAK,MAAM,UAAU,iBACpB,QAAQ,KAAK;IACZ;IACA,SAAS;IACT,UAAU;GACX,CAAC;EAEH,SAAS,OAAO;GAEf,KAAK,MAAM,UAAU,iBACpB,QAAQ,KAAK;IACZ;IACA,SAAS;IACT,UAAU;IACV,OAAO,OAAO,KAAK;GACpB,CAAC;EAEH;EAID,KAAK,MAAM,UAAU,SAIpB,IAAI,CAHa,gBAAgB,MAC/B,MAAM,EAAE,SAAS,OAAO,QAAQ,EAAE,SAAS,OAAO,IAExC,GACX,QAAQ,KAAK;GACZ;GACA,SAAS;GACT,UAAU;EACX,CAAC;EAIH,OAAO;CACR;AACD"}
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
import { pt as getHostingerToken, x as MissingCredential } from "./dns-B2vsk2Rc.mjs";
|
|
2
|
-
//#region src/target/dokploy/dns/hostinger-api.ts
|
|
3
|
-
/**
|
|
4
|
-
* Hostinger DNS API client
|
|
5
|
-
*
|
|
6
|
-
* API Documentation: https://developers.hostinger.com/
|
|
7
|
-
* Authentication: Bearer token from hpanel.hostinger.com/profile/api
|
|
8
|
-
*/
|
|
9
|
-
const HOSTINGER_API_BASE = "https://developers.hostinger.com";
|
|
10
|
-
/**
|
|
11
|
-
* Hostinger API error
|
|
12
|
-
*/
|
|
13
|
-
var HostingerApiError = class extends Error {
|
|
14
|
-
status;
|
|
15
|
-
statusText;
|
|
16
|
-
errors;
|
|
17
|
-
constructor(message, status, statusText, errors) {
|
|
18
|
-
super(message);
|
|
19
|
-
this.status = status;
|
|
20
|
-
this.statusText = statusText;
|
|
21
|
-
this.errors = errors;
|
|
22
|
-
this.name = "HostingerApiError";
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Hostinger DNS API client
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const api = new HostingerApi(token);
|
|
31
|
-
*
|
|
32
|
-
* // Get all records for a domain
|
|
33
|
-
* const records = await api.getRecords('traflabs.io');
|
|
34
|
-
*
|
|
35
|
-
* // Create/update records
|
|
36
|
-
* await api.upsertRecords('traflabs.io', [
|
|
37
|
-
* { name: 'api.joemoer', type: 'A', ttl: 300, records: ['1.2.3.4'] }
|
|
38
|
-
* ]);
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
var HostingerApi = class {
|
|
42
|
-
token;
|
|
43
|
-
constructor(token) {
|
|
44
|
-
this.token = token;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Make a request to the Hostinger API
|
|
48
|
-
*/
|
|
49
|
-
async request(method, endpoint, body) {
|
|
50
|
-
const url = `${HOSTINGER_API_BASE}${endpoint}`;
|
|
51
|
-
const response = await fetch(url, {
|
|
52
|
-
method,
|
|
53
|
-
headers: {
|
|
54
|
-
"Content-Type": "application/json",
|
|
55
|
-
Authorization: `Bearer ${this.token}`
|
|
56
|
-
},
|
|
57
|
-
body: body ? JSON.stringify(body) : void 0
|
|
58
|
-
});
|
|
59
|
-
if (!response.ok) {
|
|
60
|
-
let errorMessage = `Hostinger API error: ${response.status} ${response.statusText}`;
|
|
61
|
-
let errors;
|
|
62
|
-
try {
|
|
63
|
-
const errorBody = await response.json();
|
|
64
|
-
if (errorBody.message) errorMessage = `Hostinger API error: ${errorBody.message}`;
|
|
65
|
-
errors = errorBody.errors;
|
|
66
|
-
} catch {}
|
|
67
|
-
throw new HostingerApiError(errorMessage, response.status, response.statusText, errors);
|
|
68
|
-
}
|
|
69
|
-
const text = await response.text();
|
|
70
|
-
if (!text || text.trim() === "") return;
|
|
71
|
-
return JSON.parse(text);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Get all DNS records for a domain
|
|
75
|
-
*
|
|
76
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
77
|
-
*/
|
|
78
|
-
async getRecords(domain) {
|
|
79
|
-
const response = await this.request("GET", `/api/dns/v1/zones/${domain}`);
|
|
80
|
-
if (Array.isArray(response)) return response;
|
|
81
|
-
return response?.data ?? [];
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Create or update DNS records
|
|
85
|
-
*
|
|
86
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
87
|
-
* @param records - Records to create/update
|
|
88
|
-
* @param overwrite - If true, replaces all existing records. If false, merges with existing.
|
|
89
|
-
*/
|
|
90
|
-
async upsertRecords(domain, records, overwrite = false) {
|
|
91
|
-
await this.request("PUT", `/api/dns/v1/zones/${domain}`, {
|
|
92
|
-
overwrite,
|
|
93
|
-
zone: records
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Validate DNS records before applying
|
|
98
|
-
*
|
|
99
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
100
|
-
* @param records - Records to validate
|
|
101
|
-
* @returns true if valid, throws if invalid
|
|
102
|
-
*/
|
|
103
|
-
async validateRecords(domain, records) {
|
|
104
|
-
await this.request("POST", `/api/dns/v1/zones/${domain}/validate`, {
|
|
105
|
-
overwrite: false,
|
|
106
|
-
zone: records
|
|
107
|
-
});
|
|
108
|
-
return true;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Delete specific DNS records
|
|
112
|
-
*
|
|
113
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
114
|
-
* @param filters - Filters to match records for deletion
|
|
115
|
-
*/
|
|
116
|
-
async deleteRecords(domain, filters) {
|
|
117
|
-
await this.request("DELETE", `/api/dns/v1/zones/${domain}`, { filters });
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Check if a specific record exists
|
|
121
|
-
*
|
|
122
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
123
|
-
* @param name - Subdomain name (e.g., 'api.joemoer')
|
|
124
|
-
* @param type - Record type (e.g., 'A')
|
|
125
|
-
*/
|
|
126
|
-
async recordExists(domain, name, type = "A") {
|
|
127
|
-
return (await this.getRecords(domain)).some((r) => r.name === name && r.type === type);
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Create a single A record if it doesn't exist
|
|
131
|
-
*
|
|
132
|
-
* @param domain - Root domain (e.g., 'traflabs.io')
|
|
133
|
-
* @param subdomain - Subdomain name (e.g., 'api.joemoer')
|
|
134
|
-
* @param ip - IP address to point to
|
|
135
|
-
* @param ttl - TTL in seconds (default: 300)
|
|
136
|
-
* @returns true if created, false if already exists
|
|
137
|
-
*/
|
|
138
|
-
async createARecordIfNotExists(domain, subdomain, ip, ttl = 300) {
|
|
139
|
-
if (await this.recordExists(domain, subdomain, "A")) return false;
|
|
140
|
-
await this.upsertRecords(domain, [{
|
|
141
|
-
name: subdomain,
|
|
142
|
-
type: "A",
|
|
143
|
-
ttl,
|
|
144
|
-
records: [{ content: ip }]
|
|
145
|
-
}]);
|
|
146
|
-
return true;
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
//#endregion
|
|
150
|
-
//#region src/target/dokploy/dns/HostingerProvider.ts
|
|
151
|
-
/**
|
|
152
|
-
* Hostinger DNS Provider
|
|
153
|
-
*
|
|
154
|
-
* Implements DnsProvider interface using the Hostinger DNS API. A record's
|
|
155
|
-
* `content` is its zone-file value — an MX record's is `<priority> <host>`,
|
|
156
|
-
* Hostinger having no field of its own for the priority — so values pass
|
|
157
|
-
* through as they are. Each write replaces its one name and type
|
|
158
|
-
* (`overwrite: true`): without it Hostinger appends, and a record with
|
|
159
|
-
* another value would end up holding both.
|
|
160
|
-
*/
|
|
161
|
-
/** A value compared the way DNS does: case, a trailing dot and spacing aside. */
|
|
162
|
-
function normalize(value) {
|
|
163
|
-
return value.trim().replace(/\.$/, "").replace(/\s+/g, " ").toLowerCase();
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Hostinger DNS provider implementation.
|
|
167
|
-
*/
|
|
168
|
-
var HostingerProvider = class {
|
|
169
|
-
credential;
|
|
170
|
-
name = "hostinger";
|
|
171
|
-
api = null;
|
|
172
|
-
/** `credential`: the token, when the caller already has it. */
|
|
173
|
-
constructor(credential) {
|
|
174
|
-
this.credential = credential;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Get or create the Hostinger API client.
|
|
178
|
-
*/
|
|
179
|
-
async getApi() {
|
|
180
|
-
if (this.api) return this.api;
|
|
181
|
-
const token = this.credential?.token ?? await getHostingerToken();
|
|
182
|
-
if (!token) throw new MissingCredential("hostinger", void 0);
|
|
183
|
-
this.api = new HostingerApi(token);
|
|
184
|
-
return this.api;
|
|
185
|
-
}
|
|
186
|
-
async getRecords(domain) {
|
|
187
|
-
return (await (await this.getApi()).getRecords(domain)).map((r) => ({
|
|
188
|
-
name: r.name,
|
|
189
|
-
type: r.type,
|
|
190
|
-
ttl: r.ttl,
|
|
191
|
-
values: r.records.map((rec) => rec.content)
|
|
192
|
-
}));
|
|
193
|
-
}
|
|
194
|
-
async upsertRecords(domain, records) {
|
|
195
|
-
const api = await this.getApi();
|
|
196
|
-
const results = [];
|
|
197
|
-
const existingRecords = await api.getRecords(domain);
|
|
198
|
-
for (const record of records) {
|
|
199
|
-
const existing = existingRecords.find((r) => r.name === record.name && r.type === record.type);
|
|
200
|
-
const existingValue = existing?.records?.[0]?.content;
|
|
201
|
-
if (existing && existingValue !== void 0 && normalize(existingValue) === normalize(record.value)) {
|
|
202
|
-
results.push({
|
|
203
|
-
record,
|
|
204
|
-
created: false,
|
|
205
|
-
unchanged: true
|
|
206
|
-
});
|
|
207
|
-
continue;
|
|
208
|
-
}
|
|
209
|
-
await api.upsertRecords(domain, [{
|
|
210
|
-
name: record.name,
|
|
211
|
-
type: record.type,
|
|
212
|
-
ttl: record.ttl,
|
|
213
|
-
records: [{ content: record.value }]
|
|
214
|
-
}], true);
|
|
215
|
-
results.push({
|
|
216
|
-
record,
|
|
217
|
-
created: !existing,
|
|
218
|
-
unchanged: false
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
return results;
|
|
222
|
-
}
|
|
223
|
-
async deleteRecords(domain, records) {
|
|
224
|
-
const api = await this.getApi();
|
|
225
|
-
const results = [];
|
|
226
|
-
const existingRecords = await api.getRecords(domain);
|
|
227
|
-
const recordsToDelete = records.filter((record) => existingRecords.some((r) => r.name === record.name && r.type === record.type));
|
|
228
|
-
if (recordsToDelete.length > 0) try {
|
|
229
|
-
await api.deleteRecords(domain, recordsToDelete.map((r) => ({
|
|
230
|
-
name: r.name,
|
|
231
|
-
type: r.type
|
|
232
|
-
})));
|
|
233
|
-
for (const record of recordsToDelete) results.push({
|
|
234
|
-
record,
|
|
235
|
-
deleted: true,
|
|
236
|
-
notFound: false
|
|
237
|
-
});
|
|
238
|
-
} catch (error) {
|
|
239
|
-
for (const record of recordsToDelete) results.push({
|
|
240
|
-
record,
|
|
241
|
-
deleted: false,
|
|
242
|
-
notFound: false,
|
|
243
|
-
error: String(error)
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
for (const record of records) if (!existingRecords.find((r) => r.name === record.name && r.type === record.type)) results.push({
|
|
247
|
-
record,
|
|
248
|
-
deleted: false,
|
|
249
|
-
notFound: true
|
|
250
|
-
});
|
|
251
|
-
return results;
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
//#endregion
|
|
255
|
-
export { HostingerProvider };
|
|
256
|
-
|
|
257
|
-
//# sourceMappingURL=HostingerProvider-kLQsBCjz.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HostingerProvider-kLQsBCjz.mjs","names":[],"sources":["../src/target/dokploy/dns/hostinger-api.ts","../src/target/dokploy/dns/HostingerProvider.ts"],"sourcesContent":["/**\n * Hostinger DNS API client\n *\n * API Documentation: https://developers.hostinger.com/\n * Authentication: Bearer token from hpanel.hostinger.com/profile/api\n */\n\nconst HOSTINGER_API_BASE = 'https://developers.hostinger.com';\n\n/**\n * DNS record types supported by Hostinger\n */\nexport type DnsRecordType =\n\t| 'A'\n\t| 'AAAA'\n\t| 'CNAME'\n\t| 'MX'\n\t| 'TXT'\n\t| 'NS'\n\t| 'SRV'\n\t| 'CAA';\n\n/**\n * A single DNS record\n */\nexport interface DnsRecord {\n\t/** Subdomain name (e.g., 'api.joemoer' for api.joemoer.traflabs.io) */\n\tname: string;\n\t/** Record type */\n\ttype: DnsRecordType;\n\t/** TTL in seconds */\n\tttl: number;\n\t/** Record values */\n\trecords: Array<{ content: string }>;\n}\n\n/**\n * Filter for deleting specific records\n */\nexport interface DnsRecordFilter {\n\tname: string;\n\ttype: DnsRecordType;\n}\n\n/**\n * API error response\n */\nexport interface HostingerErrorResponse {\n\tmessage?: string;\n\terrors?: Record<string, string[]>;\n}\n\n/**\n * Hostinger API error\n */\nexport class HostingerApiError extends Error {\n\tconstructor(\n\t\tmessage: string,\n\t\tpublic status: number,\n\t\tpublic statusText: string,\n\t\tpublic errors?: Record<string, string[]>,\n\t) {\n\t\tsuper(message);\n\t\tthis.name = 'HostingerApiError';\n\t}\n}\n\n/**\n * Hostinger DNS API client\n *\n * @example\n * ```ts\n * const api = new HostingerApi(token);\n *\n * // Get all records for a domain\n * const records = await api.getRecords('traflabs.io');\n *\n * // Create/update records\n * await api.upsertRecords('traflabs.io', [\n * { name: 'api.joemoer', type: 'A', ttl: 300, records: ['1.2.3.4'] }\n * ]);\n * ```\n */\nexport class HostingerApi {\n\tprivate token: string;\n\n\tconstructor(token: string) {\n\t\tthis.token = token;\n\t}\n\n\t/**\n\t * Make a request to the Hostinger API\n\t */\n\tprivate async request<T>(\n\t\tmethod: 'GET' | 'POST' | 'PUT' | 'DELETE',\n\t\tendpoint: string,\n\t\tbody?: unknown,\n\t): Promise<T> {\n\t\tconst url = `${HOSTINGER_API_BASE}${endpoint}`;\n\n\t\tconst response = await fetch(url, {\n\t\t\tmethod,\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\tAuthorization: `Bearer ${this.token}`,\n\t\t\t},\n\t\t\tbody: body ? JSON.stringify(body) : undefined,\n\t\t});\n\n\t\tif (!response.ok) {\n\t\t\tlet errorMessage = `Hostinger API error: ${response.status} ${response.statusText}`;\n\t\t\tlet errors: Record<string, string[]> | undefined;\n\n\t\t\ttry {\n\t\t\t\tconst errorBody = (await response.json()) as HostingerErrorResponse;\n\t\t\t\tif (errorBody.message) {\n\t\t\t\t\terrorMessage = `Hostinger API error: ${errorBody.message}`;\n\t\t\t\t}\n\t\t\t\terrors = errorBody.errors;\n\t\t\t} catch {\n\t\t\t\t// Ignore JSON parse errors\n\t\t\t}\n\n\t\t\tthrow new HostingerApiError(\n\t\t\t\terrorMessage,\n\t\t\t\tresponse.status,\n\t\t\t\tresponse.statusText,\n\t\t\t\terrors,\n\t\t\t);\n\t\t}\n\n\t\t// Handle empty responses\n\t\tconst text = await response.text();\n\t\tif (!text || text.trim() === '') {\n\t\t\treturn undefined as T;\n\t\t}\n\t\treturn JSON.parse(text) as T;\n\t}\n\n\t/**\n\t * Get all DNS records for a domain\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t */\n\tasync getRecords(domain: string): Promise<DnsRecord[]> {\n\t\t// The zone comes back as a **bare array**, not `{ data: [...] }`.\n\t\t//\n\t\t// This read `response.data || []`, so every call returned zero records\n\t\t// against the real API while every mocked test passed. Silently: no error,\n\t\t// no warning, just an empty zone. `upsertRecords` uses this to decide what\n\t\t// already exists, so everything looked new and every write was reported as\n\t\t// a creation — harmless only because the PUT merges rather than replaces.\n\t\t//\n\t\t// Both shapes are accepted because one of them is a guess: the wrapper was\n\t\t// written against documentation and the array is what the API actually\n\t\t// sends, so tolerating an envelope costs a line and survives it appearing.\n\t\tconst response = await this.request<DnsRecord[] | { data?: DnsRecord[] }>(\n\t\t\t'GET',\n\t\t\t`/api/dns/v1/zones/${domain}`,\n\t\t);\n\n\t\tif (Array.isArray(response)) return response;\n\n\t\treturn response?.data ?? [];\n\t}\n\n\t/**\n\t * Create or update DNS records\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t * @param records - Records to create/update\n\t * @param overwrite - If true, replaces all existing records. If false, merges with existing.\n\t */\n\tasync upsertRecords(\n\t\tdomain: string,\n\t\trecords: DnsRecord[],\n\t\toverwrite = false,\n\t): Promise<void> {\n\t\tawait this.request('PUT', `/api/dns/v1/zones/${domain}`, {\n\t\t\toverwrite,\n\t\t\tzone: records,\n\t\t});\n\t}\n\n\t/**\n\t * Validate DNS records before applying\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t * @param records - Records to validate\n\t * @returns true if valid, throws if invalid\n\t */\n\tasync validateRecords(\n\t\tdomain: string,\n\t\trecords: DnsRecord[],\n\t): Promise<boolean> {\n\t\tawait this.request('POST', `/api/dns/v1/zones/${domain}/validate`, {\n\t\t\toverwrite: false,\n\t\t\tzone: records,\n\t\t});\n\t\treturn true;\n\t}\n\n\t/**\n\t * Delete specific DNS records\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t * @param filters - Filters to match records for deletion\n\t */\n\tasync deleteRecords(\n\t\tdomain: string,\n\t\tfilters: DnsRecordFilter[],\n\t): Promise<void> {\n\t\tawait this.request('DELETE', `/api/dns/v1/zones/${domain}`, {\n\t\t\tfilters,\n\t\t});\n\t}\n\n\t/**\n\t * Check if a specific record exists\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t * @param name - Subdomain name (e.g., 'api.joemoer')\n\t * @param type - Record type (e.g., 'A')\n\t */\n\tasync recordExists(\n\t\tdomain: string,\n\t\tname: string,\n\t\ttype: DnsRecordType = 'A',\n\t): Promise<boolean> {\n\t\tconst records = await this.getRecords(domain);\n\t\treturn records.some((r) => r.name === name && r.type === type);\n\t}\n\n\t/**\n\t * Create a single A record if it doesn't exist\n\t *\n\t * @param domain - Root domain (e.g., 'traflabs.io')\n\t * @param subdomain - Subdomain name (e.g., 'api.joemoer')\n\t * @param ip - IP address to point to\n\t * @param ttl - TTL in seconds (default: 300)\n\t * @returns true if created, false if already exists\n\t */\n\tasync createARecordIfNotExists(\n\t\tdomain: string,\n\t\tsubdomain: string,\n\t\tip: string,\n\t\tttl = 300,\n\t): Promise<boolean> {\n\t\tconst exists = await this.recordExists(domain, subdomain, 'A');\n\t\tif (exists) {\n\t\t\treturn false;\n\t\t}\n\n\t\tawait this.upsertRecords(domain, [\n\t\t\t{\n\t\t\t\tname: subdomain,\n\t\t\t\ttype: 'A',\n\t\t\t\tttl,\n\t\t\t\trecords: [{ content: ip }],\n\t\t\t},\n\t\t]);\n\n\t\treturn true;\n\t}\n}\n","/**\n * Hostinger DNS Provider\n *\n * Implements DnsProvider interface using the Hostinger DNS API. A record's\n * `content` is its zone-file value — an MX record's is `<priority> <host>`,\n * Hostinger having no field of its own for the priority — so values pass\n * through as they are. Each write replaces its one name and type\n * (`overwrite: true`): without it Hostinger appends, and a record with\n * another value would end up holding both.\n */\n\nimport { getHostingerToken } from '../../../auth/credentials';\nimport {\n\ttype HostingerCredential,\n\tMissingCredential,\n} from '../../../deploy/credentials';\nimport type {\n\tDeleteDnsRecord,\n\tDeleteResult,\n\tDnsProvider,\n\tDnsRecord,\n\tUpsertDnsRecord,\n\tUpsertResult,\n} from './DnsProvider';\nimport { HostingerApi } from './hostinger-api';\n\n/** A value compared the way DNS does: case, a trailing dot and spacing aside. */\nfunction normalize(value: string): string {\n\treturn value.trim().replace(/\\.$/, '').replace(/\\s+/g, ' ').toLowerCase();\n}\n\n/**\n * Hostinger DNS provider implementation.\n */\nexport class HostingerProvider implements DnsProvider {\n\treadonly name = 'hostinger';\n\tprivate api: HostingerApi | null = null;\n\n\t/** `credential`: the token, when the caller already has it. */\n\tconstructor(private readonly credential?: HostingerCredential) {}\n\n\t/**\n\t * Get or create the Hostinger API client.\n\t */\n\tprivate async getApi(): Promise<HostingerApi> {\n\t\tif (this.api) {\n\t\t\treturn this.api;\n\t\t}\n\n\t\tconst token = this.credential?.token ?? (await getHostingerToken());\n\t\tif (!token) throw new MissingCredential('hostinger', undefined);\n\n\t\tthis.api = new HostingerApi(token);\n\t\treturn this.api;\n\t}\n\n\tasync getRecords(domain: string): Promise<DnsRecord[]> {\n\t\tconst api = await this.getApi();\n\t\tconst records = await api.getRecords(domain);\n\n\t\treturn records.map((r) => ({\n\t\t\tname: r.name,\n\t\t\ttype: r.type,\n\t\t\tttl: r.ttl,\n\t\t\tvalues: r.records.map((rec) => rec.content),\n\t\t}));\n\t}\n\n\tasync upsertRecords(\n\t\tdomain: string,\n\t\trecords: UpsertDnsRecord[],\n\t): Promise<UpsertResult[]> {\n\t\tconst api = await this.getApi();\n\t\tconst results: UpsertResult[] = [];\n\n\t\t// Get existing records to check what already exists\n\t\tconst existingRecords = await api.getRecords(domain);\n\n\t\tfor (const record of records) {\n\t\t\tconst existing = existingRecords.find(\n\t\t\t\t(r) => r.name === record.name && r.type === record.type,\n\t\t\t);\n\n\t\t\tconst existingValue = existing?.records?.[0]?.content;\n\n\t\t\tif (\n\t\t\t\texisting &&\n\t\t\t\texistingValue !== undefined &&\n\t\t\t\tnormalize(existingValue) === normalize(record.value)\n\t\t\t) {\n\t\t\t\t// Record exists with same value - unchanged\n\t\t\t\tresults.push({\n\t\t\t\t\trecord,\n\t\t\t\t\tcreated: false,\n\t\t\t\t\tunchanged: true,\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Create the record, or replace this name's records of this type.\n\t\t\tawait api.upsertRecords(\n\t\t\t\tdomain,\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\tname: record.name,\n\t\t\t\t\t\ttype: record.type,\n\t\t\t\t\t\tttl: record.ttl,\n\t\t\t\t\t\trecords: [{ content: record.value }],\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\tresults.push({\n\t\t\t\trecord,\n\t\t\t\tcreated: !existing,\n\t\t\t\tunchanged: false,\n\t\t\t});\n\t\t}\n\n\t\treturn results;\n\t}\n\n\tasync deleteRecords(\n\t\tdomain: string,\n\t\trecords: DeleteDnsRecord[],\n\t): Promise<DeleteResult[]> {\n\t\tconst api = await this.getApi();\n\t\tconst results: DeleteResult[] = [];\n\n\t\t// Get existing records to check what exists\n\t\tconst existingRecords = await api.getRecords(domain);\n\n\t\t// Filter to only records that exist\n\t\tconst recordsToDelete = records.filter((record) =>\n\t\t\texistingRecords.some(\n\t\t\t\t(r) => r.name === record.name && r.type === record.type,\n\t\t\t),\n\t\t);\n\n\t\t// Delete existing records\n\t\tif (recordsToDelete.length > 0) {\n\t\t\ttry {\n\t\t\t\tawait api.deleteRecords(\n\t\t\t\t\tdomain,\n\t\t\t\t\trecordsToDelete.map((r) => ({\n\t\t\t\t\t\tname: r.name,\n\t\t\t\t\t\ttype: r.type as\n\t\t\t\t\t\t\t| 'A'\n\t\t\t\t\t\t\t| 'AAAA'\n\t\t\t\t\t\t\t| 'CNAME'\n\t\t\t\t\t\t\t| 'MX'\n\t\t\t\t\t\t\t| 'TXT'\n\t\t\t\t\t\t\t| 'SRV'\n\t\t\t\t\t\t\t| 'CAA',\n\t\t\t\t\t})),\n\t\t\t\t);\n\n\t\t\t\tfor (const record of recordsToDelete) {\n\t\t\t\t\tresults.push({\n\t\t\t\t\t\trecord,\n\t\t\t\t\t\tdeleted: true,\n\t\t\t\t\t\tnotFound: false,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t// If batch delete fails, report error for all records\n\t\t\t\tfor (const record of recordsToDelete) {\n\t\t\t\t\tresults.push({\n\t\t\t\t\t\trecord,\n\t\t\t\t\t\tdeleted: false,\n\t\t\t\t\t\tnotFound: false,\n\t\t\t\t\t\terror: String(error),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Mark non-existent records as not found\n\t\tfor (const record of records) {\n\t\t\tconst existing = existingRecords.find(\n\t\t\t\t(r) => r.name === record.name && r.type === record.type,\n\t\t\t);\n\t\t\tif (!existing) {\n\t\t\t\tresults.push({\n\t\t\t\t\trecord,\n\t\t\t\t\tdeleted: false,\n\t\t\t\t\tnotFound: true,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn results;\n\t}\n}\n"],"mappings":";;;;;;;;AAOA,MAAM,qBAAqB;;;;AAgD3B,IAAa,oBAAb,cAAuC,MAAM;CAGpC;CACA;CACA;CAJR,YACC,SACA,QACA,YACA,QACC;EACD,MAAM,OAAO;EAJN,KAAA,SAAA;EACA,KAAA,aAAA;EACA,KAAA,SAAA;EAGP,KAAK,OAAO;CACb;AACD;;;;;;;;;;;;;;;;;AAkBA,IAAa,eAAb,MAA0B;CACzB;CAEA,YAAY,OAAe;EAC1B,KAAK,QAAQ;CACd;;;;CAKA,MAAc,QACb,QACA,UACA,MACa;EACb,MAAM,MAAM,GAAG,qBAAqB;EAEpC,MAAM,WAAW,MAAM,MAAM,KAAK;GACjC;GACA,SAAS;IACR,gBAAgB;IAChB,eAAe,UAAU,KAAK;GAC/B;GACA,MAAM,OAAO,KAAK,UAAU,IAAI,IAAI,KAAA;EACrC,CAAC;EAED,IAAI,CAAC,SAAS,IAAI;GACjB,IAAI,eAAe,wBAAwB,SAAS,OAAO,GAAG,S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