six-degrees 0.8.0 → 1.0.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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/backup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/csv/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/restore/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/scraper/route.js +1 -1
- package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/crm/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/import/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/import/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/import.html +1 -1
- package/.next/standalone/.next/server/app/import.rsc +16 -16
- package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/insights/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/insights/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/insights.html +1 -1
- package/.next/standalone/.next/server/app/insights.rsc +16 -16
- package/.next/standalone/.next/server/app/insights.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/insights.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/insights.segments/insights/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/launch/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/launch.html +2 -2
- package/.next/standalone/.next/server/app/launch.rsc +16 -16
- package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/paths.html +1 -1
- package/.next/standalone/.next/server/app/paths.rsc +16 -16
- package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/profile.html +1 -1
- package/.next/standalone/.next/server/app/profile.rsc +16 -16
- package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/queue.html +1 -1
- package/.next/standalone/.next/server/app/queue.rsc +16 -16
- package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/scores.html +1 -1
- package/.next/standalone/.next/server/app/scores.rsc +16 -16
- package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +16 -16
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup.html +1 -1
- package/.next/standalone/.next/server/app/setup.rsc +17 -17
- package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +17 -17
- package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/social.html +1 -1
- package/.next/standalone/.next/server/app/social.rsc +16 -16
- package/.next/standalone/.next/server/app/social.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/social.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/social.segments/social/__PAGE__.segment.rsc +15 -15
- package/.next/standalone/.next/server/chunks/_1_fynia._.js +7 -7
- package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
- package/.next/standalone/.next/server/chunks/lib_02iz_9q._.js +2 -2
- package/.next/standalone/.next/server/chunks/lib_05agvk3._.js +2 -2
- package/.next/standalone/.next/server/chunks/lib_0v84u66._.js +2 -2
- package/.next/standalone/.next/server/chunks/lib_db-client_0_dch35.js +1 -1
- package/.next/standalone/.next/server/chunks/{lib_rpc_0t552z6.js → lib_rpc_1hjjjr4.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0_79idq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +4 -4
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/0hggugbh84m4t.js +21 -0
- package/.next/standalone/.next/static/chunks/1ods5h86raivz.js +1 -0
- package/.next/standalone/CHANGELOG.md +23 -0
- package/.next/standalone/README.md +15 -13
- package/.next/standalone/SECURITY.md +9 -4
- package/.next/standalone/app/api/scraper/route.js +9 -1
- package/.next/standalone/app/setup/page.js +55 -4
- package/.next/standalone/install.sh +7 -6
- package/.next/standalone/lib/scanner-setup.js +82 -3
- package/.next/standalone/lib/settings.js +3 -0
- package/.next/standalone/package-lock.json +2 -2
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/scripts/build-app.mjs +167 -11
- package/.next/standalone/scripts/build-desktop.mjs +3 -2
- package/.next/standalone/scripts/ci-mac-signing.sh +128 -0
- package/.next/standalone/scripts/entitlements/electron.plist +23 -0
- package/.next/standalone/scripts/entitlements/node.plist +27 -0
- package/.next/standalone/scripts/mac-sign.mjs +563 -0
- package/.next/standalone/scripts/make-dmg-background.mjs +2 -1
- package/.next/standalone/scripts/set-signing-secrets.sh +96 -0
- package/.next/static/chunks/0hggugbh84m4t.js +21 -0
- package/.next/static/chunks/1ods5h86raivz.js +1 -0
- package/CHANGELOG.md +23 -0
- package/README.md +15 -13
- package/SECURITY.md +9 -4
- package/lib/scanner-setup.js +82 -3
- package/lib/settings.js +3 -0
- package/package.json +1 -1
- package/.next/standalone/.next/static/chunks/0838_s6w-i_ik.js +0 -1
- package/.next/standalone/.next/static/chunks/112mv-com-mqa.js +0 -21
- package/.next/static/chunks/0838_s6w-i_ik.js +0 -1
- package/.next/static/chunks/112mv-com-mqa.js +0 -21
- /package/.next/standalone/.next/static/{3NCyJyAPDCEYsYTwF1Ieu → mwCGF3OV3CWV4SjUgg5T8}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{3NCyJyAPDCEYsYTwF1Ieu → mwCGF3OV3CWV4SjUgg5T8}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{3NCyJyAPDCEYsYTwF1Ieu → mwCGF3OV3CWV4SjUgg5T8}/_ssgManifest.js +0 -0
- /package/.next/static/{3NCyJyAPDCEYsYTwF1Ieu → mwCGF3OV3CWV4SjUgg5T8}/_buildManifest.js +0 -0
- /package/.next/static/{3NCyJyAPDCEYsYTwF1Ieu → mwCGF3OV3CWV4SjUgg5T8}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{3NCyJyAPDCEYsYTwF1Ieu → mwCGF3OV3CWV4SjUgg5T8}/_ssgManifest.js +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[47257,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
3
|
-
3:I[60451,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
4
|
-
6:I[97367,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
2
|
+
2:I[47257,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"ClientPageRoot"]
|
|
3
|
+
3:I[60451,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js","/_next/static/chunks/43pg2sursiypz.js"],"default"]
|
|
4
|
+
6:I[97367,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"OutletBoundary"]
|
|
5
5
|
7:"$Sreact.suspense"
|
|
6
|
-
b:I[97367,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
7
|
-
c:I[97367,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
8
|
-
d:I[27201,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
9
|
-
f:I[39756,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
10
|
-
10:I[37457,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
11
|
-
13:I[56456,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
12
|
-
14:I[89349,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
13
|
-
15:I[15812,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
6
|
+
b:I[97367,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"ViewportBoundary"]
|
|
7
|
+
c:I[97367,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"MetadataBoundary"]
|
|
8
|
+
d:I[27201,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"IconMark"]
|
|
9
|
+
f:I[39756,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"default"]
|
|
10
|
+
10:I[37457,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"default"]
|
|
11
|
+
13:I[56456,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"default"]
|
|
12
|
+
14:I[89349,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"default"]
|
|
13
|
+
15:I[15812,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"default"]
|
|
14
14
|
:HL["/_next/static/chunks/1cmphb3kh2ers.css","style"]
|
|
15
15
|
a:X
|
|
16
16
|
12:X
|
|
17
17
|
12:C
|
|
18
|
-
0:{"buildId":"
|
|
19
|
-
1d:I[37711,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
20
|
-
1e:I[40643,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
21
|
-
1f:I[87915,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/
|
|
18
|
+
0:{"buildId":"mwCGF3OV3CWV4SjUgg5T8","data":[{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/43pg2sursiypz.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":"$@9","staleTime":"$a","varyParams":null},{"rsc":["$","$1","h",{"children":[null,["$","$Lb",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Six Degrees"}],["$","meta","1",{"name":"description","content":"Maps your LinkedIn network: who you know, who they know, and the shortest path to someone you haven't met. Runs on your own computer; nothing is uploaded."}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.23vm2o6v3er2z.ico","sizes":"48x48","type":"image/x-icon"}],["$","$Ld","3",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":"$@e","staleTime":"$a","varyParams":null},{"rsc":["$","$1","c",{"children":[null,["$","$Lf",null,{"parallelRouterKey":"children","template":["$","$L10",null,{}]}]]}],"isPartial":"$@11","staleTime":"$a","varyParams":"$12"},{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/1cmphb3kh2ers.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/03-_esd2x_yk6.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/1d8yv3k_atka7.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/1ods5h86raivz.js","async":true}],["$","script","script-3",{"src":"/_next/static/chunks/1eyajb9ntzlrl.js","async":true}]],["$","html",null,{"lang":"en","data-backdrop":"none","data-mode":"dark","data-buttons":"soft","data-dots":"solid","className":"geist_2ae47f08-module__h69qWW__variable geist_mono_eb58308d-module__w_p2Lq__variable","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"try{var t=JSON.parse(localStorage.getItem('six-degrees-theme-vars')||'null');if(t&&t.vars){var r=document.documentElement;for(var k in t.vars){var v=String(t.vars[k]);if(/^--sd-[a-z0-9-]+$/.test(k)&&!/[;{}<>]/.test(v))r.style.setProperty(k,v)}var a=t.attrs||{};['theme','backdrop','mode','buttons','dots'].forEach(function(n){if(/^[a-z]+$/.test(a[n]||''))r.dataset[n]=a[n]});r.style.colorScheme=a.mode==='light'?'light':'dark'}}catch(e){}"}}]}],["$","body",null,{"style":{"margin":0,"padding":0,"background":"var(--sd-bg, #0a0a1a)"},"children":[["$","$L13",null,{}],["$","$L14",null,{}],["$","svg",null,{"width":"0","height":"0","aria-hidden":"true","focusable":"false","style":{"position":"absolute","width":0,"height":0,"pointerEvents":"none"},"children":["$","defs",null,{"children":[["$","filter",null,{"id":"sd-droplet","x":"-30%","y":"-30%","width":"160%","height":"160%","colorInterpolationFilters":"sRGB","children":[["$","feGaussianBlur",null,{"in":"SourceAlpha","stdDeviation":"1.4","result":"soft"}],["$","feSpecularLighting",null,{"in":"soft","surfaceScale":"4","specularConstant":"1.15","specularExponent":"24","lightingColor":"#ffffff","result":"light","children":["$","feDistantLight",null,{"azimuth":"225","elevation":"52"}]}],["$","feComposite",null,{"in":"light","in2":"SourceAlpha","operator":"in","result":"shine"}],["$","feComponentTransfer",null,{"in":"SourceGraphic","result":"clear","children":["$","feFuncA",null,{"type":"linear","slope":"0.72"}]}],["$","feMorphology",null,{"in":"SourceAlpha","operator":"erode","radius":"0.8","result":"inner"}],["$","feComposite",null,{"in":"SourceAlpha","in2":"inner","operator":"out","result":"edge"}],["$","feFlood",null,{"floodColor":"#ffffff","floodOpacity":"0.55"}],["$","feComposite",null,{"in2":"edge","operator":"in","result":"rim"}],["$","feMerge",null,{"children":[["$","feMergeNode",null,{"in":"clear"}],["$","feMergeNode",null,{"in":"shine"}],["$","feMergeNode",null,{"in":"rim"}]]}]]}],["$","filter",null,{"id":"sd-glow","x":"-80%","y":"-80%","width":"260%","height":"260%","colorInterpolationFilters":"sRGB","children":[["$","feGaussianBlur",null,{"in":"SourceGraphic","stdDeviation":"2.4","result":"b"}],["$","feMerge",null,{"children":[["$","feMergeNode",null,{"in":"b"}],["$","feMergeNode",null,{"in":"SourceGraphic"}]]}]]}]]}]}],["$","$L15",null,{"children":[["$","$Lf",null,{"parallelRouterKey":"children","template":["$","$L10",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],"$L16"],[]]}],"$L17","$L18","$L19"]}]]}]]}]]}],"isPartial":"$@1a","staleTime":"$a","varyParams":null}],"isUpgradeableISRFallback":false,"a":"$@1b","rootVaryParams":null,"needsRuntimeRequest":"$@1c"}
|
|
19
|
+
1d:I[37711,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"default"]
|
|
20
|
+
1e:I[40643,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"default"]
|
|
21
|
+
1f:I[87915,["/_next/static/chunks/03-_esd2x_yk6.js","/_next/static/chunks/1d8yv3k_atka7.js","/_next/static/chunks/1ods5h86raivz.js","/_next/static/chunks/1eyajb9ntzlrl.js"],"default"]
|
|
22
22
|
4:{}
|
|
23
23
|
5:"$0:data:0:rsc:props:children:0:props:serverProvidedParams:params"
|
|
24
24
|
8:null
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[81638,e=>{"use strict";let t;var n=e.i(74533),r=e.i(2157),i=e.i(50227)
|
|
1
|
+
module.exports=[81638,e=>{"use strict";let t;var n=e.i(74533),r=e.i(2157),i=e.i(50227);e.i(60526);var o=e.i(10960),a=e.i(88602);let s=/LinkedIn reports (\d+) connections/,l=/^Downloading Python [\d.]+: ([\d.]+) of ([\d.]+) MB$/,u=/(\d+)\s*\/\s*(\d+)\s+collected/,d=/Collected all (\d+) connections/,c=/\[(\d+)\/(\d+)\]/,p=/^(Collected \d+ connections|Pushing \d+ connections|\s*Sent \d+ →|\s*Updating \d+ profile images|\s*\[image_store\]|\s*Images \d+-\d+)/,f=/^\[\d+\/\d+\] (.+) \([^()]*-tier, score [^()]*\)/;function h(e,t){return t?{done:Math.min(e,t),total:t,kind:"walk"}:null}var g=e.i(41238);function m(e,t){try{let n=JSON.parse((0,r.readFileSync)(i.default.join(e,"bridge-progress.json"),"utf8")),o=n?.[String(t||"default")];return o&&"object"==typeof o?o:{}}catch{return{}}}function y(e){try{return JSON.parse((0,r.readFileSync)(i.default.join(e,"bridge-unclear.json"),"utf8"))||{}}catch{return{}}}function b(e,t,n={},r={}){let i=[];for(let o of e){let e=o.profile_url,a=e?n[e]:void 0;if(!t.has(o.id)&&!a)continue;let s=function(e){if(!e)return 11;if(e.hidden||!e.more)return null;let t=(Number(e.pages)||0)+1;return t<=100?t:null}(a);null!=s&&i.push({id:o.id,name:o.name,tier:o.tier,profileUrl:e,pagesRead:s-1,nextPage:s,legacy:!a,at:a?.at||null,unclear:Number(r?.[e]?.n)||0,connected:o.connected_date||null,created:o.created_at||null})}let o=e=>`${+!!e.connected}|${e.connected||e.created||""}`;return i.sort((e,t)=>(e.unclear>=2)-(t.unclear>=2)||o(t).localeCompare(o(e))),i}var w=e.i(73156),v=e.i(80998),R=e.i(77524),S=e.i(1348),_=e.i(19041),E=e.i(98612),k=e.i(51373),T=e.i(95693),x=e.i(1746),N=e.i(99218);e.i(12506);var D=e.i(3126),A=e.i(16330),P=e.i(66680),j=e.i(12714),C=e.i(98199),I=e.i(26525);let O=Object.freeze({release:"20260814",version:"3.12.14",builds:Object.freeze({"darwin-arm64":Object.freeze({file:"cpython-3.12.14+20260814-aarch64-apple-darwin-install_only.tar.gz",sha256:"4572133a5542f306b9bdb155da5800f9e38950cd0a98d469b832ce256fe299ea",size:0x17fc7f8}),"darwin-x64":Object.freeze({file:"cpython-3.12.14+20260814-x86_64-apple-darwin-install_only.tar.gz",sha256:"1a94c83264731e9603fbea78e57e7ca8f20e7d91eb866627ac2304621b0f6f1f",size:0x17b03bb}),"linux-x64":Object.freeze({file:"cpython-3.12.14+20260814-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz",sha256:"5acfa3e9ba26b51ae161c83aff278da915b590d22373a424b2ba55b8afe91fcc",size:0x208fdfb}),"linux-arm64":Object.freeze({file:"cpython-3.12.14+20260814-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz",sha256:"2d8e17dfd732102cfeb18e0e1fa6769b24caa034e159981129590fe409c7157a",size:0x1bdd3eb}),"win32-x64":Object.freeze({file:"cpython-3.12.14+20260814-x86_64-pc-windows-msvc-install_only_stripped.tar.gz",sha256:"89f18f6932917163b74339ebcec2645c8e47ae7f1c5f2ac37f2b4f4cf3beb647",size:0x14f5617})})}),$=Object.freeze({min:[3,10],max:[3,14]}),M=Object.freeze(["/usr/bin/python3","python3","python","python3.14","python3.13","python3.12","python3.11","python3.10"]),F=Object.freeze(["py","python","python3"]);function L(e,t=$){let n=String(e||"").match(/^(\d+)\.(\d+)/);if(!n)return!1;let r=[Number(n[1]),Number(n[2])],i=(e,t)=>e[0]-t[0]||e[1]-t[1];return i(r,t.min)>=0&&0>=i(r,t.max)}let U="import requests; from PIL import Image; from playwright.sync_api import sync_playwright",H=`import sys
|
|
2
2
|
print("version %d.%d.%d" % sys.version_info[:3])
|
|
3
3
|
try:
|
|
4
4
|
import venv, ensurepip
|
|
@@ -6,20 +6,20 @@ try:
|
|
|
6
6
|
except Exception:
|
|
7
7
|
pass
|
|
8
8
|
try:
|
|
9
|
-
${
|
|
9
|
+
${U}
|
|
10
10
|
print("imports")
|
|
11
11
|
except Exception as e:
|
|
12
|
-
print("missing %s: %s" % (type(e).__name__, (str(e).splitlines() or [""])[0][:200]))`;function H(e){let t={version:null,venv:!1,imports:!1,missing:null};for(let n of String(e||"").split("\n").map(e=>e.trim()))n.startsWith("version ")?t.version=n.slice(8).trim()||null:"venv"===n?t.venv=!0:"imports"===n?t.imports=!0:n.startsWith("missing ")&&(t.missing=n.slice(8).trim()||null);return t}let W=Object.freeze(["-E","-s","-B","-u","-X","utf8"]);function z(e=process.env){let t={};for(let[n,r]of Object.entries(e))n.startsWith("PYTHON")||(t[n]=r);return t.PYTHONNOUSERSITE="1",t.PYTHONDONTWRITEBYTECODE="1",t.PYTHONUTF8="1",t}function q(e=process.env){return{...e,PYTHONDONTWRITEBYTECODE:"1",PYTHONUTF8:"1"}}let G=new Set(["target","prefix","root","user"]);function B(e=process.env){let t={};for(let[n,r]of Object.entries(e))n.startsWith("PIP_")&&G.has(n.slice(4).toLowerCase().replace(/_/g,"-"))||(t[n]=r);return t}function K(e){return i.default.join(e,"venv")}function X(e,t=process.platform){return"win32"===t?i.default.join(K(e),"Scripts","python.exe"):i.default.join(K(e),"bin","python")}let Y="python";function J(e,t=process.platform){return function(e,t=process.platform){return"win32"===t?i.default.join(e,"python.exe"):i.default.join(e,"bin","python3")}(i.default.join(e,Y),t)}function V(e,t,{timeoutMs:r=8e3,env:i}={}){return new Promise(o=>{let a,s="",l="",u=!1,d=e=>{u||(u=!0,o(e))};try{a=(0,n.spawn)(e,t,{stdio:["ignore","pipe","pipe"],windowsHide:!0,...i?{env:i}:{}})}catch(e){d({ok:!1,stdout:s,stderr:l,problem:e.message});return}let c=(e,t)=>e.length<16384?e+t.toString():e;a.stdout.on("data",e=>{s=c(s,e)}),a.stderr.on("data",e=>{l=c(l,e)});let p=setTimeout(()=>{try{a.kill("SIGKILL")}catch{}d({ok:!1,stdout:s,stderr:l,problem:`it didn't answer within ${Math.round(r/1e3)} seconds`})},r);a.on("error",e=>{clearTimeout(p),d({ok:!1,stdout:s,stderr:l,problem:"ENOENT"===e.code?"it isn't there":e.message})}),a.on("close",(e,t)=>{clearTimeout(p);let n=l.trim().split("\n").pop()||"";d({ok:0===e,stdout:s,stderr:l,problem:0===e?null:t?`it was stopped (${t})`:n||`it exited with ${e}`})})})}async function Z({bundled:e="",app:t="",dataDir:n,probe:o=V,exists:a=r.default.existsSync,host:s=null,systemCandidates:l=((e=process.platform)=>"win32"===e?M:$)(),timeouts:u={own:2e4,other:8e3},env:d=process.env}={}){let c={run:null,own:null,base:null,systemFound:null,download:null};if(e){let n=t&&i.default.resolve(e).startsWith(`${i.default.resolve(t)}${i.default.sep}`)?"bundled":"custom",r=await o(e,[...W,"-c",U],{timeoutMs:u.own,env:z(d)}),a=H(r.stdout);if(r.ok&&a.imports)return c.run={path:e,source:n,version:a.version},c;c.own={source:n,problem:a.missing||r.problem||"it didn't start"}}let p=X(n);if(a(p)){let e=await o(p,["-c",U],{timeoutMs:u.other,env:d}),t=H(e.stdout);if(e.ok&&t.imports)return c.run={path:p,source:"venv",version:t.version},c}let f=[];for(let e of l){let t=await o(e,["-c",U],{timeoutMs:u.other,env:d}),n=H(t.stdout);if(n.version){if(t.ok&&n.imports)return c.run={path:e,source:"system",version:n.version},c;f.push({path:e,version:n.version,venv:n.venv})}}let h=f.find(e=>e.venv&&L(e.version));if(h)return c.base={path:h.path,source:"system",version:h.version},c;let g=f.find(e=>L(e.version))||f[0];c.systemFound=g?{version:g.version,venv:g.venv}:null;let m=J(n);if(a(m)){let e=await o(m,[...W,"-c",U],{timeoutMs:u.other,env:z(d)}),t=H(e.stdout);if(e.ok&&t.venv)return c.base={path:m,source:"downloaded",version:t.version},c}return c.download=function(e,t=I){let n=e&&Object.hasOwn(t.builds,e)?t.builds[e]:null;return n?{key:e,version:t.version,release:t.release,...n,url:function(e,t=I){return`https://github.com/astral-sh/python-build-standalone/releases/download/${t.release}/${encodeURIComponent(e.file)}`}(n,t)}:null}(s),c}class Q extends Error{}let ee=(...e)=>(globalThis.fetch?._nextOriginalFetch||globalThis.fetch)(...e),et=e=>(e/1048576).toFixed(1);async function en(e,t,{sha256:n,size:r,signal:i,onProgress:o,idleMs:a=3e4,fetchImpl:s=ee,from:l="GitHub"}={}){if(!/^[0-9a-f]{64}$/.test(String(n))||!(Number.isInteger(r)&&r>0))throw new Q("There is no pinned checksum for this download, so it wasn't started.");let u=`${t}.part`,d=new AbortController,c=i?AbortSignal.any([i,d.signal]):d.signal,p=null,f=()=>{clearTimeout(p),p=setTimeout(()=>d.abort(new Q(`The download stopped for ${Math.round(a/1e3)} seconds. Check your connection and try again.`)),a)};f();let h=await P.default.open(u,"w"),g=(0,D.createHash)("sha256"),m=0,y=!1;try{let t=await s(e,{signal:c,redirect:"follow",cache:"no-store",headers:{Accept:"application/octet-stream","User-Agent":"six-degrees-scanner-setup"}});if(!t.ok||!t.body)throw new Q(`${l} answered ${t.status} to the download. Try again later.`);let i=Number(t.headers.get("content-length"))||null;if(i&&i!==r)throw new Q(`The download isn't the size it should be (${i} bytes, not ${r}), so it was stopped.`);for await(let e of t.body){if(f(),(m+=e.byteLength)>r)throw new Q("The download is bigger than it should be, so it was stopped.");g.update(e);let t=0;for(;t<e.byteLength;){let{bytesWritten:n}=await h.write(e,t,e.byteLength-t);t+=n}o?.(m,r)}if(m!==r)throw new Q("The download ended early. Try again.");let a=g.digest("hex");if(a!==n)throw new Q("The download doesn't match the checksum Six Degrees has for it, so it was deleted and nothing was unpacked.");return y=!0,a}catch(e){if(c.aborted&&c.reason instanceof Error)throw c.reason;throw e}finally{clearTimeout(p),await h.close(),y?await P.default.rename(u,t):await P.default.rm(u,{force:!0})}}async function er(e,t,n){let o=i.default.join(e,"python");if(!await P.default.lstat(i.default.join(o,"bin","python3")).catch(()=>null))throw new Q("The download didn't contain the Python it should have.");let a=i.default.join(t,Y);return r.default.existsSync(a)&&await P.default.rename(a,i.default.join(n,"python-before")),await P.default.rename(o,a),J(t)}let ei=(0,S.registerScanState)({running:!1,action:null,target:null,recent:[],log:[],startedAt:null,exitCode:null,child:null,abort:null,stopping:!1,stderrTail:[],failure:null,pages:0,found:[],invitee:null,outcome:null}),eo=/^\s*Page \d+\.\.\.|\d+\s*\/\s*\d+\s+collected/,ea=/(\d+) found \((?:total: \d+|\d+ with images)\)/;function es(e){for(let t of String(e).split("\n")){let e=t.replace(/\s+$/,"");if(!e)continue;ei.log.push(e),eo.test(e)&&(ei.pages+=1,ei.found.push(50*!!/collected/.test(e)),ei.found.length>400&&ei.found.splice(0,ei.found.length-400));let n=e.match(ea);n&&ei.found.length&&(ei.found[ei.found.length-1]=Number(n[1]));let r="connect"===ei.action&&(0,A.connectResultIn)(e);r&&(ei.outcome=r)}ei.log.length>500&&ei.log.splice(0,ei.log.length-500)}function el(){try{let e=(0,r.readFileSync)(i.default.join((0,o.dataDir)(),"bridge-skips.json"),"utf8"),t=JSON.parse(e);return Object.entries(t).map(([e,t])=>({profileUrl:e,name:t?.name??"",reason:t?.reason??"",at:t?.at??null}))}catch{return[]}}function eu(){let e=[],t={};try{let n=(0,a.resolveProfile)({create:!1});if(n){let r=m((0,o.dataDir)(),n.id);for(let[n,i]of(e=Object.keys(r),Object.entries(r)))t[n]={pages:Number(i?.pages)||0,more:!!i?.more,total:Number(i?.total)||null}}}catch{}return{skips:el(),read:e,lists:t}}let ed={at:0,value:null},ec=null,ep=0;function ef(){ep++,ed={at:0,value:null},ec=null}let eh=Symbol.for("six-degrees.python-looker"),eg=globalThis[eh]??=function({choose:e=Z,now:t=Date.now,retryMs:n=6e4}={}){let r=null,i=null;return async function(o,a={}){if(o&&r?.path===o)return{run:r,own:null,base:null,systemFound:null,download:null};let s=!!o&&i?.path===o&&(!1===i.own.retry||t()-i.at<n),l=await e({...a,bundled:s?"":o});if(s)return{...l,own:i.own};if(o&&l.run?.path===o)r=l.run;else if(o&&l.own){let e="bundled"===l.own.source?{...l.own,retry:!1}:l.own;return i={path:o,at:t(),own:e},{...l,own:e}}return l}}();async function em(){return{root:(0,o.projectRoot)(),python:await eg(process.env.SIX_DEGREES_PYTHON||"",{app:process.env.SIX_DEGREES_APP||"",dataDir:(0,o.dataDir)(),host:(void 0===t&&(t=function({platform:e=process.platform,arch:t=process.arch,sysctlArm64:n=""}={}){return"darwin"===e?`darwin-${(0,N.chipOf)({sysctlArm64:n,processArch:t})}`:"linux"===e&&("x64"===t||"arm64"===t)?`linux-${t}`:null}({sysctlArm64:""})),t)})}}function ey(){return function({platform:e,env:t={},exists:n}){let r=t.SIX_DEGREES_TEST_CHROME;return"found"===r||"missing"!==r&&("darwin"===e?n("/Applications/Google Chrome.app"):"linux"===e?n("/opt/google/chrome/chrome"):"win32"!==e||[t.LOCALAPPDATA,t.PROGRAMFILES,t["PROGRAMFILES(X86)"]].filter(Boolean).some(e=>n(`${String(e).replace(/[\\/]+$/,"")}\\Google\\Chrome\\Application\\chrome.exe`)))}({platform:process.platform,env:process.env,exists:r.existsSync})}function eb(){let e=null;try{e=(0,k.readSettings)((0,w.getDb)()).scanRiskAccepted}catch{}return(0,T.riskAccepted)({acceptedAt:e,scannedBefore:(0,r.existsSync)(i.default.join((0,o.dataDir)(),"chrome-profile"))})}function ew(){if(Date.now()-ed.at<4e3&&ed.value)return Promise.resolve(ed.value);if(ec)return ec;let e=ep,t=em().then(t=>(e===ep&&(ed={at:Date.now(),value:t}),t)).finally(()=>{ec===t&&(ec=null)});return ec=t,t}async function ev(){let e=await ew(),t=ey(),n={first:0,second:0,third:0},s=null;try{(s=(0,a.resolveProfile)({create:!1}))&&(n=(0,a.networkCounts)(s.id))}catch{}let l=0;try{l=(0,E.waitingPhotoCount)((0,w.getDb)())}catch{}let u=e.python;return{ready:!!(e.root&&u.run&&t),mapping:function(e){if(!ei.running)return null;if(ei.target?.id&&["bridge","rescrape","resume"].includes(ei.action))return{id:ei.target.id,name:ei.target.name};let t=function(e,t){if(!Array.isArray(e)||!t||!(t.startsWith("auto-bridge")||"resume-all"===t))return null;for(let t=e.length-1;t>=0;t--){let n=String(e[t]).match(f);if(n)return n[1]}return null}(ei.log,ei.action);if(!t||!e)return null;try{let n=(0,w.getDb)().prepare("SELECT id FROM linkedin_connections WHERE user_id = ? AND degree = 1 AND name = ? LIMIT 2").all(e,t);return 1===n.length?{id:n[0].id,name:t}:null}catch{return null}}(s?.id),checks:{scriptsFound:!!e.root,python:!!(u.run||u.base),pythonPath:u.run?.path||u.base?.path||null,pythonVersion:u.run?.version||u.base?.version||null,pythonSource:u.run?.source||null,dependencies:!!u.run,ownPython:u.own,installFrom:u.base?{source:u.base.source,version:u.base.version}:null,systemPython:u.systemFound,download:u.download?{version:u.download.version,size:u.download.size,from:"github.com"}:null,chrome:t,signedIn:function(){let e=(0,o.dataDir)(),t=null;try{t=JSON.parse((0,r.readFileSync)(i.default.join(e,"signed-in.json"),"utf8"))}catch{}let n=i.default.join(e,"chrome-profile","Default");return function({note:e,profile:t,cookies:n}){return e&&"object"==typeof e&&"boolean"==typeof e.signedIn?e.signedIn&&!!t:!!n}({note:t,profile:(0,r.existsSync)(i.default.join(e,"chrome-profile")),cookies:(0,r.existsSync)(i.default.join(n,"Cookies"))||(0,r.existsSync)(i.default.join(n,"Network","Cookies"))})}(),riskAccepted:eb()},network:n,photosWaiting:l,...eR(),skips:el(),linkedin:(0,g.linkedinState)((0,o.dataDir)()),paused:function(e){if(!e)return[];try{let t=(0,w.getDb)(),n=t.prepare(`SELECT id, name, tier, profile_url, connected_date, created_at
|
|
12
|
+
print("missing %s: %s" % (type(e).__name__, (str(e).splitlines() or [""])[0][:200]))`;function W(e){let t={version:null,venv:!1,imports:!1,missing:null};for(let n of String(e||"").split("\n").map(e=>e.trim()))n.startsWith("version ")?t.version=n.slice(8).trim()||null:"venv"===n?t.venv=!0:"imports"===n?t.imports=!0:n.startsWith("missing ")&&(t.missing=n.slice(8).trim()||null);return t}let z=Object.freeze(["-E","-s","-B","-u","-X","utf8"]);function q(e=process.env){let t={};for(let[n,r]of Object.entries(e))n.startsWith("PYTHON")||(t[n]=r);return t.PYTHONNOUSERSITE="1",t.PYTHONDONTWRITEBYTECODE="1",t.PYTHONUTF8="1",t}function G(e=process.env){return{...e,PYTHONDONTWRITEBYTECODE:"1",PYTHONUTF8:"1"}}let B=new Set(["target","prefix","root","user"]);function K(e=process.env){let t={};for(let[n,r]of Object.entries(e))n.startsWith("PIP_")&&B.has(n.slice(4).toLowerCase().replace(/_/g,"-"))||(t[n]=r);return t}function X(e){return i.default.join(e,"venv")}function Y(e,t=process.platform){return"win32"===t?i.default.join(X(e),"Scripts","python.exe"):i.default.join(X(e),"bin","python")}let J="python";function V(e,t=process.platform){return function(e,t=process.platform){return"win32"===t?i.default.join(e,"python.exe"):i.default.join(e,"bin","python3")}(i.default.join(e,J),t)}function Z(e,t,{timeoutMs:r=8e3,env:i}={}){return new Promise(o=>{let a,s="",l="",u=!1,d=e=>{u||(u=!0,o(e))};try{a=(0,n.spawn)(e,t,{stdio:["ignore","pipe","pipe"],windowsHide:!0,...i?{env:i}:{}})}catch(e){d({ok:!1,stdout:s,stderr:l,problem:e.message});return}let c=(e,t)=>e.length<16384?e+t.toString():e;a.stdout.on("data",e=>{s=c(s,e)}),a.stderr.on("data",e=>{l=c(l,e)});let p=setTimeout(()=>{try{a.kill("SIGKILL")}catch{}d({ok:!1,stdout:s,stderr:l,problem:`it didn't answer within ${Math.round(r/1e3)} seconds`})},r);a.on("error",e=>{clearTimeout(p),d({ok:!1,stdout:s,stderr:l,problem:"ENOENT"===e.code?"it isn't there":e.message})}),a.on("close",(e,t)=>{clearTimeout(p);let n=l.trim().split("\n").pop()||"";d({ok:0===e,stdout:s,stderr:l,problem:0===e?null:t?`it was stopped (${t})`:n||`it exited with ${e}`})})})}async function Q({bundled:e="",app:t="",dataDir:n,probe:o=Z,exists:a=r.default.existsSync,host:s=null,systemCandidates:l=((e=process.platform)=>"win32"===e?F:M)(),timeouts:u={own:2e4,other:8e3},env:d=process.env}={}){let c={run:null,own:null,base:null,systemFound:null,download:null};if(e){let n=t&&i.default.resolve(e).startsWith(`${i.default.resolve(t)}${i.default.sep}`)?"bundled":"custom",r=await o(e,[...z,"-c",H],{timeoutMs:u.own,env:q(d)}),a=W(r.stdout);if(r.ok&&a.imports)return c.run={path:e,source:n,version:a.version},c;c.own={source:n,problem:a.missing||r.problem||"it didn't start"}}let p=Y(n);if(a(p)){let e=await o(p,["-c",H],{timeoutMs:u.other,env:d}),t=W(e.stdout);if(e.ok&&t.imports)return c.run={path:p,source:"venv",version:t.version},c}let f=[];for(let e of l){let t=await o(e,["-c",H],{timeoutMs:u.other,env:d}),n=W(t.stdout);if(n.version){if(t.ok&&n.imports)return c.run={path:e,source:"system",version:n.version},c;f.push({path:e,version:n.version,venv:n.venv})}}let h=f.find(e=>e.venv&&L(e.version));if(h)return c.base={path:h.path,source:"system",version:h.version},c;let g=f.find(e=>L(e.version))||f[0];c.systemFound=g?{version:g.version,venv:g.venv}:null;let m=V(n);if(a(m)){let e=await o(m,[...z,"-c",H],{timeoutMs:u.other,env:q(d)}),t=W(e.stdout);if(e.ok&&t.venv)return c.base={path:m,source:"downloaded",version:t.version},c}return c.download=function(e,t=O){let n=e&&Object.hasOwn(t.builds,e)?t.builds[e]:null;return n?{key:e,version:t.version,release:t.release,...n,url:function(e,t=O){return`https://github.com/astral-sh/python-build-standalone/releases/download/${t.release}/${encodeURIComponent(e.file)}`}(n,t)}:null}(s),c}class ee extends Error{}let et=(...e)=>(globalThis.fetch?._nextOriginalFetch||globalThis.fetch)(...e),en=e=>(e/1048576).toFixed(1);async function er(e,t,{sha256:n,size:r,signal:i,onProgress:o,idleMs:a=3e4,fetchImpl:s=et,from:l="GitHub"}={}){if(!/^[0-9a-f]{64}$/.test(String(n))||!(Number.isInteger(r)&&r>0))throw new ee("There is no pinned checksum for this download, so it wasn't started.");let u=`${t}.part`,d=new AbortController,c=i?AbortSignal.any([i,d.signal]):d.signal,p=null,f=()=>{clearTimeout(p),p=setTimeout(()=>d.abort(new ee(`The download stopped for ${Math.round(a/1e3)} seconds. Check your connection and try again.`)),a)};f();let h=await j.default.open(u,"w"),g=(0,P.createHash)("sha256"),m=0,y=!1;try{let t=await s(e,{signal:c,redirect:"follow",cache:"no-store",headers:{Accept:"application/octet-stream","User-Agent":"six-degrees-scanner-setup"}});if(!t.ok||!t.body)throw new ee(`${l} answered ${t.status} to the download. Try again later.`);let i=Number(t.headers.get("content-length"))||null;if(i&&i!==r)throw new ee(`The download isn't the size it should be (${i} bytes, not ${r}), so it was stopped.`);for await(let e of t.body){if(f(),(m+=e.byteLength)>r)throw new ee("The download is bigger than it should be, so it was stopped.");g.update(e);let t=0;for(;t<e.byteLength;){let{bytesWritten:n}=await h.write(e,t,e.byteLength-t);t+=n}o?.(m,r)}if(m!==r)throw new ee("The download ended early. Try again.");let a=g.digest("hex");if(a!==n)throw new ee("The download doesn't match the checksum Six Degrees has for it, so it was deleted and nothing was unpacked.");return y=!0,a}catch(e){if(c.aborted&&c.reason instanceof Error)throw c.reason;throw e}finally{clearTimeout(p),await h.close(),y?await j.default.rename(u,t):await j.default.rm(u,{force:!0})}}async function ei(e,t,n){let o=i.default.join(e,"python");if(!await j.default.lstat(i.default.join(o,"bin","python3")).catch(()=>null))throw new ee("The download didn't contain the Python it should have.");let a=i.default.join(t,J);return r.default.existsSync(a)&&await j.default.rename(a,i.default.join(n,"python-before")),await j.default.rename(o,a),V(t)}let eo=(0,S.registerScanState)({running:!1,action:null,target:null,recent:[],log:[],startedAt:null,exitCode:null,child:null,abort:null,stopping:!1,stderrTail:[],failure:null,pages:0,found:[],invitee:null,outcome:null}),ea=/^\s*Page \d+\.\.\.|\d+\s*\/\s*\d+\s+collected/,es=/(\d+) found \((?:total: \d+|\d+ with images)\)/;function el(e){for(let t of String(e).split("\n")){let e=t.replace(/\s+$/,"");if(!e)continue;eo.log.push(e),ea.test(e)&&(eo.pages+=1,eo.found.push(50*!!/collected/.test(e)),eo.found.length>400&&eo.found.splice(0,eo.found.length-400));let n=e.match(es);n&&eo.found.length&&(eo.found[eo.found.length-1]=Number(n[1]));let r="connect"===eo.action&&(0,D.connectResultIn)(e);r&&(eo.outcome=r)}eo.log.length>500&&eo.log.splice(0,eo.log.length-500)}function eu(){try{let e=(0,r.readFileSync)(i.default.join((0,o.dataDir)(),"bridge-skips.json"),"utf8"),t=JSON.parse(e);return Object.entries(t).map(([e,t])=>({profileUrl:e,name:t?.name??"",reason:t?.reason??"",at:t?.at??null}))}catch{return[]}}function ed(){let e=[],t={};try{let n=(0,a.resolveProfile)({create:!1});if(n){let r=m((0,o.dataDir)(),n.id);for(let[n,i]of(e=Object.keys(r),Object.entries(r)))t[n]={pages:Number(i?.pages)||0,more:!!i?.more,total:Number(i?.total)||null}}}catch{}return{skips:eu(),read:e,lists:t}}let ec={at:0,value:null},ep=null,ef=0;function eh(){ef++,ec={at:0,value:null},ep=null}let eg=Symbol.for("six-degrees.python-looker"),em=globalThis[eg]??=function({choose:e=Q,now:t=Date.now,retryMs:n=6e4}={}){let r=null,i=null;return async function(o,a={}){if(o&&r?.path===o)return{run:r,own:null,base:null,systemFound:null,download:null};let s=!!o&&i?.path===o&&(!1===i.own.retry||t()-i.at<n),l=await e({...a,bundled:s?"":o});if(s)return{...l,own:i.own};if(o&&l.run?.path===o)r=l.run;else if(o&&l.own){let e="bundled"===l.own.source?{...l.own,retry:!1}:l.own;return i={path:o,at:t(),own:e},{...l,own:e}}return l}}();async function ey(){return{root:(0,o.projectRoot)(),python:await em(process.env.SIX_DEGREES_PYTHON||"",{app:process.env.SIX_DEGREES_APP||"",dataDir:(0,o.dataDir)(),host:(void 0===t&&(t=function({platform:e=process.platform,arch:t=process.arch,sysctlArm64:n=""}={}){return"darwin"===e?`darwin-${(0,C.chipOf)({sysctlArm64:n,processArch:t})}`:"linux"===e&&("x64"===t||"arm64"===t)?`linux-${t}`:null}({sysctlArm64:""})),t)})}}function eb(){return(0,N.chromeInstalled)({platform:process.platform,env:process.env,exists:r.existsSync})}function ew(){let e=null;try{e=(0,k.readSettings)((0,w.getDb)()).scanRiskAccepted}catch{}return(0,T.riskAccepted)({acceptedAt:e,scannedBefore:(0,r.existsSync)(i.default.join((0,o.dataDir)(),"chrome-profile"))})}function ev(){if(Date.now()-ec.at<4e3&&ec.value)return Promise.resolve(ec.value);if(ep)return ep;let e=ef,t=ey().then(t=>(e===ef&&(ec={at:Date.now(),value:t}),t)).finally(()=>{ep===t&&(ep=null)});return ep=t,t}async function eR(){let e=await ev(),t=eb(),n={first:0,second:0,third:0},s=null;try{(s=(0,a.resolveProfile)({create:!1}))&&(n=(0,a.networkCounts)(s.id))}catch{}let l=0;try{l=(0,E.waitingPhotoCount)((0,w.getDb)())}catch{}let u=e.python;return{ready:!!(e.root&&u.run&&t),mapping:function(e){if(!eo.running)return null;if(eo.target?.id&&["bridge","rescrape","resume"].includes(eo.action))return{id:eo.target.id,name:eo.target.name};let t=function(e,t){if(!Array.isArray(e)||!t||!(t.startsWith("auto-bridge")||"resume-all"===t))return null;for(let t=e.length-1;t>=0;t--){let n=String(e[t]).match(f);if(n)return n[1]}return null}(eo.log,eo.action);if(!t||!e)return null;try{let n=(0,w.getDb)().prepare("SELECT id FROM linkedin_connections WHERE user_id = ? AND degree = 1 AND name = ? LIMIT 2").all(e,t);return 1===n.length?{id:n[0].id,name:t}:null}catch{return null}}(s?.id),checks:{scriptsFound:!!e.root,python:!!(u.run||u.base),pythonPath:u.run?.path||u.base?.path||null,pythonVersion:u.run?.version||u.base?.version||null,pythonSource:u.run?.source||null,dependencies:!!u.run,ownPython:u.own,installFrom:u.base?{source:u.base.source,version:u.base.version}:null,systemPython:u.systemFound,download:u.download?{version:u.download.version,size:u.download.size,from:"github.com"}:null,chrome:t,signedIn:function(){let e=(0,o.dataDir)(),t=null;try{t=JSON.parse((0,r.readFileSync)(i.default.join(e,N.SIGNED_IN_FILE),"utf8"))}catch{}let n=i.default.join(e,"chrome-profile","Default");return(0,N.signedInFrom)({note:t,profile:(0,r.existsSync)(i.default.join(e,"chrome-profile")),cookies:(0,r.existsSync)(i.default.join(n,"Cookies"))||(0,r.existsSync)(i.default.join(n,"Network","Cookies"))})}(),riskAccepted:ew(),mac:null},network:n,photosWaiting:l,...eS(),skips:eu(),linkedin:(0,g.linkedinState)((0,o.dataDir)()),paused:function(e){if(!e)return[];try{let t=(0,w.getDb)(),n=t.prepare(`SELECT id, name, tier, profile_url, connected_date, created_at
|
|
13
13
|
FROM linkedin_connections WHERE user_id = ? AND degree = 1`).all(e),r=new Set(t.prepare(`SELECT DISTINCT source_connection_id AS id FROM linkedin_connections
|
|
14
|
-
WHERE user_id = ? AND degree = 2 AND source_connection_id IS NOT NULL`).all(e).map(e=>e.id));return b(n,r,m((0,o.dataDir)(),e),y((0,o.dataDir)()))}catch{return[]}}(s?.id)}}function
|
|
15
|
-
FROM linkedin_connections WHERE id = ? AND user_id = ? AND degree = 1`).get(String(e??""),t.id);if(!r)return null;let i=n.prepare("SELECT 1 FROM linkedin_connections WHERE user_id = ? AND degree = 2 AND source_connection_id = ? LIMIT 1").get(t.id,r.id),[s]=b([r],new Set(i?[r.id]:[]),m((0,o.dataDir)(),t.id),y((0,o.dataDir)()));return s?{nextPage:s.nextPage,pagesRead:s.pagesRead,legacy:s.legacy}:null}catch{return null}}(t.get("resume"))});if(t.has("reach"))return Response.json(
|
|
16
|
-
FROM linkedin_connections WHERE id = ? AND user_id = ? AND degree = 1`).get(String(e??""),t.id);if(!r)return{person:null};let i=n.prepare("SELECT 1 FROM linkedin_connections WHERE user_id = ? AND degree = 2 AND source_connection_id = ? LIMIT 1").get(t.id,r.id),o=function(e=[],t=[],n={}){let r=new Set;for(let e of t||[])e?.source_connection_id!=null&&r.add(e.source_connection_id);let i=new Set;for(let e of n?.skips||[])e?.profileUrl&&i.add((0,x.keyFor)({profile_url:e.profileUrl}));let o=new Set;for(let e of n?.read||[])e&&o.add((0,x.keyFor)({profile_url:e}));let a=new Map;for(let[e,t]of Object.entries(n?.lists||{}))e&&t&&a.set((0,x.keyFor)({profile_url:e}),t);let s=new Map;for(let t of e||[]){let e=t?.unlocked_from_bridge_id;if(null==e||1!==t.degree)continue;let n=s.get(e);n||s.set(e,n=[]),n.push(t)}return{scanned:r,read:o,hidden:i,reachedFrom:s,lists:a}}([],i?[{source_connection_id:r.id}]:[],
|
|
14
|
+
WHERE user_id = ? AND degree = 2 AND source_connection_id IS NOT NULL`).all(e).map(e=>e.id));return b(n,r,m((0,o.dataDir)(),e),y((0,o.dataDir)()))}catch{return[]}}(s?.id)}}function eS(){return{running:eo.running,action:eo.action,target:eo.target,startedAt:eo.startedAt,exitCode:eo.exitCode,failure:eo.running?null:eo.failure,progress:eo.running?function(e,t){if(!Array.isArray(e)||0===e.length)return null;if("setup"===t){let t=String(e[e.length-1]).match(l);return t&&Number(t[2])?{done:Math.min(Number(t[1]),Number(t[2])),total:Number(t[2]),kind:"download"}:null}if("full"===t||"refresh"===t){for(let t=e.length-1;t>=0;t--){let n=String(e[t]);if(p.test(n))return{kind:"saving"};let r=n.match(d);if(r)return h(Number(r[1]),Number(r[1]));let i=n.match(u);if(i)return h(Number(i[1]),Number(i[2]));let o=n.match(s);if(o)return h(0,Number(o[1]))}return null}if(t&&(t.startsWith("auto-bridge")||"resume-all"===t))for(let t=e.length-1;t>=0;t--){let n=String(e[t]).match(c);if(n){let e=Number(n[1]),t=Number(n[2]);if(!t)return null;return{done:Math.min(e-1,t),total:t,current:e,kind:"batch"}}}return null}(eo.log,eo.action):null,pages:eo.running?eo.pages:0,found:eo.running?eo.found:[],log:eo.log.slice(-120),recent:eo.recent,budget:eo.running?function(){try{let e=(0,g.linkedinState)((0,o.dataDir)());return{searches:e.searchesToday??0,cap:e.limits?.daily??null,profiles:e.profilesToday??0,profileCap:e.limits?.profiles??null}}catch{return null}}():null}}async function e_(e){let t=new URL(e?.url||"http://127.0.0.1/api/scraper").searchParams;if(t.has("job"))return Response.json(eS());if(t.has("resume"))return Response.json({resume:function(e){try{let t=(0,a.resolveProfile)({create:!1});if(!t)return null;let n=(0,w.getDb)(),r=n.prepare(`SELECT id, name, tier, profile_url, connected_date, created_at
|
|
15
|
+
FROM linkedin_connections WHERE id = ? AND user_id = ? AND degree = 1`).get(String(e??""),t.id);if(!r)return null;let i=n.prepare("SELECT 1 FROM linkedin_connections WHERE user_id = ? AND degree = 2 AND source_connection_id = ? LIMIT 1").get(t.id,r.id),[s]=b([r],new Set(i?[r.id]:[]),m((0,o.dataDir)(),t.id),y((0,o.dataDir)()));return s?{nextPage:s.nextPage,pagesRead:s.pagesRead,legacy:s.legacy}:null}catch{return null}}(t.get("resume"))});if(t.has("reach"))return Response.json(ed());if(t.has("usage"))try{return Response.json((0,g.linkedinUsage)((0,o.dataDir)()))}catch{return Response.json({error:"The record of LinkedIn searches on this computer could not be read."},{status:500})}return t.has("person")?Response.json(function(e){try{let t=(0,a.resolveProfile)({create:!1});if(!t)return{person:null};let n=(0,w.getDb)(),r=n.prepare(`SELECT id, name, tier, power_score, degree, profile_url, unlocked_from_bridge_id, unlocked_from_name
|
|
16
|
+
FROM linkedin_connections WHERE id = ? AND user_id = ? AND degree = 1`).get(String(e??""),t.id);if(!r)return{person:null};let i=n.prepare("SELECT 1 FROM linkedin_connections WHERE user_id = ? AND degree = 2 AND source_connection_id = ? LIMIT 1").get(t.id,r.id),o=function(e=[],t=[],n={}){let r=new Set;for(let e of t||[])e?.source_connection_id!=null&&r.add(e.source_connection_id);let i=new Set;for(let e of n?.skips||[])e?.profileUrl&&i.add((0,x.keyFor)({profile_url:e.profileUrl}));let o=new Set;for(let e of n?.read||[])e&&o.add((0,x.keyFor)({profile_url:e}));let a=new Map;for(let[e,t]of Object.entries(n?.lists||{}))e&&t&&a.set((0,x.keyFor)({profile_url:e}),t);let s=new Map;for(let t of e||[]){let e=t?.unlocked_from_bridge_id;if(null==e||1!==t.degree)continue;let n=s.get(e);n||s.set(e,n=[]),n.push(t)}return{scanned:r,read:o,hidden:i,reachedFrom:s,lists:a}}([],i?[{source_connection_id:r.id}]:[],ed());return{person:{id:r.id,name:r.name,tier:r.tier,power_score:r.power_score,unlocked_from_bridge_id:r.unlocked_from_bridge_id,unlocked_from_name:r.unlocked_from_name},circle:r?o.scanned.has(r.id)||r.profile_url&&o.read?.has((0,x.keyFor)(r))?"scanned":r.profile_url&&o.hidden.has((0,x.keyFor)(r))?"hidden":"todo":"todo"}}catch{return{person:null}}}(t.get("person"))):Response.json(await eR())}let eE={install:{label:"Installing the scanner’s Python packages"},setup:{label:"Setting up the scanner"},login:{flag:"--login",label:"Opening LinkedIn so you can sign in"},full:{flag:"--full",label:"Scanning your whole network"},refresh:{flag:"--refresh",label:"Checking for new connections"},"auto-bridge":{flag:"--auto-bridge",label:"Mapping every bridge in turn"},"auto-bridge-retry":{flag:"--auto-bridge --retry-private",label:"Mapping every bridge, hidden ones included"},bridge:{flag:"--bridge",needsName:!0,byId:!0,label:"Mapping the circle behind"},resume:{flag:"--bridge-url",needsId:!0,label:"Carrying on with",searches:!0},"resume-all":{flag:"--auto-bridge --only-unfinished",label:"Carrying on with every paused list",searches:!0},rescrape:{flag:"--rescrape",needsName:!0,label:"Re-mapping the circle behind"},company:{flag:"--company",needsName:!0,label:"Scanning"},messages:{flag:"--messages",label:"Reading your messages list"},"messages-full":{flag:"--messages --full-history",label:"Reading your whole messages history"},photos:{flag:"--save-photos",label:"Saving profile photos to this computer"},connect:{flag:"--connect",label:"Sending a connection request to"}};function ek(e){let t=String(e??"").trim();return t.length>400||/[\u0000-\u001f\s]/.test(t)?null:/^https?:\/\/([a-z]{2,3}\.|www\.)?linkedin\.com\/in\/[^/?#]+\/?$/i.test(t)?t:null}function eT(e){let t=String(e??"").trim();return!t||t.length>120||/[\u0000-\u001f]/.test(t)?null:t}async function ex(e){let t,s={};try{s=await e.json()}catch{}let l=String(s.action||"");if("cancel"===l)return!function(){if(eo.abort){eo.stopping=!0,el("Stopping…"),eo.abort.abort(new ee("Stopped."));return}let e=eo.child;if(!e)return;eo.stopping=!0,el("Stopping…");let t=e.pid;try{process.kill(-t,"SIGTERM")}catch{try{e.kill("SIGTERM")}catch{}}setTimeout(()=>{if(eo.child&&eo.child.pid===t){el("Still running. Forcing it to stop.");try{process.kill(-t,"SIGKILL")}catch{try{e.kill("SIGKILL")}catch{}}}},2e4)}(),Response.json({ok:!0,cancelled:!0});if("set-limits"===l){let e=(0,g.writeLimits)((0,o.dataDir)(),{daily:s.daily,monthly:s.monthly,profiles:s.profiles,pace:s.pace});return Response.json({ok:!0,limits:e})}if("lift-cooldown"===l)return(0,g.liftCooldown)((0,o.dataDir)()),Response.json({ok:!0});if(!Object.hasOwn(eE,l))return Response.json({error:`Unknown action '${l}'`},{status:400});let u=null;if("connect"===l){let e=function(e){try{let t=(0,a.resolveProfile)({create:!1}),n=(0,w.getDb)(),r=t&&n.prepare("SELECT id, name, degree, profile_url, source_connection_id FROM linkedin_connections WHERE id = ? AND user_id = ?").get(String(e??""),t.id);if(!r)return(0,D.personRefusal)(null);let i=(0,D.personRefusal)(r,(0,A.requestStanding)(n,{profileUrl:r.profile_url,userId:t.id}));if(i)return i;let o=ek(r.profile_url);if(!o)return{status:400,error:`${r.name||"Their"} LinkedIn profile address on file can’t be used.`};return{person:{id:r.id,name:eT(r.name)||null,profileUrl:o,userId:t.id,bridgeId:2===r.degree?r.source_connection_id??null:null}}}catch{return(0,D.personRefusal)(null)}}(s.id);if(e.error)return Response.json({error:e.error},{status:e.status});if(u=e.person,!function(){try{return!!(0,k.readSettings)((0,w.getDb)()).autoConnectAccepted}catch{return!1}}())return Response.json({error:D.AUTO_REFUSAL,needsAutoAcceptance:!0},{status:409})}if((0,T.touchesLinkedIn)(l)&&!ew())return Response.json({error:T.RISK_REFUSAL,needsRiskAcceptance:!0},{status:409});if((0,T.touchesLinkedIn)(l)&&!eb())return Response.json({error:N.CHROME_REFUSAL,needsChrome:!0},{status:409});let d=eE[l],c=Number.isInteger(s.maxBridges)&&s.maxBridges>0?Math.min(s.maxBridges,500):0,p=Array.isArray(s.tiers)?s.tiers.map(e=>String(e).toUpperCase()).filter(e=>"SABCD".includes(e)&&1===e.length):[],f="score"===s.order?"score":"newest",h=[10,25,50,100].includes(s.maxPages)?s.maxPages:100,m=l.startsWith("auto-bridge")||["bridge","rescrape","resume","resume-all"].includes(l),y=!0===s.deeper&&(l.startsWith("auto-bridge")||"bridge"===l),b=d.needsId||d.byId&&!!s.id,E=null;if(d.needsName&&!b&&!(E=eT(s.name)))return Response.json({error:"A name is required for this action."},{status:400});let x=null,P=null;if(b){try{let e=(0,a.resolveProfile)({create:!1});P=e&&(0,w.getDb)().prepare("SELECT name, profile_url FROM linkedin_connections WHERE id = ? AND user_id = ? AND degree = 1").get(String(s.id??""),e.id),x=P?.profile_url&&ek(P.profile_url)}catch{x=null}if(!x)return Response.json({error:"That connection could not be found."},{status:400})}let j="string"==typeof s.id&&/^[\w-]{1,64}$/.test(s.id)?s.id:null,C=u?{id:u.id,name:u.name}:E||x?{id:j,name:E||P?.name||null}:null,O=d.searches||l.startsWith("auto-bridge")||["bridge","rescrape","company","full","refresh","connect"].includes(l);if(!["install","setup","login"].includes(l)&&(0,_.pendingImport)((0,o.dataDir)()))return Response.json({error:"An import is waiting to finish. Restart Six Degrees first (Settings → Your data), then scan."},{status:409});let $=(0,g.linkedinState)((0,o.dataDir)()).cooldown;if(O&&$)return Response.json({error:`Scanning is paused until ${new Date($.until).toLocaleString()}: ${$.reason}.`,cooldown:$},{status:409});if(u){let e=(0,D.inviteRefusal)((0,g.linkedinState)((0,o.dataDir)()));if(e)return Response.json({error:e},{status:409})}if(eo.running)return u?Response.json({error:`${(0,S.runningNow)(eo.action)}. Press Auto again once it has finished.`,action:eo.action},{status:409}):Response.json({error:"Something is already running.",action:eo.action},{status:409});let M=(0,o.projectRoot)();if(!M)return Response.json({error:"Could not find scripts/scrape.py next to the app."},{status:500});eh();let F=(await ev()).python;if(eo.running)return Response.json({error:"Something is already running.",action:eo.action},{status:409});let L=null;if("install"===l||"setup"===l){let e=function(e,t,{root:n,data:o,say:a}){if(t.run)return{status:409,error:"bundled"===t.run.source?"The scanner is already set up: its Python comes with the app.":"The scanner is already set up."};let s=t.base;if("install"===e&&!s)return t.download?{status:409,error:"This computer has no Python the scanner can use. Use Set up the scanner instead."}:{status:500,error:"No Python 3.10 to 3.14 is installed, or none is on this app’s PATH."};if("setup"===e&&s?.source==="system")return{status:409,error:`This computer already has Python ${s.version}, so nothing needs downloading. Use Install instead.`};if("setup"===e&&!s&&!t.download)return{status:409,error:"There is no Python download for this computer. Install Python 3.10 to 3.14, then reload."};let l=i.default.join(n,"scripts","requirements.txt"),u=e=>(function({base:e,dataDir:t,requirements:n}){let r="downloaded"===e.source,i=Y(t);return[{cmd:e.path,args:[...r?z:[],"-m","venv","--clear",X(t)],...r?{env:q}:{},note:"Creating the scanner’s own Python environment"},{cmd:i,args:["-m","pip","install","--disable-pip-version-check","--no-input","-r",n],env:K,note:"Installing Playwright, requests and Pillow"},{cmd:i,args:["-c",function(e=U){return`import sys
|
|
17
17
|
try:
|
|
18
18
|
${e}
|
|
19
19
|
except Exception as e:
|
|
20
20
|
first = (str(e).splitlines() or [""])[0][:200]
|
|
21
21
|
sys.stderr.write("pip said it installed them, but the scanner's environment can't load them (%s: %s). A pip setting may send packages somewhere else: pip config list shows yours.\\n" % (type(e).__name__, first))
|
|
22
22
|
sys.exit(1)
|
|
23
|
-
print("The scanner's packages load in its environment.")`}()],note:"Checking that they load"}]})({base:e,dataDir:o,requirements:l});if(s)return{plan:u(s),cleanup:null};let d=t.download;(0,r.mkdirSync)(o,{recursive:!0}),function(e,{now:t=Date.now(),maxAgeMs:n=36e5}={}){let o=[];try{o=r.default.readdirSync(e)}catch{return}for(let a of o){if(!a.startsWith(j.SETUP_WORK_PREFIX))continue;let o=i.default.join(e,a);try{let e=r.default.lstatSync(o);e.isDirectory()&&t-e.mtimeMs>n&&r.default.rmSync(o,{recursive:!0,force:!0})}catch{}}}(o);let c=(0,r.mkdtempSync)(i.default.join(o,j.SETUP_WORK_PREFIX)),p=i.default.join(c,d.file),f=-1;return{plan:[{note:`Downloading Python ${d.version} from GitHub (${et(d.size)} MB)`,run:async({signal:e})=>{await en(d.url,p,{sha256:d.sha256,size:d.size,signal:e,onProgress:(e,t)=>{let n=Math.floor(e/t*10);n>f&&(f=n,a(`Downloading Python ${d.version}: ${et(e)} of ${et(t)} MB`))}}),a("Its checksum matches the one Six Degrees has for it.")}},{cmd:"tar",args:["-xzf",p,"-C",c],note:"Unpacking it"},{run:()=>er(c,o,c)},...u({path:J(o),source:"downloaded"})],cleanup:()=>(0,r.rmSync)(c,{recursive:!0,force:!0})}}(l,M,{root:$,data:(0,o.dataDir)(),say:es});if(e.error)return Response.json({error:e.error},{status:e.status});({plan:t,cleanup:L}=e)}else{if(!M.run)return Response.json({error:"The scanner’s packages are not installed yet. Do step 1 first."},{status:409});t=[function(e,t,n=[]){let r=e?.source==="bundled"||e?.source==="custom";return{cmd:e.path,args:[...r?W:[],t,...n],env:r?z:q}}(M.run,i.default.join($,"scripts","scrape.py"),[...u?[`--connect=${u.profileUrl}`,...u.name?[`--connect-name=${u.name}`]:[]]:E?[`${d.flag}=${E}`]:x?[`--bridge-url=${x}`]:d.flag.split(" "),...x&&"bridge"===l&&!y?["--from-start"]:[],...c&&(l.startsWith("auto-bridge")||"resume-all"===l)?[`--max-bridges=${c}`]:[],...p.length&&l.startsWith("auto-bridge")?[`--tiers=${p.join(",")}`]:[],...l.startsWith("auto-bridge")?[`--order=${f}`]:[],...!0===s.experimental&&l.startsWith("auto-bridge")?["--experimental"]:[],...m?[`--max-pages=${l.startsWith("resume")?100:h}`]:[],...y?["--deeper"]:[],...!0===s.headless&&"login"!==l?["--headless"]:[]])]}let U=e.headers.get("host")||"127.0.0.1:3000",H=U.includes(":")?U.split(":").pop():"80";ei.running=!0,ei.stopping=!1,ei.action=l,ei.target=N,ei.exitCode=null,ei.startedAt=Date.now(),ei.log=[d.label+(N?.name?` ${N.name}…`:"…")],ei.pages=0,ei.found=[],ei.stderrTail=[],ei.failure=null,ei.invitee=u,ei.outcome=null,ef();let G="";try{G=(0,a.resolveProfile)().id}catch{}let Y={...process.env,SIX_DEGREES_USER_ID:G,APP_URL:`http://127.0.0.1:${H}`,PYTHONUNBUFFERED:"1",SIX_DEGREES_ROOT:$,SIX_DEGREES_FROM_APP:"1"};function V(e){let t=ei.invitee;if("connect"===ei.action&&t&&!t.marked&&(0,A.connectMarks)(ei.outcome)){t.marked=!0;try{let{saved:e,xp:n,user:r}=(0,C.markSentRows)((0,w.getDb)(),{connectionId:t.id,profileUrl:t.profileUrl,userId:t.userId,bridgeId:t.bridgeId});e&&Promise.resolve((0,C.awardXP)((0,C.whose)(r),n)).catch(()=>{}),es("Marked as sent in Six Degrees.")}catch(e){es(`Sent on LinkedIn, but it couldn’t be marked as sent here: ${e.message}`)}}if(0!==e&&!ei.stopping&&ei.stderrTail.length){let e=new Set(ei.log),t=ei.stderrTail.filter(t=>!e.has(t));t.length&&es(t.join("\n"));let n=ei.stderrTail.filter(e=>!/Warning|warnings\.warn\(/.test(e)).slice(-6);ei.failure=n.length?n:null}let n=ei.stopping;es(ei.stopping?"Stopped.":0===e?"Finished.":`Stopped (exit ${e}).`),ei.stopping=!1,ei.running=!1,ei.child=null,ei.abort=null,ei.exitCode=e,ei.recent=[{action:ei.action,target:ei.target,startedAt:ei.startedAt,exitCode:e,failure:ei.failure,..."connect"===ei.action?{outcome:ei.outcome}:{}},...ei.recent].slice(0,5);let r=(0,R.scanDoneNotification)({action:ei.action,target:ei.target,exitCode:e,stopped:n,log:ei.log.slice(-12),userId:G||null});if(r&&Promise.resolve(v.db.from("notifications").insert([r])).catch(()=>{}),L)try{L()}catch{}if(ef(),!["install","setup","login"].includes(ei.action))try{(0,w.backUpDailyIfDue)()&&es("Made today’s backup of your network (Settings → Your data).")}catch(e){es(`Today’s backup couldn’t be made: ${e.message}`)}}return!function e(r){let i;if(r>=t.length)return V(0);let o=t[r];if(o.note&&es(o.note+"…"),o.run){let t=new AbortController;ei.abort=t,Promise.resolve().then(()=>o.run({signal:t.signal})).then(()=>{if(ei.abort=null,ei.stopping)return V(0);e(r+1)},e=>{if(ei.abort=null,ei.stopping)return V(0);ei.stderrTail.push(e instanceof Q?e.message:`Could not finish: ${e.message}`),V(1)});return}try{let e="win32"===process.platform;i=(0,n.spawn)(o.cmd,o.args,{cwd:$,env:o.env?o.env(Y):Y,detached:!e,windowsHide:!0})}catch(e){return es(`Could not start: ${e.message}`),V(-1)}ei.child=i,i.stdout.on("data",e=>es(e.toString())),i.stderr.on("data",e=>{let t=e.toString();for(let e of t.split("\n")){let t=e.replace(/\s+$/,"");t&&ei.stderrTail.push(t)}ei.stderrTail.length>20&&ei.stderrTail.splice(0,ei.stderrTail.length-20),/error|Error|Traceback|No module|failed|externally-managed/.test(t)&&es(t)}),i.on("error",e=>{es(`Could not start: ${e.message}`),V(-1)}),i.on("close",t=>ei.stopping?V(t??0):0===t||o.tolerant?void e(r+1):V(t))}(0),Response.json({ok:!0,action:l,startedAt:ei.startedAt})}e.s(["GET",0,eS,"POST",0,eT],81638)},14974,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250),i=e.i(59756),o=e.i(61916),a=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(26937),g=e.i(10372),m=e.i(93695);e.i(52474);var y=e.i(220);let b=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/scraper/route",pathname:"/api/scraper",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/scraper/route.js",nextConfigOutput:"standalone",userland:()=>e.r(81638),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:v,serverHooks:R}=b;async function S(e,t,r){r.requestMeta&&(0,i.setRequestMeta)(e,r.requestMeta),b.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/scraper/route";w=w.replace(/\/index$/,"")||"/";let v=await b.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:R,deploymentId:S,params:_,nextConfig:E,parsedUrl:k,isDraftMode:T,prerenderManifest:x,routerServerContext:A,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:P,clientReferenceManifest:N,serverActionsManifest:j}=v,I=(0,s.normalizeAppPath)(w),O=!!(x.dynamicRoutes[I]||x.routes[P]),$=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,k,!1):t.end("This page could not be found"),null);if(O&&!T){let e=!!x.routes[P],t=x.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await $();throw new m.NoFallbackError}}let M=null;!O||b.isDev||T||(M="/index"===(M=P)?"/":M);let L=!0===b.isDev||!O,F=O&&!L;j&&N&&(0,a.setManifestsSingleton)({page:w,clientReferenceManifest:N,serverActionsManifest:j});let U=e.method||"GET",H=(0,o.getTracer)(),W=H.getActiveScopeSpan(),z=!!(null==A?void 0:A.isWrappedByNextServer),q=!!(0,i.getRequestMeta)(e,"minimalMode"),G=(0,i.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,E,x,q);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let B={params:_,previewProps:x.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts,useCacheTimeout:E.experimental.useCacheTimeout},cacheComponents:!!E.cacheComponents,validationLevel:E.experimental.instantInsights.validationLevel,supportsDynamicResponse:L,incrementalCache:G,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:E.cacheLife,staticPageGenerationTimeout:E.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,i)=>b.onRequestError(e,t,r,i,A)},sharedContext:{buildId:R,deploymentId:S}},K=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),Y=u.NextRequestAdapter.fromNodeNextRequest(K,(0,u.signalFromNodeResponse)(t)),J=async({previousCacheEntry:n})=>{try{if(!q&&C&&D&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await b.handle(Y,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let o=B.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let a=B.renderOpts.collectedTags;if(!O)return await (0,p.sendResponse)(K,X,i,o),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);a&&(t[g.NEXT_CACHE_TAGS_HEADER]=a),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,r=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=g.INFINITE_CACHE?!1!==n&&n>0?E.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:C})},!1,A),t}},V=async(i,a)=>{try{var s,l;let i=await b.handleResponse({req:e,nextConfig:E,cacheKey:M,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:x,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:J,waitUntil:r.waitUntil,isMinimalMode:q});if(!O)return;if((null==i||null==(s=i.value)?void 0:s.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});q||t.setHeader("x-nextjs-cache",C?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,f.fromNodeOutgoingHttpHeaders)(i.value.headers);q&&O||o.delete(g.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,h.getCacheControlHeader)(i.cacheControl)),await (0,p.sendResponse)(K,X,new Response(i.value.body,{headers:o,status:i.value.status||200}));return}catch(t){if(t instanceof m.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:C})},!1,A),O)throw t;await (0,p.sendResponse)(K,X,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:o.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let n=H.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=n.get("next.route")||I,s=`${U} ${r}`;i.setAttributes({"next.route":r,"http.route":r,"next.span_name":s}),i.updateName(s),a&&a!==i&&(a.setAttribute("http.route",r),a.updateName(s))})()}};if(z&&W)await V(W,void 0);else{let t=H.getActiveScopeSpan();await H.withPropagatedContext(e.headers,()=>H.trace(d.BaseServerSpan.handleRequest,{spanName:`${U} ${w}`,kind:o.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},e=>V(e,t)),void 0,!z)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:v})},"routeModule",0,b,"serverHooks",0,R,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,v])}];
|
|
23
|
+
print("The scanner's packages load in its environment.")`}()],note:"Checking that they load"}]})({base:e,dataDir:o,requirements:l});if(s)return{plan:u(s),cleanup:null};let d=t.download;(0,r.mkdirSync)(o,{recursive:!0}),function(e,{now:t=Date.now(),maxAgeMs:n=36e5}={}){let o=[];try{o=r.default.readdirSync(e)}catch{return}for(let a of o){if(!a.startsWith(I.SETUP_WORK_PREFIX))continue;let o=i.default.join(e,a);try{let e=r.default.lstatSync(o);e.isDirectory()&&t-e.mtimeMs>n&&r.default.rmSync(o,{recursive:!0,force:!0})}catch{}}}(o);let c=(0,r.mkdtempSync)(i.default.join(o,I.SETUP_WORK_PREFIX)),p=i.default.join(c,d.file),f=-1;return{plan:[{note:`Downloading Python ${d.version} from GitHub (${en(d.size)} MB)`,run:async({signal:e})=>{await er(d.url,p,{sha256:d.sha256,size:d.size,signal:e,onProgress:(e,t)=>{let n=Math.floor(e/t*10);n>f&&(f=n,a(`Downloading Python ${d.version}: ${en(e)} of ${en(t)} MB`))}}),a("Its checksum matches the one Six Degrees has for it.")}},{cmd:"tar",args:["-xzf",p,"-C",c],note:"Unpacking it"},{run:()=>ei(c,o,c)},...u({path:V(o),source:"downloaded"})],cleanup:()=>(0,r.rmSync)(c,{recursive:!0,force:!0})}}(l,F,{root:M,data:(0,o.dataDir)(),say:el});if(e.error)return Response.json({error:e.error},{status:e.status});({plan:t,cleanup:L}=e)}else{if(!F.run)return Response.json({error:"The scanner’s packages are not installed yet. Do step 1 first."},{status:409});t=[function(e,t,n=[]){let r=e?.source==="bundled"||e?.source==="custom";return{cmd:e.path,args:[...r?z:[],t,...n],env:r?q:G}}(F.run,i.default.join(M,"scripts","scrape.py"),[...u?[`--connect=${u.profileUrl}`,...u.name?[`--connect-name=${u.name}`]:[]]:E?[`${d.flag}=${E}`]:x?[`--bridge-url=${x}`]:d.flag.split(" "),...x&&"bridge"===l&&!y?["--from-start"]:[],...c&&(l.startsWith("auto-bridge")||"resume-all"===l)?[`--max-bridges=${c}`]:[],...p.length&&l.startsWith("auto-bridge")?[`--tiers=${p.join(",")}`]:[],...l.startsWith("auto-bridge")?[`--order=${f}`]:[],...!0===s.experimental&&l.startsWith("auto-bridge")?["--experimental"]:[],...m?[`--max-pages=${l.startsWith("resume")?100:h}`]:[],...y?["--deeper"]:[],...!0===s.headless&&"login"!==l?["--headless"]:[]])]}let H=e.headers.get("host")||"127.0.0.1:3000",W=H.includes(":")?H.split(":").pop():"80";eo.running=!0,eo.stopping=!1,eo.action=l,eo.target=C,eo.exitCode=null,eo.startedAt=Date.now(),eo.log=[d.label+(C?.name?` ${C.name}…`:"…")],eo.pages=0,eo.found=[],eo.stderrTail=[],eo.failure=null,eo.invitee=u,eo.outcome=null,eh();let B="";try{B=(0,a.resolveProfile)().id}catch{}let J={...process.env,SIX_DEGREES_USER_ID:B,APP_URL:`http://127.0.0.1:${W}`,PYTHONUNBUFFERED:"1",SIX_DEGREES_ROOT:M,SIX_DEGREES_FROM_APP:"1"};function Z(e){let t=eo.invitee;if("connect"===eo.action&&t&&!t.marked&&(0,D.connectMarks)(eo.outcome)){t.marked=!0;try{let{saved:e,xp:n,user:r}=(0,A.markSentRows)((0,w.getDb)(),{connectionId:t.id,profileUrl:t.profileUrl,userId:t.userId,bridgeId:t.bridgeId});e&&Promise.resolve((0,A.awardXP)((0,A.whose)(r),n)).catch(()=>{}),el("Marked as sent in Six Degrees.")}catch(e){el(`Sent on LinkedIn, but it couldn’t be marked as sent here: ${e.message}`)}}if(0!==e&&!eo.stopping&&eo.stderrTail.length){let e=new Set(eo.log),t=eo.stderrTail.filter(t=>!e.has(t));t.length&&el(t.join("\n"));let n=eo.stderrTail.filter(e=>!/Warning|warnings\.warn\(/.test(e)).slice(-6);eo.failure=n.length?n:null}let n=eo.stopping;el(eo.stopping?"Stopped.":0===e?"Finished.":`Stopped (exit ${e}).`),eo.stopping=!1,eo.running=!1,eo.child=null,eo.abort=null,eo.exitCode=e,eo.recent=[{action:eo.action,target:eo.target,startedAt:eo.startedAt,exitCode:e,failure:eo.failure,..."connect"===eo.action?{outcome:eo.outcome}:{}},...eo.recent].slice(0,5);let r=(0,R.scanDoneNotification)({action:eo.action,target:eo.target,exitCode:e,stopped:n,log:eo.log.slice(-12),userId:B||null});if(r&&Promise.resolve(v.db.from("notifications").insert([r])).catch(()=>{}),L)try{L()}catch{}if(eh(),!["install","setup","login"].includes(eo.action))try{(0,w.backUpDailyIfDue)()&&el("Made today’s backup of your network (Settings → Your data).")}catch(e){el(`Today’s backup couldn’t be made: ${e.message}`)}}return!function e(r){let i;if(r>=t.length)return Z(0);let o=t[r];if(o.note&&el(o.note+"…"),o.run){let t=new AbortController;eo.abort=t,Promise.resolve().then(()=>o.run({signal:t.signal})).then(()=>{if(eo.abort=null,eo.stopping)return Z(0);e(r+1)},e=>{if(eo.abort=null,eo.stopping)return Z(0);eo.stderrTail.push(e instanceof ee?e.message:`Could not finish: ${e.message}`),Z(1)});return}try{let e="win32"===process.platform;i=(0,n.spawn)(o.cmd,o.args,{cwd:M,env:o.env?o.env(J):J,detached:!e,windowsHide:!0})}catch(e){return el(`Could not start: ${e.message}`),Z(-1)}eo.child=i,i.stdout.on("data",e=>el(e.toString())),i.stderr.on("data",e=>{let t=e.toString();for(let e of t.split("\n")){let t=e.replace(/\s+$/,"");t&&eo.stderrTail.push(t)}eo.stderrTail.length>20&&eo.stderrTail.splice(0,eo.stderrTail.length-20),/error|Error|Traceback|No module|failed|externally-managed/.test(t)&&el(t)}),i.on("error",e=>{el(`Could not start: ${e.message}`),Z(-1)}),i.on("close",t=>eo.stopping?Z(t??0):0===t||o.tolerant?void e(r+1):Z(t))}(0),Response.json({ok:!0,action:l,startedAt:eo.startedAt})}e.s(["GET",0,e_,"POST",0,ex],81638)},14974,e=>{"use strict";var t=e.i(47909),n=e.i(74017),r=e.i(96250),i=e.i(59756),o=e.i(61916),a=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(26937),g=e.i(10372),m=e.i(93695);e.i(52474);var y=e.i(220);let b=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/scraper/route",pathname:"/api/scraper",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/scraper/route.js",nextConfigOutput:"standalone",userland:()=>e.r(81638),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:v,serverHooks:R}=b;async function S(e,t,r){r.requestMeta&&(0,i.setRequestMeta)(e,r.requestMeta),b.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/scraper/route";w=w.replace(/\/index$/,"")||"/";let v=await b.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:R,deploymentId:S,params:_,nextConfig:E,parsedUrl:k,isDraftMode:T,prerenderManifest:x,routerServerContext:N,isOnDemandRevalidate:D,revalidateOnlyGenerated:A,resolvedPathname:P,clientReferenceManifest:j,serverActionsManifest:C}=v,I=(0,s.normalizeAppPath)(w),O=!!(x.dynamicRoutes[I]||x.routes[P]),$=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,k,!1):t.end("This page could not be found"),null);if(O&&!T){let e=!!x.routes[P],t=x.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await $();throw new m.NoFallbackError}}let M=null;!O||b.isDev||T||(M="/index"===(M=P)?"/":M);let F=!0===b.isDev||!O,L=O&&!F;C&&j&&(0,a.setManifestsSingleton)({page:w,clientReferenceManifest:j,serverActionsManifest:C});let U=e.method||"GET",H=(0,o.getTracer)(),W=H.getActiveScopeSpan(),z=!!(null==N?void 0:N.isWrappedByNextServer),q=!!(0,i.getRequestMeta)(e,"minimalMode"),G=(0,i.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,E,x,q);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let B={params:_,previewProps:x.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts,useCacheTimeout:E.experimental.useCacheTimeout},cacheComponents:!!E.cacheComponents,validationLevel:E.experimental.instantInsights.validationLevel,supportsDynamicResponse:F,incrementalCache:G,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:E.cacheLife,staticPageGenerationTimeout:E.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,r,i)=>b.onRequestError(e,t,r,i,N)},sharedContext:{buildId:R,deploymentId:S}},K=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),Y=u.NextRequestAdapter.fromNodeNextRequest(K,(0,u.signalFromNodeResponse)(t)),J=async({previousCacheEntry:n})=>{try{if(!q&&D&&A&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await b.handle(Y,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let o=B.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let a=B.renderOpts.collectedTags;if(!O)return await (0,p.sendResponse)(K,X,i,o),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);a&&(t[g.NEXT_CACHE_TAGS_HEADER]=a),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,r=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=g.INFINITE_CACHE?!1!==n&&n>0?E.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:r}}}}catch(t){throw(null==n?void 0:n.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:D})},!1,N),t}},V=async(i,a)=>{try{var s,l;let i=await b.handleResponse({req:e,nextConfig:E,cacheKey:M,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:x,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:A,responseGenerator:J,waitUntil:r.waitUntil,isMinimalMode:q});if(!O)return;if((null==i||null==(s=i.value)?void 0:s.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});q||t.setHeader("x-nextjs-cache",D?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,f.fromNodeOutgoingHttpHeaders)(i.value.headers);q&&O||o.delete(g.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,h.getCacheControlHeader)(i.cacheControl)),await (0,p.sendResponse)(K,X,new Response(i.value.body,{headers:o,status:i.value.status||200}));return}catch(t){if(t instanceof m.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:L,isOnDemandRevalidate:D})},!1,N),O)throw t;await (0,p.sendResponse)(K,X,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:o.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let n=H.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=n.get("next.route")||I,s=`${U} ${r}`;i.setAttributes({"next.route":r,"http.route":r,"next.span_name":s}),i.updateName(s),a&&a!==i&&(a.setAttribute("http.route",r),a.updateName(s))})()}};if(z&&W)await V(W,void 0);else{let t=H.getActiveScopeSpan();await H.withPropagatedContext(e.headers,()=>H.trace(d.BaseServerSpan.handleRequest,{spanName:`${U} ${w}`,kind:o.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},e=>V(e,t)),void 0,!z)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:v})},"routeModule",0,b,"serverHooks",0,R,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,v])}];
|
|
24
24
|
|
|
25
25
|
//# sourceMappingURL=_1_fynia._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[24214,(e,t,r)=>{t.exports={name:"six-degrees",version:"0.
|
|
1
|
+
module.exports=[24214,(e,t,r)=>{t.exports={name:"six-degrees",version:"1.0.0",description:"Map your professional network as a galaxy — leverage tiers, bridges into new circles, and the shortest path to anyone. Runs locally on your own data.",license:"MIT",author:"Blake Burford",repository:{type:"git",url:"git+https://github.com/blakeb056/six-degrees.git"},bugs:{url:"https://github.com/blakeb056/six-degrees/issues"},homepage:"https://sixdegreesapp.com/",keywords:["linkedin","network","graph","visualization","d3","local-first","networking","career"],engines:{node:">=22.13"},os:["darwin","linux"],private:!1,bin:{"six-degrees":"bin/six-degrees.mjs"},files:["bin/",".next/standalone/",".next/static/","public/","db/","lib/","scripts/scrape.py","scripts/image_store.py","scripts/requirements.txt","README.md","LICENSE","CHANGELOG.md","SECURITY.md","scripts/check-node.mjs","scripts/audit-avatars.mjs","scripts/check-stale-server.mjs","scripts/update.mjs"],scripts:{dev:"node scripts/next.mjs dev -H 127.0.0.1",predev:"node scripts/check-node.mjs && node scripts/check-stale-server.mjs",fresh:"node scripts/check-node.mjs && node scripts/sandbox.mjs",build:"node scripts/next.mjs build && node scripts/prepare-standalone.mjs",prebuild:"node scripts/check-node.mjs",start:"node scripts/next.mjs start -H 127.0.0.1",lint:"eslint",test:"node --test tests/*.test.mjs","gen:demo":"node scripts/gen-synthetic.mjs",prepack:"npm run build","start:packaged":"node bin/six-degrees.mjs",scrape:"python3 scripts/scrape.py","scrape:login":"python3 scripts/scrape.py --login","scrape:server":"python3 scripts/scrape.py --server","setup:python":"python3 -m pip install -r scripts/requirements.txt","scrape:full":"python3 scripts/scrape.py --full","scrape:refresh":"python3 scripts/scrape.py --refresh","audit:avatars":"node scripts/audit-avatars.mjs","build:app":"node scripts/build-app.mjs","build:desktop":"node scripts/build-app.mjs --shell=electron",desktop:"electron desktop",update:"node scripts/update.mjs"},devDependencies:{"@electron/packager":"20.3.0",d3:"^7.9.0",electron:"44.4.5",eslint:"^9","eslint-config-next":"16.3.6",next:"16.3.6",react:"19.2.4","react-dom":"19.2.4"}}},34091,e=>{"use strict";var t=e.i(74533),r=e.i(2157),s=e.i(10960),n=e.i(60526),a=e.i(50227),i=e.i(12506),o=e.i(98199);e.i(66680),e.i(12714);let l=new Set(["checking","downloading","verifying","preparing","restarting"]),u=new Set(["checking","downloading","verifying","preparing"]);class c extends Error{constructor(e,t=null){super(e),this.code=t}}function d({home:e=n.default.homedir(),tmp:t=n.default.tmpdir()}={}){let r=a.default.join(e,"Library","Caches","Six Degrees");return{cacheDir:r,statusFile:a.default.join(r,"last-update.json"),confirmFile:a.default.join(r,"update-confirmed.json"),logFile:a.default.join(t,"six-degrees-update.log")}}function p(e){try{let t=JSON.parse(r.default.readFileSync(e,"utf8"));return t&&"object"==typeof t&&!Array.isArray(t)?t:null}catch{return null}}let h=Symbol.for("six-degrees.update-job");function f(){return globalThis[h]||(globalThis[h]={job:null}),globalThis[h]}function m(e){if(!e)return null;let{id:t,phase:r,version:s,notes:n,received:a,total:i,error:o,code:l,startedAt:u,endedAt:c}=e;return{id:t,phase:r,version:s,notes:n,received:a,total:i,error:o,code:l,startedAt:u,endedAt:c}}function g(){return m(f().job)}function y(e){try{return r.default.statSync(e).dev!==r.default.statSync(a.default.dirname(e)).dev}catch{return!1}}o.BUNDLE_ID,o.GITHUB.apiBase,o.GITHUB.downloadBase;var v=e.i(24214);let b=null;function R(e,r){return new Promise(s=>{let n,a="",i="";try{n=(0,t.spawn)("git",e,{cwd:r})}catch(e){return s({code:-1,out:"",err:e.message})}let o=setTimeout(()=>{try{n.kill()}catch{}},6e4);n.stdout.on("data",e=>{a+=e.toString()}),n.stderr.on("data",e=>{i+=e.toString()}),n.on("error",e=>{clearTimeout(o),s({code:-1,out:a,err:e.message})}),n.on("close",e=>{clearTimeout(o),s({code:e,out:a.trim(),raw:a,err:i.trim()})})})}async function w(e){let[t,r,s,n]=await Promise.all([R(["rev-parse","--short","HEAD"],e),R(["log","-1","--pretty=%s"],e),R(["status","--porcelain"],e),R(["rev-parse","--abbrev-ref","HEAD"],e)]),a=(s.raw||"").split("\n").filter(e=>e.length>3).map(e=>e.slice(3).trim()).filter(Boolean),i=a.length>0&&a.every(e=>"package-lock.json"===e);return{sha:t.out,subject:r.out,branch:n.out,dirty:a,onlyLockfile:i}}function j(){let e=(0,s.dataDir)();return a.default.resolve(e)===a.default.join((0,n.homedir)(),".six-degrees")?null:e}function S(e){let t=(0,i.repoSlug)(v.default.repository),s=(0,i.installKind)(process.env,e||""),n={supported:!1,installed:!0,kind:s,version:v.default.version,slug:t,command:t?(0,i.updateCommand)(s,t,{dataDir:j()}):null};if("mac-app"===s){let e=d();!function({statusFile:e,confirmFile:t},s){let n=p(e);if(n&&"started"===n.outcome&&n.to===s&&p(t)?.version!==s)try{var i;let e;i={version:s,pid:process.pid,at:new Date().toISOString()},r.default.mkdirSync(a.default.dirname(t),{recursive:!0}),e=`${t}.${process.pid}.tmp`,r.default.writeFileSync(e,`${JSON.stringify(i)}
|
|
2
2
|
`),r.default.renameSync(e,t)}catch{return!1}}(e,v.default.version),n.lastUpdate=(0,o.lastUpdateReport)(p(e.statusFile),{runningVersion:v.default.version}),n.job=g()}let l=(0,o.releaseSource)(process.env);return l.test&&(n.testReleases=l.apiBase),n}async function x(e,t){let r=await fetch(`${t}/repos/${e}/releases/latest`,{headers:{Accept:"application/vnd.github+json","User-Agent":"six-degrees-update-check"},signal:AbortSignal.timeout(1e4),cache:"no-store"});if(404===r.status)return null;if(!r.ok)throw Error(`GitHub answered ${r.status}`);let s=await r.json();return{version:String(s.tag_name||"").replace(/^v/i,""),url:s.html_url||null,release:s}}async function k(e,s){let h=S(s),v=(0,o.releaseSource)(process.env);if("update-status"===e)return Response.json({job:g()});if("cancel-install"===e){let e;return Response.json({job:((e=f().job)&&u.has(e.phase)&&e.ctrl.abort(new c("cancelled")),m(e))})}if("check-release"===e){if(!h.slug)return Response.json({error:"This copy does not say where it was published."},{status:400});let e="mac-app"===h.kind?{refusal:{code:"not-mac",message:"Installing an update from here works only in the Mac app."}}:null;e&&function(e){let s;if(!(!e||(s=f().job)&&l.has(s.phase)))try{!function({bundle:e,cacheDir:s,tmpRoot:n,statusFile:i,now:l=Date.now(),isAlive:u=function(e){try{return process.kill(e,0),!0}catch(e){return"EPERM"===e.code}},asideAgeMs:c=6e5}={}){let d=[],h=e=>l-Math.max(e.mtimeMs,e.ctimeMs),f=e=>{try{return r.default.lstatSync(e)}catch{return null}},m=e=>{try{return r.default.readdirSync(e)}catch{return[]}},g=e=>{try{r.default.rmSync(e,{recursive:!0,force:!0}),d.push(e)}catch{}},v=i?p(i):null,b=v?.outcome==="failed"&&"string"==typeof v.previous?a.default.resolve(v.previous):null;if(e){let t=a.default.dirname(e);for(let{name:r,kind:s,pid:n}of(0,o.leftoversBeside)(m(t),a.default.basename(e))){let e=a.default.join(t,r),i=f(e);i&&e!==b&&("incoming"===s?h(i)>36e5&&g(e):!u(n)&&h(i)>c&&g(e))}}if(s)for(let e of m(s)){if(!/^\.previous-[A-Za-z0-9]{6}$/.test(e)&&!/\.zip\.part$/.test(e)&&!/^(last-update|update-confirmed)\.json\.\d+\.tmp$/.test(e))continue;let t=a.default.join(s,e),r=f(t);r&&h(r)>36e5&&g(t)}if(n)for(let e of m(n)){if(!/^six-degrees-update-[A-Za-z0-9]{6}$/.test(e))continue;let r=a.default.join(n,e),s=f(r);if(!s||!s.isDirectory()||36e5>=h(s))continue;let i=a.default.join(r,"mnt");if(y(i)){try{(0,t.execFileSync)("/usr/bin/hdiutil",["detach",i,"-force"],{stdio:"ignore",timeout:3e4})}catch{}if(y(i))continue}g(r)}}({bundle:e,tmpRoot:(0,n.tmpdir)(),...d()})}catch{}}(e.bundle);try{var b;let s=await x(h.slug,v.apiBase),a=!!(s&&(0,i.compareVersions)(s.version,h.version)>0),l=null,u=null;if(a&&e){let a,i=e.refusal?null:(0,o.planFromRelease)(s.release,{currentVersion:h.version,chip:(a=(e,r)=>{try{return(0,t.execFileSync)(e,r,{timeout:5e3,stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return""}},{chip:(0,o.chipOf)({sysctlArm64:a("/usr/sbin/sysctl",["-n","hw.optional.arm64"]),processArch:process.arch}),macosVersion:a("/usr/bin/sw_vers",["-productVersion"])}).chip,slug:h.slug,downloadBase:v.downloadBase}),c=e.refusal||i?.refusal||null;l=c?{possible:!1,reason:c.message,code:c.code}:{possible:!0,size:i.plan.dmg.size},u=function(e,t){let s=!0;try{(0,r.accessSync)("/Applications",r.constants.W_OK)}catch{s=!1}return(0,o.terminalFallback)({bundle:e,refusalCode:t?.code||null,installsTo:(0,o.installerTarget)({applicationsWritable:s,home:(0,n.homedir)()}),dataDir:j()})}(e.bundle,e.refusal)}e&&(b=a?s.version:null,f().checked=b?String(b):null);let c=`https://github.com/${h.slug}/releases/`,d=a&&i.INSTALLER_KINDS.includes(h.kind)&&s?.url&&String(s.url).startsWith(c)?{url:s.url}:null;return Response.json({...h,latest:s&&{version:s.version,url:s.url},newer:a,install:l,fallback:u,download:d})}catch(e){return Response.json({error:`Could not reach GitHub (${e.message}). Try again in a moment.`},{status:502})}}if("install-release"===e){let e=i.INSTALLER_KINDS.includes(h.kind)?"On Windows and Linux an update is the new installer: download it from the release page and run it.":"Only the Mac app can install an update itself. Use the line below instead.";return Response.json({error:e,command:h.command},{status:400})}return Response.json({error:"Not a git checkout."},{status:400})}async function E(){let e=(0,s.projectRoot)();if(!(0,s.isGitCheckout)())return Response.json(S(e));let r=await w(e),n=function(e){if(null===b)try{b=(0,t.execFileSync)("git",["rev-parse","--short","HEAD"],{cwd:e}).toString().trim()}catch{b=""}return b}(e);return Response.json({supported:!0,...r,bootSha:n,restartNeeded:!!(n&&r.sha&&n!==r.sha)})}async function A(e){let t=(0,s.projectRoot)(),r={};try{r=await e.json()}catch{}let n=String(r.action||"");if(!(0,s.isGitCheckout)())return k(n,t);if("check"===n){let e=await R(["fetch","--quiet","origin"],t);if(0!==e.code)return Response.json({error:`Could not reach GitHub: ${e.err.slice(0,200)}`},{status:502});let r=await w(t),s=`origin/${r.branch||"main"}`,[n,a]=await Promise.all([R(["rev-list","--count",`HEAD..${s}`],t),R(["log","--pretty=%h %s",`HEAD..${s}`],t)]),i=Number(n.out||0);return Response.json({...r,behind:Number.isFinite(i)?i:0,commits:(a.out||"").split("\n").filter(Boolean).slice(0,25)})}if("pull"===n){let e=await w(t);if(e.dirty.length&&!e.onlyLockfile)return Response.json({error:"There are local changes here, so nothing was updated.",dirty:e.dirty},{status:409});e.onlyLockfile&&await R(["checkout","--","package-lock.json"],t);let r=await R(["pull","--ff-only"],t);if(0!==r.code)return Response.json({error:r.err.slice(0,400)||"The update could not be applied automatically."},{status:409});let s=await w(t),n=/package(-lock)?\.json/.test(r.out);return Response.json({ok:!0,output:r.out.split("\n").slice(-40).join("\n"),sha:s.sha,subject:s.subject,needsRestart:n})}return Response.json({error:`Unknown action '${n}'`},{status:400})}e.s(["GET",0,E,"POST",0,A],34091)},81067,e=>{"use strict";var t=e.i(47909),r=e.i(74017),s=e.i(96250),n=e.i(59756),a=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),u=e.i(87718),c=e.i(95169),d=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(26937),m=e.i(10372),g=e.i(93695);e.i(52474);var y=e.i(220);let v=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/update/route",pathname:"/api/update",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/update/route.js",nextConfigOutput:"standalone",userland:()=>e.r(34091),...{}}),{workAsyncStorage:b,workUnitAsyncStorage:R,serverHooks:w}=v;async function j(e,t,s){s.requestMeta&&(0,n.setRequestMeta)(e,s.requestMeta),v.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let b="/api/update/route";b=b.replace(/\/index$/,"")||"/";let R=await v.prepare(e,t,{srcPage:b,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:w,deploymentId:j,params:S,nextConfig:x,parsedUrl:k,isDraftMode:E,prerenderManifest:A,routerServerContext:C,isOnDemandRevalidate:T,revalidateOnlyGenerated:N,resolvedPathname:H,clientReferenceManifest:D,serverActionsManifest:P}=R,O=(0,o.normalizeAppPath)(b),_=!!(A.dynamicRoutes[O]||A.routes[H]),I=async()=>((null==C?void 0:C.render404)?await C.render404(e,t,k,!1):t.end("This page could not be found"),null);if(_&&!E){let e=!!A.routes[H],t=A.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(x.adapterPath)return await I();throw new g.NoFallbackError}}let M=null;!_||v.isDev||E||(M="/index"===(M=H)?"/":M);let U=!0===v.isDev||!_,$=_&&!U;P&&D&&(0,i.setManifestsSingleton)({page:b,clientReferenceManifest:D,serverActionsManifest:P});let q=e.method||"GET",B=(0,a.getTracer)(),F=B.getActiveScopeSpan(),L=!!(null==C?void 0:C.isWrappedByNextServer),G=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await v.getIncrementalCache(e,x,A,G);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let V={params:S,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts,useCacheTimeout:x.experimental.useCacheTimeout},cacheComponents:!!x.cacheComponents,validationLevel:x.experimental.instantInsights.validationLevel,supportsDynamicResponse:U,incrementalCache:K,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:x.cacheLife,staticPageGenerationTimeout:x.staticPageGenerationTimeout,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>v.onRequestError(e,t,s,n,C)},sharedContext:{buildId:w,deploymentId:j}},z=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),X=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!G&&T&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await v.handle(X,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let a=V.renderOpts.pendingWaitUntil;a&&s.waitUntil&&(s.waitUntil(a),a=void 0);let i=V.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(z,W,n,a),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[m.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,s=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==r&&r>0?x.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await v.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:T})},!1,C),t}},J=async(n,i)=>{try{var o,l;let n=await v.handleResponse({req:e,nextConfig:x,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:N,responseGenerator:Z,waitUntil:s.waitUntil,isMinimalMode:G});if(!_)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});G||t.setHeader("x-nextjs-cache",T?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let a=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);G&&_||a.delete(m.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||a.get("Cache-Control")||a.set("Cache-Control",(0,f.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(z,W,new Response(n.value.body,{headers:a,status:n.value.status||200}));return}catch(t){if(t instanceof g.NoFallbackError||await v.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:T})},!1,C),_)throw t;await (0,p.sendResponse)(z,W,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:a.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=B.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route")||O,o=`${q} ${s}`;n.setAttributes({"next.route":s,"http.route":s,"next.span_name":o}),n.updateName(o),i&&i!==n&&(i.setAttribute("http.route",s),i.updateName(o))})()}};if(L&&F)await J(F,void 0);else{let t=B.getActiveScopeSpan();await B.withPropagatedContext(e.headers,()=>B.trace(c.BaseServerSpan.handleRequest,{spanName:`${q} ${b}`,kind:a.SpanKind.SERVER,attributes:{"http.method":q,"http.target":e.url}},e=>J(e,t)),void 0,!L)}}e.s(["handler",0,j,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:R})},"routeModule",0,v,"serverHooks",0,w,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,R])}];
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=_1itd1o_._.js.map
|