deepline 0.3.563 → 0.3.565
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/bundling-sources/sdk/src/client-core.ts +51 -0
- package/dist/bundling-sources/sdk/src/connector-sync.ts +241 -0
- package/dist/bundling-sources/sdk/src/index.ts +10 -0
- package/dist/bundling-sources/sdk/src/integrations.ts +7 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +8 -0
- package/dist/cli/auth-AN2KCWG2.js +44 -0
- package/dist/cli/{auth-3YES4ACM.mjs → auth-YKIUCQ2Q.mjs} +5 -5
- package/dist/cli/{billing-NZ2NCOQS.mjs → billing-HK23QHAA.mjs} +9 -9
- package/dist/cli/{billing-L2GDKBXK.js → billing-NIGAUQJF.js} +102 -102
- package/dist/cli/{chunk-UMJWODG7.mjs → chunk-2US3VJXX.mjs} +1 -1
- package/dist/cli/{chunk-HST5XA3B.mjs → chunk-4ENCU2BI.mjs} +2 -2
- package/dist/cli/{chunk-T2RNEBV7.js → chunk-4VKDPTHF.js} +4 -4
- package/dist/cli/{chunk-TX5PQ7KP.js → chunk-5HV2CNXA.js} +10 -10
- package/dist/cli/{chunk-V4KKZGLT.js → chunk-6HCJQ23O.js} +23 -23
- package/dist/cli/{chunk-JVXHVEWX.mjs → chunk-A3EI3A3Q.mjs} +5 -5
- package/dist/cli/{chunk-YDXFVE4V.mjs → chunk-AAOXS3XM.mjs} +152 -2
- package/dist/cli/{chunk-L5QJRMFJ.mjs → chunk-AH2CBDQJ.mjs} +2 -2
- package/dist/cli/{chunk-NCGDBNNF.mjs → chunk-B2FQZ7P4.mjs} +2 -2
- package/dist/cli/{chunk-QGIHGITM.js → chunk-B4FBMREO.js} +3 -3
- package/dist/cli/{chunk-UUEVGLGO.mjs → chunk-BCEXSQPK.mjs} +1 -1
- package/dist/cli/{chunk-VYY6HNOC.js → chunk-BDNVUPDX.js} +2 -2
- package/dist/cli/{search-output-FRRT574G.js → chunk-C5IA2OYE.js} +2 -199
- package/dist/cli/{chunk-K77ANXGU.js → chunk-E73BRM5N.js} +13 -13
- package/dist/cli/{chunk-MGOCWY7J.js → chunk-EPQIA32E.js} +100 -100
- package/dist/cli/{chunk-XWGWVLQQ.mjs → chunk-EXOC3TLA.mjs} +4 -4
- package/dist/cli/{chunk-BP2XRVBA.mjs → chunk-F4ZLUDKW.mjs} +5 -5
- package/dist/cli/{chunk-QOLFZD6Q.js → chunk-FEWBYUUF.js} +2 -2
- package/dist/cli/{chunk-ERT4ZMZT.js → chunk-FWH6QYTE.js} +5 -5
- package/dist/cli/{chunk-LIO7CPM3.js → chunk-FXRSHBRP.js} +159 -9
- package/dist/cli/{chunk-DA24O3ZV.js → chunk-GE62FFN6.js} +3 -3
- package/dist/cli/{chunk-RP2LCS7G.mjs → chunk-GTX2RMQG.mjs} +11 -11
- package/dist/cli/{chunk-G5CY6KI2.js → chunk-H3NH5RJ6.js} +41 -41
- package/dist/cli/{chunk-AYNDNXBJ.mjs → chunk-H4LHB6ES.mjs} +1 -1
- package/dist/cli/{chunk-XTSQ3ZV5.mjs → chunk-IFZA4IGI.mjs} +2 -2
- package/dist/cli/{chunk-NTRTFEI4.js → chunk-IKA37N6Y.js} +26 -26
- package/dist/cli/{chunk-U77PK5R3.js → chunk-J5QAOURJ.js} +20 -20
- package/dist/cli/{chunk-GVRVZQBY.mjs → chunk-JLXLCD6F.mjs} +2 -2
- package/dist/cli/{chunk-O3NLECXL.mjs → chunk-K6RPKBD7.mjs} +1 -1
- package/dist/cli/{chunk-VACBPVIR.mjs → chunk-KOMEYB7H.mjs} +104 -0
- package/dist/cli/{chunk-2MAP42AM.mjs → chunk-LHL6VWJE.mjs} +1 -1
- package/dist/cli/{chunk-XDZZCRUG.mjs → chunk-LKVWMLWI.mjs} +1 -1
- package/dist/cli/{chunk-K5FNC4VL.mjs → chunk-LOV5JGWO.mjs} +2 -2
- package/dist/cli/{search-output-O7FYSGYQ.mjs → chunk-MI5Q5FOD.mjs} +1 -198
- package/dist/cli/{chunk-IICHFEFE.js → chunk-NH3LVGVR.js} +5 -5
- package/dist/cli/{chunk-ZX3UZCWC.mjs → chunk-NOSGGCJ3.mjs} +1 -1
- package/dist/cli/{chunk-5CNHEUGJ.js → chunk-OEVCKW2M.js} +104 -0
- package/dist/cli/{chunk-SJ2LY4V5.js → chunk-OIDETCX2.js} +20 -20
- package/dist/cli/{chunk-H3UIWEXF.js → chunk-P6BVT2OW.js} +2 -2
- package/dist/cli/{chunk-QGNITJYC.js → chunk-PQEWFVJ3.js} +15 -15
- package/dist/cli/{chunk-L5O7MWRZ.mjs → chunk-RULYYQB4.mjs} +5 -5
- package/dist/cli/{chunk-6LPMQPSQ.mjs → chunk-SEWLXJHM.mjs} +2 -2
- package/dist/cli/{chunk-2UW5A57I.js → chunk-SL3IRGAW.js} +9 -9
- package/dist/cli/{chunk-FCRBXLIJ.js → chunk-TCJZQRX6.js} +12 -12
- package/dist/cli/{chunk-POGS26GF.mjs → chunk-U7F4ODVQ.mjs} +1 -1
- package/dist/cli/{chunk-6UHRBEDV.mjs → chunk-UTQ6LQWG.mjs} +3 -3
- package/dist/cli/{chunk-NS56OQUQ.js → chunk-UWMK5DLS.js} +1 -1
- package/dist/cli/{chunk-6U7CIG3C.mjs → chunk-V2TC2ARE.mjs} +4 -4
- package/dist/cli/{chunk-OZC6SSOB.js → chunk-WPVJV23H.js} +7 -7
- package/dist/cli/{chunk-DVWFK676.js → chunk-XNOUOO6G.js} +6 -6
- package/dist/cli/{chunk-XY5DE4TK.mjs → chunk-YD5BBYS2.mjs} +5 -5
- package/dist/cli/{chunk-H2N324LF.mjs → chunk-YGVLCJNY.mjs} +3 -3
- package/dist/cli/{chunk-DFCBNTVQ.mjs → chunk-YIKEVZUQ.mjs} +2 -2
- package/dist/cli/{chunk-4MPLA5RD.js → chunk-ZEKRYFMN.js} +48 -48
- package/dist/cli/{chunk-CH7OVBBJ.js → chunk-ZIKVPGYC.js} +5 -5
- package/dist/cli/{chunk-4KHRPJOW.js → chunk-ZTHMJ4SK.js} +53 -53
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-SKAAESKY.js +22 -0
- package/dist/cli/{concurrent-runs-help-VEZX3RK4.mjs → concurrent-runs-help-WD2EUKO7.mjs} +6 -6
- package/dist/cli/{csv-RJBNLD23.mjs → csv-RM3FOTS5.mjs} +4 -4
- package/dist/cli/{csv-W5C4JCYL.js → csv-UI63ZOMD.js} +13 -13
- package/dist/cli/{db-VVGP2KCM.mjs → db-RIJBJCT7.mjs} +6 -6
- package/dist/cli/{db-GYCRUH4V.js → db-V5SWE3WN.js} +27 -27
- package/dist/cli/{describe-HZW272Y6.mjs → describe-HZC4GOLO.mjs} +18 -18
- package/dist/cli/describe-RRWLYUQS.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-D37NX6CD.js → executions-2Q23JJSI.js} +8 -8
- package/dist/cli/{executions-N4ZA4ZD5.mjs → executions-XRH267DY.mjs} +6 -6
- package/dist/cli/{feedback-W6CY6UBA.js → feedback-BEHH4KGB.js} +14 -14
- package/dist/cli/{feedback-4PB4ACBV.mjs → feedback-Y5MWMTQ2.mjs} +6 -6
- package/dist/cli/{git-WHIEYIVM.mjs → git-644DZQKA.mjs} +5 -5
- package/dist/cli/git-OEHB7UQH.js +26 -0
- package/dist/cli/index.js +147 -147
- package/dist/cli/index.mjs +46 -46
- package/dist/cli/integrations-ILXWYGTO.js +284 -0
- package/dist/cli/integrations-PMXZ7V6Y.mjs +284 -0
- package/dist/cli/{legacy-noops-PJNDUOWG.js → legacy-noops-USLUHQWW.js} +9 -9
- package/dist/cli/{legacy-noops-YYX2W2WX.mjs → legacy-noops-YUG2HVGQ.mjs} +6 -6
- package/dist/cli/{mcp-APKPI24N.js → mcp-DFLBEEWG.js} +24 -24
- package/dist/cli/{mcp-T32DPP4D.mjs → mcp-X63UPZS7.mjs} +4 -4
- package/dist/cli/{monitors-BY4DJFCF.js → monitors-POG6YUZ4.js} +100 -100
- package/dist/cli/{monitors-DTJD3IUI.mjs → monitors-QGI7QH4K.mjs} +7 -7
- package/dist/cli/{org-2GMHKAQK.js → org-E3NIDN32.js} +121 -121
- package/dist/cli/{org-GQYIJBKO.mjs → org-VAJL4BCS.mjs} +6 -6
- package/dist/cli/{outcomes-3ASEQLIF.mjs → outcomes-FOE35FHM.mjs} +6 -6
- package/dist/cli/{outcomes-4XY4F57P.js → outcomes-SCQFFBXS.js} +14 -14
- package/dist/cli/{play-EX7PB6CI.mjs → play-7N4Z2LEH.mjs} +19 -19
- package/dist/cli/{play-2LDJMIG2.js → play-BGK7PDXO.js} +324 -324
- package/dist/cli/{providers-GAERKWYW.mjs → providers-KDI3B22S.mjs} +6 -6
- package/dist/cli/{providers-IDIFP5PU.js → providers-OK2ES375.js} +9 -9
- package/dist/cli/{quickstart-7NL5YAJF.js → quickstart-HOHFIFVW.js} +6 -6
- package/dist/cli/{quickstart-E2GCIGR4.mjs → quickstart-LHJF7YCP.mjs} +4 -4
- package/dist/cli/{run-2EPOAEJ5.mjs → run-BQIDPU5J.mjs} +23 -23
- package/dist/cli/{run-3CEY5JF3.js → run-K45RGJP4.js} +44 -44
- package/dist/cli/{search-TYRKGVKB.mjs → search-PD3OAWO3.mjs} +7 -7
- package/dist/cli/search-QCFLRPCX.js +32 -0
- package/dist/cli/search-output-FVT2FPUN.mjs +205 -0
- package/dist/cli/search-output-P2JVWNCK.js +205 -0
- package/dist/cli/{secrets-5YL7RU2B.mjs → secrets-4MCBJUGL.mjs} +6 -6
- package/dist/cli/{secrets-5W2ZF2JB.js → secrets-LDCXYN33.js} +15 -15
- package/dist/cli/{sessions-VWENSY3G.mjs → sessions-36VI33IL.mjs} +6 -6
- package/dist/cli/sessions-WTQ6QNAU.js +23 -0
- package/dist/cli/{settings-JQOMJTOC.js → settings-3J4FUQPF.js} +85 -85
- package/dist/cli/{settings-W6FCYDJC.mjs → settings-D6L7S4ZC.mjs} +12 -12
- package/dist/cli/{setup-DJIVQUBT.js → setup-L6VH3OR4.js} +49 -49
- package/dist/cli/{setup-3JUQWZTS.mjs → setup-PBQ773AV.mjs} +9 -9
- package/dist/cli/skills-PENWR7KI.js +37 -0
- package/dist/cli/{skills-7JTWCFL3.mjs → skills-ZRTREJY2.mjs} +7 -7
- package/dist/cli/{tools-DRR3KDV2.mjs → tools-OAHCQUQB.mjs} +17 -17
- package/dist/cli/tools-TIN7MRLX.js +57 -0
- package/dist/cli/update-4TIZS6WV.js +37 -0
- package/dist/cli/{update-KL43AZPW.mjs → update-ZM4LSW5L.mjs} +9 -9
- package/dist/cli/{views-HX4GM53H.js → views-F4MEME43.js} +21 -21
- package/dist/cli/{views-FFTXTJ7U.mjs → views-W6PVUSE3.mjs} +6 -6
- package/dist/cli/{workflow-R2K6CH2X.js → workflow-37V7F5I4.js} +17 -17
- package/dist/cli/{workflow-QO7BRZLM.mjs → workflow-7E2QYAIY.mjs} +7 -7
- package/dist/{client-CnphYDTe.d.mts → client-B5cSKEi4.d.mts} +1 -1
- package/dist/{client-core-DQOTt3yV.d.mts → client-core-BP19BoBb.d.mts} +107 -2
- package/dist/{client-core-Yad6-K7-.d.ts → client-core-Deqov12F.d.ts} +107 -2
- package/dist/{client-BSxuaObS.d.ts → client-vUZGmXT9.d.ts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +121 -118
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-UC22BJN2.js +0 -44
- package/dist/cli/concurrent-runs-help-NMNGH7QN.js +0 -22
- package/dist/cli/describe-HJ564FPP.js +0 -50
- package/dist/cli/git-LMRN2YR5.js +0 -26
- package/dist/cli/integrations-ASNRHKLO.mjs +0 -129
- package/dist/cli/integrations-HXY5DR6D.js +0 -129
- package/dist/cli/search-ILJXFKNF.js +0 -32
- package/dist/cli/sessions-YMXBFVB3.js +0 -23
- package/dist/cli/skills-T36PD3IA.js +0 -37
- package/dist/cli/tools-X53FZHIC.js +0 -57
- package/dist/cli/update-BISEE3LC.js +0 -37
|
@@ -692,6 +692,7 @@ Input and output:
|
|
|
692
692
|
reconnect, disconnect, and delete act on existing org authorizations.
|
|
693
693
|
Pass --provider when the same name occurs for more than one provider.
|
|
694
694
|
verify <domain> checks an existing Google Admin grant and enables it locally.
|
|
695
|
+
sync shows and controls CRM syncs into the Customer DB (see sync --help).
|
|
695
696
|
Scope changes require provider approval; a Play's connection selection
|
|
696
697
|
cannot expand granted access.
|
|
697
698
|
SDK:
|
|
@@ -705,6 +706,109 @@ Examples:
|
|
|
705
706
|
deepline integrations list --json
|
|
706
707
|
deepline integrations get deepline.com --json
|
|
707
708
|
`
|
|
709
|
+
},
|
|
710
|
+
"integrations sync": {
|
|
711
|
+
core: `
|
|
712
|
+
Purpose:
|
|
713
|
+
Show and control the CRM syncs that copy HubSpot, Salesforce and Attio
|
|
714
|
+
objects into the org's Customer DB. Same state and controls as the
|
|
715
|
+
dashboard sync page (Integrations > Sync).
|
|
716
|
+
Input and output:
|
|
717
|
+
status lists each provider's state, as the Integrations list shows it;
|
|
718
|
+
status <provider> shows one. objects <provider> lists its synced objects.
|
|
719
|
+
on <provider> and off <provider> turn its whole sync on or off.
|
|
720
|
+
pause <provider> <objects...> and resume <provider> <objects...> stop or
|
|
721
|
+
restart individual objects (for example tickets) while the rest sync.
|
|
722
|
+
run <provider> [objects...] syncs now instead of waiting for the schedule.
|
|
723
|
+
Object names are the object column of objects <provider>.
|
|
724
|
+
States:
|
|
725
|
+
off: the sync is turned off; nothing is copied.
|
|
726
|
+
starting: turned on; its first setup run is in progress.
|
|
727
|
+
on: turned on and every active object synced on schedule.
|
|
728
|
+
needs_attention: turned on, but objects failed, are overdue, have never
|
|
729
|
+
synced, are all paused, setup failed, or the Customer DB is
|
|
730
|
+
unavailable. reason and label say which.
|
|
731
|
+
unknown: turned on, but no sync has recorded its status yet; the next
|
|
732
|
+
scheduled check records it.
|
|
733
|
+
An object is overdue when its scheduled run is more than 20 minutes late.
|
|
734
|
+
SDK:
|
|
735
|
+
client.integrations.sync exposes status, get, objects, set, pause, resume
|
|
736
|
+
and run.
|
|
737
|
+
Cost:
|
|
738
|
+
These commands do not spend Deepline credits. Syncing reads from the
|
|
739
|
+
provider's API under the org's connection.
|
|
740
|
+
Examples:
|
|
741
|
+
deepline integrations sync status --json
|
|
742
|
+
deepline integrations sync on hubspot
|
|
743
|
+
deepline integrations sync pause hubspot tickets quotes
|
|
744
|
+
`
|
|
745
|
+
},
|
|
746
|
+
"integrations sync status": {
|
|
747
|
+
core: `Purpose: Show CRM sync state, as the Integrations list shows it.
|
|
748
|
+
Input: no provider for every CRM; a provider (hubspot, salesforce, attio) for
|
|
749
|
+
one.
|
|
750
|
+
Output: state (off, starting, on, needs_attention, unknown), reason, label
|
|
751
|
+
(the Integrations list text), sync_enabled, last_success_at, connector_status
|
|
752
|
+
(healthy, error, unknown as the sync last recorded it) and object counts:
|
|
753
|
+
total, active, paused, failed, backfilling, scheduled, never_synced, and
|
|
754
|
+
overdue (none, some or all scheduled objects past due). Counts come from the
|
|
755
|
+
last recorded sync check, overdue from the current time, so a sync that
|
|
756
|
+
stopped running still reads as overdue. objects is null when the sync is off
|
|
757
|
+
or nothing is recorded yet. This command never reads the Customer DB.
|
|
758
|
+
[[cli:--json prints GET /api/v2/ingestion/sync-status (one provider's entry
|
|
759
|
+
with a provider).]]
|
|
760
|
+
Cost: Does not spend credits.`
|
|
761
|
+
},
|
|
762
|
+
"integrations sync objects": {
|
|
763
|
+
core: `Purpose: List one provider's synced objects, as the sync page does.
|
|
764
|
+
Input: hubspot, salesforce or attio.
|
|
765
|
+
Output: the provider's state and every object: object_type, status, health
|
|
766
|
+
(healthy, paused, last_sync_failed, sync_overdue, no_successful_sync),
|
|
767
|
+
frequency, next run, last success and last error, read from the Customer DB.
|
|
768
|
+
Reads every page. Fails when the Customer DB read fails.
|
|
769
|
+
[[cli:--json prints the state and all objects from
|
|
770
|
+
GET /api/v2/ingestion/providers/<provider>/sync.]]
|
|
771
|
+
Cost: Does not spend credits.`
|
|
772
|
+
},
|
|
773
|
+
"integrations sync on": {
|
|
774
|
+
core: `Purpose: Turn a provider's CRM sync on.
|
|
775
|
+
Input: hubspot, salesforce or attio. The org must have it connected and a
|
|
776
|
+
Customer DB. The first time, Deepline creates its default objects and starts
|
|
777
|
+
a setup run (state starting); later, paused objects resume.
|
|
778
|
+
Output: the change counts and the provider's resulting sync state.
|
|
779
|
+
Cost: Does not spend credits.`
|
|
780
|
+
},
|
|
781
|
+
"integrations sync off": {
|
|
782
|
+
core: `Purpose: Turn a provider's CRM sync off.
|
|
783
|
+
Input: hubspot, salesforce or attio. Every object stops syncing; data already
|
|
784
|
+
in the Customer DB stays.
|
|
785
|
+
Output: the change counts and the provider's resulting state (off).
|
|
786
|
+
Cost: Does not spend credits.`
|
|
787
|
+
},
|
|
788
|
+
"integrations sync pause": {
|
|
789
|
+
core: `Purpose: Pause individual objects while the rest of the sync continues.
|
|
790
|
+
Input: the provider and one or more object names from objects <provider>.
|
|
791
|
+
An unknown object name fails (exit 4) and lists the synced objects. To stop
|
|
792
|
+
the whole sync use off.
|
|
793
|
+
Output: pausedCount and the provider's resulting state.
|
|
794
|
+
Cost: Does not spend credits.`
|
|
795
|
+
},
|
|
796
|
+
"integrations sync resume": {
|
|
797
|
+
core: `Purpose: Resume individual paused objects.
|
|
798
|
+
Input: the provider and one or more object names from objects <provider>.
|
|
799
|
+
An unknown object name fails (exit 4). Resuming does not turn on a sync
|
|
800
|
+
that is off; use on.
|
|
801
|
+
Output: resumedCount and the provider's resulting state.
|
|
802
|
+
Cost: Does not spend credits.`
|
|
803
|
+
},
|
|
804
|
+
"integrations sync run": {
|
|
805
|
+
core: `Purpose: Sync now instead of waiting for the schedule.
|
|
806
|
+
Input: the provider, and optionally object names; with none, every synced
|
|
807
|
+
object, paused ones included, as the sync page's Run all now does. The sync
|
|
808
|
+
must be on (exit 7 with SYNC_OFF otherwise). A paused object runs once and
|
|
809
|
+
stays paused.
|
|
810
|
+
Output: queuedCount and the provider's resulting state.
|
|
811
|
+
Cost: Does not spend Deepline credits; reads the provider's API.`
|
|
708
812
|
},
|
|
709
813
|
"integrations discover-ad-accounts": {
|
|
710
814
|
core: `Purpose: Discover and save the ad accounts a connected provider can access in the selected workspace.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PlayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AAOXS3XM.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2US3VJXX.mjs";
|
|
8
8
|
|
|
9
9
|
// src/plays/local-play-execution.ts
|
|
10
10
|
function importedNodes(graph) {
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DEFAULT_SUMMARY_WIDTH
|
|
3
|
-
} from "./chunk-5AEDYVB6.mjs";
|
|
4
|
-
import {
|
|
5
|
-
discoveryAuthLines
|
|
6
|
-
} from "./chunk-BM4GE67C.mjs";
|
|
7
|
-
import "./chunk-STXDSVQZ.mjs";
|
|
8
|
-
import "./chunk-PSX3WHIH.mjs";
|
|
9
|
-
import {
|
|
10
|
-
renderCommandEnvelopeText
|
|
11
|
-
} from "./chunk-GVRVZQBY.mjs";
|
|
12
|
-
import "./chunk-UMJWODG7.mjs";
|
|
13
|
-
import "./chunk-XDZZCRUG.mjs";
|
|
14
|
-
import "./chunk-ASB47RXJ.mjs";
|
|
15
|
-
import "./chunk-DLIRSHV6.mjs";
|
|
16
|
-
import "./chunk-Z3A2S3QM.mjs";
|
|
17
|
-
import "./chunk-2MGZAI54.mjs";
|
|
18
|
-
import "./chunk-AYNDNXBJ.mjs";
|
|
19
|
-
import "./chunk-WZYKRD7T.mjs";
|
|
20
1
|
import {
|
|
21
2
|
__commonJS,
|
|
22
3
|
__toESM
|
|
@@ -5733,184 +5714,6 @@ function formatTextTable(rows, columns) {
|
|
|
5733
5714
|
}).split("\n").map((line) => line.trimEnd()).join("\n").trimEnd();
|
|
5734
5715
|
}
|
|
5735
5716
|
|
|
5736
|
-
// src/cli/search-output.ts
|
|
5737
|
-
function clipSummary(value, width) {
|
|
5738
|
-
const characters = Array.from(value.replace(/\s+/gu, " ").trim());
|
|
5739
|
-
return characters.length <= width ? characters.join("") : `${characters.slice(0, width - 1).join("")}\u2026`;
|
|
5740
|
-
}
|
|
5741
|
-
function toolPrice(item) {
|
|
5742
|
-
const pricing = item.pricing;
|
|
5743
|
-
if (!pricing) return item.kind === "tool" ? "unknown" : "\u2014";
|
|
5744
|
-
if (item.billingSource === "own_provider_credentials") return "0 (byok)";
|
|
5745
|
-
if (pricing.benefit?.status === "included")
|
|
5746
|
-
return typeof pricing.benefit.remaining === "number" ? `0 (${pricing.benefit.remaining.toLocaleString("en-US")} free left)*` : "0 (included)*";
|
|
5747
|
-
if (pricing.benefit?.status === "unavailable")
|
|
5748
|
-
return "inclusion unavailable*";
|
|
5749
|
-
if (pricing.benefit?.status === "exhausted" && typeof pricing.creditsPerUnit === "number")
|
|
5750
|
-
return `${pricing.creditsPerUnit}/${pricing.unit ?? "result"}*`;
|
|
5751
|
-
const range = pricing.estimatedRange;
|
|
5752
|
-
if (range)
|
|
5753
|
-
return `${range.minCreditsPerUnit}\u2013${range.maxCreditsPerUnit}/${pricing.unit} (estimate)*`;
|
|
5754
|
-
const observed = pricing.observedReference;
|
|
5755
|
-
if (observed) return `${observed.creditsPerCall}/call (observed)*`;
|
|
5756
|
-
const observedAvg = pricing.observedMax;
|
|
5757
|
-
if (observedAvg?.avgCreditsPerCall && observedAvg.sampleCount)
|
|
5758
|
-
return `variable, ${observedAvg.avgCreditsPerCall} avg*`;
|
|
5759
|
-
const display = pricing.displayText ?? "";
|
|
5760
|
-
const footnote = pricing.summary || pricing.details?.length || pricing.observedMax ? "*" : "";
|
|
5761
|
-
const rate = display.match(
|
|
5762
|
-
/^([\d.,]+) Deepline credits(?: \/ \$[\d.,]+)? per (call|result|page|item|basic profile|full profile)( \(estimate\))?$/
|
|
5763
|
-
);
|
|
5764
|
-
if (rate) return `${rate[1]}/${rate[2]}${rate[3] ?? ""}${footnote}`;
|
|
5765
|
-
if (pricing.creditsPerUnit === 0 && /^Free\b/.test(display))
|
|
5766
|
-
return `0 (free)${footnote}`;
|
|
5767
|
-
if (!display || display === "Pricing unavailable.")
|
|
5768
|
-
return `unknown${footnote}`;
|
|
5769
|
-
return pricing.unit === "usage" ? "usage-based*" : "variable*";
|
|
5770
|
-
}
|
|
5771
|
-
var RATE_WINDOW_UNITS = {
|
|
5772
|
-
1e3: "s",
|
|
5773
|
-
6e4: "min",
|
|
5774
|
-
36e5: "hr"
|
|
5775
|
-
};
|
|
5776
|
-
function rateLimitDisplay(item) {
|
|
5777
|
-
const limits = (Array.isArray(item.rateLimits) ? item.rateLimits : []).filter(
|
|
5778
|
-
(limit) => typeof limit?.requestsPerWindow === "number" && typeof limit?.windowMs === "number" && limit.windowMs > 0
|
|
5779
|
-
);
|
|
5780
|
-
const [tightest] = limits.sort(
|
|
5781
|
-
(a, b) => a.requestsPerWindow / a.windowMs - b.requestsPerWindow / b.windowMs
|
|
5782
|
-
);
|
|
5783
|
-
return tightest ? `${tightest.requestsPerWindow}/${RATE_WINDOW_UNITS[tightest.windowMs] ?? `${tightest.windowMs / 1e3}s`}` : "\u2014";
|
|
5784
|
-
}
|
|
5785
|
-
function failureRateDisplay(rate) {
|
|
5786
|
-
if (typeof rate !== "number") return "\u2014";
|
|
5787
|
-
const percent = Math.round(rate * 100);
|
|
5788
|
-
return percent === 0 && rate > 0 ? "<1%" : `${percent}%`;
|
|
5789
|
-
}
|
|
5790
|
-
function latencyDisplay(ms) {
|
|
5791
|
-
if (typeof ms !== "number" || !Number.isFinite(ms)) return "\u2014";
|
|
5792
|
-
if (ms < 1e3) return `${Math.round(ms)}ms`;
|
|
5793
|
-
if (ms < 6e4) return `${(ms / 1e3).toFixed(ms < 1e4 ? 1 : 0)}s`;
|
|
5794
|
-
return `${(ms / 6e4).toFixed(1)}min`;
|
|
5795
|
-
}
|
|
5796
|
-
function searchRow(item, summaryWidth) {
|
|
5797
|
-
const observedCost = item.observedCost;
|
|
5798
|
-
const notes = [];
|
|
5799
|
-
let cost;
|
|
5800
|
-
if (!observedCost) {
|
|
5801
|
-
cost = toolPrice(item);
|
|
5802
|
-
} else if (observedCost.status === "available") {
|
|
5803
|
-
cost = `${observedCost.avgCredits}/${observedCost.unit} (observed)`;
|
|
5804
|
-
} else {
|
|
5805
|
-
cost = observedCost.typical ? `${observedCost.typical.lowCredits}\u2013${observedCost.typical.highCredits}/${observedCost.typical.unit} (typical)` : "no data yet";
|
|
5806
|
-
notes.push(`Cost: ${observedCost.displayText}`);
|
|
5807
|
-
}
|
|
5808
|
-
if (item.auth?.connectionRequired && typeof item.connectionMessage === "string") {
|
|
5809
|
-
notes.push(item.connectionMessage);
|
|
5810
|
-
} else if (item.connected === false && item.credentialStatus === "managed") {
|
|
5811
|
-
notes.push("Temporarily unavailable.");
|
|
5812
|
-
}
|
|
5813
|
-
return {
|
|
5814
|
-
id: item.id,
|
|
5815
|
-
kind: item.kind,
|
|
5816
|
-
cost,
|
|
5817
|
-
rateLimit: rateLimitDisplay(item),
|
|
5818
|
-
// Production share of errored or rate-limited calls; absent when too few
|
|
5819
|
-
// calls or orgs used the tool to say.
|
|
5820
|
-
failureRate: failureRateDisplay(item.failureRate),
|
|
5821
|
-
// Production share of calls that returned a result; same floor.
|
|
5822
|
-
hitRate: failureRateDisplay(item.hitRate),
|
|
5823
|
-
// Production p95 latency of successful calls; absent for the same reason.
|
|
5824
|
-
p95: latencyDisplay(item.latencyP95Ms),
|
|
5825
|
-
summary: clipSummary(item.description ?? "", summaryWidth),
|
|
5826
|
-
notes
|
|
5827
|
-
};
|
|
5828
|
-
}
|
|
5829
|
-
var SEARCH_KIND_COLUMN_ENABLED = false;
|
|
5830
|
-
var OPTIONAL_COLUMNS = [
|
|
5831
|
-
{ header: "RATE LIMIT", key: "rateLimit" },
|
|
5832
|
-
{ header: "FAILURES", key: "failureRate" },
|
|
5833
|
-
{ header: "HIT RATE", key: "hitRate" },
|
|
5834
|
-
{ header: "P95", key: "p95" }
|
|
5835
|
-
];
|
|
5836
|
-
function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
|
|
5837
|
-
if (result.results.length === 0)
|
|
5838
|
-
return renderCommandEnvelopeText(result);
|
|
5839
|
-
const rows = result.results.map((item) => searchRow(item, summaryWidth));
|
|
5840
|
-
const kinds = new Set(rows.map((row) => row.kind));
|
|
5841
|
-
const onlyTools = kinds.size === 1 && kinds.has("tool");
|
|
5842
|
-
const columns = [
|
|
5843
|
-
{ header: onlyTools ? "TOOL" : "ID", value: (row) => row.id },
|
|
5844
|
-
...SEARCH_KIND_COLUMN_ENABLED && !onlyTools ? [{ header: "KIND", value: (row) => row.kind }] : [],
|
|
5845
|
-
{ header: "CREDITS", value: (row) => row.cost, alignment: "right" },
|
|
5846
|
-
// Right-aligned figures that appear only when some row has one.
|
|
5847
|
-
...OPTIONAL_COLUMNS.filter(
|
|
5848
|
-
({ key }) => rows.some((row) => row[key] !== "\u2014")
|
|
5849
|
-
).map(({ header, key }) => ({
|
|
5850
|
-
header,
|
|
5851
|
-
value: (row) => row[key],
|
|
5852
|
-
alignment: "right"
|
|
5853
|
-
})),
|
|
5854
|
-
{ header: "SUMMARY", value: (row) => row.summary }
|
|
5855
|
-
];
|
|
5856
|
-
const render = result.render;
|
|
5857
|
-
const sections = render?.sections ?? [];
|
|
5858
|
-
const resultIndex = sections.findIndex(
|
|
5859
|
-
({ title: title2 }) => title2 !== "ignored categories" && title2 !== "exact tool lookup"
|
|
5860
|
-
);
|
|
5861
|
-
const title = sections[resultIndex]?.title ?? `${result.total ?? rows.length} matches \u2014 showing ${rows.length}`;
|
|
5862
|
-
const remaining = {
|
|
5863
|
-
sections: sections.filter(
|
|
5864
|
-
({ title: title2 }, index) => index !== resultIndex && title2 !== "exact tool lookup"
|
|
5865
|
-
),
|
|
5866
|
-
actions: render?.actions
|
|
5867
|
-
};
|
|
5868
|
-
const followUps = remaining.sections?.length || remaining.actions?.length ? `
|
|
5869
|
-
${renderCommandEnvelopeText({ render: remaining })}` : "";
|
|
5870
|
-
const exact = result.exactLookup?.toolId;
|
|
5871
|
-
const matched = exact && result.results.find((item) => item.id === exact);
|
|
5872
|
-
const contract = matched ? [
|
|
5873
|
-
...matched.toolUsage?.effect ? [`Effect: ${matched.toolUsage.effect}`] : [],
|
|
5874
|
-
...(matched.toolUsage?.requiredInputs ?? []).map(
|
|
5875
|
-
({ name, meaning }) => ` ${name}${meaning ? ` \u2014 ${meaning}` : ""}`
|
|
5876
|
-
),
|
|
5877
|
-
...matched.auth ? discoveryAuthLines(matched.auth) : [],
|
|
5878
|
-
...matched.describeCommand ? [matched.describeCommand] : [],
|
|
5879
|
-
...matched.toolUsage?.example ? [matched.toolUsage.example.cli] : []
|
|
5880
|
-
] : [];
|
|
5881
|
-
const missingConnections = /* @__PURE__ */ new Set();
|
|
5882
|
-
for (const item of result.results) {
|
|
5883
|
-
if (item.id === exact || item.auth?.connectionRequired || item.credentialStatus !== "requires_connection")
|
|
5884
|
-
continue;
|
|
5885
|
-
const provider = typeof item.provider === "string" && item.provider.trim();
|
|
5886
|
-
missingConnections.add(provider || item.id);
|
|
5887
|
-
}
|
|
5888
|
-
const notes = [...missingConnections].map(
|
|
5889
|
-
(provider) => ` ${provider}: Not connected. Connect to use tools that require your credentials. See deepline describe <toolId> for setup.`
|
|
5890
|
-
);
|
|
5891
|
-
notes.push(
|
|
5892
|
-
...rows.flatMap((row) => row.notes.map((note) => ` ${row.id}: ${note}`))
|
|
5893
|
-
);
|
|
5894
|
-
const details = [
|
|
5895
|
-
...notes.length ? ["Notes", ...notes, ""] : [],
|
|
5896
|
-
rows.some((row) => row.cost.endsWith("*")) ? "* See deepline describe <toolId> for full pricing information." : "Full descriptions and pricing: deepline describe <toolId>."
|
|
5897
|
-
].join("\n");
|
|
5898
|
-
const exactContract = contract.length ? `
|
|
5899
|
-
|
|
5900
|
-
Exact match
|
|
5901
|
-
${contract.join("\n")}` : "";
|
|
5902
|
-
const exactMiss = result.exactLookup?.status !== "found" ? result.exactLookup?.message : void 0;
|
|
5903
|
-
return `${exactMiss ? `${exactMiss}
|
|
5904
|
-
|
|
5905
|
-
` : ""}${title}
|
|
5906
|
-
|
|
5907
|
-
${formatTextTable(rows, columns)}${exactContract}
|
|
5908
|
-
|
|
5909
|
-
${details}
|
|
5910
|
-
${followUps}`;
|
|
5911
|
-
}
|
|
5912
5717
|
export {
|
|
5913
|
-
|
|
5914
|
-
SEARCH_KIND_COLUMN_ENABLED,
|
|
5915
|
-
renderSearchResults
|
|
5718
|
+
formatTextTable
|
|
5916
5719
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFXRSHBRPjs = require('./chunk-FXRSHBRP.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkGE62FFN6js = require('./chunk-GE62FFN6.js');
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
|
-
var DeeplineClient2 = class extends
|
|
10
|
+
var DeeplineClient2 = class extends _chunkFXRSHBRPjs.DeeplineClient {
|
|
11
11
|
constructor(options) {
|
|
12
|
-
const config =
|
|
13
|
-
super(config, new (0,
|
|
12
|
+
const config = _chunkGE62FFN6js.resolveConfig.call(void 0, options);
|
|
13
|
+
super(config, new (0, _chunkGE62FFN6js.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -692,6 +692,7 @@ Input and output:
|
|
|
692
692
|
reconnect, disconnect, and delete act on existing org authorizations.
|
|
693
693
|
Pass --provider when the same name occurs for more than one provider.
|
|
694
694
|
verify <domain> checks an existing Google Admin grant and enables it locally.
|
|
695
|
+
sync shows and controls CRM syncs into the Customer DB (see sync --help).
|
|
695
696
|
Scope changes require provider approval; a Play's connection selection
|
|
696
697
|
cannot expand granted access.
|
|
697
698
|
SDK:
|
|
@@ -705,6 +706,109 @@ Examples:
|
|
|
705
706
|
deepline integrations list --json
|
|
706
707
|
deepline integrations get deepline.com --json
|
|
707
708
|
`
|
|
709
|
+
},
|
|
710
|
+
"integrations sync": {
|
|
711
|
+
core: `
|
|
712
|
+
Purpose:
|
|
713
|
+
Show and control the CRM syncs that copy HubSpot, Salesforce and Attio
|
|
714
|
+
objects into the org's Customer DB. Same state and controls as the
|
|
715
|
+
dashboard sync page (Integrations > Sync).
|
|
716
|
+
Input and output:
|
|
717
|
+
status lists each provider's state, as the Integrations list shows it;
|
|
718
|
+
status <provider> shows one. objects <provider> lists its synced objects.
|
|
719
|
+
on <provider> and off <provider> turn its whole sync on or off.
|
|
720
|
+
pause <provider> <objects...> and resume <provider> <objects...> stop or
|
|
721
|
+
restart individual objects (for example tickets) while the rest sync.
|
|
722
|
+
run <provider> [objects...] syncs now instead of waiting for the schedule.
|
|
723
|
+
Object names are the object column of objects <provider>.
|
|
724
|
+
States:
|
|
725
|
+
off: the sync is turned off; nothing is copied.
|
|
726
|
+
starting: turned on; its first setup run is in progress.
|
|
727
|
+
on: turned on and every active object synced on schedule.
|
|
728
|
+
needs_attention: turned on, but objects failed, are overdue, have never
|
|
729
|
+
synced, are all paused, setup failed, or the Customer DB is
|
|
730
|
+
unavailable. reason and label say which.
|
|
731
|
+
unknown: turned on, but no sync has recorded its status yet; the next
|
|
732
|
+
scheduled check records it.
|
|
733
|
+
An object is overdue when its scheduled run is more than 20 minutes late.
|
|
734
|
+
SDK:
|
|
735
|
+
client.integrations.sync exposes status, get, objects, set, pause, resume
|
|
736
|
+
and run.
|
|
737
|
+
Cost:
|
|
738
|
+
These commands do not spend Deepline credits. Syncing reads from the
|
|
739
|
+
provider's API under the org's connection.
|
|
740
|
+
Examples:
|
|
741
|
+
deepline integrations sync status --json
|
|
742
|
+
deepline integrations sync on hubspot
|
|
743
|
+
deepline integrations sync pause hubspot tickets quotes
|
|
744
|
+
`
|
|
745
|
+
},
|
|
746
|
+
"integrations sync status": {
|
|
747
|
+
core: `Purpose: Show CRM sync state, as the Integrations list shows it.
|
|
748
|
+
Input: no provider for every CRM; a provider (hubspot, salesforce, attio) for
|
|
749
|
+
one.
|
|
750
|
+
Output: state (off, starting, on, needs_attention, unknown), reason, label
|
|
751
|
+
(the Integrations list text), sync_enabled, last_success_at, connector_status
|
|
752
|
+
(healthy, error, unknown as the sync last recorded it) and object counts:
|
|
753
|
+
total, active, paused, failed, backfilling, scheduled, never_synced, and
|
|
754
|
+
overdue (none, some or all scheduled objects past due). Counts come from the
|
|
755
|
+
last recorded sync check, overdue from the current time, so a sync that
|
|
756
|
+
stopped running still reads as overdue. objects is null when the sync is off
|
|
757
|
+
or nothing is recorded yet. This command never reads the Customer DB.
|
|
758
|
+
[[cli:--json prints GET /api/v2/ingestion/sync-status (one provider's entry
|
|
759
|
+
with a provider).]]
|
|
760
|
+
Cost: Does not spend credits.`
|
|
761
|
+
},
|
|
762
|
+
"integrations sync objects": {
|
|
763
|
+
core: `Purpose: List one provider's synced objects, as the sync page does.
|
|
764
|
+
Input: hubspot, salesforce or attio.
|
|
765
|
+
Output: the provider's state and every object: object_type, status, health
|
|
766
|
+
(healthy, paused, last_sync_failed, sync_overdue, no_successful_sync),
|
|
767
|
+
frequency, next run, last success and last error, read from the Customer DB.
|
|
768
|
+
Reads every page. Fails when the Customer DB read fails.
|
|
769
|
+
[[cli:--json prints the state and all objects from
|
|
770
|
+
GET /api/v2/ingestion/providers/<provider>/sync.]]
|
|
771
|
+
Cost: Does not spend credits.`
|
|
772
|
+
},
|
|
773
|
+
"integrations sync on": {
|
|
774
|
+
core: `Purpose: Turn a provider's CRM sync on.
|
|
775
|
+
Input: hubspot, salesforce or attio. The org must have it connected and a
|
|
776
|
+
Customer DB. The first time, Deepline creates its default objects and starts
|
|
777
|
+
a setup run (state starting); later, paused objects resume.
|
|
778
|
+
Output: the change counts and the provider's resulting sync state.
|
|
779
|
+
Cost: Does not spend credits.`
|
|
780
|
+
},
|
|
781
|
+
"integrations sync off": {
|
|
782
|
+
core: `Purpose: Turn a provider's CRM sync off.
|
|
783
|
+
Input: hubspot, salesforce or attio. Every object stops syncing; data already
|
|
784
|
+
in the Customer DB stays.
|
|
785
|
+
Output: the change counts and the provider's resulting state (off).
|
|
786
|
+
Cost: Does not spend credits.`
|
|
787
|
+
},
|
|
788
|
+
"integrations sync pause": {
|
|
789
|
+
core: `Purpose: Pause individual objects while the rest of the sync continues.
|
|
790
|
+
Input: the provider and one or more object names from objects <provider>.
|
|
791
|
+
An unknown object name fails (exit 4) and lists the synced objects. To stop
|
|
792
|
+
the whole sync use off.
|
|
793
|
+
Output: pausedCount and the provider's resulting state.
|
|
794
|
+
Cost: Does not spend credits.`
|
|
795
|
+
},
|
|
796
|
+
"integrations sync resume": {
|
|
797
|
+
core: `Purpose: Resume individual paused objects.
|
|
798
|
+
Input: the provider and one or more object names from objects <provider>.
|
|
799
|
+
An unknown object name fails (exit 4). Resuming does not turn on a sync
|
|
800
|
+
that is off; use on.
|
|
801
|
+
Output: resumedCount and the provider's resulting state.
|
|
802
|
+
Cost: Does not spend credits.`
|
|
803
|
+
},
|
|
804
|
+
"integrations sync run": {
|
|
805
|
+
core: `Purpose: Sync now instead of waiting for the schedule.
|
|
806
|
+
Input: the provider, and optionally object names; with none, every synced
|
|
807
|
+
object, paused ones included, as the sync page's Run all now does. The sync
|
|
808
|
+
must be on (exit 7 with SYNC_OFF otherwise). A paused object runs once and
|
|
809
|
+
stays paused.
|
|
810
|
+
Output: queuedCount and the provider's resulting state.
|
|
811
|
+
Cost: Does not spend Deepline credits; reads the provider's API.`
|
|
708
812
|
},
|
|
709
813
|
"integrations discover-ad-accounts": {
|
|
710
814
|
core: `Purpose: Discover and save the ad accounts a connected provider can access in the selected workspace.
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkP6BVT2OWjs = require('./chunk-P6BVT2OW.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkH3NH5RJ6js = require('./chunk-H3NH5RJ6.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkZEKRYFMNjs = require('./chunk-ZEKRYFMN.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkJ5QAOURJjs = require('./chunk-J5QAOURJ.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkGE62FFN6js = require('./chunk-GE62FFN6.js');
|
|
21
21
|
|
|
22
22
|
// src/cli/commands/update.ts
|
|
23
23
|
var _child_process = require('child_process');
|
|
@@ -499,7 +499,7 @@ function normalizedNpmPrefix(value) {
|
|
|
499
499
|
}
|
|
500
500
|
function resolveNpmGlobalPrefix(env) {
|
|
501
501
|
try {
|
|
502
|
-
const plan =
|
|
502
|
+
const plan = _chunkZEKRYFMNjs.resolveShellSpawn.call(void 0,
|
|
503
503
|
"npm",
|
|
504
504
|
["prefix", "-g"],
|
|
505
505
|
process.platform,
|
|
@@ -561,8 +561,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
561
561
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
562
562
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
563
563
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
564
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
565
|
-
const npmGlobalInstallFlags =
|
|
564
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkP6BVT2OWjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
565
|
+
const npmGlobalInstallFlags = _chunkP6BVT2OWjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
566
566
|
const args = installPrefix ? [
|
|
567
567
|
"install",
|
|
568
568
|
"-g",
|
|
@@ -572,7 +572,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
572
572
|
packageSpec
|
|
573
573
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
574
574
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
575
|
-
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) ||
|
|
575
|
+
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunkGE62FFN6js.autoDetectBaseUrl.call(void 0, )
|
|
576
576
|
);
|
|
577
577
|
return {
|
|
578
578
|
kind: "npm-global",
|
|
@@ -821,7 +821,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
821
821
|
function runCommand(command, args, env = process.env) {
|
|
822
822
|
return new Promise((resolveResult) => {
|
|
823
823
|
let output = "";
|
|
824
|
-
const plan =
|
|
824
|
+
const plan = _chunkZEKRYFMNjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
825
825
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
826
826
|
windowsHide: true,
|
|
827
827
|
stdio: ["inherit", "pipe", "pipe"],
|
|
@@ -1169,7 +1169,7 @@ function normalizePinnedVersion(value) {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
async function readPinMetadata(registryUrl, version) {
|
|
1171
1171
|
const controller = new AbortController();
|
|
1172
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
1172
|
+
const timeout = setTimeout(() => controller.abort(), _chunkGE62FFN6js.DEFAULT_TIMEOUT);
|
|
1173
1173
|
try {
|
|
1174
1174
|
const response = await fetch(
|
|
1175
1175
|
new URL(
|
|
@@ -1185,7 +1185,7 @@ async function readPinMetadata(registryUrl, version) {
|
|
|
1185
1185
|
if (!response.ok) {
|
|
1186
1186
|
return {
|
|
1187
1187
|
kind: "miss",
|
|
1188
|
-
transient:
|
|
1188
|
+
transient: _chunkGE62FFN6js.TRANSIENT_HTTP_STATUSES.has(response.status),
|
|
1189
1189
|
error: new Error(`${registryUrl} returned HTTP ${response.status}`)
|
|
1190
1190
|
};
|
|
1191
1191
|
}
|
|
@@ -1219,8 +1219,8 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl, retry =
|
|
|
1219
1219
|
"https://registry.npmjs.org/",
|
|
1220
1220
|
...fallbackRegistryUrl ? [fallbackRegistryUrl] : []
|
|
1221
1221
|
];
|
|
1222
|
-
const maxRetries = _nullishCoalesce(retry.maxRetries, () => (
|
|
1223
|
-
const backoffMs = _nullishCoalesce(retry.backoffMs, () => (
|
|
1222
|
+
const maxRetries = _nullishCoalesce(retry.maxRetries, () => ( _chunkGE62FFN6js.DEFAULT_MAX_RETRIES));
|
|
1223
|
+
const backoffMs = _nullishCoalesce(retry.backoffMs, () => ( _chunkGE62FFN6js.defaultRetryBackoffMs));
|
|
1224
1224
|
let lastError = null;
|
|
1225
1225
|
for (let round = 1; ; round += 1) {
|
|
1226
1226
|
let transientOnly = true;
|
|
@@ -1283,14 +1283,14 @@ async function resolveInstalledVersionIfLatest(plan) {
|
|
|
1283
1283
|
return null;
|
|
1284
1284
|
}
|
|
1285
1285
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1286
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1286
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkGE62FFN6js.autoDetectBaseUrl));
|
|
1287
1287
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1288
1288
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1289
1289
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1290
1290
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1291
1291
|
process.stdout.write = (() => true);
|
|
1292
1292
|
try {
|
|
1293
|
-
const exitCode = await
|
|
1293
|
+
const exitCode = await _chunkH3NH5RJ6js.runSkillsCommand.call(void 0, { json: true });
|
|
1294
1294
|
if (exitCode !== 0) {
|
|
1295
1295
|
throw new Error(
|
|
1296
1296
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1363,7 +1363,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
if (options.json && !options.executeWithJson) {
|
|
1365
1365
|
const upToDateVersion2 = pinnedVersion || options.force ? null : await resolveUpToDateVersion(plan);
|
|
1366
|
-
|
|
1366
|
+
_chunkJ5QAOURJjs.printCommandEnvelope.call(void 0,
|
|
1367
1367
|
{
|
|
1368
1368
|
...plan,
|
|
1369
1369
|
updated: false,
|
|
@@ -1375,7 +1375,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1375
1375
|
return 0;
|
|
1376
1376
|
}
|
|
1377
1377
|
if (options.printCommand) {
|
|
1378
|
-
|
|
1378
|
+
_chunkJ5QAOURJjs.printCommandEnvelope.call(void 0,
|
|
1379
1379
|
{
|
|
1380
1380
|
...plan,
|
|
1381
1381
|
render: {
|
|
@@ -1388,7 +1388,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1388
1388
|
return 0;
|
|
1389
1389
|
}
|
|
1390
1390
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1391
|
-
|
|
1391
|
+
_chunkJ5QAOURJjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1392
1392
|
return 0;
|
|
1393
1393
|
}
|
|
1394
1394
|
const upToDateVersion = pinnedVersion || options.force ? null : await resolveUpToDateVersion(plan);
|
|
@@ -1426,7 +1426,7 @@ To retry with full installer output, run: deepline skills install
|
|
|
1426
1426
|
);
|
|
1427
1427
|
}
|
|
1428
1428
|
if (options.executeWithJson && options.json) {
|
|
1429
|
-
|
|
1429
|
+
_chunkJ5QAOURJjs.printCommandEnvelope.call(void 0,
|
|
1430
1430
|
{
|
|
1431
1431
|
ok: true,
|
|
1432
1432
|
pinnedVersion,
|