mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix(ide): use port number for server port file instead of vscode pid (#7368)
This commit is contained in:
@@ -460,7 +460,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
express@5.1.0
|
express@4.21.2
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
@@ -490,7 +490,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
accepts@2.0.0
|
accepts@1.3.8
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
@@ -577,7 +577,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
negotiator@1.0.0
|
negotiator@0.6.3
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
@@ -607,7 +607,34 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
body-parser@2.2.0
|
array-flatten@1.1.1
|
||||||
|
(git://github.com/blakeembrey/array-flatten.git)
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
============================================================
|
||||||
|
body-parser@1.20.3
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
@@ -717,6 +744,63 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
============================================================
|
||||||
|
depd@2.0.0
|
||||||
|
(No repository found)
|
||||||
|
|
||||||
|
(The MIT License)
|
||||||
|
|
||||||
|
Copyright (c) 2014-2018 Douglas Christopher Wilson
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
'Software'), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
============================================================
|
||||||
|
destroy@1.2.0
|
||||||
|
(No repository found)
|
||||||
|
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014 Jonathan Ong me@jongleberry.com
|
||||||
|
Copyright (c) 2015-2022 Douglas Christopher Wilson doug@somethingdoug.com
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
http-errors@2.0.0
|
http-errors@2.0.0
|
||||||
(No repository found)
|
(No repository found)
|
||||||
@@ -746,34 +830,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
============================================================
|
|
||||||
depd@2.0.0
|
|
||||||
(No repository found)
|
|
||||||
|
|
||||||
(The MIT License)
|
|
||||||
|
|
||||||
Copyright (c) 2014-2018 Douglas Christopher Wilson
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
'Software'), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
inherits@2.0.4
|
inherits@2.0.4
|
||||||
(No repository found)
|
(No repository found)
|
||||||
@@ -983,7 +1039,7 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
qs@6.14.0
|
qs@6.13.0
|
||||||
(https://github.com/ljharb/qs.git)
|
(https://github.com/ljharb/qs.git)
|
||||||
|
|
||||||
BSD 3-Clause License
|
BSD 3-Clause License
|
||||||
@@ -1559,7 +1615,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
type-is@2.0.1
|
type-is@1.6.18
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
@@ -1588,12 +1644,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
media-typer@1.1.0
|
media-typer@0.3.0
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
|
|
||||||
Copyright (c) 2014-2017 Douglas Christopher Wilson
|
Copyright (c) 2014 Douglas Christopher Wilson
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
@@ -1616,7 +1672,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
content-disposition@1.0.0
|
content-disposition@0.5.4
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
@@ -1701,32 +1757,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
cookie-signature@1.2.2
|
cookie-signature@1.0.6
|
||||||
(https://github.com/visionmedia/node-cookie-signature.git)
|
(https://github.com/visionmedia/node-cookie-signature.git)
|
||||||
|
|
||||||
(The MIT License)
|
License text not found.
|
||||||
|
|
||||||
Copyright (c) 2012–2024 LearnBoost <tj@learnboost.com> and other contributors;
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
'Software'), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
encodeurl@2.0.0
|
encodeurl@2.0.0
|
||||||
@@ -1815,7 +1849,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
finalhandler@2.1.0
|
finalhandler@1.3.1
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
@@ -1873,7 +1907,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
fresh@2.0.0
|
fresh@0.5.2
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
@@ -1902,62 +1936,89 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
merge-descriptors@2.0.0
|
merge-descriptors@1.0.3
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
MIT License
|
(The MIT License)
|
||||||
|
|
||||||
Copyright (c) Jonathan Ong <me@jongleberry.com>
|
Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
|
||||||
Copyright (c) Douglas Christopher Wilson <doug@somethingdoug.com>
|
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
'Software'), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
once@1.4.0
|
methods@1.1.2
|
||||||
(git://github.com/isaacs/once)
|
(No repository found)
|
||||||
|
|
||||||
The ISC License
|
(The MIT License)
|
||||||
|
|
||||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
Copyright (c) 2013-2014 TJ Holowaychuk <tj@vision-media.ca>
|
||||||
|
Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
a copy of this software and associated documentation files (the
|
||||||
copyright notice and this permission notice appear in all copies.
|
'Software'), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
wrappy@1.0.2
|
path-to-regexp@0.1.12
|
||||||
(https://github.com/npm/wrappy)
|
(https://github.com/pillarjs/path-to-regexp.git)
|
||||||
|
|
||||||
The ISC License
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
copyright notice and this permission notice appear in all copies.
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
The above copyright notice and this permission notice shall be included in
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
all copies or substantial portions of the Software.
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
@@ -2071,87 +2132,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
router@2.2.0
|
send@0.19.0
|
||||||
(No repository found)
|
|
||||||
|
|
||||||
(The MIT License)
|
|
||||||
|
|
||||||
Copyright (c) 2013 Roman Shtylman
|
|
||||||
Copyright (c) 2014-2022 Douglas Christopher Wilson
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
'Software'), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
============================================================
|
|
||||||
is-promise@4.0.0
|
|
||||||
(https://github.com/then/is-promise.git)
|
|
||||||
|
|
||||||
Copyright (c) 2014 Forbes Lindesay
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
============================================================
|
|
||||||
path-to-regexp@8.2.0
|
|
||||||
(https://github.com/pillarjs/path-to-regexp.git)
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
============================================================
|
|
||||||
send@1.2.0
|
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
@@ -2180,7 +2161,34 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
serve-static@2.2.0
|
mime@3.0.0
|
||||||
|
(https://github.com/broofa/mime)
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
============================================================
|
||||||
|
serve-static@1.16.2
|
||||||
(No repository found)
|
(No repository found)
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
@@ -2210,6 +2218,32 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
============================================================
|
||||||
|
utils-merge@1.0.1
|
||||||
|
(git://github.com/jaredhanson/utils-merge.git)
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2013-2017 Jared Hanson
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
============================================================
|
============================================================
|
||||||
express-rate-limit@7.5.1
|
express-rate-limit@7.5.1
|
||||||
(git+https://github.com/express-rate-limit/express-rate-limit.git)
|
(git+https://github.com/express-rate-limit/express-rate-limit.git)
|
||||||
|
|||||||
@@ -122,15 +122,25 @@ describe('IDEServer', () => {
|
|||||||
|
|
||||||
const port = getPortFromMock(replaceMock);
|
const port = getPortFromMock(replaceMock);
|
||||||
const expectedPortFile = path.join(
|
const expectedPortFile = path.join(
|
||||||
|
'/tmp',
|
||||||
|
`gemini-ide-server-${port}.json`,
|
||||||
|
);
|
||||||
|
const expectedPpidPortFile = path.join(
|
||||||
'/tmp',
|
'/tmp',
|
||||||
`gemini-ide-server-${process.ppid}.json`,
|
`gemini-ide-server-${process.ppid}.json`,
|
||||||
);
|
);
|
||||||
|
const expectedContent = JSON.stringify({
|
||||||
|
port: parseInt(port, 10),
|
||||||
|
workspacePath: expectedWorkspacePaths,
|
||||||
|
ppid: process.ppid,
|
||||||
|
});
|
||||||
expect(fs.writeFile).toHaveBeenCalledWith(
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
expectedPortFile,
|
expectedPortFile,
|
||||||
JSON.stringify({
|
expectedContent,
|
||||||
port: parseInt(port, 10),
|
);
|
||||||
workspacePath: expectedWorkspacePaths,
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
}),
|
expectedPpidPortFile,
|
||||||
|
expectedContent,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -147,15 +157,25 @@ describe('IDEServer', () => {
|
|||||||
|
|
||||||
const port = getPortFromMock(replaceMock);
|
const port = getPortFromMock(replaceMock);
|
||||||
const expectedPortFile = path.join(
|
const expectedPortFile = path.join(
|
||||||
|
'/tmp',
|
||||||
|
`gemini-ide-server-${port}.json`,
|
||||||
|
);
|
||||||
|
const expectedPpidPortFile = path.join(
|
||||||
'/tmp',
|
'/tmp',
|
||||||
`gemini-ide-server-${process.ppid}.json`,
|
`gemini-ide-server-${process.ppid}.json`,
|
||||||
);
|
);
|
||||||
|
const expectedContent = JSON.stringify({
|
||||||
|
port: parseInt(port, 10),
|
||||||
|
workspacePath: '/foo/bar',
|
||||||
|
ppid: process.ppid,
|
||||||
|
});
|
||||||
expect(fs.writeFile).toHaveBeenCalledWith(
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
expectedPortFile,
|
expectedPortFile,
|
||||||
JSON.stringify({
|
expectedContent,
|
||||||
port: parseInt(port, 10),
|
);
|
||||||
workspacePath: '/foo/bar',
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
}),
|
expectedPpidPortFile,
|
||||||
|
expectedContent,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -172,15 +192,25 @@ describe('IDEServer', () => {
|
|||||||
|
|
||||||
const port = getPortFromMock(replaceMock);
|
const port = getPortFromMock(replaceMock);
|
||||||
const expectedPortFile = path.join(
|
const expectedPortFile = path.join(
|
||||||
|
'/tmp',
|
||||||
|
`gemini-ide-server-${port}.json`,
|
||||||
|
);
|
||||||
|
const expectedPpidPortFile = path.join(
|
||||||
'/tmp',
|
'/tmp',
|
||||||
`gemini-ide-server-${process.ppid}.json`,
|
`gemini-ide-server-${process.ppid}.json`,
|
||||||
);
|
);
|
||||||
|
const expectedContent = JSON.stringify({
|
||||||
|
port: parseInt(port, 10),
|
||||||
|
workspacePath: '',
|
||||||
|
ppid: process.ppid,
|
||||||
|
});
|
||||||
expect(fs.writeFile).toHaveBeenCalledWith(
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
expectedPortFile,
|
expectedPortFile,
|
||||||
JSON.stringify({
|
expectedContent,
|
||||||
port: parseInt(port, 10),
|
);
|
||||||
workspacePath: '',
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
}),
|
expectedPpidPortFile,
|
||||||
|
expectedContent,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -211,15 +241,25 @@ describe('IDEServer', () => {
|
|||||||
|
|
||||||
const port = getPortFromMock(replaceMock);
|
const port = getPortFromMock(replaceMock);
|
||||||
const expectedPortFile = path.join(
|
const expectedPortFile = path.join(
|
||||||
|
'/tmp',
|
||||||
|
`gemini-ide-server-${port}.json`,
|
||||||
|
);
|
||||||
|
const expectedPpidPortFile = path.join(
|
||||||
'/tmp',
|
'/tmp',
|
||||||
`gemini-ide-server-${process.ppid}.json`,
|
`gemini-ide-server-${process.ppid}.json`,
|
||||||
);
|
);
|
||||||
|
const expectedContent = JSON.stringify({
|
||||||
|
port: parseInt(port, 10),
|
||||||
|
workspacePath: expectedWorkspacePaths,
|
||||||
|
ppid: process.ppid,
|
||||||
|
});
|
||||||
expect(fs.writeFile).toHaveBeenCalledWith(
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
expectedPortFile,
|
expectedPortFile,
|
||||||
JSON.stringify({
|
expectedContent,
|
||||||
port: parseInt(port, 10),
|
);
|
||||||
workspacePath: expectedWorkspacePaths,
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
}),
|
expectedPpidPortFile,
|
||||||
|
expectedContent,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Simulate removing a folder
|
// Simulate removing a folder
|
||||||
@@ -230,27 +270,38 @@ describe('IDEServer', () => {
|
|||||||
'GEMINI_CLI_IDE_WORKSPACE_PATH',
|
'GEMINI_CLI_IDE_WORKSPACE_PATH',
|
||||||
'/baz/qux',
|
'/baz/qux',
|
||||||
);
|
);
|
||||||
|
const expectedContent2 = JSON.stringify({
|
||||||
|
port: parseInt(port, 10),
|
||||||
|
workspacePath: '/baz/qux',
|
||||||
|
ppid: process.ppid,
|
||||||
|
});
|
||||||
expect(fs.writeFile).toHaveBeenCalledWith(
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
expectedPortFile,
|
expectedPortFile,
|
||||||
JSON.stringify({
|
expectedContent2,
|
||||||
port: parseInt(port, 10),
|
);
|
||||||
workspacePath: '/baz/qux',
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
}),
|
expectedPpidPortFile,
|
||||||
|
expectedContent2,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should clear env vars and delete port file on stop', async () => {
|
it('should clear env vars and delete port file on stop', async () => {
|
||||||
await ideServer.start(mockContext);
|
await ideServer.start(mockContext);
|
||||||
const portFile = path.join(
|
const replaceMock = mockContext.environmentVariableCollection.replace;
|
||||||
|
const port = getPortFromMock(replaceMock);
|
||||||
|
const portFile = path.join('/tmp', `gemini-ide-server-${port}.json`);
|
||||||
|
const ppidPortFile = path.join(
|
||||||
'/tmp',
|
'/tmp',
|
||||||
`gemini-ide-server-${process.ppid}.json`,
|
`gemini-ide-server-${process.ppid}.json`,
|
||||||
);
|
);
|
||||||
expect(fs.writeFile).toHaveBeenCalledWith(portFile, expect.any(String));
|
expect(fs.writeFile).toHaveBeenCalledWith(portFile, expect.any(String));
|
||||||
|
expect(fs.writeFile).toHaveBeenCalledWith(ppidPortFile, expect.any(String));
|
||||||
|
|
||||||
await ideServer.stop();
|
await ideServer.stop();
|
||||||
|
|
||||||
expect(mockContext.environmentVariableCollection.clear).toHaveBeenCalled();
|
expect(mockContext.environmentVariableCollection.clear).toHaveBeenCalled();
|
||||||
expect(fs.unlink).toHaveBeenCalledWith(portFile);
|
expect(fs.unlink).toHaveBeenCalledWith(portFile);
|
||||||
|
expect(fs.unlink).toHaveBeenCalledWith(ppidPortFile);
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skipIf(process.platform !== 'win32')(
|
it.skipIf(process.platform !== 'win32')(
|
||||||
@@ -272,15 +323,25 @@ describe('IDEServer', () => {
|
|||||||
|
|
||||||
const port = getPortFromMock(replaceMock);
|
const port = getPortFromMock(replaceMock);
|
||||||
const expectedPortFile = path.join(
|
const expectedPortFile = path.join(
|
||||||
|
'/tmp',
|
||||||
|
`gemini-ide-server-${port}.json`,
|
||||||
|
);
|
||||||
|
const expectedPpidPortFile = path.join(
|
||||||
'/tmp',
|
'/tmp',
|
||||||
`gemini-ide-server-${process.ppid}.json`,
|
`gemini-ide-server-${process.ppid}.json`,
|
||||||
);
|
);
|
||||||
|
const expectedContent = JSON.stringify({
|
||||||
|
port: parseInt(port, 10),
|
||||||
|
workspacePath: expectedWorkspacePaths,
|
||||||
|
ppid: process.ppid,
|
||||||
|
});
|
||||||
expect(fs.writeFile).toHaveBeenCalledWith(
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
expectedPortFile,
|
expectedPortFile,
|
||||||
JSON.stringify({
|
expectedContent,
|
||||||
port: parseInt(port, 10),
|
);
|
||||||
workspacePath: expectedWorkspacePaths,
|
expect(fs.writeFile).toHaveBeenCalledWith(
|
||||||
}),
|
expectedPpidPortFile,
|
||||||
|
expectedContent,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,10 +23,11 @@ const MCP_SESSION_ID_HEADER = 'mcp-session-id';
|
|||||||
const IDE_SERVER_PORT_ENV_VAR = 'GEMINI_CLI_IDE_SERVER_PORT';
|
const IDE_SERVER_PORT_ENV_VAR = 'GEMINI_CLI_IDE_SERVER_PORT';
|
||||||
const IDE_WORKSPACE_PATH_ENV_VAR = 'GEMINI_CLI_IDE_WORKSPACE_PATH';
|
const IDE_WORKSPACE_PATH_ENV_VAR = 'GEMINI_CLI_IDE_WORKSPACE_PATH';
|
||||||
|
|
||||||
function writePortAndWorkspace(
|
async function writePortAndWorkspace(
|
||||||
context: vscode.ExtensionContext,
|
context: vscode.ExtensionContext,
|
||||||
port: number,
|
port: number,
|
||||||
portFile: string,
|
portFile: string,
|
||||||
|
ppidPortFile: string,
|
||||||
log: (message: string) => void,
|
log: (message: string) => void,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const workspaceFolders = vscode.workspace.workspaceFolders;
|
const workspaceFolders = vscode.workspace.workspaceFolders;
|
||||||
@@ -44,13 +45,20 @@ function writePortAndWorkspace(
|
|||||||
workspacePath,
|
workspacePath,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const content = JSON.stringify({ port, workspacePath, ppid: process.ppid });
|
||||||
|
|
||||||
log(`Writing port file to: ${portFile}`);
|
log(`Writing port file to: ${portFile}`);
|
||||||
return fs
|
log(`Writing ppid port file to: ${ppidPortFile}`);
|
||||||
.writeFile(portFile, JSON.stringify({ port, workspacePath }))
|
|
||||||
.catch((err) => {
|
try {
|
||||||
const message = err instanceof Error ? err.message : String(err);
|
await Promise.all([
|
||||||
log(`Failed to write port to file: ${message}`);
|
fs.writeFile(portFile, content),
|
||||||
});
|
fs.writeFile(ppidPortFile, content),
|
||||||
|
]);
|
||||||
|
} catch (err) {
|
||||||
|
const message = err instanceof Error ? err.message : String(err);
|
||||||
|
log(`Failed to write port to file: ${message}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendIdeContextUpdateNotification(
|
function sendIdeContextUpdateNotification(
|
||||||
@@ -80,17 +88,14 @@ export class IDEServer {
|
|||||||
private server: HTTPServer | undefined;
|
private server: HTTPServer | undefined;
|
||||||
private context: vscode.ExtensionContext | undefined;
|
private context: vscode.ExtensionContext | undefined;
|
||||||
private log: (message: string) => void;
|
private log: (message: string) => void;
|
||||||
private portFile: string;
|
private portFile: string | undefined;
|
||||||
|
private ppidPortFile: string | undefined;
|
||||||
private port: number | undefined;
|
private port: number | undefined;
|
||||||
diffManager: DiffManager;
|
diffManager: DiffManager;
|
||||||
|
|
||||||
constructor(log: (message: string) => void, diffManager: DiffManager) {
|
constructor(log: (message: string) => void, diffManager: DiffManager) {
|
||||||
this.log = log;
|
this.log = log;
|
||||||
this.diffManager = diffManager;
|
this.diffManager = diffManager;
|
||||||
this.portFile = path.join(
|
|
||||||
os.tmpdir(),
|
|
||||||
`gemini-ide-server-${process.ppid}.json`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start(context: vscode.ExtensionContext): Promise<void> {
|
start(context: vscode.ExtensionContext): Promise<void> {
|
||||||
@@ -233,11 +238,20 @@ export class IDEServer {
|
|||||||
const address = (this.server as HTTPServer).address();
|
const address = (this.server as HTTPServer).address();
|
||||||
if (address && typeof address !== 'string') {
|
if (address && typeof address !== 'string') {
|
||||||
this.port = address.port;
|
this.port = address.port;
|
||||||
|
this.portFile = path.join(
|
||||||
|
os.tmpdir(),
|
||||||
|
`gemini-ide-server-${this.port}.json`,
|
||||||
|
);
|
||||||
|
this.ppidPortFile = path.join(
|
||||||
|
os.tmpdir(),
|
||||||
|
`gemini-ide-server-${process.ppid}.json`,
|
||||||
|
);
|
||||||
this.log(`IDE server listening on port ${this.port}`);
|
this.log(`IDE server listening on port ${this.port}`);
|
||||||
await writePortAndWorkspace(
|
await writePortAndWorkspace(
|
||||||
context,
|
context,
|
||||||
this.port,
|
this.port,
|
||||||
this.portFile,
|
this.portFile,
|
||||||
|
this.ppidPortFile,
|
||||||
this.log,
|
this.log,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -247,11 +261,18 @@ export class IDEServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async updateWorkspacePath(): Promise<void> {
|
async updateWorkspacePath(): Promise<void> {
|
||||||
if (this.context && this.port) {
|
if (
|
||||||
|
this.context &&
|
||||||
|
this.server &&
|
||||||
|
this.port &&
|
||||||
|
this.portFile &&
|
||||||
|
this.ppidPortFile
|
||||||
|
) {
|
||||||
await writePortAndWorkspace(
|
await writePortAndWorkspace(
|
||||||
this.context,
|
this.context,
|
||||||
this.port,
|
this.port,
|
||||||
this.portFile,
|
this.portFile,
|
||||||
|
this.ppidPortFile,
|
||||||
this.log,
|
this.log,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -275,10 +296,19 @@ export class IDEServer {
|
|||||||
if (this.context) {
|
if (this.context) {
|
||||||
this.context.environmentVariableCollection.clear();
|
this.context.environmentVariableCollection.clear();
|
||||||
}
|
}
|
||||||
try {
|
if (this.portFile) {
|
||||||
await fs.unlink(this.portFile);
|
try {
|
||||||
} catch (_err) {
|
await fs.unlink(this.portFile);
|
||||||
// Ignore errors if the file doesn't exist.
|
} catch (_err) {
|
||||||
|
// Ignore errors if the file doesn't exist.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.ppidPortFile) {
|
||||||
|
try {
|
||||||
|
await fs.unlink(this.ppidPortFile);
|
||||||
|
} catch (_err) {
|
||||||
|
// Ignore errors if the file doesn't exist.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user