@lhremote/core 0.7.0 → 0.9.0
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/cdp/app-discovery.d.ts +57 -0
- package/dist/cdp/app-discovery.d.ts.map +1 -1
- package/dist/cdp/app-discovery.js +90 -7
- package/dist/cdp/app-discovery.js.map +1 -1
- package/dist/cdp/app-discovery.test.js +180 -9
- package/dist/cdp/app-discovery.test.js.map +1 -1
- package/dist/cdp/client.d.ts +8 -1
- package/dist/cdp/client.d.ts.map +1 -1
- package/dist/cdp/client.js +8 -1
- package/dist/cdp/client.js.map +1 -1
- package/dist/cdp/discovery.d.ts.map +1 -1
- package/dist/cdp/discovery.js +5 -1
- package/dist/cdp/discovery.js.map +1 -1
- package/dist/cdp/discovery.test.js +7 -0
- package/dist/cdp/discovery.test.js.map +1 -1
- package/dist/cdp/index.d.ts +1 -1
- package/dist/cdp/index.d.ts.map +1 -1
- package/dist/cdp/index.js +1 -1
- package/dist/cdp/index.js.map +1 -1
- package/dist/cdp/instance-discovery.d.ts.map +1 -1
- package/dist/cdp/instance-discovery.js +25 -10
- package/dist/cdp/instance-discovery.js.map +1 -1
- package/dist/cdp/instance-discovery.test.js +17 -0
- package/dist/cdp/instance-discovery.test.js.map +1 -1
- package/dist/cdp/testing/launch-chromium.d.ts +1 -1
- package/dist/cdp/testing/launch-chromium.js +2 -2
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +3 -0
- package/dist/db/client.js.map +1 -1
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +1 -1
- package/dist/db/index.js.map +1 -1
- package/dist/db/repositories/action-budget.d.ts +29 -0
- package/dist/db/repositories/action-budget.d.ts.map +1 -0
- package/dist/db/repositories/action-budget.js +100 -0
- package/dist/db/repositories/action-budget.js.map +1 -0
- package/dist/db/repositories/action-budget.test.d.ts +2 -0
- package/dist/db/repositories/action-budget.test.d.ts.map +1 -0
- package/dist/db/repositories/action-budget.test.js +181 -0
- package/dist/db/repositories/action-budget.test.js.map +1 -0
- package/dist/db/repositories/campaign-hard-delete.integration.test.d.ts +2 -0
- package/dist/db/repositories/campaign-hard-delete.integration.test.d.ts.map +1 -0
- package/dist/db/repositories/campaign-hard-delete.integration.test.js +78 -0
- package/dist/db/repositories/campaign-hard-delete.integration.test.js.map +1 -0
- package/dist/db/repositories/campaign.d.ts +14 -0
- package/dist/db/repositories/campaign.d.ts.map +1 -1
- package/dist/db/repositories/campaign.js +125 -0
- package/dist/db/repositories/campaign.js.map +1 -1
- package/dist/db/repositories/collection-list.integration.test.js +6 -4
- package/dist/db/repositories/collection-list.integration.test.js.map +1 -1
- package/dist/db/repositories/index.d.ts +1 -0
- package/dist/db/repositories/index.d.ts.map +1 -1
- package/dist/db/repositories/index.js +1 -0
- package/dist/db/repositories/index.js.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -7
- package/dist/index.js.map +1 -1
- package/dist/linkedin/__tests__/dom-automation.integration.test.d.ts +2 -0
- package/dist/linkedin/__tests__/dom-automation.integration.test.d.ts.map +1 -0
- package/dist/linkedin/__tests__/dom-automation.integration.test.js +160 -0
- package/dist/linkedin/__tests__/dom-automation.integration.test.js.map +1 -0
- package/dist/linkedin/dom-automation-retry.test.d.ts +2 -0
- package/dist/linkedin/dom-automation-retry.test.d.ts.map +1 -0
- package/dist/linkedin/dom-automation-retry.test.js +51 -0
- package/dist/linkedin/dom-automation-retry.test.js.map +1 -0
- package/dist/linkedin/dom-automation.d.ts +224 -0
- package/dist/linkedin/dom-automation.d.ts.map +1 -0
- package/dist/linkedin/dom-automation.js +614 -0
- package/dist/linkedin/dom-automation.js.map +1 -0
- package/dist/linkedin/humanized-mouse.d.ts +69 -0
- package/dist/linkedin/humanized-mouse.d.ts.map +1 -0
- package/dist/linkedin/humanized-mouse.js +109 -0
- package/dist/linkedin/humanized-mouse.js.map +1 -0
- package/dist/linkedin/index.d.ts +4 -0
- package/dist/linkedin/index.d.ts.map +1 -0
- package/dist/linkedin/index.js +6 -0
- package/dist/linkedin/index.js.map +1 -0
- package/dist/linkedin/selectors.d.ts +67 -0
- package/dist/linkedin/selectors.d.ts.map +1 -0
- package/dist/linkedin/selectors.js +74 -0
- package/dist/linkedin/selectors.js.map +1 -0
- package/dist/operations/add-people-to-collection.d.ts +1 -1
- package/dist/operations/add-people-to-collection.d.ts.map +1 -1
- package/dist/operations/add-people-to-collection.js +3 -6
- package/dist/operations/add-people-to-collection.js.map +1 -1
- package/dist/operations/build-linkedin-url.test.d.ts +2 -0
- package/dist/operations/build-linkedin-url.test.d.ts.map +1 -0
- package/dist/operations/build-linkedin-url.test.js +158 -0
- package/dist/operations/build-linkedin-url.test.js.map +1 -0
- package/dist/operations/campaign-add-action.d.ts +1 -1
- package/dist/operations/campaign-add-action.d.ts.map +1 -1
- package/dist/operations/campaign-add-action.js +3 -6
- package/dist/operations/campaign-add-action.js.map +1 -1
- package/dist/operations/campaign-create.d.ts +1 -1
- package/dist/operations/campaign-create.d.ts.map +1 -1
- package/dist/operations/campaign-create.js +3 -6
- package/dist/operations/campaign-create.js.map +1 -1
- package/dist/operations/campaign-delete.d.ts +7 -3
- package/dist/operations/campaign-delete.d.ts.map +1 -1
- package/dist/operations/campaign-delete.js +12 -8
- package/dist/operations/campaign-delete.js.map +1 -1
- package/dist/operations/campaign-delete.test.js +41 -1
- package/dist/operations/campaign-delete.test.js.map +1 -1
- package/dist/operations/campaign-erase.d.ts +19 -0
- package/dist/operations/campaign-erase.d.ts.map +1 -0
- package/dist/operations/campaign-erase.js +19 -0
- package/dist/operations/campaign-erase.js.map +1 -0
- package/dist/operations/campaign-erase.test.d.ts +2 -0
- package/dist/operations/campaign-erase.test.d.ts.map +1 -0
- package/dist/operations/campaign-erase.test.js +101 -0
- package/dist/operations/campaign-erase.test.js.map +1 -0
- package/dist/operations/campaign-exclude-add.d.ts +1 -1
- package/dist/operations/campaign-exclude-add.d.ts.map +1 -1
- package/dist/operations/campaign-exclude-add.js +3 -6
- package/dist/operations/campaign-exclude-add.js.map +1 -1
- package/dist/operations/campaign-exclude-list.d.ts +1 -1
- package/dist/operations/campaign-exclude-list.d.ts.map +1 -1
- package/dist/operations/campaign-exclude-list.js +3 -6
- package/dist/operations/campaign-exclude-list.js.map +1 -1
- package/dist/operations/campaign-exclude-remove.d.ts +1 -1
- package/dist/operations/campaign-exclude-remove.d.ts.map +1 -1
- package/dist/operations/campaign-exclude-remove.js +3 -6
- package/dist/operations/campaign-exclude-remove.js.map +1 -1
- package/dist/operations/campaign-export.d.ts +1 -1
- package/dist/operations/campaign-export.d.ts.map +1 -1
- package/dist/operations/campaign-export.js +3 -6
- package/dist/operations/campaign-export.js.map +1 -1
- package/dist/operations/campaign-get.d.ts +1 -1
- package/dist/operations/campaign-get.d.ts.map +1 -1
- package/dist/operations/campaign-get.js +3 -6
- package/dist/operations/campaign-get.js.map +1 -1
- package/dist/operations/campaign-list-people.d.ts +1 -1
- package/dist/operations/campaign-list-people.d.ts.map +1 -1
- package/dist/operations/campaign-list-people.js +3 -6
- package/dist/operations/campaign-list-people.js.map +1 -1
- package/dist/operations/campaign-list.d.ts +1 -1
- package/dist/operations/campaign-list.d.ts.map +1 -1
- package/dist/operations/campaign-list.js +3 -6
- package/dist/operations/campaign-list.js.map +1 -1
- package/dist/operations/campaign-move-next.d.ts +1 -1
- package/dist/operations/campaign-move-next.d.ts.map +1 -1
- package/dist/operations/campaign-move-next.js +3 -6
- package/dist/operations/campaign-move-next.js.map +1 -1
- package/dist/operations/campaign-remove-action.d.ts +1 -1
- package/dist/operations/campaign-remove-action.d.ts.map +1 -1
- package/dist/operations/campaign-remove-action.js +3 -6
- package/dist/operations/campaign-remove-action.js.map +1 -1
- package/dist/operations/campaign-remove-people.d.ts +1 -1
- package/dist/operations/campaign-remove-people.d.ts.map +1 -1
- package/dist/operations/campaign-remove-people.js +3 -6
- package/dist/operations/campaign-remove-people.js.map +1 -1
- package/dist/operations/campaign-reorder-actions.d.ts +1 -1
- package/dist/operations/campaign-reorder-actions.d.ts.map +1 -1
- package/dist/operations/campaign-reorder-actions.js +3 -6
- package/dist/operations/campaign-reorder-actions.js.map +1 -1
- package/dist/operations/campaign-retry.d.ts +1 -1
- package/dist/operations/campaign-retry.d.ts.map +1 -1
- package/dist/operations/campaign-retry.js +3 -6
- package/dist/operations/campaign-retry.js.map +1 -1
- package/dist/operations/campaign-start.d.ts +1 -1
- package/dist/operations/campaign-start.d.ts.map +1 -1
- package/dist/operations/campaign-start.js +3 -6
- package/dist/operations/campaign-start.js.map +1 -1
- package/dist/operations/campaign-statistics.d.ts +1 -1
- package/dist/operations/campaign-statistics.d.ts.map +1 -1
- package/dist/operations/campaign-statistics.js +3 -6
- package/dist/operations/campaign-statistics.js.map +1 -1
- package/dist/operations/campaign-status.d.ts +1 -1
- package/dist/operations/campaign-status.d.ts.map +1 -1
- package/dist/operations/campaign-status.js +3 -6
- package/dist/operations/campaign-status.js.map +1 -1
- package/dist/operations/campaign-stop.d.ts +1 -1
- package/dist/operations/campaign-stop.d.ts.map +1 -1
- package/dist/operations/campaign-stop.js +3 -6
- package/dist/operations/campaign-stop.js.map +1 -1
- package/dist/operations/campaign-update-action.d.ts +1 -1
- package/dist/operations/campaign-update-action.d.ts.map +1 -1
- package/dist/operations/campaign-update-action.js +3 -6
- package/dist/operations/campaign-update-action.js.map +1 -1
- package/dist/operations/campaign-update.d.ts +1 -1
- package/dist/operations/campaign-update.d.ts.map +1 -1
- package/dist/operations/campaign-update.js +3 -6
- package/dist/operations/campaign-update.js.map +1 -1
- package/dist/operations/check-replies.d.ts +3 -1
- package/dist/operations/check-replies.d.ts.map +1 -1
- package/dist/operations/check-replies.js +132 -17
- package/dist/operations/check-replies.js.map +1 -1
- package/dist/operations/check-replies.test.js +177 -17
- package/dist/operations/check-replies.test.js.map +1 -1
- package/dist/operations/collect-people.d.ts +1 -1
- package/dist/operations/collect-people.d.ts.map +1 -1
- package/dist/operations/collect-people.js +3 -6
- package/dist/operations/collect-people.js.map +1 -1
- package/dist/operations/comment-on-post.d.ts +37 -0
- package/dist/operations/comment-on-post.d.ts.map +1 -0
- package/dist/operations/comment-on-post.js +104 -0
- package/dist/operations/comment-on-post.js.map +1 -0
- package/dist/operations/comment-on-post.test.d.ts +2 -0
- package/dist/operations/comment-on-post.test.d.ts.map +1 -0
- package/dist/operations/comment-on-post.test.js +242 -0
- package/dist/operations/comment-on-post.test.js.map +1 -0
- package/dist/operations/create-collection.d.ts +1 -1
- package/dist/operations/create-collection.d.ts.map +1 -1
- package/dist/operations/create-collection.js +3 -6
- package/dist/operations/create-collection.js.map +1 -1
- package/dist/operations/delete-collection.d.ts +1 -1
- package/dist/operations/delete-collection.d.ts.map +1 -1
- package/dist/operations/delete-collection.js +3 -6
- package/dist/operations/delete-collection.js.map +1 -1
- package/dist/operations/dismiss-errors.d.ts +25 -0
- package/dist/operations/dismiss-errors.d.ts.map +1 -0
- package/dist/operations/dismiss-errors.js +74 -0
- package/dist/operations/dismiss-errors.js.map +1 -0
- package/dist/operations/dismiss-errors.test.d.ts +2 -0
- package/dist/operations/dismiss-errors.test.d.ts.map +1 -0
- package/dist/operations/dismiss-errors.test.js +183 -0
- package/dist/operations/dismiss-errors.test.js.map +1 -0
- package/dist/operations/endorse-skills.d.ts +10 -0
- package/dist/operations/endorse-skills.d.ts.map +1 -0
- package/dist/operations/endorse-skills.js +12 -0
- package/dist/operations/endorse-skills.js.map +1 -0
- package/dist/operations/endorse-skills.test.d.ts +2 -0
- package/dist/operations/endorse-skills.test.d.ts.map +1 -0
- package/dist/operations/endorse-skills.test.js +70 -0
- package/dist/operations/endorse-skills.test.js.map +1 -0
- package/dist/operations/enrich-profile.d.ts +18 -0
- package/dist/operations/enrich-profile.d.ts.map +1 -0
- package/dist/operations/enrich-profile.js +15 -0
- package/dist/operations/enrich-profile.js.map +1 -0
- package/dist/operations/enrich-profile.test.d.ts +2 -0
- package/dist/operations/enrich-profile.test.d.ts.map +1 -0
- package/dist/operations/enrich-profile.test.js +73 -0
- package/dist/operations/enrich-profile.test.js.map +1 -0
- package/dist/operations/ephemeral-action.d.ts +22 -0
- package/dist/operations/ephemeral-action.d.ts.map +1 -0
- package/dist/operations/ephemeral-action.js +28 -0
- package/dist/operations/ephemeral-action.js.map +1 -0
- package/dist/operations/ephemeral-action.test.d.ts +2 -0
- package/dist/operations/ephemeral-action.test.d.ts.map +1 -0
- package/dist/operations/ephemeral-action.test.js +140 -0
- package/dist/operations/ephemeral-action.test.js.map +1 -0
- package/dist/operations/follow-person.d.ts +9 -0
- package/dist/operations/follow-person.d.ts.map +1 -0
- package/dist/operations/follow-person.js +11 -0
- package/dist/operations/follow-person.js.map +1 -0
- package/dist/operations/follow-person.test.d.ts +2 -0
- package/dist/operations/follow-person.test.d.ts.map +1 -0
- package/dist/operations/follow-person.test.js +57 -0
- package/dist/operations/follow-person.test.js.map +1 -0
- package/dist/operations/get-action-budget.d.ts +6 -0
- package/dist/operations/get-action-budget.d.ts.map +1 -0
- package/dist/operations/get-action-budget.js +19 -0
- package/dist/operations/get-action-budget.js.map +1 -0
- package/dist/operations/get-action-budget.test.d.ts +2 -0
- package/dist/operations/get-action-budget.test.d.ts.map +1 -0
- package/dist/operations/get-action-budget.test.js +79 -0
- package/dist/operations/get-action-budget.test.js.map +1 -0
- package/dist/operations/get-errors.d.ts +14 -4
- package/dist/operations/get-errors.d.ts.map +1 -1
- package/dist/operations/get-errors.js +72 -13
- package/dist/operations/get-errors.js.map +1 -1
- package/dist/operations/get-errors.test.js +108 -43
- package/dist/operations/get-errors.test.js.map +1 -1
- package/dist/operations/get-feed.d.ts +112 -0
- package/dist/operations/get-feed.d.ts.map +1 -0
- package/dist/operations/get-feed.js +467 -0
- package/dist/operations/get-feed.js.map +1 -0
- package/dist/operations/get-feed.test.d.ts +2 -0
- package/dist/operations/get-feed.test.d.ts.map +1 -0
- package/dist/operations/get-feed.test.js +502 -0
- package/dist/operations/get-feed.test.js.map +1 -0
- package/dist/operations/get-post-engagers.d.ts +43 -0
- package/dist/operations/get-post-engagers.d.ts.map +1 -0
- package/dist/operations/get-post-engagers.js +328 -0
- package/dist/operations/get-post-engagers.js.map +1 -0
- package/dist/operations/get-post-engagers.test.d.ts +2 -0
- package/dist/operations/get-post-engagers.test.d.ts.map +1 -0
- package/dist/operations/get-post-engagers.test.js +297 -0
- package/dist/operations/get-post-engagers.test.js.map +1 -0
- package/dist/operations/get-post-stats.d.ts +43 -0
- package/dist/operations/get-post-stats.d.ts.map +1 -0
- package/dist/operations/get-post-stats.js +164 -0
- package/dist/operations/get-post-stats.js.map +1 -0
- package/dist/operations/get-post-stats.test.d.ts +2 -0
- package/dist/operations/get-post-stats.test.d.ts.map +1 -0
- package/dist/operations/get-post-stats.test.js +169 -0
- package/dist/operations/get-post-stats.test.js.map +1 -0
- package/dist/operations/get-post.d.ts +42 -0
- package/dist/operations/get-post.d.ts.map +1 -0
- package/dist/operations/get-post.js +416 -0
- package/dist/operations/get-post.js.map +1 -0
- package/dist/operations/get-post.test.d.ts +2 -0
- package/dist/operations/get-post.test.d.ts.map +1 -0
- package/dist/operations/get-post.test.js +272 -0
- package/dist/operations/get-post.test.js.map +1 -0
- package/dist/operations/get-profile-activity.d.ts +50 -0
- package/dist/operations/get-profile-activity.d.ts.map +1 -0
- package/dist/operations/get-profile-activity.js +381 -0
- package/dist/operations/get-profile-activity.js.map +1 -0
- package/dist/operations/get-profile-activity.test.d.ts +2 -0
- package/dist/operations/get-profile-activity.test.d.ts.map +1 -0
- package/dist/operations/get-profile-activity.test.js +324 -0
- package/dist/operations/get-profile-activity.test.js.map +1 -0
- package/dist/operations/get-throttle-status.d.ts +6 -0
- package/dist/operations/get-throttle-status.d.ts.map +1 -0
- package/dist/operations/get-throttle-status.js +24 -0
- package/dist/operations/get-throttle-status.js.map +1 -0
- package/dist/operations/get-throttle-status.test.d.ts +2 -0
- package/dist/operations/get-throttle-status.test.d.ts.map +1 -0
- package/dist/operations/get-throttle-status.test.js +62 -0
- package/dist/operations/get-throttle-status.test.js.map +1 -0
- package/dist/operations/import-people-from-collection.d.ts +1 -1
- package/dist/operations/import-people-from-collection.d.ts.map +1 -1
- package/dist/operations/import-people-from-collection.js +3 -6
- package/dist/operations/import-people-from-collection.js.map +1 -1
- package/dist/operations/import-people-from-urls.d.ts +1 -1
- package/dist/operations/import-people-from-urls.d.ts.map +1 -1
- package/dist/operations/import-people-from-urls.js +3 -6
- package/dist/operations/import-people-from-urls.js.map +1 -1
- package/dist/operations/index.d.ts +23 -1
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +33 -0
- package/dist/operations/index.js.map +1 -1
- package/dist/operations/like-person-posts.d.ts +14 -0
- package/dist/operations/like-person-posts.d.ts.map +1 -0
- package/dist/operations/like-person-posts.js +28 -0
- package/dist/operations/like-person-posts.js.map +1 -0
- package/dist/operations/like-person-posts.test.d.ts +2 -0
- package/dist/operations/like-person-posts.test.d.ts.map +1 -0
- package/dist/operations/like-person-posts.test.js +103 -0
- package/dist/operations/like-person-posts.test.js.map +1 -0
- package/dist/operations/list-collections.d.ts +1 -1
- package/dist/operations/list-collections.d.ts.map +1 -1
- package/dist/operations/list-collections.js +3 -6
- package/dist/operations/list-collections.js.map +1 -1
- package/dist/operations/message-person.d.ts +11 -0
- package/dist/operations/message-person.d.ts.map +1 -0
- package/dist/operations/message-person.js +19 -0
- package/dist/operations/message-person.js.map +1 -0
- package/dist/operations/message-person.test.d.ts +2 -0
- package/dist/operations/message-person.test.d.ts.map +1 -0
- package/dist/operations/message-person.test.js +108 -0
- package/dist/operations/message-person.test.js.map +1 -0
- package/dist/operations/navigate-away.d.ts +14 -0
- package/dist/operations/navigate-away.d.ts.map +1 -0
- package/dist/operations/navigate-away.js +24 -0
- package/dist/operations/navigate-away.js.map +1 -0
- package/dist/operations/navigate-away.test.d.ts +2 -0
- package/dist/operations/navigate-away.test.d.ts.map +1 -0
- package/dist/operations/navigate-away.test.js +51 -0
- package/dist/operations/navigate-away.test.js.map +1 -0
- package/dist/operations/query-messages.d.ts +1 -1
- package/dist/operations/query-messages.d.ts.map +1 -1
- package/dist/operations/query-messages.js +3 -6
- package/dist/operations/query-messages.js.map +1 -1
- package/dist/operations/react-to-post.d.ts +41 -0
- package/dist/operations/react-to-post.d.ts.map +1 -0
- package/dist/operations/react-to-post.js +80 -0
- package/dist/operations/react-to-post.js.map +1 -0
- package/dist/operations/react-to-post.test.d.ts +2 -0
- package/dist/operations/react-to-post.test.d.ts.map +1 -0
- package/dist/operations/react-to-post.test.js +157 -0
- package/dist/operations/react-to-post.test.js.map +1 -0
- package/dist/operations/remove-connection.d.ts +6 -0
- package/dist/operations/remove-connection.d.ts.map +1 -0
- package/dist/operations/remove-connection.js +7 -0
- package/dist/operations/remove-connection.js.map +1 -0
- package/dist/operations/remove-connection.test.d.ts +2 -0
- package/dist/operations/remove-connection.test.d.ts.map +1 -0
- package/dist/operations/remove-connection.test.js +45 -0
- package/dist/operations/remove-connection.test.js.map +1 -0
- package/dist/operations/remove-people-from-collection.d.ts +1 -1
- package/dist/operations/remove-people-from-collection.d.ts.map +1 -1
- package/dist/operations/remove-people-from-collection.js +3 -6
- package/dist/operations/remove-people-from-collection.js.map +1 -1
- package/dist/operations/resolve-linkedin-entity.d.ts.map +1 -1
- package/dist/operations/resolve-linkedin-entity.js +2 -2
- package/dist/operations/resolve-linkedin-entity.js.map +1 -1
- package/dist/operations/resolve-linkedin-entity.test.d.ts +2 -0
- package/dist/operations/resolve-linkedin-entity.test.d.ts.map +1 -0
- package/dist/operations/resolve-linkedin-entity.test.js +343 -0
- package/dist/operations/resolve-linkedin-entity.test.js.map +1 -0
- package/dist/operations/scrape-messaging-history.d.ts +2 -1
- package/dist/operations/scrape-messaging-history.d.ts.map +1 -1
- package/dist/operations/scrape-messaging-history.js +121 -18
- package/dist/operations/scrape-messaging-history.js.map +1 -1
- package/dist/operations/scrape-messaging-history.test.js +134 -12
- package/dist/operations/scrape-messaging-history.test.js.map +1 -1
- package/dist/operations/search-posts.d.ts +51 -0
- package/dist/operations/search-posts.d.ts.map +1 -0
- package/dist/operations/search-posts.js +419 -0
- package/dist/operations/search-posts.js.map +1 -0
- package/dist/operations/search-posts.test.d.ts +2 -0
- package/dist/operations/search-posts.test.d.ts.map +1 -0
- package/dist/operations/search-posts.test.js +300 -0
- package/dist/operations/search-posts.test.js.map +1 -0
- package/dist/operations/send-inmail.d.ts +11 -0
- package/dist/operations/send-inmail.d.ts.map +1 -0
- package/dist/operations/send-inmail.js +19 -0
- package/dist/operations/send-inmail.js.map +1 -0
- package/dist/operations/send-inmail.test.d.ts +2 -0
- package/dist/operations/send-inmail.test.d.ts.map +1 -0
- package/dist/operations/send-inmail.test.js +108 -0
- package/dist/operations/send-inmail.test.js.map +1 -0
- package/dist/operations/send-invite.d.ts +9 -0
- package/dist/operations/send-invite.d.ts.map +1 -0
- package/dist/operations/send-invite.js +14 -0
- package/dist/operations/send-invite.js.map +1 -0
- package/dist/operations/send-invite.test.d.ts +2 -0
- package/dist/operations/send-invite.test.d.ts.map +1 -0
- package/dist/operations/send-invite.test.js +59 -0
- package/dist/operations/send-invite.test.js.map +1 -0
- package/dist/operations/types.d.ts +24 -1
- package/dist/operations/types.d.ts.map +1 -1
- package/dist/operations/types.js +13 -1
- package/dist/operations/types.js.map +1 -1
- package/dist/operations/visit-profile.d.ts +14 -0
- package/dist/operations/visit-profile.d.ts.map +1 -0
- package/dist/operations/visit-profile.js +46 -0
- package/dist/operations/visit-profile.js.map +1 -0
- package/dist/operations/visit-profile.test.d.ts +2 -0
- package/dist/operations/visit-profile.test.d.ts.map +1 -0
- package/dist/operations/visit-profile.test.js +193 -0
- package/dist/operations/visit-profile.test.js.map +1 -0
- package/dist/services/account-resolution.d.ts +9 -4
- package/dist/services/account-resolution.d.ts.map +1 -1
- package/dist/services/account-resolution.js +60 -5
- package/dist/services/account-resolution.js.map +1 -1
- package/dist/services/app.d.ts +6 -2
- package/dist/services/app.d.ts.map +1 -1
- package/dist/services/app.js +18 -6
- package/dist/services/app.js.map +1 -1
- package/dist/services/app.test.js +41 -7
- package/dist/services/app.test.js.map +1 -1
- package/dist/services/campaign.d.ts +44 -2
- package/dist/services/campaign.d.ts.map +1 -1
- package/dist/services/campaign.js +124 -1
- package/dist/services/campaign.js.map +1 -1
- package/dist/services/collection.d.ts +5 -2
- package/dist/services/collection.d.ts.map +1 -1
- package/dist/services/collection.js +24 -5
- package/dist/services/collection.js.map +1 -1
- package/dist/services/collection.test.js +51 -9
- package/dist/services/collection.test.js.map +1 -1
- package/dist/services/ephemeral-campaign.d.ts +64 -0
- package/dist/services/ephemeral-campaign.d.ts.map +1 -0
- package/dist/services/ephemeral-campaign.js +210 -0
- package/dist/services/ephemeral-campaign.js.map +1 -0
- package/dist/services/ephemeral-campaign.test.d.ts +2 -0
- package/dist/services/ephemeral-campaign.test.d.ts.map +1 -0
- package/dist/services/ephemeral-campaign.test.js +333 -0
- package/dist/services/ephemeral-campaign.test.js.map +1 -0
- package/dist/services/errors.d.ts +12 -1
- package/dist/services/errors.d.ts.map +1 -1
- package/dist/services/errors.js +26 -3
- package/dist/services/errors.js.map +1 -1
- package/dist/services/index.d.ts +2 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +2 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/instance-context.d.ts +5 -1
- package/dist/services/instance-context.d.ts.map +1 -1
- package/dist/services/instance-context.js +87 -20
- package/dist/services/instance-context.js.map +1 -1
- package/dist/services/instance-context.test.js +82 -2
- package/dist/services/instance-context.test.js.map +1 -1
- package/dist/services/instance-lifecycle.d.ts.map +1 -1
- package/dist/services/instance-lifecycle.js +32 -1
- package/dist/services/instance-lifecycle.js.map +1 -1
- package/dist/services/instance-lifecycle.test.js +52 -1
- package/dist/services/instance-lifecycle.test.js.map +1 -1
- package/dist/services/instance.d.ts +43 -0
- package/dist/services/instance.d.ts.map +1 -1
- package/dist/services/instance.js +163 -1
- package/dist/services/instance.js.map +1 -1
- package/dist/services/instance.test.js +135 -0
- package/dist/services/instance.test.js.map +1 -1
- package/dist/services/launcher.d.ts +54 -3
- package/dist/services/launcher.d.ts.map +1 -1
- package/dist/services/launcher.js +223 -34
- package/dist/services/launcher.js.map +1 -1
- package/dist/services/launcher.test.js +133 -6
- package/dist/services/launcher.test.js.map +1 -1
- package/dist/services/status.d.ts +6 -2
- package/dist/services/status.d.ts.map +1 -1
- package/dist/services/status.js +67 -34
- package/dist/services/status.js.map +1 -1
- package/dist/services/status.test.js +9 -2
- package/dist/services/status.test.js.map +1 -1
- package/dist/testing/e2e-helpers.d.ts +23 -1
- package/dist/testing/e2e-helpers.d.ts.map +1 -1
- package/dist/testing/e2e-helpers.js +110 -5
- package/dist/testing/e2e-helpers.js.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/types/account.d.ts +1 -1
- package/dist/types/action-budget.d.ts +52 -0
- package/dist/types/action-budget.d.ts.map +1 -0
- package/dist/types/action-budget.js +4 -0
- package/dist/types/action-budget.js.map +1 -0
- package/dist/types/campaign.d.ts +24 -0
- package/dist/types/campaign.d.ts.map +1 -1
- package/dist/types/feed.d.ts +30 -0
- package/dist/types/feed.d.ts.map +1 -0
- package/dist/types/feed.js +4 -0
- package/dist/types/feed.js.map +1 -0
- package/dist/types/index.d.ts +6 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/post-analytics.d.ts +40 -0
- package/dist/types/post-analytics.d.ts.map +1 -0
- package/dist/types/post-analytics.js +4 -0
- package/dist/types/post-analytics.js.map +1 -0
- package/dist/types/post.d.ts +43 -0
- package/dist/types/post.d.ts.map +1 -0
- package/dist/types/post.js +4 -0
- package/dist/types/post.js.map +1 -0
- package/dist/types/ui-health.d.ts +16 -0
- package/dist/types/ui-health.d.ts.map +1 -1
- package/dist/utils/cdp-port.d.ts.map +1 -1
- package/dist/utils/cdp-port.js +3 -1
- package/dist/utils/cdp-port.js.map +1 -1
- package/dist/utils/cdp-port.test.js +1 -1
- package/dist/utils/cdp-port.test.js.map +1 -1
- package/dist/utils/delay.d.ts +79 -0
- package/dist/utils/delay.d.ts.map +1 -1
- package/dist/utils/delay.js +118 -0
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/delay.test.js +111 -1
- package/dist/utils/delay.test.js.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/session-pacer.d.ts +27 -0
- package/dist/utils/session-pacer.d.ts.map +1 -0
- package/dist/utils/session-pacer.js +55 -0
- package/dist/utils/session-pacer.js.map +1 -0
- package/dist/utils/session-pacer.test.d.ts +2 -0
- package/dist/utils/session-pacer.test.d.ts.map +1 -0
- package/dist/utils/session-pacer.test.js +111 -0
- package/dist/utils/session-pacer.test.js.map +1 -0
- package/package.json +1 -1
package/dist/operations/types.js
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Build the CDP connection options object from a {@link ConnectionOptions}
|
|
5
|
+
* source (typically the operation input).
|
|
6
|
+
*
|
|
7
|
+
* Maps `cdpHost` → `host` and passes through `allowRemote`, omitting
|
|
8
|
+
* fields that are `undefined`.
|
|
9
|
+
*/
|
|
10
|
+
export function buildCdpOptions(input) {
|
|
11
|
+
return {
|
|
12
|
+
...(input.cdpHost !== undefined && { host: input.cdpHost }),
|
|
13
|
+
...(input.allowRemote !== undefined && { allowRemote: input.allowRemote }),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
4
16
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/operations/types.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/operations/types.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAsBpC;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,KAG/B;IACC,OAAO;QACL,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;QAC3D,GAAG,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC;KAC3E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Profile } from "../types/index.js";
|
|
2
|
+
import { type ConnectionOptions } from "./types.js";
|
|
3
|
+
export interface VisitProfileInput extends ConnectionOptions {
|
|
4
|
+
readonly personId?: number | undefined;
|
|
5
|
+
readonly url?: string | undefined;
|
|
6
|
+
readonly extractCurrentOrganizations?: boolean | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface VisitProfileOutput {
|
|
9
|
+
readonly success: true;
|
|
10
|
+
readonly actionType: "VisitAndExtract";
|
|
11
|
+
readonly profile: Profile;
|
|
12
|
+
}
|
|
13
|
+
export declare function visitProfile(input: VisitProfileInput): Promise<VisitProfileOutput>;
|
|
14
|
+
//# sourceMappingURL=visit-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visit-profile.d.ts","sourceRoot":"","sources":["../../src/operations/visit-profile.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIjD,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAErE,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC5D;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAcD,wBAAsB,YAAY,CAChC,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,kBAAkB,CAAC,CAoC7B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { resolveAccount } from "../services/account-resolution.js";
|
|
4
|
+
import { withInstanceDatabase } from "../services/instance-context.js";
|
|
5
|
+
import { ProfileRepository } from "../db/index.js";
|
|
6
|
+
import { buildCdpOptions } from "./types.js";
|
|
7
|
+
const LINKEDIN_PROFILE_RE = /linkedin\.com\/in\/([^/?#]+)/;
|
|
8
|
+
function extractPublicId(url) {
|
|
9
|
+
const match = LINKEDIN_PROFILE_RE.exec(url);
|
|
10
|
+
if (!match?.[1]) {
|
|
11
|
+
throw new Error(`Invalid LinkedIn profile URL: ${url}. Expected format: https://www.linkedin.com/in/<public-id>`);
|
|
12
|
+
}
|
|
13
|
+
return decodeURIComponent(match[1]);
|
|
14
|
+
}
|
|
15
|
+
export async function visitProfile(input) {
|
|
16
|
+
if ((input.personId == null) === (input.url == null)) {
|
|
17
|
+
throw new Error("Exactly one of personId or url must be provided");
|
|
18
|
+
}
|
|
19
|
+
const cdpPort = input.cdpPort;
|
|
20
|
+
const accountId = await resolveAccount(cdpPort, buildCdpOptions(input));
|
|
21
|
+
return withInstanceDatabase(cdpPort, accountId, async ({ instance, db }) => {
|
|
22
|
+
const repo = new ProfileRepository(db);
|
|
23
|
+
let personId;
|
|
24
|
+
if (input.personId != null) {
|
|
25
|
+
personId = input.personId;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
const publicId = extractPublicId(input.url);
|
|
29
|
+
const existing = repo.findByPublicId(publicId);
|
|
30
|
+
personId = existing.id;
|
|
31
|
+
}
|
|
32
|
+
await instance.executeAction("VisitAndExtract", {
|
|
33
|
+
personIds: [personId],
|
|
34
|
+
...(input.extractCurrentOrganizations !== undefined && {
|
|
35
|
+
extractCurrentOrganizations: input.extractCurrentOrganizations,
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
const profile = repo.findById(personId, { includePositions: true });
|
|
39
|
+
return {
|
|
40
|
+
success: true,
|
|
41
|
+
actionType: "VisitAndExtract",
|
|
42
|
+
profile,
|
|
43
|
+
};
|
|
44
|
+
}, { instanceTimeout: 120_000 });
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=visit-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visit-profile.js","sourceRoot":"","sources":["../../src/operations/visit-profile.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,eAAe,EAA0B,MAAM,YAAY,CAAC;AAcrE,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAE3D,SAAS,eAAe,CAAC,GAAW;IAClC,MAAM,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CACb,iCAAiC,GAAG,4DAA4D,CACjG,CAAC;IACJ,CAAC;IACD,OAAO,kB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,EAAE,IAAI,EAAE,CAAC,CAAC;QAEpE,OAAO;YACL,OAAO,EAAE,IAAa;YACtB,UAAU,EAAE,iBAA0B;YACtC,OAAO;SACR,CAAC;IACJ,CAAC,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visit-profile.test.d.ts","sourceRoot":"","sources":["../../src/operations/visit-profile.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
|
+
vi.mock("../services/account-resolution.js", () => ({
|
|
5
|
+
resolveAccount: vi.fn(),
|
|
6
|
+
}));
|
|
7
|
+
vi.mock("../services/instance-context.js", () => ({
|
|
8
|
+
withInstanceDatabase: vi.fn(),
|
|
9
|
+
}));
|
|
10
|
+
vi.mock("../db/index.js", () => ({
|
|
11
|
+
ProfileRepository: vi.fn(),
|
|
12
|
+
}));
|
|
13
|
+
import { resolveAccount } from "../services/account-resolution.js";
|
|
14
|
+
import { withInstanceDatabase } from "../services/instance-context.js";
|
|
15
|
+
import { ProfileRepository } from "../db/index.js";
|
|
16
|
+
import { visitProfile } from "./visit-profile.js";
|
|
17
|
+
const MOCK_PROFILE = {
|
|
18
|
+
id: 100,
|
|
19
|
+
miniProfile: {
|
|
20
|
+
firstName: "Jane",
|
|
21
|
+
lastName: "Doe",
|
|
22
|
+
headline: "Software Engineer",
|
|
23
|
+
avatar: null,
|
|
24
|
+
},
|
|
25
|
+
externalIds: [{ externalId: "jane-doe-123", typeGroup: "public", isMemberId: false }],
|
|
26
|
+
currentPosition: { company: "Acme Corp", title: "Senior Engineer" },
|
|
27
|
+
positions: [
|
|
28
|
+
{
|
|
29
|
+
company: "Acme Corp",
|
|
30
|
+
title: "Senior Engineer",
|
|
31
|
+
startDate: "2023-01",
|
|
32
|
+
endDate: null,
|
|
33
|
+
isCurrent: true,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
education: [],
|
|
37
|
+
skills: [{ name: "TypeScript" }],
|
|
38
|
+
emails: [],
|
|
39
|
+
};
|
|
40
|
+
const mockInstance = { executeAction: vi.fn().mockResolvedValue(undefined) };
|
|
41
|
+
function setupMocks() {
|
|
42
|
+
vi.mocked(resolveAccount).mockResolvedValue(1);
|
|
43
|
+
vi.mocked(withInstanceDatabase).mockImplementation(async (_cdpPort, _accountId, callback) => callback({
|
|
44
|
+
accountId: 1,
|
|
45
|
+
instance: mockInstance,
|
|
46
|
+
db: {},
|
|
47
|
+
}));
|
|
48
|
+
vi.mocked(ProfileRepository).mockImplementation(function () {
|
|
49
|
+
return {
|
|
50
|
+
findById: vi.fn().mockReturnValue(MOCK_PROFILE),
|
|
51
|
+
findByPublicId: vi.fn().mockReturnValue(MOCK_PROFILE),
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
describe("visitProfile", () => {
|
|
56
|
+
beforeEach(() => {
|
|
57
|
+
vi.clearAllMocks();
|
|
58
|
+
});
|
|
59
|
+
afterEach(() => {
|
|
60
|
+
vi.restoreAllMocks();
|
|
61
|
+
});
|
|
62
|
+
it("throws when neither personId nor url is provided", async () => {
|
|
63
|
+
await expect(visitProfile({ cdpPort: 9222 })).rejects.toThrow("Exactly one of personId or url must be provided");
|
|
64
|
+
});
|
|
65
|
+
it("throws when both personId and url are provided", async () => {
|
|
66
|
+
await expect(visitProfile({ personId: 100, url: "https://www.linkedin.com/in/jane-doe-123", cdpPort: 9222 })).rejects.toThrow("Exactly one of personId or url must be provided");
|
|
67
|
+
});
|
|
68
|
+
it("returns success with profile after visiting by personId", async () => {
|
|
69
|
+
setupMocks();
|
|
70
|
+
const result = await visitProfile({
|
|
71
|
+
personId: 100,
|
|
72
|
+
cdpPort: 9222,
|
|
73
|
+
});
|
|
74
|
+
expect(result.success).toBe(true);
|
|
75
|
+
expect(result.actionType).toBe("VisitAndExtract");
|
|
76
|
+
expect(result.profile).toBe(MOCK_PROFILE);
|
|
77
|
+
});
|
|
78
|
+
it("calls instance.executeAction with VisitAndExtract and personIds", async () => {
|
|
79
|
+
setupMocks();
|
|
80
|
+
await visitProfile({
|
|
81
|
+
personId: 100,
|
|
82
|
+
cdpPort: 9222,
|
|
83
|
+
});
|
|
84
|
+
expect(mockInstance.executeAction).toHaveBeenCalledWith("VisitAndExtract", { personIds: [100] });
|
|
85
|
+
});
|
|
86
|
+
it("resolves person from LinkedIn URL and visits", async () => {
|
|
87
|
+
setupMocks();
|
|
88
|
+
await visitProfile({
|
|
89
|
+
url: "https://www.linkedin.com/in/jane-doe-123",
|
|
90
|
+
cdpPort: 9222,
|
|
91
|
+
});
|
|
92
|
+
const mockRepo = vi.mocked(ProfileRepository).mock.results[0]
|
|
93
|
+
?.value;
|
|
94
|
+
expect(mockRepo.findByPublicId).toHaveBeenCalledWith("jane-doe-123");
|
|
95
|
+
expect(mockInstance.executeAction).toHaveBeenCalledWith("VisitAndExtract", { personIds: [100] });
|
|
96
|
+
});
|
|
97
|
+
it("handles URL with trailing slash and query params", async () => {
|
|
98
|
+
setupMocks();
|
|
99
|
+
await visitProfile({
|
|
100
|
+
url: "https://www.linkedin.com/in/jane-doe-123/?locale=en_US",
|
|
101
|
+
cdpPort: 9222,
|
|
102
|
+
});
|
|
103
|
+
const mockRepo = vi.mocked(ProfileRepository).mock.results[0]
|
|
104
|
+
?.value;
|
|
105
|
+
expect(mockRepo.findByPublicId).toHaveBeenCalledWith("jane-doe-123");
|
|
106
|
+
});
|
|
107
|
+
it("throws on invalid LinkedIn URL", async () => {
|
|
108
|
+
setupMocks();
|
|
109
|
+
await expect(visitProfile({ url: "https://example.com/not-linkedin", cdpPort: 9222 })).rejects.toThrow("Invalid LinkedIn profile URL");
|
|
110
|
+
});
|
|
111
|
+
it("passes extractCurrentOrganizations when provided", async () => {
|
|
112
|
+
setupMocks();
|
|
113
|
+
await visitProfile({
|
|
114
|
+
personId: 100,
|
|
115
|
+
cdpPort: 9222,
|
|
116
|
+
extractCurrentOrganizations: true,
|
|
117
|
+
});
|
|
118
|
+
expect(mockInstance.executeAction).toHaveBeenCalledWith("VisitAndExtract", { personIds: [100], extractCurrentOrganizations: true });
|
|
119
|
+
});
|
|
120
|
+
it("omits extractCurrentOrganizations when undefined", async () => {
|
|
121
|
+
setupMocks();
|
|
122
|
+
await visitProfile({
|
|
123
|
+
personId: 100,
|
|
124
|
+
cdpPort: 9222,
|
|
125
|
+
});
|
|
126
|
+
expect(mockInstance.executeAction).toHaveBeenCalledWith("VisitAndExtract", { personIds: [100] });
|
|
127
|
+
});
|
|
128
|
+
it("queries profile with includePositions true", async () => {
|
|
129
|
+
setupMocks();
|
|
130
|
+
await visitProfile({
|
|
131
|
+
personId: 100,
|
|
132
|
+
cdpPort: 9222,
|
|
133
|
+
});
|
|
134
|
+
const mockRepo = vi.mocked(ProfileRepository).mock.results[0]
|
|
135
|
+
?.value;
|
|
136
|
+
expect(mockRepo.findById).toHaveBeenCalledWith(100, { includePositions: true });
|
|
137
|
+
});
|
|
138
|
+
it("passes instanceTimeout to withInstanceDatabase", async () => {
|
|
139
|
+
setupMocks();
|
|
140
|
+
await visitProfile({
|
|
141
|
+
personId: 100,
|
|
142
|
+
cdpPort: 9222,
|
|
143
|
+
});
|
|
144
|
+
expect(withInstanceDatabase).toHaveBeenCalledWith(9222, 1, expect.any(Function), { instanceTimeout: 120_000 });
|
|
145
|
+
});
|
|
146
|
+
it("passes connection options to resolveAccount", async () => {
|
|
147
|
+
setupMocks();
|
|
148
|
+
await visitProfile({
|
|
149
|
+
personId: 100,
|
|
150
|
+
cdpPort: 1234,
|
|
151
|
+
cdpHost: "192.168.1.1",
|
|
152
|
+
allowRemote: true,
|
|
153
|
+
});
|
|
154
|
+
expect(resolveAccount).toHaveBeenCalledWith(1234, {
|
|
155
|
+
host: "192.168.1.1",
|
|
156
|
+
allowRemote: true,
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
it("omits undefined connection options", async () => {
|
|
160
|
+
setupMocks();
|
|
161
|
+
await visitProfile({
|
|
162
|
+
personId: 100,
|
|
163
|
+
cdpPort: 9222,
|
|
164
|
+
});
|
|
165
|
+
expect(resolveAccount).toHaveBeenCalledWith(9222, {});
|
|
166
|
+
});
|
|
167
|
+
it("propagates resolveAccount errors", async () => {
|
|
168
|
+
vi.mocked(resolveAccount).mockRejectedValue(new Error("connection refused"));
|
|
169
|
+
await expect(visitProfile({ personId: 100, cdpPort: 9222 })).rejects.toThrow("connection refused");
|
|
170
|
+
});
|
|
171
|
+
it("propagates withInstanceDatabase errors", async () => {
|
|
172
|
+
vi.mocked(resolveAccount).mockResolvedValue(1);
|
|
173
|
+
vi.mocked(withInstanceDatabase).mockRejectedValue(new Error("instance not running"));
|
|
174
|
+
await expect(visitProfile({ personId: 100, cdpPort: 9222 })).rejects.toThrow("instance not running");
|
|
175
|
+
});
|
|
176
|
+
it("propagates ProfileRepository errors", async () => {
|
|
177
|
+
vi.mocked(resolveAccount).mockResolvedValue(1);
|
|
178
|
+
vi.mocked(withInstanceDatabase).mockImplementation(async (_cdpPort, _accountId, callback) => callback({
|
|
179
|
+
accountId: 1,
|
|
180
|
+
instance: mockInstance,
|
|
181
|
+
db: {},
|
|
182
|
+
}));
|
|
183
|
+
vi.mocked(ProfileRepository).mockImplementation(function () {
|
|
184
|
+
return {
|
|
185
|
+
findById: vi.fn().mockImplementation(() => {
|
|
186
|
+
throw new Error("profile not found");
|
|
187
|
+
}),
|
|
188
|
+
};
|
|
189
|
+
});
|
|
190
|
+
await expect(visitProfile({ personId: 100, cdpPort: 9222 })).rejects.toThrow("profile not found");
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
//# sourceMappingURL=visit-profile.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visit-profile.test.js","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QAC/C,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,iBAAiB,CAC/C,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAClC,CAAC;QAEF,MAAM,MAAM,CACV,YAAY,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAC/C,CAAC,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;QACnD,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;QAC/C,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,kBAAkB,CAChD,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,CACvC,QAAQ,CAAC;YACP,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,YAAY;YACtB,EAAE,EAAE,EAAE;SAC+B,CAAC,CAC3C,CAAC;QACF,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,kBAAkB,CAAC;YAC9C,OAAO;gBACL,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE;oBACxC,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;gBACvC,CAAC,CAAC;aAC6B,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,MAAM,MAAM,CACV,YAAY,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAC/C,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -11,11 +11,16 @@ export declare class AccountResolutionError extends ServiceError {
|
|
|
11
11
|
* Connect to the LinkedHelper launcher, resolve the single account,
|
|
12
12
|
* and return its ID.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
* {@link
|
|
16
|
-
*
|
|
14
|
+
* When {@link cdpPort} is omitted the launcher port is auto-discovered
|
|
15
|
+
* via {@link resolveLauncherPort}. If the provided port belongs to an
|
|
16
|
+
* instance (not the launcher), the account is resolved from local
|
|
17
|
+
* databases instead.
|
|
18
|
+
*
|
|
19
|
+
* @throws {LinkedHelperNotRunningError} if the launcher is unreachable
|
|
20
|
+
* and no database fallback is available.
|
|
21
|
+
* @throws {AccountResolutionError} if zero or multiple accounts exist.
|
|
17
22
|
*/
|
|
18
|
-
export declare function resolveAccount(cdpPort
|
|
23
|
+
export declare function resolveAccount(cdpPort?: number, options?: {
|
|
19
24
|
host?: string;
|
|
20
25
|
allowRemote?: boolean;
|
|
21
26
|
}): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-resolution.d.ts","sourceRoot":"","sources":["../../src/services/account-resolution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"account-resolution.d.ts","sourceRoot":"","sources":["../../src/services/account-resolution.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,YAAY,EAEb,MAAM,aAAa,CAAC;AAGrB;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,YAAY;IACtD,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,mBAAmB,CAAC;gBAEzC,MAAM,EAAE,aAAa,GAAG,mBAAmB;CASxD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,cAAc,CAClC,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GACjD,OAAO,CAAC,MAAM,CAAC,CA2BjB"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { resolveLauncherPort } from "../cdp/index.js";
|
|
4
|
+
import { discoverAllDatabases } from "../db/index.js";
|
|
5
|
+
import { LinkedHelperNotRunningError, LinkedHelperUnreachableError, ServiceError, WrongPortError, } from "./errors.js";
|
|
3
6
|
import { LauncherService } from "./launcher.js";
|
|
4
|
-
import { ServiceError } from "./errors.js";
|
|
5
7
|
/**
|
|
6
8
|
* Thrown when account resolution fails because no accounts exist,
|
|
7
9
|
* or multiple accounts exist and automatic selection is not possible.
|
|
@@ -21,12 +23,47 @@ export class AccountResolutionError extends ServiceError {
|
|
|
21
23
|
* Connect to the LinkedHelper launcher, resolve the single account,
|
|
22
24
|
* and return its ID.
|
|
23
25
|
*
|
|
24
|
-
*
|
|
25
|
-
* {@link
|
|
26
|
-
*
|
|
26
|
+
* When {@link cdpPort} is omitted the launcher port is auto-discovered
|
|
27
|
+
* via {@link resolveLauncherPort}. If the provided port belongs to an
|
|
28
|
+
* instance (not the launcher), the account is resolved from local
|
|
29
|
+
* databases instead.
|
|
30
|
+
*
|
|
31
|
+
* @throws {LinkedHelperNotRunningError} if the launcher is unreachable
|
|
32
|
+
* and no database fallback is available.
|
|
33
|
+
* @throws {AccountResolutionError} if zero or multiple accounts exist.
|
|
27
34
|
*/
|
|
28
35
|
export async function resolveAccount(cdpPort, options) {
|
|
29
|
-
|
|
36
|
+
let port;
|
|
37
|
+
try {
|
|
38
|
+
port = await resolveLauncherPort(cdpPort, options?.host);
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
// When cdpPort was omitted and the launcher is unreachable or not
|
|
42
|
+
// running, fall back to database-based resolution instead of
|
|
43
|
+
// propagating the error (the "instance-only" scenario).
|
|
44
|
+
if (cdpPort === undefined &&
|
|
45
|
+
(error instanceof LinkedHelperUnreachableError ||
|
|
46
|
+
error instanceof LinkedHelperNotRunningError)) {
|
|
47
|
+
return resolveAccountFromDatabases();
|
|
48
|
+
}
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
return await resolveAccountViaLauncher(port, options);
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
if (error instanceof WrongPortError) {
|
|
56
|
+
// Port belongs to an instance — resolve from databases
|
|
57
|
+
return resolveAccountFromDatabases();
|
|
58
|
+
}
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Resolve account by connecting to the launcher.
|
|
64
|
+
*/
|
|
65
|
+
async function resolveAccountViaLauncher(port, options) {
|
|
66
|
+
const launcher = new LauncherService(port, options);
|
|
30
67
|
try {
|
|
31
68
|
await launcher.connect();
|
|
32
69
|
const accounts = await launcher.listAccounts();
|
|
@@ -42,4 +79,22 @@ export async function resolveAccount(cdpPort, options) {
|
|
|
42
79
|
launcher.disconnect();
|
|
43
80
|
}
|
|
44
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Resolve account from locally discovered databases.
|
|
84
|
+
*
|
|
85
|
+
* Used as a fallback when the launcher is not available (e.g. when
|
|
86
|
+
* connected directly to an instance).
|
|
87
|
+
*/
|
|
88
|
+
function resolveAccountFromDatabases() {
|
|
89
|
+
const databases = discoverAllDatabases();
|
|
90
|
+
if (databases.size === 0) {
|
|
91
|
+
throw new AccountResolutionError("no-accounts");
|
|
92
|
+
}
|
|
93
|
+
if (databases.size > 1) {
|
|
94
|
+
throw new AccountResolutionError("multiple-accounts");
|
|
95
|
+
}
|
|
96
|
+
// databases.size === 1 is guaranteed by the guards above
|
|
97
|
+
const accountId = databases.keys().next().value;
|
|
98
|
+
return accountId;
|
|
99
|
+
}
|
|
45
100
|
//# sourceMappingURL=account-resolution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-resolution.js","sourceRoot":"","sources":["../../src/services/account-resolution.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;
|
|
1
|
+
{"version":3,"file":"account-resolution.js","sourceRoot":"","sources":["../../src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AAC"}
|
package/dist/services/app.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface AppServiceOptions {
|
|
|
14
14
|
export declare class AppService {
|
|
15
15
|
private assignedPort;
|
|
16
16
|
private childProcess;
|
|
17
|
+
private detectedExternal;
|
|
17
18
|
private readonly launchProbeDelay;
|
|
18
19
|
private readonly force;
|
|
19
20
|
/**
|
|
@@ -46,8 +47,11 @@ export declare class AppService {
|
|
|
46
47
|
* for the process to exit. If it does not exit within
|
|
47
48
|
* {@link QUIT_GRACEFUL_TIMEOUT}, escalates to `SIGKILL`.
|
|
48
49
|
*
|
|
49
|
-
* When
|
|
50
|
-
*
|
|
50
|
+
* When the instance was detected externally (not spawned by us),
|
|
51
|
+
* `quit()` is a no-op to avoid destroying the user's running app.
|
|
52
|
+
*
|
|
53
|
+
* When no child process handle is available and the port was
|
|
54
|
+
* explicitly provided, attempts to close via CDP.
|
|
51
55
|
*/
|
|
52
56
|
quit(): Promise<void>;
|
|
53
57
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/services/app.ts"],"names":[],"mappings":"AAqBA,MAAM,WAAW,iBAAiB;IAChC,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;GAMG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;IAEhC;;;;OAIG;gBACS,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB;IAMzD;;;;;OAKG;IACH,IAAI,OAAO,IAAI,MAAM,CAKpB;IAED;;;;;;;;OAQG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/services/app.ts"],"names":[],"mappings":"AAqBA,MAAM,WAAW,iBAAiB;IAChC,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;GAMG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;IAEhC;;;;OAIG;gBACS,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB;IAMzD;;;;;OAKG;IACH,IAAI,OAAO,IAAI,MAAM,CAKpB;IAED;;;;;;;;OAQG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAgE7B;;;;;;;;;;;;OAYG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAuC3B;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;IAYnC;;;;;OAKG;IACH,MAAM,CAAC,UAAU,IAAI,MAAM;CAW5B"}
|
package/dist/services/app.js
CHANGED
|
@@ -22,6 +22,7 @@ const QUIT_FORCE_TIMEOUT = 5_000;
|
|
|
22
22
|
export class AppService {
|
|
23
23
|
assignedPort;
|
|
24
24
|
childProcess = null;
|
|
25
|
+
detectedExternal = false;
|
|
25
26
|
launchProbeDelay;
|
|
26
27
|
force;
|
|
27
28
|
/**
|
|
@@ -63,10 +64,13 @@ export class AppService {
|
|
|
63
64
|
const existingApps = await findApp();
|
|
64
65
|
if (existingApps.length > 0) {
|
|
65
66
|
if (!this.force) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
// Only reuse a launcher process — connecting to an instance port
|
|
68
|
+
// as a launcher yields WrongPortError because the instance lacks
|
|
69
|
+
// the electronStore / mainWindow globals.
|
|
70
|
+
const connectableLauncher = existingApps.find((a) => a.connectable && a.role === "launcher");
|
|
71
|
+
if (connectableLauncher) {
|
|
72
|
+
this.assignedPort = connectableLauncher.cdpPort;
|
|
73
|
+
this.detectedExternal = true;
|
|
70
74
|
return;
|
|
71
75
|
}
|
|
72
76
|
throw new LinkedHelperUnreachableError(existingApps);
|
|
@@ -82,6 +86,7 @@ export class AppService {
|
|
|
82
86
|
const child = spawn(binary, args, {
|
|
83
87
|
detached: true,
|
|
84
88
|
stdio: "ignore",
|
|
89
|
+
env: { ...process.env, ELECTRON_RUN_AS_NODE: "" },
|
|
85
90
|
});
|
|
86
91
|
child.unref();
|
|
87
92
|
// Wait for an early error (e.g. ENOENT from spawn) before probing
|
|
@@ -109,8 +114,11 @@ export class AppService {
|
|
|
109
114
|
* for the process to exit. If it does not exit within
|
|
110
115
|
* {@link QUIT_GRACEFUL_TIMEOUT}, escalates to `SIGKILL`.
|
|
111
116
|
*
|
|
112
|
-
* When
|
|
113
|
-
*
|
|
117
|
+
* When the instance was detected externally (not spawned by us),
|
|
118
|
+
* `quit()` is a no-op to avoid destroying the user's running app.
|
|
119
|
+
*
|
|
120
|
+
* When no child process handle is available and the port was
|
|
121
|
+
* explicitly provided, attempts to close via CDP.
|
|
114
122
|
*/
|
|
115
123
|
async quit() {
|
|
116
124
|
if (this.childProcess) {
|
|
@@ -124,6 +132,10 @@ export class AppService {
|
|
|
124
132
|
}
|
|
125
133
|
return;
|
|
126
134
|
}
|
|
135
|
+
// Never close an externally-detected instance we did not spawn
|
|
136
|
+
if (this.detectedExternal) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
127
139
|
if (this.assignedPort === null) {
|
|
128
140
|
return;
|
|
129
141
|
}
|
package/dist/services/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../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