diff --git a/customers.csv b/customers.csv
new file mode 100644
index 0000000..e4d1cd1
--- /dev/null
+++ b/customers.csv
@@ -0,0 +1,249 @@
+databaseId,firstname,lastname,gender,dateOfBirth,lastCheckIn,facilityName,facilityId,customerNumber,cardNumber,lockerKey,customerStatus,purchasedContingentCode,purchasedContingentType,imageUrl,checkedIn,street,houseNumber,zip,city
+1210004724,Monika,Manzl,1,1947-09-21,,Die Heldin,1210002980,1-10064,,,1,,,,false,Georg-Klopp-Straße,8,5020,Salzburg
+1210004921,Ernestine,Meilinger CC,1,1967-10-25,,Die Heldin,1210002980,1-10173,,,1,,,,false,Minnesheimerstraße,20,5023,Sbg
+1210004824,Evelyn,Schmidjell,1,1944-05-24,,Die Heldin,1210002980,1-10105,,,1,,,,false,Bachwinkl,9,5081,Anif
+1210005524,Stanisaljevic,Lydia,1,1974-07-28,,Die Heldin,1210002980,1-11162,,,1,,,,false,Josef-Resslsrt.,19,5020,Salzburg
+1210005817,Brigitte,Raffetseder CC,1,1958-02-27,,Die Heldin,1210002980,1-11260,,,1,,,,false,K.H. Waggerl,Str.,5020,Sbg
+1210005918,Eva,Hummer CC,1,1954-08-11,2024-01-19T10:18:37.216+01:00[Europe/Vienna],Die Heldin,1210002980,1-11301,,,1,,,,false,Salzweg,34,5082,Grödig
+1210006410,Helene,Buczolits cc,1,1951-10-03,2024-04-12T10:52:49.276+02:00[Europe/Vienna],Die Heldin,1210002980,1-11441,,,1,,,,false,Erentrudisstr.,6,5020,Salzburg
+1210006415,Johanna,Zehetgruber CC,1,1950-07-05,2022-06-10T07:53:06.547+02:00[Europe/Vienna],Die Heldin,1210002980,1-11481,,,1,,,,false,Naumanng.,6,5020,Salzburg
+1210007405,Ulrike,Koushan CC,1,1947-07-01,,Die Heldin,1210002980,1-12132,,,1,,,,false,Leitmeritzstr.,4/38,5020,Salzburg
+1210007507,Petra,Kubicza CC,1,1988-11-05,2020-10-27T17:52:12.583+01:00[Europe/Vienna],Die Heldin,1210002980,1-12155,,,1,,,,false,Hochthronstr.,13,5083,St. Leonhard
+1210007609,Helga,Zach CC,1,1958-04-03,,Die Heldin,1210002980,1-12172,,,1,,,,false,Rene Marcic Strasse,4/11,5020,Salzburg
+1210008886,Andrea,Lipold CC,1,1960-05-07,,Die Heldin,1210002980,1-12427,,,1,,,,false,Glanhofen,5.,5020,Salzburg
+1210009582,Kerstin,Volz CC,1,1989-05-09,,Die Heldin,1210002980,1-13193,,,1,,,,false,Keine Daten,0,5020,Salzburg
+1210009871,Manuela,Spießberger CC,1,1973-06-29,,Die Heldin,1210002980,1-13296,,,1,,,,false,Brunnwiesweg,1,5204,Strasswalchen
+1210011422,Tanja,Lipold CC,1,1989-11-19,,Die Heldin,1210002980,1-14137,,,1,,,,false,Glanhofen,5,5020,Salzburg
+1210011424,Katorina,Virojic CC,1,1985-07-30,,Die Heldin,1210002980,1-14151,,,1,,,,false,Borromäumstraße,17/4,5020,Salzburg
+1210011420,Sabine,Werner CC,1,1964-05-12,,Die Heldin,1210002980,1-14117,,,1,,,,false,Minnesheimstraße,8b,5020,Salzburg
+1210011510,Christine,Hucke CC,1,1945-07-01,,Die Heldin,1210002980,1-14275,,,1,,,,false,Franz Schalk Str.,6,5020,Salzburg
+1210011511,Jacqueline,Rieder CC,1,1992-07-21,,Die Heldin,1210002980,1-14278,,,1,,,,false,Bayernweg,5,5400,Hallein
+1210011514,Brunhilde,Klammer CC,1,1954-07-28,2024-06-06T09:54:48.203+02:00[Europe/Vienna],Die Heldin,1210002980,1-14318,,,1,,,,false,Naumanngasse,23/4,5020,Sbg
+1210012025,Patricia,Nethalo,1,1989-01-20,,Die Heldin,1210002980,1-14471,,,1,,,,false,Bundschuhstrasse,20,5020,Salzburg
+1210012694,Barbara,Pamperl,1,1970-01-26,,Die Heldin,1210002980,1-15009,,,1,,,,false,F.-Inhauser-str.,4,5020,Salzburg
+1210013463,Helga,Pentek,1,1949-04-27,2021-06-09T08:19:24.894+02:00[Europe/Vienna],Die Heldin,1210002980,1-15094,,,1,,,,false,Otto-holzbauerstraße,11,5020,Salzburg
+1210015065,Verena,Pogadl CC,1,1986-04-19,,Die Heldin,1210002980,1-15309,,,1,,,,false,Gaißbergweg,7/1,5081,Anif
+1210015342,Claudia,Markut,1,1969-08-01,2022-03-03T07:51:16.894+01:00[Europe/Vienna],Die Heldin,1210002980,1-15342,,,1,,,,false,Pabensteinstr. 7,0,5400,Hallein
+1210015618,Margit,Egeo CC,1,1967-08-19,,Die Heldin,1210002980,1-15383,,,1,,,,false,Quellenweg,9,5020,Salzburg
+1210015897,Edith,Stromberger CC,1,1955-05-31,2020-02-21T07:49:20.002+01:00[Europe/Vienna],Die Heldin,1210002980,1-15414,,,1,,,,false,Karl Schoenherrstr.,8,5020,Salzburg
+1210015985,Barbara,Geiger CC,1,1975-09-06,2021-07-05T15:24:44.126+02:00[Europe/Vienna],Die Heldin,1210002980,1-16029,,,1,,,,false,Höglwörthweg,33,5020,Sbg
+1210015984,Barbara,Pamperl CC,1,1970-01-26,2021-10-18T17:49:50.830+02:00[Europe/Vienna],Die Heldin,1210002980,1-16028,,,1,,,,false,F.-Inhauser-Str.,4,5020,Sbg
+1210015988,Ursula,Wegmayr,1,1958-10-23,2023-09-12T10:29:36.170+02:00[Europe/Vienna],Die Heldin,1210002980,1-16035,,,1,,,,false,Pfeifferhoferstr.,12,5020,Salzburg
+1210016072,Ingrid,Fuchs,1,1958-12-29,2024-01-24T08:34:25.577+01:00[Europe/Vienna],Die Heldin,1210002980,1-16056,,,1,,,,false,Gaisberg,1,5020,Salzburg
+1210016075,Erna,Glechner CC,1,1963-04-27,2022-05-23T07:48:03.946+02:00[Europe/Vienna],Die Heldin,1210002980,1-16061,,,1,,,,false,Salzachweg,55,5061,Elsbethen
+1210016170,Karin,Geiger CC,1,1972-04-18,2020-07-08T17:26:08.037+02:00[Europe/Vienna],Die Heldin,1210002980,1-16078,,,1,,,,false,Mohrstr.,9,5020,Salzburg
+1210016173,Monika,Posch,1,1952-01-25,,Die Heldin,1210002980,1-16082,,,1,,,,false,Schleiferbachweg,1,5023,Salzburg
+1210016177,Dorota,Bednarz CC,1,1982-10-28,2020-02-21T11:02:47.539+01:00[Europe/Vienna],Die Heldin,1210002980,1-16092,,,1,,,,false,Kobergerweg,10,5020,Salzburg
+1210016179,Ursula,Kroisenbrunner CC,1,1943-06-25,2023-11-13T08:56:55.447+01:00[Europe/Vienna],Die Heldin,1210002980,1-16098,,,1,,,,false,Otto Glöckel Str.,17/22,5082,Grödig
+1210016272,Angelika,Spraider CC,1,1982-08-16,2020-03-13T17:27:11.084+01:00[Europe/Vienna],Die Heldin,1210002980,1-16108,,,1,,,,false,Kaiser-Karl-Strasse,3/4,5020,Salzburg
+1210016643,Susanne,Felsenberger CC,1,1975-03-18,2022-01-14T07:53:25.420+01:00[Europe/Vienna],Die Heldin,1210002980,1-17005,,,1,,,,false,Friedenstr.,20,5020,Salzburg
+1210016646,Michaela,Schubeck-John CC,1,1971-01-25,2023-01-19T17:15:07.943+01:00[Europe/Vienna],Die Heldin,1210002980,1-17013,,,1,,,,false,Rainweg,29,5102,Anthering
+1210016842,Sylvia,Krallinger CC,1,1959-12-21,2023-09-04T07:48:49.318+02:00[Europe/Vienna],Die Heldin,1210002980,1-17054,,,1,,,,false,Achenpromenade,12,5081,Anif
+1210016746,Evelyn,Hettegger CC,1,1979-08-16,2022-10-10T10:26:26.492+02:00[Europe/Vienna],Die Heldin,1210002980,1-17040,,,1,,,,false,Friedenstrasse,2/3,5020,Salzburg
+1210017036,Sarah,Hyden,1,1987-09-19,,Die Heldin,1210002980,1-17090,,,1,,,,false,Hugo-Wolf-Str.,14/2,5020,Salzburg
+1210017032,Viktoria,Pichler CC,1,1991-01-01,2020-09-21T14:45:26.929+02:00[Europe/Vienna],Die Heldin,1210002980,1-17086,,,1,,,,false,Ahornstr.,21,83451,Piding
+1210017120,Susanne,Zwatz CC,1,1975-03-04,,Die Heldin,1210002980,1-17094,,,1,,,,false,Fürstenallee,35/9,5020,Salzburg
+1210016747,Anita,Gimpl CC,1,1993-11-14,,Die Heldin,1210002980,1-17045,,,1,,,,false,Reinbergweg,5,5061,Elsbethen
+1210017215,Michaela,Seer-Hetz CC,1,1976-06-27,2024-06-21T09:55:46.960+02:00[Europe/Vienna],Die Heldin,1210002980,1-18016,,,1,,,,false,Johann-Herbst-Straße,18,5061,Elsbethen
+1210017492,Bettina,Holzer CC,1,1985-02-23,2022-07-11T10:47:38.078+02:00[Europe/Vienna],Die Heldin,1210002980,1-18062,,,1,,,,false,Willhelm von Exner Straße,20/2,5020,Salzburg
+1210017684,Elena,Fercher CC,1,2001-05-05,2020-08-24T17:46:09.415+02:00[Europe/Vienna],Die Heldin,1210002980,1-18090,,,1,,,,false,Usnerweg,4,5412,Puch
+1210017979,Heike,strobl CC,1,1983-05-09,2020-06-12T08:45:13.939+02:00[Europe/Vienna],Die Heldin,1210002980,1-18130,,,1,,,,false,Weidenweg,1,5061,Salzburg
+1210017870,Cornelia,Egger cc,1,1980-03-14,2021-09-08T07:55:28.640+02:00[Europe/Vienna],Die Heldin,1210002980,1-18110,,,1,,,,false,Staufenstraße,11,5071,Wals
+1210017973,Sorina,Heiser,1,1965-05-31,,Die Heldin,1210002980,1-18124,,,1,,,,false,Vierthalerstraße,1,5400,Hallein
+1210018065,Claudia,Quehenberger,1,1967-09-10,,Die Heldin,1210002980,1-18300,,,1,,,,false,Ernst-Grein-Str.,6A,5020,Salzburg
+1210018367,Loredana,Niculescu,1,1996-08-28,2020-06-05T16:51:03.192+02:00[Europe/Vienna],Die Heldin,1210002980,1-19035,,,1,,,,false,Salzbuger Strasse,29,5411,Hallein
+1210018760,Katharina,Neureiter CC,1,1984-01-18,2021-07-08T08:56:01.702+02:00[Europe/Vienna],Die Heldin,1210002980,1-19068,,,1,,,,false,Scharten,22,5450,Werfen
+1210048017,Christina,Krispler CC,1,1987-04-21,,Die Heldin,1210002980,1-2818141,,,1,,,,false,Hinterebenau,10,23,Ebenau
+1210047336,Olga,Damm,1,1978-04-18,,Die Heldin,1210002980,1-2820061,,,1,,,,false,Adnet,26,5421,Adnet
+1210047338,Cornelia,Ludwig CC,1,2000-11-30,2020-02-11T08:17:14.394+01:00[Europe/Vienna],Die Heldin,1210002980,1-2820063,,,1,,,,false,Neutorstr.,19,5020,Salzburg
+1210047523,Eva,Sieberer CC,1,1985-11-13,2022-04-04T09:30:03.582+02:00[Europe/Vienna],Die Heldin,1210002980,1-2820078,,,1,,,,false,Heimstraße 12,a,5020,Salzburg
+1210047428,Gudrun,Körbler CC,1,1961-02-27,2022-05-19T09:52:17.022+02:00[Europe/Vienna],Die Heldin,1210002980,1-2820073,,,1,,,,false,Samstrasse,38,5023,Salzburg
+1210047526,Heidrun,Lehner CC,1,1964-09-19,2020-03-13T08:12:16.463+01:00[Europe/Vienna],Die Heldin,1210002980,1-2820081,,,1,,,,false,Seppenpointstr.,374,5412,Puch
+1210126522,Tanja,Niedermoser,1,1983-01-11,,Die Heldin,1210002980,1-2820107,,,1,,,,false,Dorfstrasse,20,5081,Anif
+1210126520,Nadine,Krebs,1,1993-09-19,2020-07-02T17:20:27.349+02:00[Europe/Vienna],Die Heldin,1210002980,1-2820100,,,1,,,,false,Kreuzbrücklweg,11,5020,Salzburg
+1210125493,Gisela,König,1,1964-12-20,2022-04-26T18:29:58.831+02:00[Europe/Vienna],Die Heldin,1210002980,1-2820106,,,1,,,,false,Bairau,43,5511,Hüttau
+1210220870,Barbara,Schweiger CC,1,1975-12-15,2022-01-27T10:05:05.419+01:00[Europe/Vienna],Die Heldin,1210002980,1-2820139,,,1,,,,false,Haunsbergstr.,93,5020,Salzburg
+1210206270,Dummy,Dummy,1,2019-12-24,,Die Heldin,1210002980,1-2820131,,,1,,,,false,Alpenstr.,54,5020,Salzburg
+1210216991,Beate,Kirschenhofer,1,1980-03-07,2020-08-06T07:47:14.732+02:00[Europe/Vienna],Die Heldin,1210002980,1-2820136,,,1,,,,false,Stegweg,2,5061,Elsbethen
+1210274110,Ayhan,Kirbas,1,1968-07-19,2022-10-21T08:22:29.354+02:00[Europe/Vienna],Die Heldin,1210002980,1-2820147,,,1,,,,false,Konradlaibstrasse,10a,5020,Salzburg
+1210462550,Irina,Bayrhammer,1,1983-07-16,,Die Heldin,1210002980,1-2820178,,,1,,,,false,Hintersee,42,5324,Hintersee
+1210876390,Eva-Maria,heis,1,1991-07-24,,Die Heldin,1210002980,1-2820204,,,1,,,,false,Franz-ofner-Strasse,1,5020,Salzburg
+1210876570,Silvia,Suler,1,1979-02-07,,Die Heldin,1210002980,1-2820205,,,1,,,,false,Siezenheimerstrasse,66,5020,Salzburg
+1211550510,Petra,Kropiunik-wirlandner CC,1,1972-02-08,2022-09-15T16:25:13.232+02:00[Europe/Vienna],Die Heldin,1210002980,1-2820260,,,1,,,,false,Tannenweg,5/4,5400 hallein,Anif
+1212039590,Helen,Roessler CC,2,1988-02-23,,Die Heldin,1210002980,1-2820278,,,1,,,,false,Rifer Hauptstr.,94c,5400,Hallein
+1212274080,Raffaela,Egger,1,1986-08-07,,Die Heldin,1210002980,1-2820286,,,1,,,,false,Rosengasse,10,5020,Salzburg
+1212331920,Claudia,Masarie,1,1973-03-16,,Die Heldin,1210002980,1-2820290,,,1,,,,false,klessheimerstrasse allee,28,5020,Salzburg
+1213860190,Karin,Steingruber,1,1986-01-15,2022-06-29T09:29:39.302+02:00[Europe/Vienna],Die Heldin,1210002980,1-2820369,,,1,,,[object Object],false,Guggenmooserstr.,40,5020,Salzburg
+1213781891,Michaela,Draschl CC,1,1972-08-27,,Die Heldin,1210002980,1-2820362,,,1,,,,false,H.Weixelbaumer Strasse,2/6,54/2,Puch bei Hallein
+1213901770,Astrid,Pucher CC,1,1978-04-04,2022-06-28T11:22:23.284+02:00[Europe/Vienna],Die Heldin,1210002980,1-2820371,,,1,,,,false,Sportplatzweg,7,5325,Plainfeld
+1213980970,Petry,Stase Agne CC,1,1989-07-29,,Die Heldin,1210002980,1-2820376,,,1,,,,false,Linzer Bundesstraße,30-12,5023,Salzburg
+1214148270,Karin,Schaffer CC,1,1964-11-05,,Die Heldin,1210002980,1-2820384,,,1,,,,false,Baslerstrasse,1,5020,Salzburg
+1214378610,Susanne,Gruber-Ebert CC,1,1963-03-04,2023-03-23T17:25:58.391+01:00[Europe/Vienna],Die Heldin,1210002980,1-2820395,,,1,,,,false,Neu-Aniferstraße,1,5081,Anif
+1214483110,Sabine,Kralik CC,1,1976-11-07,,Die Heldin,1210002980,1-2820403,,,1,,,,false,Weideweg,1A,5111,Bürmoos
+1214541960,Buket,Konstantinov,1,1989-08-27,,Die Heldin,1210002980,1-2820405,,,1,,,,false,Humboldstrasse,12/6,5020,Salzburg
+1214996980,Sima,Ghawidel Asgari CC,1,1979-01-14,,Die Heldin,1210002980,1-2820411,,,1,,,,false,Trattbergstr.,216,5423,St.Koloman
+1215305071,Rosi,Petsche CC,1,1969-02-17,,Die Heldin,1210002980,1-2820425,,,1,,,,false,Moosstr.,469/3,5020,Salzburg
+1215477461,Helena,Danninger CC,1,1986-08-22,,Die Heldin,1210002980,1-2820435,,,1,,,,false,Tauxgasse,20,5020,Salzburg
+1215441216,Ulrike,Kraft,1,1964-07-29,,Die Heldin,1210002980,1-2820430,,,1,,,,false,Unterdorfweg,23,5303,Thalgau
+1215634215,Daniela,Thurner CC,1,1956-07-17,,Die Heldin,1210002980,1-2820447,,,1,,,,false,Fischbachstr.,58,5020,Salzburg
+1215785124,Simone,Neuhauser,1,1966-11-28,,Die Heldin,1210002980,1-2820455,,,1,,,,false,8,6207,5020,Salzburg
+1216106598,Sarah,Kuss CC,1,1995-10-18,,Die Heldin,1210002980,1-2820468,,,1,,,,false,Michael-Pacher Str.,13/12,5020,Salzburg
+1215915223,Emma,Rinnerthaler,1,1966-11-21,,Die Heldin,1210002980,1-2820461,,,1,,,,false,Eberhard-Fugger-Str.,4/74,5020,Salzburg
+1216106153,Susanne,Ramsauer CC,1,1986-04-03,,Die Heldin,1210002980,1-2820467,,,1,,,,false,Mascagnigasse,8,5020,Salzburg
+1215882961,Anita,Deisenberger,1,1947-09-29,,Die Heldin,1210002980,1-2820460,,,1,,,,false,Roplindlweg,11,5071,Wals
+1216159282,Laura,Spitzy CC,1,1957-10-19,,Die Heldin,1210002980,1-2820469,,,1,,,,false,Elsenneimstrasse,5,5020,Salzburg
+1216320905,Brigitte,Schmiedbauer CC,1,1970-02-16,,Die Heldin,1210002980,1-2820478,,,1,,,,false,Friedenstraße,6c,5020,Salzburg
+1216181111,Claudia,Hartl CC,1,1988-03-08,,Die Heldin,1210002980,1-2820473,,,1,,,,false,Bliemhofweg,16,5020,Salzburg
+1216432802,Elke,Poltzer,1,1946-03-28,,Die Heldin,1210002980,1-2820484,,,1,,,,false,Hellbrunnerstrasse,28,5020,Salzburg
+1216613893,Elfriede,Moser CC,1,1973-05-09,,Die Heldin,1210002980,1-2820488,,,1,,,,false,Laschenskystraße,32,5071,Wals
+1216676572,Ines,Schütz CC,1,1974-11-19,,Die Heldin,1210002980,1-2820492,,,1,,,,false,Schwarzenbergpromenade,41,5026,Salzburg
+1216917591,Emilia,Grasedieck CC,1,1978-03-30,,Die Heldin,1210002980,1-2820497,,,1,,,,false,Hermine-Weixlbaumer-Str.,5/9,5412,Puch
+1217005738,Vanja,Sulic CC,1,1991-06-21,,Die Heldin,1210002980,1-2820508,,,1,,,,false,Schwetsernweg,9,5020,Salzburg
+1217093292,Stefanie,Rainer CC,1,1999-05-16,,Die Heldin,1210002980,1-2820518,,,1,,,,false,Gabelsbergerstraße,11/19,5020,Salzburg
+1217152063,Borbola,Török,1,1979-10-09,,Die Heldin,1210002980,1-2820530,,,1,,,,false,Leitmentzstrasse,11,5020,Salzburg
+1217293230,Svitlana,Kryzhanivska,1,1986-02-23,,Die Heldin,1210002980,1-2820542,,,1,,,,false,Paracelsusstraße,30,5020,Salzburg
+1217527462,Verena,Putz,1,1976-07-05,,Die Heldin,1210002980,1-2820553,,,1,,,,false,Rossfelstraße,70,83471,Berchtesgaden
+1217551864,Daniela,Brandstätter,1,1982-11-13,,Die Heldin,1210002980,1-2820557,,,1,,,,false,Morzgerstr.,63,5020,Salzburg
+1217544211,Vera,Lothaller,1,1969-12-09,,Die Heldin,1210002980,1-2820555,,,1,,,,false,Naglstraße,24,5121,Ostermiething
+1217518621,Emma,Ebner CC,1,1961-06-10,,Die Heldin,1210002980,1-2820551,,,1,,,,false,Enzersbergstraße,34,5303,Thalgau
+1217553182,Hanna,Siiki-Hölbing,1,1982-09-20,,Die Heldin,1210002980,1-2820558,,,1,,,,false,Stizhaimerstr.,13/8,5020,Salzburg
+1217639311,Ingrid,Bedel CC,1,1978-03-04,,Die Heldin,1210002980,1-2820566,,,1,,,,false,Modereggweg,14,83471,Schönau
+1217705473,Sonja,Frey,1,1979-11-09,,Die Heldin,1210002980,1-2820579,,,1,,,,false,Bachwinkl,12,5031,Grödig
+1217656421,Elena,Kraus,1,1961-08-30,,Die Heldin,1210002980,1-2820571,,,1,,,,false,bayeischplatzerlstraße,21,5020,Salzburg
+1217653123,Patricia,Diehl,1,1972-03-19,,Die Heldin,1210002980,1-2820570,,,1,,,,false,Am Goring,13,83435,Bad Reichenhall
+1217714324,Renate,Fuchs,1,1972-05-31,,Die Heldin,1210002980,1-2820582,,,1,,,,false,Prödschhofstraße,17,5082,Grödig
+1217770843,Antonia,Csepreghy CC,1,1976-06-07,,Die Heldin,1210002980,1-2820587,,,1,,,,false,Römerstrasse,10/1,5081,Anif
+1217808882,Bojana,Jerinic CC,1,1995-04-28,,Die Heldin,1210002980,1-2820592,,,1,,,,false,Salzburgerstraße,49,5400,Hallein
+1217875039,Nadja,Hinterhöller CC,1,1983-11-14,,Die Heldin,1210002980,1-2820599,,,1,,,,false,Eisgraben,14,5082,Grödig
+1217826154,Hanna,Bürgschwendtner CC,1,1990-01-23,,Die Heldin,1210002980,1-2820595,,,1,,,,false,Schloss-Str.,13,5081,Anif
+1217986210,Elisabeth,Harl,1,1979-03-16,,Die Heldin,1210002980,1-2820608,,,1,,,,false,Staufenstrasse,351,5084,Grossgmain
+1217985901,Teresa,Lüftinger,1,1994-03-12,,Die Heldin,1210002980,1-2820609,,,1,,,,false,Marie-Andeßner Platz,5,5020,Salzburg
+1217902480,Mirela,Muhic,1,1982-07-05,,Die Heldin,1210002980,1-2820600,,,1,,,,false,Rottweg,70 A,5020,Salzburg
+1217910612,Sigrid,Pancis CC,1,1961-03-07,,Die Heldin,1210002980,1-2820602,,,1,,,,false,Kleingmainergasse,15a,5020,Salzburg
+1218081862,Christine,Tarazi,1,1967-01-18,,Die Heldin,1210002980,1-2820618,,,1,,,,false,Schlossstrasse,26b,5020,Salzburg
+1218011365,Lisa,Kühn CC,1,1996-02-04,,Die Heldin,1210002980,1-2820612,,,1,,,,false,Hans-Webersdorfer Straße,29,5020,Salzburg
+1218147031,Waltraud,Wieser CC,1,1958-09-20,,Die Heldin,1210002980,1-2820622,,,1,,,,false,Mühlbachstraße,23,5412,Puch
+1218354951,Anita,Koch CC,1,1981-08-17,,Die Heldin,1210002980,1-2820636,,,1,,,,false,Untersbergstraße,7,5411,Oberalm
+1218505040,Monika,Weinberger,1,1970-11-07,,Die Heldin,1210002980,1-2820649,,,1,,,,false,Akademiestr.,17/3,5020,Salzburg
+1218408681,Johanna,Schwarz CC,1,1981-03-06,,Die Heldin,1210002980,1-2820642,,,1,,,,false,Golsweg,50,5412,St.Jakob am Thurn
+1218466604,Mariana,Deußner,1,1991-11-14,,Die Heldin,1210002980,1-2820648,,,1,,,,false,Birkenstraße,42,5020,Salzburg
+1218627171,Desiree,Blattert,1,1973-10-24,,Die Heldin,1210002980,1-2820659,,,1,,,,false,Amselweg,6,5071,Wals
+1218505521,Franziska,Oberholzner CC,1,1970-12-13,,Die Heldin,1210002980,1-2820651,,,1,,,,false,Traunstr.,25,5026,Aigen
+1218554362,Amela,Demir CC,1,1990-10-01,,Die Heldin,1210002980,1-2820655,,,1,,,,false,Nikolaus Kroner Straße,20,5020,Salzburg
+1218613671,Birgit,Enzensberger CC,1,1969-07-04,,Die Heldin,1210002980,1-2820657,,,1,,,,false,Pfarrhofgutweg,12,5400,Hallein
+1218635894,Sonja,Höll CC,1,1955-07-24,,Die Heldin,1210002980,1-2820661,,,1,,,,false,Friedrich Inhauserstraße,4,5026,Salzburg
+1218642396,Johanna,Helpferer,1,1948-08-19,,Die Heldin,1210002980,1-2820664,,,1,,,,false,Traunstr.,11,5026,Aigen
+1218902354,Waltraud,Bonnecken,1,1968-12-05,,Die Heldin,1210002980,1-2820675,,,1,,,,false,Fischer von Erlach Straße,23,5020,Salzburg
+1218924710,Andrea,Wendl CC,1,1966-07-03,,Die Heldin,1210002980,1-2820677,,,1,,,,false,Schwedenstr.,3,5020,Salzburg
+1218847794,Walter,Erika,1,1952-09-21,,Die Heldin,1210002980,1-2820672,,,1,,,,false,Kreuzbergprommenade,17,5020,Salzburg
+1218966091,Andrea,bsteh CC,1,1957-09-12,,Die Heldin,1210002980,1-2820679,,,1,,,,false,Moosstraße,116g,5020,Salzburg
+1218847960,Bärbl,Stadlbauer,1,1943-03-29,,Die Heldin,1210002980,1-2820671,,,1,,,,false,Fischer von Erlach,13,5020,Salzburg
+1219115441,Marie-Christine,Marie-Christine,1,1992-01-23,,Die Heldin,1210002980,1-2820686,,,1,,,,false,Elsbethen,50,5061,Elsbethen
+1218994320,Claudia,Wallner,1,1971-11-18,,Die Heldin,1210002980,1-2820680,,,1,,,,false,Sportplatzstraße,7,5020,Salzburg
+1218993542,Julia,Birnbaum CC,1,1969-03-26,,Die Heldin,1210002980,1-2820681,,,1,,,,false,Ramsaustraße,22,5324,Faistenau
+1219237420,Chistiane,Frimbichler,1,1982-07-22,,Die Heldin,1210002980,1-2820688,,,1,,,,false,Ramsaustr.,1,5324,Faistenau
+1219115592,Dinka,Ceperkovic CC,1,1983-10-04,,Die Heldin,1210002980,1-2820687,,,1,,,,false,Lindachstraße,2,5110,Oberndorf
+1219268502,Ulrike,Ulmann CC,1,1970-10-19,,Die Heldin,1210002980,1-2820689,,,1,,,,false,Mascggnigasse,33/14,5020,Salzburg
+1219453502,Julia,Ptacinova,1,1967-07-21,,Die Heldin,1210002980,1-2820699,,,1,,,,false,Borromäumstr.,11/4,5020,Salzburg
+1219399051,Waltraud,Franke CC,1,1960-02-17,,Die Heldin,1210002980,1-2820698,,,1,,,,false,Eisgrabenweg,14,5081,Anif
+1219527384,Margit,Prüwasser,1,1953-03-23,,Die Heldin,1210002980,1-2820707,,,1,,,,false,General Arnoldstr,17,5020,Salzburg
+1219453833,Sefidin,Shlahan-Ramush,0,1956-10-10,,Die Heldin,1210002980,1-2820700,,,1,,,,false,borromäusstr.,11/4,5020,Salzburg
+1219538711,Isabella,Hupf,1,1970-06-08,,Die Heldin,1210002980,1-2820709,,,1,,,,false,Stadlerweg,15a,5340,St. Gilgen
+1219459283,Patricia,Späth CC,1,1981-01-17,,Die Heldin,1210002980,1-2820702,,,1,,,,false,Konnrad-Seydenstraße,3,5301,Eugendorf
+1219463653,Susanna,Payer CC,1,1957-08-09,,Die Heldin,1210002980,1-2820703,,,1,,,,false,Nonnthaler-Hauptsrasse,9a,5020,Salzburg
+1219515831,Sibel,Nowatschek CC,1,1998-06-09,,Die Heldin,1210002980,1-2820705,,,1,,,,false,Klessheimallee,53b,5020,Salzburg
+1219625274,Margit,Ebner 2.0,1,1971-11-08,,Die Heldin,1210002980,1-2820716,,,1,,,,false,Brunnleitenweg,7,5061,Elsbethen
+1219552525,Nadine,Bernegger CC,1,1985-11-29,,Die Heldin,1210002980,1-2820711,,,1,,,,false,Moostraße,98b,5020,Salzburg
+1219612272,Denise,San CC,1,1991-08-25,,Die Heldin,1210002980,1-2820714,,,1,,,,false,Südtirolerstraße,71/14,5500,Bischofshofen
+1219649524,Barbara,Schmalzmaier,1,1978-03-09,,Die Heldin,1210002980,1-2820719,,,1,,,,false,Moartalstr.,379/2,5440,Golling
+1219610622,Sabine,Schörghofer CC,1,1970-03-23,,Die Heldin,1210002980,1-2820713,,,1,,,,false,Salzweg,35,508L,Grödig
+1219649681,Liliane,Ebner,1,1951-12-21,,Die Heldin,1210002980,1-2820718,,,1,,,,false,Rosittenstraße,2,5082,2
+1220189000,Alexandra,CC Luger,1,1968-05-09,,Die Heldin,1210002980,1-2820725,,,1,,,,false,Auerspergstraße,52,5020,Salzburg
+1220208801,Saskia,Pesendorfer CC,1,1991-04-10,,Die Heldin,1210002980,1-2820726,,,1,,,,false,Albert- Schweitzerstr.,17,5020,Salzburg
+1219657520,Anita,Brandauer CC,1,1989-04-29,,Die Heldin,1210002980,1-2820721,,,1,,,,false,Moos,72,5431,Kuchl
+1220295051,Beate,Fenninger CC,1,1975-10-30,,Die Heldin,1210002980,1-2820729,,,1,,,,false,Ehrenbachstraße,22,5161,Elixhausen
+1219708251,Susanna,Andreini,1,1965-06-22,,Die Heldin,1210002980,1-2820723,,,1,,,,false,Fürstenallee,52,5020,Salzburg
+1219657801,Verena,Kraus CC,1,1990-11-20,,Die Heldin,1210002980,1-2820722,,,1,,,,false,Martkl,166c,5431,Kuchl
+1220377862,Andrea,Hitzfeld CC,1,1980-10-10,,Die Heldin,1210002980,1-2820733,,,1,,,,false,Franz-Josef Straße,23,5020,Salzburg
+1220416773,Sabine,CC Becker,1,1984-03-21,,Die Heldin,1210002980,1-2820737,,,1,,,,false,Gattsreithweg,11,5301,Eugendorf
+1220312675,Andrea,Fuchs CC,1,1966-07-13,,Die Heldin,1210002980,1-2820731,,,1,,,,false,Moorweg,3,5071,Wals
+1220391462,Gabriela,Kovacs CC,1,1964-09-05,,Die Heldin,1210002980,1-2820736,,,1,,,,false,Gaisbergstraße,9A,5020,Salzburg
+1220312831,Sarah,Bsteh CC,1,1988-03-30,,Die Heldin,1210002980,1-2820730,,,1,,,,false,Gärtnerstraße,26,5020,Salzburg
+1220378021,Floripes,Andexer CC,1,1961-11-23,,Die Heldin,1210002980,1-2820734,,,1,,,,false,Hühnerauweg,24,5400,Hallein
+1220564774,Nicole,CC Wintersteller,1,1980-07-28,,Die Heldin,1210002980,1-2820748,,,1,,,,false,Hauptstraße,6/15,5082,Grödig
+1220477450,Sophia,Pogadl CC,1,2008-08-11,,Die Heldin,1210002980,1-2820741,,,1,,,,false,Gaisbergweg,7,5081,Anif
+1220584882,Veronika,Einberger,1,1962-08-09,,Die Heldin,1210002980,1-2820749,,,1,,,,false,Friedenstraße,2A,5020,Salzburg
+1220521510,Catalin-Laur,Alixandru,0,2000-05-08,,Die Heldin,1210002980,1-2820745,,,1,,,,false,Wagrainerstraße,12,5600,Pongau
+1220660332,Aloise,Ebner CC,1,1963-05-28,,Die Heldin,1210002980,1-2820752,,,1,,,,false,Oberfeld,6a,5082,Grödig
+1220678844,Angelika CC,Russold,1,1974-04-07,,Die Heldin,1210002980,1-2820755,,,1,,,,false,Ramsaustraße,88,5324,Faistenau
+1220679180,Eva,Frisch CC,1,1983-08-12,,Die Heldin,1210002980,1-2820754,,,1,,,,false,Adam-Müller-Gzttenbrunstraße,32,5020,Salzburg
+1220697841,Andrea,Berger CC,1,1978-09-03,,Die Heldin,1210002980,1-2820757,,,1,,,,false,Kastnerweg,7,5081,Anif
+1220736303,Melissa,Neschki CC,1,2001-04-14,,Die Heldin,1210002980,1-2820759,,,1,,,,false,Albert-Schweitzer-Straße,29,5020,Salzburg
+1220668071,Ulrike,Tschinkel CC,1,1962-04-20,,Die Heldin,1210002980,1-2820753,,,1,,,,false,Kreuzhofweg,24,5020,Salzburg
+1220861782,Sandra,Doppler CC,1,1975-02-07,,Die Heldin,1210002980,1-2820766,,,1,,,,false,Pfeifferhofstraße,3,5020,Salzburg
+1220798800,Helene,Hostalek,1,1944-10-18,,Die Heldin,1210002980,1-2820763,,,1,,,,false,Siebenstätterstraße,29,5020,Salzburg
+1220822661,Marion,Behrend,1,1946-10-30,,Die Heldin,1210002980,1-2820765,,,1,,,,false,Goethessttraße,3,5020,Salzburg
+1220866351,Elfriede,Brandstätter CC,1,1968-03-31,,Die Heldin,1210002980,1-2820767,,,1,,,,false,Priesterbauchweg,46,5400,Hallein
+1220890801,Nathalie,Stadnyk,1,1979-02-24,,Die Heldin,1210002980,1-2820768,,,1,,,,false,Rudolf-Bieblstraße,44,5020,Salzburg
+1221138392,Maria,Brandauer CC,1,1958-12-27,,Die Heldin,1210002980,1-2820777,,,1,,,,false,Sonnenscheinweg,8,5400,Hallein
+1221089505,Christine,Löffelberger CC,1,1991-05-02,,Die Heldin,1210002980,1-2820775,,,1,,,,false,Föhrenweg,3,5081,Anif
+1221124052,Anna,Högg CC,1,1990-03-02,,Die Heldin,1210002980,1-2820776,,,1,,,,false,Kaigasse 38,2,5020,Salzburg
+1221145464,Nicole,Wintersteller,1,1980-07-28,,Die Heldin,1210002980,1-2820779,,,1,,,,false,Hauptstraße,6/15,5082,Grödig
+1220974170,Karin,Holeczy,1,1956-11-13,,Die Heldin,1210002980,1-2820770,,,1,,,,false,Hans Schmidingerstraße,8,5303,Thalgau
+1221090180,Elisabeth,Denkl,1,1995-11-01,,Die Heldin,1210002980,1-2820774,,,1,,,,false,Weizensteinerstraße,17,5020,Sakzburg
+1221145610,Aloise,Ebner,1,1963-05-28,,Die Heldin,1210002980,1-2820778,,,1,,,,false,Oberfeld,6A,5082,Grödig
+1220983911,Petra,Schmid CC,1,1993-08-03,,Die Heldin,1210002980,1-2820771,,,1,,,,false,Fischhornstraße,8,5020,Salzburg
+1221006072,Sherin,Shahin,1,1981-11-25,,Die Heldin,1210002980,1-2820772,,,1,,,,false,Rossegerstraße,12,5020,Salzburg
+1221160106,Andrea,Neater,1,1951-05-20,,Die Heldin,1210002980,1-2820782,,,1,,,,false,Pezolt Gasse,12,5020,Salzburg
+1221193770,Simone,Thaler CC,1,1981-05-15,,Die Heldin,1210002980,1-2820784,,,1,,,,false,Bachweg,23,5412,Puch
+1221202933,Marita,Sporeni CC,1,1970-05-15,,Die Heldin,1210002980,1-2820785,,,1,,,,false,Winklerstraße,8/12,5400,Hallein
+1221160790,Albina,Kustrah,1,1980-06-16,,Die Heldin,1210002980,1-2820781,,,1,,,,false,Ludwig Richter Straße,49,5026,Salzburg
+1221177041,Daniela,Rünzler,1,1971-10-29,,Die Heldin,1210002980,1-2820783,,,1,,,,false,Schallmoser Hauptstr.,6a,5020,Salzburg
+1221146193,Angelika,Grünanger CC,1,1961-10-02,,Die Heldin,1210002980,1-2820780,,,1,,,,false,Krögerbaumstraße,4,5411,Oberalm
+1221387190,Maja,Stevic,1,1994-12-28,,Die Heldin,1210002980,1-2820795,,,1,,,,false,Otto-Glöckel Straße,1,5082,Grödig
+1221313882,Medina,Sarsakova,1,2005-09-02,,Die Heldin,1210002980,1-2820793,,,1,,,,false,Laufenstraße,44,5020,Salzurg
+1221387192,Sabine,Heigl CC,1,1988-04-12,,Die Heldin,1210002980,1-2820796,,,1,,,,false,Schrannengasse,10/13,5020,Salzburg
+1221387655,Anke,Ranggetinger CC,1,1983-08-02,,Die Heldin,1210002980,1-2820798,,,1,,,,false,Fürstenallee,35,5020,Salzburg
+1221386847,Mirsada,Adiloski,1,1981-06-20,,Die Heldin,1210002980,1-2820797,,,1,,,,false,Karlheinz Böhmstraße,6/10,5082,Grödig
+1221429311,Monika,Lovric CC,1,1976-01-25,,Die Heldin,1210002980,1-2820799,,,1,,,,false,Halleinerlandestraße,,5411,Oberalm
+1221366351,Ulrike,Hafner,1,1957-05-20,,Die Heldin,1210002980,1-2820794,,,1,,,,false,Franz-Martin-Straße,4A,5020,Salzburg
+1221455550,Erika,Thaler CC,1,1957-07-23,,Die Heldin,1210002980,1-2820800,,,1,,,,false,Stanzingstraße,1,5061,Glasenbach
+1221525552,Jaqueline,Wirrer,1,1993-12-16,,Die Heldin,1210002980,1-2820806,,,1,,,,false,Josef-Hautthalerstraße,43a,5071,Wals
+1221544102,Shuena,Yunus Oma CC,1,1973-12-12,,Die Heldin,1210002980,1-2820807,,,1,,,,false,Röcklbrunnerstraße,18-4-28,5020,Salzburg
+1221524182,Eva,Wenzl CC,1,1981-07-01,,Die Heldin,1210002980,1-2820804,,,1,,,,false,Lindenweg,22,5120,St. Partaleon
+1221582372,Sabrina Karg,Neumann CC,1,1988-10-22,,Die Heldin,1210002980,1-2820808,,,1,,,,false,Kleingmainer Gasse,23/A,5020,Salzburg
+1221616432,Alxeandra,Quintus CC,1,1979-07-31,,Die Heldin,1210002980,1-2820809,,,1,,,,false,kleingmainer Gasse,23a,5020,Salzburg
+1221854131,Erhard,Imelda CC,1,1976-01-30,,Die Heldin,1210002980,1-2820821,,,1,,,,false,Höhenroid,21/2,5203,Köstendorf
+1221861641,Marica,Ketonic CC,1,1958-12-27,,Die Heldin,1210002980,1-2820823,,,1,,,,false,St. Julienstraße,27/2/9,5020,Salzburg
+1221859513,Eva,Brudl-Schober CC,1,1975-06-27,,Die Heldin,1210002980,1-2820822,,,1,,,,false,Kasermühlweg,3/3,5411,Oberalm
+1222007641,Dragana,Stankovic CC,1,1995-07-26,,Die Heldin,1210002980,1-2820829,,,1,,,,false,Geyereck,11,5082,Grödig
+1222035092,Sabine,Schneider,1,1979-03-23,,Die Heldin,1210002980,1-2820833,,,1,,,,false,Wimberg,170,5421,Adnet
+1222024470,Ümmü,Ata CC,1,1987-06-09,,Die Heldin,1210002980,1-2820831,,,1,,,,false,Neualmstraße,6,5400,Hallein
+1221712733,Eder,Annemarie CC,1,1960-12-10,,Die Heldin,1210002980,1-2820814,,,1,,,,false,Staufenweg,22,5400,Taxach/ Rif
+1221712552,Ingeborg,Schuffert CC,1,1970-02-10,,Die Heldin,1210002980,1-2820813,,,1,,,,false,Fischhornstraße,39,5020,Salzburg
+1222007291,Barbara,Flak cc,1,1974-01-10,,Die Heldin,1210002980,1-2820830,,,1,,,,false,Nicolaus Gartner,10,5303,Thalgau
+1221470963,Mirsada,Adiloski CC,1,1981-06-20,,Die Heldin,1210002980,1-2820802,,,1,,,,false,Karlheinz Böhmstraße,6/10,5082,Grödig
+1221827693,Miriam CC,Knoll,1,1984-12-22,,Die Heldin,1210002980,1-2820818,,,1,,,,false,Hammerstraße,42,5411,Oberalm
+1221845692,Ursula,Berk CC,1,1969-05-11,,Die Heldin,1210002980,1-2820820,,,1,,,,false,Bäslestraße,8,5020,Salzburg
+1221873102,Jaqueline,Wertschnig CC,1,1991-08-13,,Die Heldin,1210002980,1-2820824,,,1,,,,false,Rettenbacherstraße,13,5020,Salzburg
+1221896554,Serpil,Ibrahim,1,1978-11-19,,Die Heldin,1210002980,1-2820826,,,1,,,,false,Fürstensallee,36F / 8,5020,Salzburg
+1221988662,Catalina,Mitu CC,1,1988-06-20,,Die Heldin,1210002980,1-2820828,,,1,,,,false,Schiessstattstraße,27,5020,Salzurg
+1221926573,Dragana,Dokic CC,1,1993-03-31,,Die Heldin,1210002980,1-2820827,,,1,,,,false,Salzachtalbundestraße,12,5081,Anif
+1221692453,Adriane,Steiner,1,1964-06-12,,Die Heldin,1210002980,1-2820812,,,1,,,,false,Ford-Parscherstraße,8,5071,Wals
+1221834705,Tanja CC,Winkler,1,1975-06-01,,Die Heldin,1210002980,1-2820819,,,1,,,,false,Auweg,19D,5400,Taxach
+1222055012,Paulus,Edtih CC,1,1964-09-19,,Die Heldin,1210002980,1-2820834,,,1,,,,false,Adlgasserweg,17,5020,Salzburg
+1221467740,Brigitte,Melnik,1,1981-05-24,,Die Heldin,1210002980,1-2820801,,,1,,,,false,Franztalerstraße,4,5020,Salzburg
+1221524184,Ulrike,Hafner CC,1,1957-05-20,,Die Heldin,1210002980,1-2820805,,,1,,,,false,Franz martin Straße,4a,5020,Salzburg
+1221628931,Padungchit,Weber,1,1948-12-26,,Die Heldin,1210002980,1-2820810,,,1,,,,false,Süssmayerstraße,14,5020,Salzburg
+1221508820,Sabine,Schneider CC,1,1976-03-23,,Die Heldin,1210002980,1-2820803,,,1,,,,false,Wimberg,170,5421,Adnet
+1221650972,Maria,Wischner CC,1,1964-10-29,,Die Heldin,1210002980,1-2820811,,,1,,,,false,Anton-Graf-Straße,6a,5020,Salzburg
+1221881151,Maria,Brandauer,1,1958-12-27,,Die Heldin,1210002980,1-2820825,,,1,,,,false,Sonnenscheinweg,,5400,Hallein
+1222028942,Desiree,Moser CC,1,1989-11-27,,Die Heldin,1210002980,1-2820832,,,1,,,,false,Schlossstraße,24/7,5020,Salzburg
+1210004169,Melanie,Steinhagen,1,1991-11-10,,Die Heldin,1210002980,1-29,,,1,,,,false,Gartenstraße,52,5072,Siezenheim
+1210004243,Regina,Putz CC,1,1972-03-12,,Die Heldin,1210002980,1-33,,,1,,,,false,Georgenberg,349,5431,Kuchl
+1210004244,Nicole,Schwaiger CC,1,1964-06-29,2020-03-06T15:05:43.131+01:00[Europe/Vienna],Die Heldin,1210002980,1-34,,,1,,,,false,Schiffhofweg,9,5020,Salzburg
+1210004351,Melanie,Ruckenthaler,1,1984-10-14,,Die Heldin,1210002980,1-41,,,1,,,,false,Versorgungshausstrasse,22,5020,Salzburg
+1210042263,Karin,Kaindl,1,1960-02-01,,Die Heldin,1210002980,1-446430,,,1,,,,false,Dr. Sylvesterstr.,12,5020,Salzburg
+1210044959,Daniela,Hemetinger CC,1,1982-12-19,,Die Heldin,1210002980,1-446716,,,1,,,,false,Generationenweg,12,5412,Puch
+1210045815,Selina,Brenner CC,1,1976-09-30,,Die Heldin,1210002980,1-446802,,,1,,,,false,Henry-Dunant-Straße,44/24,5020,Salzburg
+1210003966,Richarda,Sunkler,1,1949-12-23,2020-06-08T10:23:12.326+02:00[Europe/Vienna],Die Heldin,1210002980,1-6,,,1,,,,false,Wiesbauerstr.,6,5020,Salzburg
\ No newline at end of file
diff --git a/customers.html b/customers.html
new file mode 100644
index 0000000..7e5d6a2
--- /dev/null
+++ b/customers.html
@@ -0,0 +1,273 @@
+
+
+
+
+ Customers – 23.2.2026
+
+
+
+ Customer Export
+ Generated: 2026-02-23T20:29:12.712Z | Total: 248
+
+ | databaseId | firstname | lastname | gender | dateOfBirth | lastCheckIn | facilityName | facilityId | customerNumber | cardNumber | lockerKey | customerStatus | purchasedContingentCode | purchasedContingentType | imageUrl | checkedIn | street | houseNumber | zip | city |
+
+| 1210004724 | Monika | Manzl | 1 | 1947-09-21 | | Die Heldin | 1210002980 | 1-10064 | | | 1 | | | | false | Georg-Klopp-Straße | 8 | 5020 | Salzburg |
+| 1210004921 | Ernestine | Meilinger CC | 1 | 1967-10-25 | | Die Heldin | 1210002980 | 1-10173 | | | 1 | | | | false | Minnesheimerstraße | 20 | 5023 | Sbg |
+| 1210004824 | Evelyn | Schmidjell | 1 | 1944-05-24 | | Die Heldin | 1210002980 | 1-10105 | | | 1 | | | | false | Bachwinkl | 9 | 5081 | Anif |
+| 1210005524 | Stanisaljevic | Lydia | 1 | 1974-07-28 | | Die Heldin | 1210002980 | 1-11162 | | | 1 | | | | false | Josef-Resslsrt. | 19 | 5020 | Salzburg |
+| 1210005817 | Brigitte | Raffetseder CC | 1 | 1958-02-27 | | Die Heldin | 1210002980 | 1-11260 | | | 1 | | | | false | K.H. Waggerl | Str. | 5020 | Sbg |
+| 1210005918 | Eva | Hummer CC | 1 | 1954-08-11 | 2024-01-19T10:18:37.216+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-11301 | | | 1 | | | | false | Salzweg | 34 | 5082 | Grödig |
+| 1210006410 | Helene | Buczolits cc | 1 | 1951-10-03 | 2024-04-12T10:52:49.276+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-11441 | | | 1 | | | | false | Erentrudisstr. | 6 | 5020 | Salzburg |
+| 1210006415 | Johanna | Zehetgruber CC | 1 | 1950-07-05 | 2022-06-10T07:53:06.547+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-11481 | | | 1 | | | | false | Naumanng. | 6 | 5020 | Salzburg |
+| 1210007405 | Ulrike | Koushan CC | 1 | 1947-07-01 | | Die Heldin | 1210002980 | 1-12132 | | | 1 | | | | false | Leitmeritzstr. | 4/38 | 5020 | Salzburg |
+| 1210007507 | Petra | Kubicza CC | 1 | 1988-11-05 | 2020-10-27T17:52:12.583+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-12155 | | | 1 | | | | false | Hochthronstr. | 13 | 5083 | St. Leonhard |
+| 1210007609 | Helga | Zach CC | 1 | 1958-04-03 | | Die Heldin | 1210002980 | 1-12172 | | | 1 | | | | false | Rene Marcic Strasse | 4/11 | 5020 | Salzburg |
+| 1210008886 | Andrea | Lipold CC | 1 | 1960-05-07 | | Die Heldin | 1210002980 | 1-12427 | | | 1 | | | | false | Glanhofen | 5. | 5020 | Salzburg |
+| 1210009582 | Kerstin | Volz CC | 1 | 1989-05-09 | | Die Heldin | 1210002980 | 1-13193 | | | 1 | | | | false | Keine Daten | 0 | 5020 | Salzburg |
+| 1210009871 | Manuela | Spießberger CC | 1 | 1973-06-29 | | Die Heldin | 1210002980 | 1-13296 | | | 1 | | | | false | Brunnwiesweg | 1 | 5204 | Strasswalchen |
+| 1210011422 | Tanja | Lipold CC | 1 | 1989-11-19 | | Die Heldin | 1210002980 | 1-14137 | | | 1 | | | | false | Glanhofen | 5 | 5020 | Salzburg |
+| 1210011424 | Katorina | Virojic CC | 1 | 1985-07-30 | | Die Heldin | 1210002980 | 1-14151 | | | 1 | | | | false | Borromäumstraße | 17/4 | 5020 | Salzburg |
+| 1210011420 | Sabine | Werner CC | 1 | 1964-05-12 | | Die Heldin | 1210002980 | 1-14117 | | | 1 | | | | false | Minnesheimstraße | 8b | 5020 | Salzburg |
+| 1210011510 | Christine | Hucke CC | 1 | 1945-07-01 | | Die Heldin | 1210002980 | 1-14275 | | | 1 | | | | false | Franz Schalk Str. | 6 | 5020 | Salzburg |
+| 1210011511 | Jacqueline | Rieder CC | 1 | 1992-07-21 | | Die Heldin | 1210002980 | 1-14278 | | | 1 | | | | false | Bayernweg | 5 | 5400 | Hallein |
+| 1210011514 | Brunhilde | Klammer CC | 1 | 1954-07-28 | 2024-06-06T09:54:48.203+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-14318 | | | 1 | | | | false | Naumanngasse | 23/4 | 5020 | Sbg |
+| 1210012025 | Patricia | Nethalo | 1 | 1989-01-20 | | Die Heldin | 1210002980 | 1-14471 | | | 1 | | | | false | Bundschuhstrasse | 20 | 5020 | Salzburg |
+| 1210012694 | Barbara | Pamperl | 1 | 1970-01-26 | | Die Heldin | 1210002980 | 1-15009 | | | 1 | | | | false | F.-Inhauser-str. | 4 | 5020 | Salzburg |
+| 1210013463 | Helga | Pentek | 1 | 1949-04-27 | 2021-06-09T08:19:24.894+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-15094 | | | 1 | | | | false | Otto-holzbauerstraße | 11 | 5020 | Salzburg |
+| 1210015065 | Verena | Pogadl CC | 1 | 1986-04-19 | | Die Heldin | 1210002980 | 1-15309 | | | 1 | | | | false | Gaißbergweg | 7/1 | 5081 | Anif |
+| 1210015342 | Claudia | Markut | 1 | 1969-08-01 | 2022-03-03T07:51:16.894+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-15342 | | | 1 | | | | false | Pabensteinstr. 7 | 0 | 5400 | Hallein |
+| 1210015618 | Margit | Egeo CC | 1 | 1967-08-19 | | Die Heldin | 1210002980 | 1-15383 | | | 1 | | | | false | Quellenweg | 9 | 5020 | Salzburg |
+| 1210015897 | Edith | Stromberger CC | 1 | 1955-05-31 | 2020-02-21T07:49:20.002+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-15414 | | | 1 | | | | false | Karl Schoenherrstr. | 8 | 5020 | Salzburg |
+| 1210015985 | Barbara | Geiger CC | 1 | 1975-09-06 | 2021-07-05T15:24:44.126+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-16029 | | | 1 | | | | false | Höglwörthweg | 33 | 5020 | Sbg |
+| 1210015984 | Barbara | Pamperl CC | 1 | 1970-01-26 | 2021-10-18T17:49:50.830+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-16028 | | | 1 | | | | false | F.-Inhauser-Str. | 4 | 5020 | Sbg |
+| 1210015988 | Ursula | Wegmayr | 1 | 1958-10-23 | 2023-09-12T10:29:36.170+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-16035 | | | 1 | | | | false | Pfeifferhoferstr. | 12 | 5020 | Salzburg |
+| 1210016072 | Ingrid | Fuchs | 1 | 1958-12-29 | 2024-01-24T08:34:25.577+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-16056 | | | 1 | | | | false | Gaisberg | 1 | 5020 | Salzburg |
+| 1210016075 | Erna | Glechner CC | 1 | 1963-04-27 | 2022-05-23T07:48:03.946+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-16061 | | | 1 | | | | false | Salzachweg | 55 | 5061 | Elsbethen |
+| 1210016170 | Karin | Geiger CC | 1 | 1972-04-18 | 2020-07-08T17:26:08.037+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-16078 | | | 1 | | | | false | Mohrstr. | 9 | 5020 | Salzburg |
+| 1210016173 | Monika | Posch | 1 | 1952-01-25 | | Die Heldin | 1210002980 | 1-16082 | | | 1 | | | | false | Schleiferbachweg | 1 | 5023 | Salzburg |
+| 1210016177 | Dorota | Bednarz CC | 1 | 1982-10-28 | 2020-02-21T11:02:47.539+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-16092 | | | 1 | | | | false | Kobergerweg | 10 | 5020 | Salzburg |
+| 1210016179 | Ursula | Kroisenbrunner CC | 1 | 1943-06-25 | 2023-11-13T08:56:55.447+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-16098 | | | 1 | | | | false | Otto Glöckel Str. | 17/22 | 5082 | Grödig |
+| 1210016272 | Angelika | Spraider CC | 1 | 1982-08-16 | 2020-03-13T17:27:11.084+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-16108 | | | 1 | | | | false | Kaiser-Karl-Strasse | 3/4 | 5020 | Salzburg |
+| 1210016643 | Susanne | Felsenberger CC | 1 | 1975-03-18 | 2022-01-14T07:53:25.420+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-17005 | | | 1 | | | | false | Friedenstr. | 20 | 5020 | Salzburg |
+| 1210016646 | Michaela | Schubeck-John CC | 1 | 1971-01-25 | 2023-01-19T17:15:07.943+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-17013 | | | 1 | | | | false | Rainweg | 29 | 5102 | Anthering |
+| 1210016842 | Sylvia | Krallinger CC | 1 | 1959-12-21 | 2023-09-04T07:48:49.318+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-17054 | | | 1 | | | | false | Achenpromenade | 12 | 5081 | Anif |
+| 1210016746 | Evelyn | Hettegger CC | 1 | 1979-08-16 | 2022-10-10T10:26:26.492+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-17040 | | | 1 | | | | false | Friedenstrasse | 2/3 | 5020 | Salzburg |
+| 1210017036 | Sarah | Hyden | 1 | 1987-09-19 | | Die Heldin | 1210002980 | 1-17090 | | | 1 | | | | false | Hugo-Wolf-Str. | 14/2 | 5020 | Salzburg |
+| 1210017032 | Viktoria | Pichler CC | 1 | 1991-01-01 | 2020-09-21T14:45:26.929+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-17086 | | | 1 | | | | false | Ahornstr. | 21 | 83451 | Piding |
+| 1210017120 | Susanne | Zwatz CC | 1 | 1975-03-04 | | Die Heldin | 1210002980 | 1-17094 | | | 1 | | | | false | Fürstenallee | 35/9 | 5020 | Salzburg |
+| 1210016747 | Anita | Gimpl CC | 1 | 1993-11-14 | | Die Heldin | 1210002980 | 1-17045 | | | 1 | | | | false | Reinbergweg | 5 | 5061 | Elsbethen |
+| 1210017215 | Michaela | Seer-Hetz CC | 1 | 1976-06-27 | 2024-06-21T09:55:46.960+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-18016 | | | 1 | | | | false | Johann-Herbst-Straße | 18 | 5061 | Elsbethen |
+| 1210017492 | Bettina | Holzer CC | 1 | 1985-02-23 | 2022-07-11T10:47:38.078+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-18062 | | | 1 | | | | false | Willhelm von Exner Straße | 20/2 | 5020 | Salzburg |
+| 1210017684 | Elena | Fercher CC | 1 | 2001-05-05 | 2020-08-24T17:46:09.415+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-18090 | | | 1 | | | | false | Usnerweg | 4 | 5412 | Puch |
+| 1210017979 | Heike | strobl CC | 1 | 1983-05-09 | 2020-06-12T08:45:13.939+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-18130 | | | 1 | | | | false | Weidenweg | 1 | 5061 | Salzburg |
+| 1210017870 | Cornelia | Egger cc | 1 | 1980-03-14 | 2021-09-08T07:55:28.640+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-18110 | | | 1 | | | | false | Staufenstraße | 11 | 5071 | Wals |
+| 1210017973 | Sorina | Heiser | 1 | 1965-05-31 | | Die Heldin | 1210002980 | 1-18124 | | | 1 | | | | false | Vierthalerstraße | 1 | 5400 | Hallein |
+| 1210018065 | Claudia | Quehenberger | 1 | 1967-09-10 | | Die Heldin | 1210002980 | 1-18300 | | | 1 | | | | false | Ernst-Grein-Str. | 6A | 5020 | Salzburg |
+| 1210018367 | Loredana | Niculescu | 1 | 1996-08-28 | 2020-06-05T16:51:03.192+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-19035 | | | 1 | | | | false | Salzbuger Strasse | 29 | 5411 | Hallein |
+| 1210018760 | Katharina | Neureiter CC | 1 | 1984-01-18 | 2021-07-08T08:56:01.702+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-19068 | | | 1 | | | | false | Scharten | 22 | 5450 | Werfen |
+| 1210048017 | Christina | Krispler CC | 1 | 1987-04-21 | | Die Heldin | 1210002980 | 1-2818141 | | | 1 | | | | false | Hinterebenau | 10 | 23 | Ebenau |
+| 1210047336 | Olga | Damm | 1 | 1978-04-18 | | Die Heldin | 1210002980 | 1-2820061 | | | 1 | | | | false | Adnet | 26 | 5421 | Adnet |
+| 1210047338 | Cornelia | Ludwig CC | 1 | 2000-11-30 | 2020-02-11T08:17:14.394+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820063 | | | 1 | | | | false | Neutorstr. | 19 | 5020 | Salzburg |
+| 1210047523 | Eva | Sieberer CC | 1 | 1985-11-13 | 2022-04-04T09:30:03.582+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820078 | | | 1 | | | | false | Heimstraße 12 | a | 5020 | Salzburg |
+| 1210047428 | Gudrun | Körbler CC | 1 | 1961-02-27 | 2022-05-19T09:52:17.022+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820073 | | | 1 | | | | false | Samstrasse | 38 | 5023 | Salzburg |
+| 1210047526 | Heidrun | Lehner CC | 1 | 1964-09-19 | 2020-03-13T08:12:16.463+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820081 | | | 1 | | | | false | Seppenpointstr. | 374 | 5412 | Puch |
+| 1210126522 | Tanja | Niedermoser | 1 | 1983-01-11 | | Die Heldin | 1210002980 | 1-2820107 | | | 1 | | | | false | Dorfstrasse | 20 | 5081 | Anif |
+| 1210126520 | Nadine | Krebs | 1 | 1993-09-19 | 2020-07-02T17:20:27.349+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820100 | | | 1 | | | | false | Kreuzbrücklweg | 11 | 5020 | Salzburg |
+| 1210125493 | Gisela | König | 1 | 1964-12-20 | 2022-04-26T18:29:58.831+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820106 | | | 1 | | | | false | Bairau | 43 | 5511 | Hüttau |
+| 1210220870 | Barbara | Schweiger CC | 1 | 1975-12-15 | 2022-01-27T10:05:05.419+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820139 | | | 1 | | | | false | Haunsbergstr. | 93 | 5020 | Salzburg |
+| 1210206270 | Dummy | Dummy | 1 | 2019-12-24 | | Die Heldin | 1210002980 | 1-2820131 | | | 1 | | | | false | Alpenstr. | 54 | 5020 | Salzburg |
+| 1210216991 | Beate | Kirschenhofer | 1 | 1980-03-07 | 2020-08-06T07:47:14.732+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820136 | | | 1 | | | | false | Stegweg | 2 | 5061 | Elsbethen |
+| 1210274110 | Ayhan | Kirbas | 1 | 1968-07-19 | 2022-10-21T08:22:29.354+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820147 | | | 1 | | | | false | Konradlaibstrasse | 10a | 5020 | Salzburg |
+| 1210462550 | Irina | Bayrhammer | 1 | 1983-07-16 | | Die Heldin | 1210002980 | 1-2820178 | | | 1 | | | | false | Hintersee | 42 | 5324 | Hintersee |
+| 1210876390 | Eva-Maria | heis | 1 | 1991-07-24 | | Die Heldin | 1210002980 | 1-2820204 | | | 1 | | | | false | Franz-ofner-Strasse | 1 | 5020 | Salzburg |
+| 1210876570 | Silvia | Suler | 1 | 1979-02-07 | | Die Heldin | 1210002980 | 1-2820205 | | | 1 | | | | false | Siezenheimerstrasse | 66 | 5020 | Salzburg |
+| 1211550510 | Petra | Kropiunik-wirlandner CC | 1 | 1972-02-08 | 2022-09-15T16:25:13.232+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820260 | | | 1 | | | | false | Tannenweg | 5/4 | 5400 hallein | Anif |
+| 1212039590 | Helen | Roessler CC | 2 | 1988-02-23 | | Die Heldin | 1210002980 | 1-2820278 | | | 1 | | | | false | Rifer Hauptstr. | 94c | 5400 | Hallein |
+| 1212274080 | Raffaela | Egger | 1 | 1986-08-07 | | Die Heldin | 1210002980 | 1-2820286 | | | 1 | | | | false | Rosengasse | 10 | 5020 | Salzburg |
+| 1212331920 | Claudia | Masarie | 1 | 1973-03-16 | | Die Heldin | 1210002980 | 1-2820290 | | | 1 | | | | false | klessheimerstrasse allee | 28 | 5020 | Salzburg |
+| 1213860190 | Karin | Steingruber | 1 | 1986-01-15 | 2022-06-29T09:29:39.302+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820369 | | | 1 | | | [object Object] | false | Guggenmooserstr. | 40 | 5020 | Salzburg |
+| 1213781891 | Michaela | Draschl CC | 1 | 1972-08-27 | | Die Heldin | 1210002980 | 1-2820362 | | | 1 | | | | false | H.Weixelbaumer Strasse | 2/6 | 54/2 | Puch bei Hallein |
+| 1213901770 | Astrid | Pucher CC | 1 | 1978-04-04 | 2022-06-28T11:22:23.284+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820371 | | | 1 | | | | false | Sportplatzweg | 7 | 5325 | Plainfeld |
+| 1213980970 | Petry | Stase Agne CC | 1 | 1989-07-29 | | Die Heldin | 1210002980 | 1-2820376 | | | 1 | | | | false | Linzer Bundesstraße | 30-12 | 5023 | Salzburg |
+| 1214148270 | Karin | Schaffer CC | 1 | 1964-11-05 | | Die Heldin | 1210002980 | 1-2820384 | | | 1 | | | | false | Baslerstrasse | 1 | 5020 | Salzburg |
+| 1214378610 | Susanne | Gruber-Ebert CC | 1 | 1963-03-04 | 2023-03-23T17:25:58.391+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-2820395 | | | 1 | | | | false | Neu-Aniferstraße | 1 | 5081 | Anif |
+| 1214483110 | Sabine | Kralik CC | 1 | 1976-11-07 | | Die Heldin | 1210002980 | 1-2820403 | | | 1 | | | | false | Weideweg | 1A | 5111 | Bürmoos |
+| 1214541960 | Buket | Konstantinov | 1 | 1989-08-27 | | Die Heldin | 1210002980 | 1-2820405 | | | 1 | | | | false | Humboldstrasse | 12/6 | 5020 | Salzburg |
+| 1214996980 | Sima | Ghawidel Asgari CC | 1 | 1979-01-14 | | Die Heldin | 1210002980 | 1-2820411 | | | 1 | | | | false | Trattbergstr. | 216 | 5423 | St.Koloman |
+| 1215305071 | Rosi | Petsche CC | 1 | 1969-02-17 | | Die Heldin | 1210002980 | 1-2820425 | | | 1 | | | | false | Moosstr. | 469/3 | 5020 | Salzburg |
+| 1215477461 | Helena | Danninger CC | 1 | 1986-08-22 | | Die Heldin | 1210002980 | 1-2820435 | | | 1 | | | | false | Tauxgasse | 20 | 5020 | Salzburg |
+| 1215441216 | Ulrike | Kraft | 1 | 1964-07-29 | | Die Heldin | 1210002980 | 1-2820430 | | | 1 | | | | false | Unterdorfweg | 23 | 5303 | Thalgau |
+| 1215634215 | Daniela | Thurner CC | 1 | 1956-07-17 | | Die Heldin | 1210002980 | 1-2820447 | | | 1 | | | | false | Fischbachstr. | 58 | 5020 | Salzburg |
+| 1215785124 | Simone | Neuhauser | 1 | 1966-11-28 | | Die Heldin | 1210002980 | 1-2820455 | | | 1 | | | | false | 8 | 6207 | 5020 | Salzburg |
+| 1216106598 | Sarah | Kuss CC | 1 | 1995-10-18 | | Die Heldin | 1210002980 | 1-2820468 | | | 1 | | | | false | Michael-Pacher Str. | 13/12 | 5020 | Salzburg |
+| 1215915223 | Emma | Rinnerthaler | 1 | 1966-11-21 | | Die Heldin | 1210002980 | 1-2820461 | | | 1 | | | | false | Eberhard-Fugger-Str. | 4/74 | 5020 | Salzburg |
+| 1216106153 | Susanne | Ramsauer CC | 1 | 1986-04-03 | | Die Heldin | 1210002980 | 1-2820467 | | | 1 | | | | false | Mascagnigasse | 8 | 5020 | Salzburg |
+| 1215882961 | Anita | Deisenberger | 1 | 1947-09-29 | | Die Heldin | 1210002980 | 1-2820460 | | | 1 | | | | false | Roplindlweg | 11 | 5071 | Wals |
+| 1216159282 | Laura | Spitzy CC | 1 | 1957-10-19 | | Die Heldin | 1210002980 | 1-2820469 | | | 1 | | | | false | Elsenneimstrasse | 5 | 5020 | Salzburg |
+| 1216320905 | Brigitte | Schmiedbauer CC | 1 | 1970-02-16 | | Die Heldin | 1210002980 | 1-2820478 | | | 1 | | | | false | Friedenstraße | 6c | 5020 | Salzburg |
+| 1216181111 | Claudia | Hartl CC | 1 | 1988-03-08 | | Die Heldin | 1210002980 | 1-2820473 | | | 1 | | | | false | Bliemhofweg | 16 | 5020 | Salzburg |
+| 1216432802 | Elke | Poltzer | 1 | 1946-03-28 | | Die Heldin | 1210002980 | 1-2820484 | | | 1 | | | | false | Hellbrunnerstrasse | 28 | 5020 | Salzburg |
+| 1216613893 | Elfriede | Moser CC | 1 | 1973-05-09 | | Die Heldin | 1210002980 | 1-2820488 | | | 1 | | | | false | Laschenskystraße | 32 | 5071 | Wals |
+| 1216676572 | Ines | Schütz CC | 1 | 1974-11-19 | | Die Heldin | 1210002980 | 1-2820492 | | | 1 | | | | false | Schwarzenbergpromenade | 41 | 5026 | Salzburg |
+| 1216917591 | Emilia | Grasedieck CC | 1 | 1978-03-30 | | Die Heldin | 1210002980 | 1-2820497 | | | 1 | | | | false | Hermine-Weixlbaumer-Str. | 5/9 | 5412 | Puch |
+| 1217005738 | Vanja | Sulic CC | 1 | 1991-06-21 | | Die Heldin | 1210002980 | 1-2820508 | | | 1 | | | | false | Schwetsernweg | 9 | 5020 | Salzburg |
+| 1217093292 | Stefanie | Rainer CC | 1 | 1999-05-16 | | Die Heldin | 1210002980 | 1-2820518 | | | 1 | | | | false | Gabelsbergerstraße | 11/19 | 5020 | Salzburg |
+| 1217152063 | Borbola | Török | 1 | 1979-10-09 | | Die Heldin | 1210002980 | 1-2820530 | | | 1 | | | | false | Leitmentzstrasse | 11 | 5020 | Salzburg |
+| 1217293230 | Svitlana | Kryzhanivska | 1 | 1986-02-23 | | Die Heldin | 1210002980 | 1-2820542 | | | 1 | | | | false | Paracelsusstraße | 30 | 5020 | Salzburg |
+| 1217527462 | Verena | Putz | 1 | 1976-07-05 | | Die Heldin | 1210002980 | 1-2820553 | | | 1 | | | | false | Rossfelstraße | 70 | 83471 | Berchtesgaden |
+| 1217551864 | Daniela | Brandstätter | 1 | 1982-11-13 | | Die Heldin | 1210002980 | 1-2820557 | | | 1 | | | | false | Morzgerstr. | 63 | 5020 | Salzburg |
+| 1217544211 | Vera | Lothaller | 1 | 1969-12-09 | | Die Heldin | 1210002980 | 1-2820555 | | | 1 | | | | false | Naglstraße | 24 | 5121 | Ostermiething |
+| 1217518621 | Emma | Ebner CC | 1 | 1961-06-10 | | Die Heldin | 1210002980 | 1-2820551 | | | 1 | | | | false | Enzersbergstraße | 34 | 5303 | Thalgau |
+| 1217553182 | Hanna | Siiki-Hölbing | 1 | 1982-09-20 | | Die Heldin | 1210002980 | 1-2820558 | | | 1 | | | | false | Stizhaimerstr. | 13/8 | 5020 | Salzburg |
+| 1217639311 | Ingrid | Bedel CC | 1 | 1978-03-04 | | Die Heldin | 1210002980 | 1-2820566 | | | 1 | | | | false | Modereggweg | 14 | 83471 | Schönau |
+| 1217705473 | Sonja | Frey | 1 | 1979-11-09 | | Die Heldin | 1210002980 | 1-2820579 | | | 1 | | | | false | Bachwinkl | 12 | 5031 | Grödig |
+| 1217656421 | Elena | Kraus | 1 | 1961-08-30 | | Die Heldin | 1210002980 | 1-2820571 | | | 1 | | | | false | bayeischplatzerlstraße | 21 | 5020 | Salzburg |
+| 1217653123 | Patricia | Diehl | 1 | 1972-03-19 | | Die Heldin | 1210002980 | 1-2820570 | | | 1 | | | | false | Am Goring | 13 | 83435 | Bad Reichenhall |
+| 1217714324 | Renate | Fuchs | 1 | 1972-05-31 | | Die Heldin | 1210002980 | 1-2820582 | | | 1 | | | | false | Prödschhofstraße | 17 | 5082 | Grödig |
+| 1217770843 | Antonia | Csepreghy CC | 1 | 1976-06-07 | | Die Heldin | 1210002980 | 1-2820587 | | | 1 | | | | false | Römerstrasse | 10/1 | 5081 | Anif |
+| 1217808882 | Bojana | Jerinic CC | 1 | 1995-04-28 | | Die Heldin | 1210002980 | 1-2820592 | | | 1 | | | | false | Salzburgerstraße | 49 | 5400 | Hallein |
+| 1217875039 | Nadja | Hinterhöller CC | 1 | 1983-11-14 | | Die Heldin | 1210002980 | 1-2820599 | | | 1 | | | | false | Eisgraben | 14 | 5082 | Grödig |
+| 1217826154 | Hanna | Bürgschwendtner CC | 1 | 1990-01-23 | | Die Heldin | 1210002980 | 1-2820595 | | | 1 | | | | false | Schloss-Str. | 13 | 5081 | Anif |
+| 1217986210 | Elisabeth | Harl | 1 | 1979-03-16 | | Die Heldin | 1210002980 | 1-2820608 | | | 1 | | | | false | Staufenstrasse | 351 | 5084 | Grossgmain |
+| 1217985901 | Teresa | Lüftinger | 1 | 1994-03-12 | | Die Heldin | 1210002980 | 1-2820609 | | | 1 | | | | false | Marie-Andeßner Platz | 5 | 5020 | Salzburg |
+| 1217902480 | Mirela | Muhic | 1 | 1982-07-05 | | Die Heldin | 1210002980 | 1-2820600 | | | 1 | | | | false | Rottweg | 70 A | 5020 | Salzburg |
+| 1217910612 | Sigrid | Pancis CC | 1 | 1961-03-07 | | Die Heldin | 1210002980 | 1-2820602 | | | 1 | | | | false | Kleingmainergasse | 15a | 5020 | Salzburg |
+| 1218081862 | Christine | Tarazi | 1 | 1967-01-18 | | Die Heldin | 1210002980 | 1-2820618 | | | 1 | | | | false | Schlossstrasse | 26b | 5020 | Salzburg |
+| 1218011365 | Lisa | Kühn CC | 1 | 1996-02-04 | | Die Heldin | 1210002980 | 1-2820612 | | | 1 | | | | false | Hans-Webersdorfer Straße | 29 | 5020 | Salzburg |
+| 1218147031 | Waltraud | Wieser CC | 1 | 1958-09-20 | | Die Heldin | 1210002980 | 1-2820622 | | | 1 | | | | false | Mühlbachstraße | 23 | 5412 | Puch |
+| 1218354951 | Anita | Koch CC | 1 | 1981-08-17 | | Die Heldin | 1210002980 | 1-2820636 | | | 1 | | | | false | Untersbergstraße | 7 | 5411 | Oberalm |
+| 1218505040 | Monika | Weinberger | 1 | 1970-11-07 | | Die Heldin | 1210002980 | 1-2820649 | | | 1 | | | | false | Akademiestr. | 17/3 | 5020 | Salzburg |
+| 1218408681 | Johanna | Schwarz CC | 1 | 1981-03-06 | | Die Heldin | 1210002980 | 1-2820642 | | | 1 | | | | false | Golsweg | 50 | 5412 | St.Jakob am Thurn |
+| 1218466604 | Mariana | Deußner | 1 | 1991-11-14 | | Die Heldin | 1210002980 | 1-2820648 | | | 1 | | | | false | Birkenstraße | 42 | 5020 | Salzburg |
+| 1218627171 | Desiree | Blattert | 1 | 1973-10-24 | | Die Heldin | 1210002980 | 1-2820659 | | | 1 | | | | false | Amselweg | 6 | 5071 | Wals |
+| 1218505521 | Franziska | Oberholzner CC | 1 | 1970-12-13 | | Die Heldin | 1210002980 | 1-2820651 | | | 1 | | | | false | Traunstr. | 25 | 5026 | Aigen |
+| 1218554362 | Amela | Demir CC | 1 | 1990-10-01 | | Die Heldin | 1210002980 | 1-2820655 | | | 1 | | | | false | Nikolaus Kroner Straße | 20 | 5020 | Salzburg |
+| 1218613671 | Birgit | Enzensberger CC | 1 | 1969-07-04 | | Die Heldin | 1210002980 | 1-2820657 | | | 1 | | | | false | Pfarrhofgutweg | 12 | 5400 | Hallein |
+| 1218635894 | Sonja | Höll CC | 1 | 1955-07-24 | | Die Heldin | 1210002980 | 1-2820661 | | | 1 | | | | false | Friedrich Inhauserstraße | 4 | 5026 | Salzburg |
+| 1218642396 | Johanna | Helpferer | 1 | 1948-08-19 | | Die Heldin | 1210002980 | 1-2820664 | | | 1 | | | | false | Traunstr. | 11 | 5026 | Aigen |
+| 1218902354 | Waltraud | Bonnecken | 1 | 1968-12-05 | | Die Heldin | 1210002980 | 1-2820675 | | | 1 | | | | false | Fischer von Erlach Straße | 23 | 5020 | Salzburg |
+| 1218924710 | Andrea | Wendl CC | 1 | 1966-07-03 | | Die Heldin | 1210002980 | 1-2820677 | | | 1 | | | | false | Schwedenstr. | 3 | 5020 | Salzburg |
+| 1218847794 | Walter | Erika | 1 | 1952-09-21 | | Die Heldin | 1210002980 | 1-2820672 | | | 1 | | | | false | Kreuzbergprommenade | 17 | 5020 | Salzburg |
+| 1218966091 | Andrea | bsteh CC | 1 | 1957-09-12 | | Die Heldin | 1210002980 | 1-2820679 | | | 1 | | | | false | Moosstraße | 116g | 5020 | Salzburg |
+| 1218847960 | Bärbl | Stadlbauer | 1 | 1943-03-29 | | Die Heldin | 1210002980 | 1-2820671 | | | 1 | | | | false | Fischer von Erlach | 13 | 5020 | Salzburg |
+| 1219115441 | Marie-Christine | Marie-Christine | 1 | 1992-01-23 | | Die Heldin | 1210002980 | 1-2820686 | | | 1 | | | | false | Elsbethen | 50 | 5061 | Elsbethen |
+| 1218994320 | Claudia | Wallner | 1 | 1971-11-18 | | Die Heldin | 1210002980 | 1-2820680 | | | 1 | | | | false | Sportplatzstraße | 7 | 5020 | Salzburg |
+| 1218993542 | Julia | Birnbaum CC | 1 | 1969-03-26 | | Die Heldin | 1210002980 | 1-2820681 | | | 1 | | | | false | Ramsaustraße | 22 | 5324 | Faistenau |
+| 1219237420 | Chistiane | Frimbichler | 1 | 1982-07-22 | | Die Heldin | 1210002980 | 1-2820688 | | | 1 | | | | false | Ramsaustr. | 1 | 5324 | Faistenau |
+| 1219115592 | Dinka | Ceperkovic CC | 1 | 1983-10-04 | | Die Heldin | 1210002980 | 1-2820687 | | | 1 | | | | false | Lindachstraße | 2 | 5110 | Oberndorf |
+| 1219268502 | Ulrike | Ulmann CC | 1 | 1970-10-19 | | Die Heldin | 1210002980 | 1-2820689 | | | 1 | | | | false | Mascggnigasse | 33/14 | 5020 | Salzburg |
+| 1219453502 | Julia | Ptacinova | 1 | 1967-07-21 | | Die Heldin | 1210002980 | 1-2820699 | | | 1 | | | | false | Borromäumstr. | 11/4 | 5020 | Salzburg |
+| 1219399051 | Waltraud | Franke CC | 1 | 1960-02-17 | | Die Heldin | 1210002980 | 1-2820698 | | | 1 | | | | false | Eisgrabenweg | 14 | 5081 | Anif |
+| 1219527384 | Margit | Prüwasser | 1 | 1953-03-23 | | Die Heldin | 1210002980 | 1-2820707 | | | 1 | | | | false | General Arnoldstr | 17 | 5020 | Salzburg |
+| 1219453833 | Sefidin | Shlahan-Ramush | 0 | 1956-10-10 | | Die Heldin | 1210002980 | 1-2820700 | | | 1 | | | | false | borromäusstr. | 11/4 | 5020 | Salzburg |
+| 1219538711 | Isabella | Hupf | 1 | 1970-06-08 | | Die Heldin | 1210002980 | 1-2820709 | | | 1 | | | | false | Stadlerweg | 15a | 5340 | St. Gilgen |
+| 1219459283 | Patricia | Späth CC | 1 | 1981-01-17 | | Die Heldin | 1210002980 | 1-2820702 | | | 1 | | | | false | Konnrad-Seydenstraße | 3 | 5301 | Eugendorf |
+| 1219463653 | Susanna | Payer CC | 1 | 1957-08-09 | | Die Heldin | 1210002980 | 1-2820703 | | | 1 | | | | false | Nonnthaler-Hauptsrasse | 9a | 5020 | Salzburg |
+| 1219515831 | Sibel | Nowatschek CC | 1 | 1998-06-09 | | Die Heldin | 1210002980 | 1-2820705 | | | 1 | | | | false | Klessheimallee | 53b | 5020 | Salzburg |
+| 1219625274 | Margit | Ebner 2.0 | 1 | 1971-11-08 | | Die Heldin | 1210002980 | 1-2820716 | | | 1 | | | | false | Brunnleitenweg | 7 | 5061 | Elsbethen |
+| 1219552525 | Nadine | Bernegger CC | 1 | 1985-11-29 | | Die Heldin | 1210002980 | 1-2820711 | | | 1 | | | | false | Moostraße | 98b | 5020 | Salzburg |
+| 1219612272 | Denise | San CC | 1 | 1991-08-25 | | Die Heldin | 1210002980 | 1-2820714 | | | 1 | | | | false | Südtirolerstraße | 71/14 | 5500 | Bischofshofen |
+| 1219649524 | Barbara | Schmalzmaier | 1 | 1978-03-09 | | Die Heldin | 1210002980 | 1-2820719 | | | 1 | | | | false | Moartalstr. | 379/2 | 5440 | Golling |
+| 1219610622 | Sabine | Schörghofer CC | 1 | 1970-03-23 | | Die Heldin | 1210002980 | 1-2820713 | | | 1 | | | | false | Salzweg | 35 | 508L | Grödig |
+| 1219649681 | Liliane | Ebner | 1 | 1951-12-21 | | Die Heldin | 1210002980 | 1-2820718 | | | 1 | | | | false | Rosittenstraße | 2 | 5082 | 2 |
+| 1220189000 | Alexandra | CC Luger | 1 | 1968-05-09 | | Die Heldin | 1210002980 | 1-2820725 | | | 1 | | | | false | Auerspergstraße | 52 | 5020 | Salzburg |
+| 1220208801 | Saskia | Pesendorfer CC | 1 | 1991-04-10 | | Die Heldin | 1210002980 | 1-2820726 | | | 1 | | | | false | Albert- Schweitzerstr. | 17 | 5020 | Salzburg |
+| 1219657520 | Anita | Brandauer CC | 1 | 1989-04-29 | | Die Heldin | 1210002980 | 1-2820721 | | | 1 | | | | false | Moos | 72 | 5431 | Kuchl |
+| 1220295051 | Beate | Fenninger CC | 1 | 1975-10-30 | | Die Heldin | 1210002980 | 1-2820729 | | | 1 | | | | false | Ehrenbachstraße | 22 | 5161 | Elixhausen |
+| 1219708251 | Susanna | Andreini | 1 | 1965-06-22 | | Die Heldin | 1210002980 | 1-2820723 | | | 1 | | | | false | Fürstenallee | 52 | 5020 | Salzburg |
+| 1219657801 | Verena | Kraus CC | 1 | 1990-11-20 | | Die Heldin | 1210002980 | 1-2820722 | | | 1 | | | | false | Martkl | 166c | 5431 | Kuchl |
+| 1220377862 | Andrea | Hitzfeld CC | 1 | 1980-10-10 | | Die Heldin | 1210002980 | 1-2820733 | | | 1 | | | | false | Franz-Josef Straße | 23 | 5020 | Salzburg |
+| 1220416773 | Sabine | CC Becker | 1 | 1984-03-21 | | Die Heldin | 1210002980 | 1-2820737 | | | 1 | | | | false | Gattsreithweg | 11 | 5301 | Eugendorf |
+| 1220312675 | Andrea | Fuchs CC | 1 | 1966-07-13 | | Die Heldin | 1210002980 | 1-2820731 | | | 1 | | | | false | Moorweg | 3 | 5071 | Wals |
+| 1220391462 | Gabriela | Kovacs CC | 1 | 1964-09-05 | | Die Heldin | 1210002980 | 1-2820736 | | | 1 | | | | false | Gaisbergstraße | 9A | 5020 | Salzburg |
+| 1220312831 | Sarah | Bsteh CC | 1 | 1988-03-30 | | Die Heldin | 1210002980 | 1-2820730 | | | 1 | | | | false | Gärtnerstraße | 26 | 5020 | Salzburg |
+| 1220378021 | Floripes | Andexer CC | 1 | 1961-11-23 | | Die Heldin | 1210002980 | 1-2820734 | | | 1 | | | | false | Hühnerauweg | 24 | 5400 | Hallein |
+| 1220564774 | Nicole | CC Wintersteller | 1 | 1980-07-28 | | Die Heldin | 1210002980 | 1-2820748 | | | 1 | | | | false | Hauptstraße | 6/15 | 5082 | Grödig |
+| 1220477450 | Sophia | Pogadl CC | 1 | 2008-08-11 | | Die Heldin | 1210002980 | 1-2820741 | | | 1 | | | | false | Gaisbergweg | 7 | 5081 | Anif |
+| 1220584882 | Veronika | Einberger | 1 | 1962-08-09 | | Die Heldin | 1210002980 | 1-2820749 | | | 1 | | | | false | Friedenstraße | 2A | 5020 | Salzburg |
+| 1220521510 | Catalin-Laur | Alixandru | 0 | 2000-05-08 | | Die Heldin | 1210002980 | 1-2820745 | | | 1 | | | | false | Wagrainerstraße | 12 | 5600 | Pongau |
+| 1220660332 | Aloise | Ebner CC | 1 | 1963-05-28 | | Die Heldin | 1210002980 | 1-2820752 | | | 1 | | | | false | Oberfeld | 6a | 5082 | Grödig |
+| 1220678844 | Angelika CC | Russold | 1 | 1974-04-07 | | Die Heldin | 1210002980 | 1-2820755 | | | 1 | | | | false | Ramsaustraße | 88 | 5324 | Faistenau |
+| 1220679180 | Eva | Frisch CC | 1 | 1983-08-12 | | Die Heldin | 1210002980 | 1-2820754 | | | 1 | | | | false | Adam-Müller-Gzttenbrunstraße | 32 | 5020 | Salzburg |
+| 1220697841 | Andrea | Berger CC | 1 | 1978-09-03 | | Die Heldin | 1210002980 | 1-2820757 | | | 1 | | | | false | Kastnerweg | 7 | 5081 | Anif |
+| 1220736303 | Melissa | Neschki CC | 1 | 2001-04-14 | | Die Heldin | 1210002980 | 1-2820759 | | | 1 | | | | false | Albert-Schweitzer-Straße | 29 | 5020 | Salzburg |
+| 1220668071 | Ulrike | Tschinkel CC | 1 | 1962-04-20 | | Die Heldin | 1210002980 | 1-2820753 | | | 1 | | | | false | Kreuzhofweg | 24 | 5020 | Salzburg |
+| 1220861782 | Sandra | Doppler CC | 1 | 1975-02-07 | | Die Heldin | 1210002980 | 1-2820766 | | | 1 | | | | false | Pfeifferhofstraße | 3 | 5020 | Salzburg |
+| 1220798800 | Helene | Hostalek | 1 | 1944-10-18 | | Die Heldin | 1210002980 | 1-2820763 | | | 1 | | | | false | Siebenstätterstraße | 29 | 5020 | Salzburg |
+| 1220822661 | Marion | Behrend | 1 | 1946-10-30 | | Die Heldin | 1210002980 | 1-2820765 | | | 1 | | | | false | Goethessttraße | 3 | 5020 | Salzburg |
+| 1220866351 | Elfriede | Brandstätter CC | 1 | 1968-03-31 | | Die Heldin | 1210002980 | 1-2820767 | | | 1 | | | | false | Priesterbauchweg | 46 | 5400 | Hallein |
+| 1220890801 | Nathalie | Stadnyk | 1 | 1979-02-24 | | Die Heldin | 1210002980 | 1-2820768 | | | 1 | | | | false | Rudolf-Bieblstraße | 44 | 5020 | Salzburg |
+| 1221138392 | Maria | Brandauer CC | 1 | 1958-12-27 | | Die Heldin | 1210002980 | 1-2820777 | | | 1 | | | | false | Sonnenscheinweg | 8 | 5400 | Hallein |
+| 1221089505 | Christine | Löffelberger CC | 1 | 1991-05-02 | | Die Heldin | 1210002980 | 1-2820775 | | | 1 | | | | false | Föhrenweg | 3 | 5081 | Anif |
+| 1221124052 | Anna | Högg CC | 1 | 1990-03-02 | | Die Heldin | 1210002980 | 1-2820776 | | | 1 | | | | false | Kaigasse 38 | 2 | 5020 | Salzburg |
+| 1221145464 | Nicole | Wintersteller | 1 | 1980-07-28 | | Die Heldin | 1210002980 | 1-2820779 | | | 1 | | | | false | Hauptstraße | 6/15 | 5082 | Grödig |
+| 1220974170 | Karin | Holeczy | 1 | 1956-11-13 | | Die Heldin | 1210002980 | 1-2820770 | | | 1 | | | | false | Hans Schmidingerstraße | 8 | 5303 | Thalgau |
+| 1221090180 | Elisabeth | Denkl | 1 | 1995-11-01 | | Die Heldin | 1210002980 | 1-2820774 | | | 1 | | | | false | Weizensteinerstraße | 17 | 5020 | Sakzburg |
+| 1221145610 | Aloise | Ebner | 1 | 1963-05-28 | | Die Heldin | 1210002980 | 1-2820778 | | | 1 | | | | false | Oberfeld | 6A | 5082 | Grödig |
+| 1220983911 | Petra | Schmid CC | 1 | 1993-08-03 | | Die Heldin | 1210002980 | 1-2820771 | | | 1 | | | | false | Fischhornstraße | 8 | 5020 | Salzburg |
+| 1221006072 | Sherin | Shahin | 1 | 1981-11-25 | | Die Heldin | 1210002980 | 1-2820772 | | | 1 | | | | false | Rossegerstraße | 12 | 5020 | Salzburg |
+| 1221160106 | Andrea | Neater | 1 | 1951-05-20 | | Die Heldin | 1210002980 | 1-2820782 | | | 1 | | | | false | Pezolt Gasse | 12 | 5020 | Salzburg |
+| 1221193770 | Simone | Thaler CC | 1 | 1981-05-15 | | Die Heldin | 1210002980 | 1-2820784 | | | 1 | | | | false | Bachweg | 23 | 5412 | Puch |
+| 1221202933 | Marita | Sporeni CC | 1 | 1970-05-15 | | Die Heldin | 1210002980 | 1-2820785 | | | 1 | | | | false | Winklerstraße | 8/12 | 5400 | Hallein |
+| 1221160790 | Albina | Kustrah | 1 | 1980-06-16 | | Die Heldin | 1210002980 | 1-2820781 | | | 1 | | | | false | Ludwig Richter Straße | 49 | 5026 | Salzburg |
+| 1221177041 | Daniela | Rünzler | 1 | 1971-10-29 | | Die Heldin | 1210002980 | 1-2820783 | | | 1 | | | | false | Schallmoser Hauptstr. | 6a | 5020 | Salzburg |
+| 1221146193 | Angelika | Grünanger CC | 1 | 1961-10-02 | | Die Heldin | 1210002980 | 1-2820780 | | | 1 | | | | false | Krögerbaumstraße | 4 | 5411 | Oberalm |
+| 1221387190 | Maja | Stevic | 1 | 1994-12-28 | | Die Heldin | 1210002980 | 1-2820795 | | | 1 | | | | false | Otto-Glöckel Straße | 1 | 5082 | Grödig |
+| 1221313882 | Medina | Sarsakova | 1 | 2005-09-02 | | Die Heldin | 1210002980 | 1-2820793 | | | 1 | | | | false | Laufenstraße | 44 | 5020 | Salzurg |
+| 1221387192 | Sabine | Heigl CC | 1 | 1988-04-12 | | Die Heldin | 1210002980 | 1-2820796 | | | 1 | | | | false | Schrannengasse | 10/13 | 5020 | Salzburg |
+| 1221387655 | Anke | Ranggetinger CC | 1 | 1983-08-02 | | Die Heldin | 1210002980 | 1-2820798 | | | 1 | | | | false | Fürstenallee | 35 | 5020 | Salzburg |
+| 1221386847 | Mirsada | Adiloski | 1 | 1981-06-20 | | Die Heldin | 1210002980 | 1-2820797 | | | 1 | | | | false | Karlheinz Böhmstraße | 6/10 | 5082 | Grödig |
+| 1221429311 | Monika | Lovric CC | 1 | 1976-01-25 | | Die Heldin | 1210002980 | 1-2820799 | | | 1 | | | | false | Halleinerlandestraße | | 5411 | Oberalm |
+| 1221366351 | Ulrike | Hafner | 1 | 1957-05-20 | | Die Heldin | 1210002980 | 1-2820794 | | | 1 | | | | false | Franz-Martin-Straße | 4A | 5020 | Salzburg |
+| 1221455550 | Erika | Thaler CC | 1 | 1957-07-23 | | Die Heldin | 1210002980 | 1-2820800 | | | 1 | | | | false | Stanzingstraße | 1 | 5061 | Glasenbach |
+| 1221525552 | Jaqueline | Wirrer | 1 | 1993-12-16 | | Die Heldin | 1210002980 | 1-2820806 | | | 1 | | | | false | Josef-Hautthalerstraße | 43a | 5071 | Wals |
+| 1221544102 | Shuena | Yunus Oma CC | 1 | 1973-12-12 | | Die Heldin | 1210002980 | 1-2820807 | | | 1 | | | | false | Röcklbrunnerstraße | 18-4-28 | 5020 | Salzburg |
+| 1221524182 | Eva | Wenzl CC | 1 | 1981-07-01 | | Die Heldin | 1210002980 | 1-2820804 | | | 1 | | | | false | Lindenweg | 22 | 5120 | St. Partaleon |
+| 1221582372 | Sabrina Karg | Neumann CC | 1 | 1988-10-22 | | Die Heldin | 1210002980 | 1-2820808 | | | 1 | | | | false | Kleingmainer Gasse | 23/A | 5020 | Salzburg |
+| 1221616432 | Alxeandra | Quintus CC | 1 | 1979-07-31 | | Die Heldin | 1210002980 | 1-2820809 | | | 1 | | | | false | kleingmainer Gasse | 23a | 5020 | Salzburg |
+| 1221854131 | Erhard | Imelda CC | 1 | 1976-01-30 | | Die Heldin | 1210002980 | 1-2820821 | | | 1 | | | | false | Höhenroid | 21/2 | 5203 | Köstendorf |
+| 1221861641 | Marica | Ketonic CC | 1 | 1958-12-27 | | Die Heldin | 1210002980 | 1-2820823 | | | 1 | | | | false | St. Julienstraße | 27/2/9 | 5020 | Salzburg |
+| 1221859513 | Eva | Brudl-Schober CC | 1 | 1975-06-27 | | Die Heldin | 1210002980 | 1-2820822 | | | 1 | | | | false | Kasermühlweg | 3/3 | 5411 | Oberalm |
+| 1222007641 | Dragana | Stankovic CC | 1 | 1995-07-26 | | Die Heldin | 1210002980 | 1-2820829 | | | 1 | | | | false | Geyereck | 11 | 5082 | Grödig |
+| 1222035092 | Sabine | Schneider | 1 | 1979-03-23 | | Die Heldin | 1210002980 | 1-2820833 | | | 1 | | | | false | Wimberg | 170 | 5421 | Adnet |
+| 1222024470 | Ümmü | Ata CC | 1 | 1987-06-09 | | Die Heldin | 1210002980 | 1-2820831 | | | 1 | | | | false | Neualmstraße | 6 | 5400 | Hallein |
+| 1221712733 | Eder | Annemarie CC | 1 | 1960-12-10 | | Die Heldin | 1210002980 | 1-2820814 | | | 1 | | | | false | Staufenweg | 22 | 5400 | Taxach/ Rif |
+| 1221712552 | Ingeborg | Schuffert CC | 1 | 1970-02-10 | | Die Heldin | 1210002980 | 1-2820813 | | | 1 | | | | false | Fischhornstraße | 39 | 5020 | Salzburg |
+| 1222007291 | Barbara | Flak cc | 1 | 1974-01-10 | | Die Heldin | 1210002980 | 1-2820830 | | | 1 | | | | false | Nicolaus Gartner | 10 | 5303 | Thalgau |
+| 1221470963 | Mirsada | Adiloski CC | 1 | 1981-06-20 | | Die Heldin | 1210002980 | 1-2820802 | | | 1 | | | | false | Karlheinz Böhmstraße | 6/10 | 5082 | Grödig |
+| 1221827693 | Miriam CC | Knoll | 1 | 1984-12-22 | | Die Heldin | 1210002980 | 1-2820818 | | | 1 | | | | false | Hammerstraße | 42 | 5411 | Oberalm |
+| 1221845692 | Ursula | Berk CC | 1 | 1969-05-11 | | Die Heldin | 1210002980 | 1-2820820 | | | 1 | | | | false | Bäslestraße | 8 | 5020 | Salzburg |
+| 1221873102 | Jaqueline | Wertschnig CC | 1 | 1991-08-13 | | Die Heldin | 1210002980 | 1-2820824 | | | 1 | | | | false | Rettenbacherstraße | 13 | 5020 | Salzburg |
+| 1221896554 | Serpil | Ibrahim | 1 | 1978-11-19 | | Die Heldin | 1210002980 | 1-2820826 | | | 1 | | | | false | Fürstensallee | 36F / 8 | 5020 | Salzburg |
+| 1221988662 | Catalina | Mitu CC | 1 | 1988-06-20 | | Die Heldin | 1210002980 | 1-2820828 | | | 1 | | | | false | Schiessstattstraße | 27 | 5020 | Salzurg |
+| 1221926573 | Dragana | Dokic CC | 1 | 1993-03-31 | | Die Heldin | 1210002980 | 1-2820827 | | | 1 | | | | false | Salzachtalbundestraße | 12 | 5081 | Anif |
+| 1221692453 | Adriane | Steiner | 1 | 1964-06-12 | | Die Heldin | 1210002980 | 1-2820812 | | | 1 | | | | false | Ford-Parscherstraße | 8 | 5071 | Wals |
+| 1221834705 | Tanja CC | Winkler | 1 | 1975-06-01 | | Die Heldin | 1210002980 | 1-2820819 | | | 1 | | | | false | Auweg | 19D | 5400 | Taxach |
+| 1222055012 | Paulus | Edtih CC | 1 | 1964-09-19 | | Die Heldin | 1210002980 | 1-2820834 | | | 1 | | | | false | Adlgasserweg | 17 | 5020 | Salzburg |
+| 1221467740 | Brigitte | Melnik | 1 | 1981-05-24 | | Die Heldin | 1210002980 | 1-2820801 | | | 1 | | | | false | Franztalerstraße | 4 | 5020 | Salzburg |
+| 1221524184 | Ulrike | Hafner CC | 1 | 1957-05-20 | | Die Heldin | 1210002980 | 1-2820805 | | | 1 | | | | false | Franz martin Straße | 4a | 5020 | Salzburg |
+| 1221628931 | Padungchit | Weber | 1 | 1948-12-26 | | Die Heldin | 1210002980 | 1-2820810 | | | 1 | | | | false | Süssmayerstraße | 14 | 5020 | Salzburg |
+| 1221508820 | Sabine | Schneider CC | 1 | 1976-03-23 | | Die Heldin | 1210002980 | 1-2820803 | | | 1 | | | | false | Wimberg | 170 | 5421 | Adnet |
+| 1221650972 | Maria | Wischner CC | 1 | 1964-10-29 | | Die Heldin | 1210002980 | 1-2820811 | | | 1 | | | | false | Anton-Graf-Straße | 6a | 5020 | Salzburg |
+| 1221881151 | Maria | Brandauer | 1 | 1958-12-27 | | Die Heldin | 1210002980 | 1-2820825 | | | 1 | | | | false | Sonnenscheinweg | | 5400 | Hallein |
+| 1222028942 | Desiree | Moser CC | 1 | 1989-11-27 | | Die Heldin | 1210002980 | 1-2820832 | | | 1 | | | | false | Schlossstraße | 24/7 | 5020 | Salzburg |
+| 1210004169 | Melanie | Steinhagen | 1 | 1991-11-10 | | Die Heldin | 1210002980 | 1-29 | | | 1 | | | | false | Gartenstraße | 52 | 5072 | Siezenheim |
+| 1210004243 | Regina | Putz CC | 1 | 1972-03-12 | | Die Heldin | 1210002980 | 1-33 | | | 1 | | | | false | Georgenberg | 349 | 5431 | Kuchl |
+| 1210004244 | Nicole | Schwaiger CC | 1 | 1964-06-29 | 2020-03-06T15:05:43.131+01:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-34 | | | 1 | | | | false | Schiffhofweg | 9 | 5020 | Salzburg |
+| 1210004351 | Melanie | Ruckenthaler | 1 | 1984-10-14 | | Die Heldin | 1210002980 | 1-41 | | | 1 | | | | false | Versorgungshausstrasse | 22 | 5020 | Salzburg |
+| 1210042263 | Karin | Kaindl | 1 | 1960-02-01 | | Die Heldin | 1210002980 | 1-446430 | | | 1 | | | | false | Dr. Sylvesterstr. | 12 | 5020 | Salzburg |
+| 1210044959 | Daniela | Hemetinger CC | 1 | 1982-12-19 | | Die Heldin | 1210002980 | 1-446716 | | | 1 | | | | false | Generationenweg | 12 | 5412 | Puch |
+| 1210045815 | Selina | Brenner CC | 1 | 1976-09-30 | | Die Heldin | 1210002980 | 1-446802 | | | 1 | | | | false | Henry-Dunant-Straße | 44/24 | 5020 | Salzburg |
+| 1210003966 | Richarda | Sunkler | 1 | 1949-12-23 | 2020-06-08T10:23:12.326+02:00[Europe/Vienna] | Die Heldin | 1210002980 | 1-6 | | | 1 | | | | false | Wiesbauerstr. | 6 | 5020 | Salzburg |
+
+
+
+
\ No newline at end of file
diff --git a/export-customers.ts b/export-customers.ts
new file mode 100644
index 0000000..830fce3
--- /dev/null
+++ b/export-customers.ts
@@ -0,0 +1,156 @@
+import { writeFileSync } from "node:fs"
+import { Openmagicline } from "openmagicline"
+
+// ---------------------------------------------------------------------------
+// Config – set via environment variables or edit directly below
+// ---------------------------------------------------------------------------
+const GYM = process.env.MAGICLINE_GYM ?? "dieheldin"
+const USERNAME = process.env.MAGICLINE_USER ?? "tanja.wild"
+const PASSWORD = process.env.MAGICLINE_PASS ?? "Luna22111993"
+
+if (!GYM || !USERNAME || !PASSWORD) {
+ console.error(
+ "Missing credentials. Set MAGICLINE_GYM, MAGICLINE_USER, and MAGICLINE_PASS.",
+ )
+ process.exit(1)
+}
+
+// ---------------------------------------------------------------------------
+// Helpers
+// ---------------------------------------------------------------------------
+
+/** Escape a value for use in a CSV cell. */
+function csvCell(value: unknown): string {
+ if (value === null || value === undefined) return ""
+ const str = String(value)
+ if (str.includes(",") || str.includes('"') || str.includes("\n")) {
+ return `"${str.replace(/"/g, '""')}"`
+ }
+ return str
+}
+
+/** Escape a value for use in HTML table cell content. */
+function htmlEscape(value: unknown): string {
+ if (value === null || value === undefined) return ""
+ return String(value)
+ .replace(/&/g, "&")
+ .replace(//g, ">")
+ .replace(/"/g, """)
+}
+
+// ---------------------------------------------------------------------------
+// Main
+// ---------------------------------------------------------------------------
+
+const mgl = new Openmagicline({ gym: GYM, username: USERNAME, password: PASSWORD })
+await mgl.login()
+console.log("Logged in.")
+
+// Fetch the real facility/organization unit ID — searching with facility:0 returns nothing.
+const facilityId = await mgl.util.getDefaultUnitID()
+console.log(`Using facility ID: ${facilityId}`)
+
+const SEARCH_CAP = 50
+
+const seen = new Set()
+const customers: Record[] = []
+
+async function sweep(prefix: string): Promise {
+ const results = await mgl.customer.search(prefix, {
+ facility: facilityId,
+ showAllFacilities: false,
+ searchInName: false,
+ searchInCustomerNumber: true,
+ })
+
+ if (results.length === SEARCH_CAP) {
+ for (const d of "0123456789") {
+ await sweep(prefix + d)
+ }
+ return
+ }
+
+ for (const c of results) {
+ if (!seen.has(c.databaseId) && c.customerStatus === 1) {
+ seen.add(c.databaseId)
+ customers.push(c as unknown as Record)
+ }
+ }
+}
+
+for (const d of "0123456789") {
+ const prefix = `1-${d}`
+ process.stdout.write(`Sweeping '${prefix}'… `)
+ const before = customers.length
+ await sweep(prefix)
+ console.log(`+${customers.length - before} (total: ${customers.length})`)
+}
+
+if (customers.length === 0) {
+ console.error("No customers found.")
+ process.exit(1)
+}
+
+// Collect the union of all keys across all customer records
+const allKeys = Array.from(
+ customers.reduce((keys, c) => {
+ for (const k of Object.keys(c)) keys.add(k)
+ return keys
+ }, new Set()),
+)
+
+// ---------------------------------------------------------------------------
+// CSV export
+// ---------------------------------------------------------------------------
+
+const csvLines = [
+ allKeys.map(csvCell).join(","),
+ ...customers.map((c) => allKeys.map((k) => csvCell(c[k])).join(",")),
+]
+const csvPath = "customers.csv"
+writeFileSync(csvPath, csvLines.join("\n"), "utf-8")
+console.log(`CSV written to ${csvPath} (${customers.length} rows)`)
+
+// ---------------------------------------------------------------------------
+// HTML export
+// ---------------------------------------------------------------------------
+
+const headerCells = allKeys.map((k) => `${htmlEscape(k)} | `).join("")
+const bodyRows = customers
+ .map(
+ (c) =>
+ `${allKeys.map((k) => `| ${htmlEscape(c[k])} | `).join("")}
`,
+ )
+ .join("\n")
+
+const html = `
+
+
+
+ Customers – ${new Date().toLocaleDateString()}
+
+
+
+ Customer Export
+ Generated: ${new Date().toISOString()} | Total: ${customers.length}
+
+ ${headerCells}
+
+${bodyRows}
+
+
+
+`
+
+const htmlPath = "customers.html"
+writeFileSync(htmlPath, html, "utf-8")
+console.log(`HTML written to ${htmlPath}`)
diff --git a/node_modules/.bin/esbuild b/node_modules/.bin/esbuild
new file mode 120000
index 0000000..c83ac07
--- /dev/null
+++ b/node_modules/.bin/esbuild
@@ -0,0 +1 @@
+../esbuild/bin/esbuild
\ No newline at end of file
diff --git a/node_modules/.bin/tsc b/node_modules/.bin/tsc
new file mode 120000
index 0000000..0863208
--- /dev/null
+++ b/node_modules/.bin/tsc
@@ -0,0 +1 @@
+../typescript/bin/tsc
\ No newline at end of file
diff --git a/node_modules/.bin/tsserver b/node_modules/.bin/tsserver
new file mode 120000
index 0000000..f8f8f1a
--- /dev/null
+++ b/node_modules/.bin/tsserver
@@ -0,0 +1 @@
+../typescript/bin/tsserver
\ No newline at end of file
diff --git a/node_modules/.bin/tsx b/node_modules/.bin/tsx
new file mode 120000
index 0000000..f7282dd
--- /dev/null
+++ b/node_modules/.bin/tsx
@@ -0,0 +1 @@
+../tsx/dist/cli.mjs
\ No newline at end of file
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
new file mode 100644
index 0000000..15e5542
--- /dev/null
+++ b/node_modules/.package-lock.json
@@ -0,0 +1,455 @@
+{
+ "name": "dieheldin-export",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz",
+ "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@stomp/stompjs": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/@stomp/stompjs/-/stompjs-6.1.2.tgz",
+ "integrity": "sha512-FHDTrIFM5Ospi4L3Xhj6v2+NzCVAeNDcBe95YjUWhWiRMrBF6uN3I7AUOlRgT6jU/2WQvvYK8ZaIxFfxFp+uHQ=="
+ },
+ "node_modules/@types/node": {
+ "version": "25.3.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.0.tgz",
+ "integrity": "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A==",
+ "dev": true,
+ "dependencies": {
+ "undici-types": "~7.18.0"
+ }
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
+ },
+ "node_modules/axios": {
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
+ "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
+ "dependencies": {
+ "follow-redirects": "^1.14.0"
+ }
+ },
+ "node_modules/axios-auth-refresh": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/axios-auth-refresh/-/axios-auth-refresh-3.3.6.tgz",
+ "integrity": "sha512-2CeBUce/SxIfFxow5/n8vApJ97yYF6qoV4gh1UrswT7aEOnlOdBLxxyhOI4IaxGs6BY0l8YujU2jlc4aCmK17Q==",
+ "peerDependencies": {
+ "axios": ">= 0.18 < 0.19.0 || >= 0.19.1"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-set-tostringtag": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/esbuild": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz",
+ "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==",
+ "dev": true,
+ "hasInstallScript": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.27.3",
+ "@esbuild/android-arm": "0.27.3",
+ "@esbuild/android-arm64": "0.27.3",
+ "@esbuild/android-x64": "0.27.3",
+ "@esbuild/darwin-arm64": "0.27.3",
+ "@esbuild/darwin-x64": "0.27.3",
+ "@esbuild/freebsd-arm64": "0.27.3",
+ "@esbuild/freebsd-x64": "0.27.3",
+ "@esbuild/linux-arm": "0.27.3",
+ "@esbuild/linux-arm64": "0.27.3",
+ "@esbuild/linux-ia32": "0.27.3",
+ "@esbuild/linux-loong64": "0.27.3",
+ "@esbuild/linux-mips64el": "0.27.3",
+ "@esbuild/linux-ppc64": "0.27.3",
+ "@esbuild/linux-riscv64": "0.27.3",
+ "@esbuild/linux-s390x": "0.27.3",
+ "@esbuild/linux-x64": "0.27.3",
+ "@esbuild/netbsd-arm64": "0.27.3",
+ "@esbuild/netbsd-x64": "0.27.3",
+ "@esbuild/openbsd-arm64": "0.27.3",
+ "@esbuild/openbsd-x64": "0.27.3",
+ "@esbuild/openharmony-arm64": "0.27.3",
+ "@esbuild/sunos-x64": "0.27.3",
+ "@esbuild/win32-arm64": "0.27.3",
+ "@esbuild/win32-ia32": "0.27.3",
+ "@esbuild/win32-x64": "0.27.3"
+ }
+ },
+ "node_modules/follow-redirects": {
+ "version": "1.15.11",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",
+ "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/form-data": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
+ "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "es-set-tostringtag": "^2.1.0",
+ "hasown": "^2.0.2",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/get-tsconfig": {
+ "version": "4.13.6",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz",
+ "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==",
+ "dev": true,
+ "dependencies": {
+ "resolve-pkg-maps": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
+ "dependencies": {
+ "has-symbols": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.23",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
+ "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w=="
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/openmagicline": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/openmagicline/-/openmagicline-1.1.0.tgz",
+ "integrity": "sha512-zAARHNrjvtDyNG+i8nlroEy6wcsCfEpR1RSNpgCTFDbsZwbNlqA2T8TvxGL0l1rz35ibNttGYaf95LxSjqwI5w==",
+ "dependencies": {
+ "@stomp/stompjs": "^6.1.0",
+ "axios": "^0.21.1",
+ "axios-auth-refresh": "^3.3.4",
+ "debug": "^4.3.1",
+ "form-data": "^4.0.0",
+ "lodash": "^4.17.21",
+ "ws": "^7.5.3"
+ }
+ },
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+ }
+ },
+ "node_modules/tsx": {
+ "version": "4.21.0",
+ "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz",
+ "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==",
+ "dev": true,
+ "dependencies": {
+ "esbuild": "~0.27.0",
+ "get-tsconfig": "^4.7.5"
+ },
+ "bin": {
+ "tsx": "dist/cli.mjs"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "5.9.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "7.18.2",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
+ "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
+ "dev": true
+ },
+ "node_modules/ws": {
+ "version": "7.5.10",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
+ "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
+ "engines": {
+ "node": ">=8.3.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ }
+ }
+}
diff --git a/node_modules/@esbuild/linux-x64/README.md b/node_modules/@esbuild/linux-x64/README.md
new file mode 100644
index 0000000..b2f1930
--- /dev/null
+++ b/node_modules/@esbuild/linux-x64/README.md
@@ -0,0 +1,3 @@
+# esbuild
+
+This is the Linux 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
diff --git a/node_modules/@esbuild/linux-x64/bin/esbuild b/node_modules/@esbuild/linux-x64/bin/esbuild
new file mode 100755
index 0000000..3f7a34d
Binary files /dev/null and b/node_modules/@esbuild/linux-x64/bin/esbuild differ
diff --git a/node_modules/@esbuild/linux-x64/package.json b/node_modules/@esbuild/linux-x64/package.json
new file mode 100644
index 0000000..40c9210
--- /dev/null
+++ b/node_modules/@esbuild/linux-x64/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "@esbuild/linux-x64",
+ "version": "0.27.3",
+ "description": "The Linux 64-bit binary for esbuild, a JavaScript bundler.",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/evanw/esbuild.git"
+ },
+ "license": "MIT",
+ "preferUnplugged": true,
+ "engines": {
+ "node": ">=18"
+ },
+ "os": [
+ "linux"
+ ],
+ "cpu": [
+ "x64"
+ ]
+}
diff --git a/node_modules/@stomp/stompjs/LICENSE b/node_modules/@stomp/stompjs/LICENSE
new file mode 100644
index 0000000..c239d5e
--- /dev/null
+++ b/node_modules/@stomp/stompjs/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2018-2020 Deepak Kumar
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/@stomp/stompjs/README.md b/node_modules/@stomp/stompjs/README.md
new file mode 100644
index 0000000..2c70075
--- /dev/null
+++ b/node_modules/@stomp/stompjs/README.md
@@ -0,0 +1,89 @@
+# STOMP.js
+
+[](https://travis-ci.org/stomp-js/stompjs)
+
+This library provides a STOMP over WebSocket client for Web browser and node.js applications.
+
+# Introduction
+
+This repository is for version 5 and above of this library.
+Lower versions are not supported any longer.
+
+This library allows you to connect to a STOMP broker over WebSocket. This library
+supports complete STOMP specifications including all current protocol variants. Most
+popular messaging brokers support STOMP and STOMP over WebSockets either natively
+or using plugins.
+
+In general JavaScript engines in browsers are not friendly to binary protocols,
+so using STOMP is a good option because it is a text-oriented protocol.
+
+This library has its roots in a version released by [Jeff Mesnil](http://jmesnil.net/).
+
+## Current Status
+
+Version 5 of this library has been bottom-up rewritten using TypeScript (versions 3/4
+use CoffeeScript). The code has substantially changed, so, while there is a compatibility
+mode, you might need to update your code.
+
+This library is feature complete and has been used in production for many years. It
+is actively maintained. You are welcome to file issues and submit pull requests.
+
+## Getting started
+
+The API documentation is hosted as GitHub pages for the entire StompJS family of libraries.
+You may head straight to the https://stomp-js.github.io/api-docs/latest/
+
+This library comes with detailed usage instructions. Please find it at
+[Usage instructions](https://stomp-js.github.io/guide/stompjs/using-stompjs-v5.html).
+Check out other guides at https://stomp-js.github.io/.
+
+There are quite detailed API documentation,
+you should start at https://stomp-js.github.io/api-docs/latest/classes/Client.html.
+
+## Upgrading
+
+if you were using an older version of this library, you would need to make changes
+to your code. Head to
+[Upgrading](https://stomp-js.github.io/#upgrading).
+
+## Usage with RxJS
+
+https://github.com/stomp-js/rx-stomp is based on this library and exposes the entire functionality
+offered by this library as RxJS Observables.
+
+## Usage with Angular2+
+
+https://github.com/stomp-js/ng2-stompjs is based on https://github.com/stomp-js/rx-stomp
+and exposes key classes as Angular Injectable Services.
+
+## TypeScript definitions
+
+The npm package includes TypeScript definitions, so there is no need no install it separately.
+
+## Change-log
+
+Please visit [Change Log](Change-log.md).
+
+## Contributing
+
+If you want to understand the code, develop, or contribute. Please visit
+[How to contribute](Contribute.md).
+
+## Authors
+
+- [Jeff Mesnil](http://jmesnil.net/)
+- [Jeff Lindsay](http://github.com/progrium)
+- [Vanessa Williams](http://github.com/fridgebuzz)
+- [Deepak Kumar](https://github.com/kum-deepak)
+- [Astha Deep](https://github.com/astha183)
+- [Dillon Sellars](https://github.com/dillon-sellars)
+- [Jimi Charalampidis](https://github.com/jimic)
+- [Raul](https://github.com/rulonder)
+- [Dimitar Georgiev](https://github.com/iMitaka)
+- [Genadi](https://github.com/genadis)
+- [Bobohuochai](https://github.com/bobohuochai)
+- [Sailai](https://github.com/sailai)
+
+## License
+
+[License](LICENSE) - Apache-2.0
diff --git a/node_modules/@stomp/stompjs/bundles/stomp.umd.js b/node_modules/@stomp/stompjs/bundles/stomp.umd.js
new file mode 100644
index 0000000..f3c10a3
--- /dev/null
+++ b/node_modules/@stomp/stompjs/bundles/stomp.umd.js
@@ -0,0 +1,2170 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define("StompJs", [], factory);
+ else if(typeof exports === 'object')
+ exports["StompJs"] = factory();
+ else
+ root["StompJs"] = factory();
+})(typeof self !== 'undefined' ? self : this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ }
+/******/ };
+/******/
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/
+/******/ // create a fake namespace object
+/******/ // mode & 1: value is a module id, require it
+/******/ // mode & 2: merge all properties of value into the ns
+/******/ // mode & 4: return value when already ns object
+/******/ // mode & 8|1: behave like require
+/******/ __webpack_require__.t = function(value, mode) {
+/******/ if(mode & 1) value = __webpack_require__(value);
+/******/ if(mode & 8) return value;
+/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ var ns = Object.create(null);
+/******/ __webpack_require__.r(ns);
+/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ return ns;
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 0);
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ "./src/augment-websocket.ts":
+/*!**********************************!*\
+ !*** ./src/augment-websocket.ts ***!
+ \**********************************/
+/*! exports provided: augmentWebsocket */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "augmentWebsocket", function() { return augmentWebsocket; });
+/**
+ * @internal
+ */
+function augmentWebsocket(webSocket, debug) {
+ webSocket.terminate = function () {
+ const noOp = () => { };
+ // set all callbacks to no op
+ this.onerror = noOp;
+ this.onmessage = noOp;
+ this.onopen = noOp;
+ const ts = new Date();
+ const origOnClose = this.onclose;
+ // Track delay in actual closure of the socket
+ this.onclose = closeEvent => {
+ const delay = new Date().getTime() - ts.getTime();
+ debug(`Discarded socket closed after ${delay}ms, with code/reason: ${closeEvent.code}/${closeEvent.reason}`);
+ };
+ this.close();
+ origOnClose.call(this, {
+ code: 4001,
+ reason: 'Heartbeat failure, discarding the socket',
+ wasClean: false,
+ });
+ };
+}
+
+
+/***/ }),
+
+/***/ "./src/byte.ts":
+/*!*********************!*\
+ !*** ./src/byte.ts ***!
+ \*********************/
+/*! exports provided: BYTE */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BYTE", function() { return BYTE; });
+/**
+ * Some byte values, used as per STOMP specifications.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+const BYTE = {
+ // LINEFEED byte (octet 10)
+ LF: '\x0A',
+ // NULL byte (octet 0)
+ NULL: '\x00',
+};
+
+
+/***/ }),
+
+/***/ "./src/client.ts":
+/*!***********************!*\
+ !*** ./src/client.ts ***!
+ \***********************/
+/*! exports provided: Client */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Client", function() { return Client; });
+/* harmony import */ var _stomp_handler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stomp-handler */ "./src/stomp-handler.ts");
+/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./types */ "./src/types.ts");
+/* harmony import */ var _versions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./versions */ "./src/versions.ts");
+var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+
+
+
+/**
+ * STOMP Client Class.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+class Client {
+ /**
+ * Create an instance.
+ */
+ constructor(conf = {}) {
+ /**
+ * STOMP versions to attempt during STOMP handshake. By default versions `1.0`, `1.1`, and `1.2` are attempted.
+ *
+ * Example:
+ * ```javascript
+ * // Try only versions 1.0 and 1.1
+ * client.stompVersions = new Versions(['1.0', '1.1'])
+ * ```
+ */
+ this.stompVersions = _versions__WEBPACK_IMPORTED_MODULE_2__["Versions"].default;
+ /**
+ * Will retry if Stomp connection is not established in specified milliseconds.
+ * Default 0, which implies wait for ever.
+ */
+ this.connectionTimeout = 0;
+ /**
+ * automatically reconnect with delay in milliseconds, set to 0 to disable.
+ */
+ this.reconnectDelay = 5000;
+ /**
+ * Incoming heartbeat interval in milliseconds. Set to 0 to disable.
+ */
+ this.heartbeatIncoming = 10000;
+ /**
+ * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.
+ */
+ this.heartbeatOutgoing = 10000;
+ /**
+ * This switches on a non standard behavior while sending WebSocket packets.
+ * It splits larger (text) packets into chunks of [maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+ * Only Java Spring brokers seems to use this mode.
+ *
+ * WebSockets, by itself, split large (text) packets,
+ * so it is not needed with a truly compliant STOMP/WebSocket broker.
+ * Actually setting it for such broker will cause large messages to fail.
+ *
+ * `false` by default.
+ *
+ * Binary frames are never split.
+ */
+ this.splitLargeFrames = false;
+ /**
+ * See [splitLargeFrames]{@link Client#splitLargeFrames}.
+ * This has no effect if [splitLargeFrames]{@link Client#splitLargeFrames} is `false`.
+ */
+ this.maxWebSocketChunkSize = 8 * 1024;
+ /**
+ * Usually the
+ * [type of WebSocket frame]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send#Parameters}
+ * is automatically decided by type of the payload.
+ * Default is `false`, which should work with all compliant brokers.
+ *
+ * Set this flag to force binary frames.
+ */
+ this.forceBinaryWSFrames = false;
+ /**
+ * A bug in ReactNative chops a string on occurrence of a NULL.
+ * See issue [https://github.com/stomp-js/stompjs/issues/89]{@link https://github.com/stomp-js/stompjs/issues/89}.
+ * This makes incoming WebSocket messages invalid STOMP packets.
+ * Setting this flag attempts to reverse the damage by appending a NULL.
+ * If the broker splits a large message into multiple WebSocket messages,
+ * this flag will cause data loss and abnormal termination of connection.
+ *
+ * This is not an ideal solution, but a stop gap until the underlying issue is fixed at ReactNative library.
+ */
+ this.appendMissingNULLonIncoming = false;
+ /**
+ * Activation state.
+ *
+ * It will usually be ACTIVE or INACTIVE.
+ * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+ */
+ this.state = _types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].INACTIVE;
+ // Dummy callbacks
+ const noOp = () => { };
+ this.debug = noOp;
+ this.beforeConnect = noOp;
+ this.onConnect = noOp;
+ this.onDisconnect = noOp;
+ this.onUnhandledMessage = noOp;
+ this.onUnhandledReceipt = noOp;
+ this.onUnhandledFrame = noOp;
+ this.onStompError = noOp;
+ this.onWebSocketClose = noOp;
+ this.onWebSocketError = noOp;
+ this.logRawCommunication = false;
+ this.onChangeState = noOp;
+ // These parameters would typically get proper values before connect is called
+ this.connectHeaders = {};
+ this._disconnectHeaders = {};
+ // Apply configuration
+ this.configure(conf);
+ }
+ /**
+ * Underlying WebSocket instance, READONLY.
+ */
+ get webSocket() {
+ return this._stompHandler ? this._stompHandler._webSocket : undefined;
+ }
+ /**
+ * Disconnection headers.
+ */
+ get disconnectHeaders() {
+ return this._disconnectHeaders;
+ }
+ set disconnectHeaders(value) {
+ this._disconnectHeaders = value;
+ if (this._stompHandler) {
+ this._stompHandler.disconnectHeaders = this._disconnectHeaders;
+ }
+ }
+ /**
+ * `true` if there is a active connection with STOMP Broker
+ */
+ get connected() {
+ return !!this._stompHandler && this._stompHandler.connected;
+ }
+ /**
+ * version of STOMP protocol negotiated with the server, READONLY
+ */
+ get connectedVersion() {
+ return this._stompHandler ? this._stompHandler.connectedVersion : undefined;
+ }
+ /**
+ * if the client is active (connected or going to reconnect)
+ */
+ get active() {
+ return this.state === _types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].ACTIVE;
+ }
+ _changeState(state) {
+ this.state = state;
+ this.onChangeState(state);
+ }
+ /**
+ * Update configuration.
+ */
+ configure(conf) {
+ // bulk assign all properties to this
+ Object.assign(this, conf);
+ }
+ /**
+ * Initiate the connection with the broker.
+ * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},
+ * it will keep trying to reconnect.
+ *
+ * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.
+ */
+ activate() {
+ if (this.state === _types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].DEACTIVATING) {
+ this.debug('Still DEACTIVATING, please await call to deactivate before trying to re-activate');
+ throw new Error('Still DEACTIVATING, can not activate now');
+ }
+ if (this.active) {
+ this.debug('Already ACTIVE, ignoring request to activate');
+ return;
+ }
+ this._changeState(_types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].ACTIVE);
+ this._connect();
+ }
+ _connect() {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this.connected) {
+ this.debug('STOMP: already connected, nothing to do');
+ return;
+ }
+ yield this.beforeConnect();
+ if (!this.active) {
+ this.debug('Client has been marked inactive, will not attempt to connect');
+ return;
+ }
+ // setup connection watcher
+ if (this.connectionTimeout > 0) {
+ // clear first
+ if (this._connectionWatcher) {
+ clearTimeout(this._connectionWatcher);
+ }
+ this._connectionWatcher = setTimeout(() => {
+ if (this.connected) {
+ return;
+ }
+ // Connection not established, close the underlying socket
+ // a reconnection will be attempted
+ this.debug(`Connection not established in ${this.connectionTimeout}ms, closing socket`);
+ this.forceDisconnect();
+ }, this.connectionTimeout);
+ }
+ this.debug('Opening Web Socket...');
+ // Get the actual WebSocket (or a similar object)
+ const webSocket = this._createWebSocket();
+ this._stompHandler = new _stomp_handler__WEBPACK_IMPORTED_MODULE_0__["StompHandler"](this, webSocket, {
+ debug: this.debug,
+ stompVersions: this.stompVersions,
+ connectHeaders: this.connectHeaders,
+ disconnectHeaders: this._disconnectHeaders,
+ heartbeatIncoming: this.heartbeatIncoming,
+ heartbeatOutgoing: this.heartbeatOutgoing,
+ splitLargeFrames: this.splitLargeFrames,
+ maxWebSocketChunkSize: this.maxWebSocketChunkSize,
+ forceBinaryWSFrames: this.forceBinaryWSFrames,
+ logRawCommunication: this.logRawCommunication,
+ appendMissingNULLonIncoming: this.appendMissingNULLonIncoming,
+ discardWebsocketOnCommFailure: this.discardWebsocketOnCommFailure,
+ onConnect: frame => {
+ // Successfully connected, stop the connection watcher
+ if (this._connectionWatcher) {
+ clearTimeout(this._connectionWatcher);
+ this._connectionWatcher = undefined;
+ }
+ if (!this.active) {
+ this.debug('STOMP got connected while deactivate was issued, will disconnect now');
+ this._disposeStompHandler();
+ return;
+ }
+ this.onConnect(frame);
+ },
+ onDisconnect: frame => {
+ this.onDisconnect(frame);
+ },
+ onStompError: frame => {
+ this.onStompError(frame);
+ },
+ onWebSocketClose: evt => {
+ this._stompHandler = undefined; // a new one will be created in case of a reconnect
+ if (this.state === _types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].DEACTIVATING) {
+ // Mark deactivation complete
+ this._resolveSocketClose();
+ this._resolveSocketClose = undefined;
+ this._changeState(_types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].INACTIVE);
+ }
+ this.onWebSocketClose(evt);
+ // The callback is called before attempting to reconnect, this would allow the client
+ // to be `deactivated` in the callback.
+ if (this.active) {
+ this._schedule_reconnect();
+ }
+ },
+ onWebSocketError: evt => {
+ this.onWebSocketError(evt);
+ },
+ onUnhandledMessage: message => {
+ this.onUnhandledMessage(message);
+ },
+ onUnhandledReceipt: frame => {
+ this.onUnhandledReceipt(frame);
+ },
+ onUnhandledFrame: frame => {
+ this.onUnhandledFrame(frame);
+ },
+ });
+ this._stompHandler.start();
+ });
+ }
+ _createWebSocket() {
+ let webSocket;
+ if (this.webSocketFactory) {
+ webSocket = this.webSocketFactory();
+ }
+ else {
+ webSocket = new WebSocket(this.brokerURL, this.stompVersions.protocolVersions());
+ }
+ webSocket.binaryType = 'arraybuffer';
+ return webSocket;
+ }
+ _schedule_reconnect() {
+ if (this.reconnectDelay > 0) {
+ this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`);
+ this._reconnector = setTimeout(() => {
+ this._connect();
+ }, this.reconnectDelay);
+ }
+ }
+ /**
+ * Disconnect if connected and stop auto reconnect loop.
+ * Appropriate callbacks will be invoked if underlying STOMP connection was connected.
+ *
+ * This call is async, it will resolve immediately if there is no underlying active websocket,
+ * otherwise, it will resolve after underlying websocket is properly disposed.
+ *
+ * To reactivate you can call [Client#activate]{@link Client#activate}.
+ */
+ deactivate() {
+ return __awaiter(this, void 0, void 0, function* () {
+ let retPromise;
+ if (this.state !== _types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].ACTIVE) {
+ this.debug(`Already ${_types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"][this.state]}, ignoring call to deactivate`);
+ return Promise.resolve();
+ }
+ this._changeState(_types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].DEACTIVATING);
+ // Clear if a reconnection was scheduled
+ if (this._reconnector) {
+ clearTimeout(this._reconnector);
+ }
+ if (this._stompHandler &&
+ this.webSocket.readyState !== _types__WEBPACK_IMPORTED_MODULE_1__["StompSocketState"].CLOSED) {
+ // we need to wait for underlying websocket to close
+ retPromise = new Promise((resolve, reject) => {
+ this._resolveSocketClose = resolve;
+ });
+ }
+ else {
+ // indicate that auto reconnect loop should terminate
+ this._changeState(_types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].INACTIVE);
+ return Promise.resolve();
+ }
+ this._disposeStompHandler();
+ return retPromise;
+ });
+ }
+ /**
+ * Force disconnect if there is an active connection by directly closing the underlying WebSocket.
+ * This is different than a normal disconnect where a DISCONNECT sequence is carried out with the broker.
+ * After forcing disconnect, automatic reconnect will be attempted.
+ * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.
+ */
+ forceDisconnect() {
+ if (this._stompHandler) {
+ this._stompHandler.forceDisconnect();
+ }
+ }
+ _disposeStompHandler() {
+ // Dispose STOMP Handler
+ if (this._stompHandler) {
+ this._stompHandler.dispose();
+ this._stompHandler = null;
+ }
+ }
+ /**
+ * Send a message to a named destination. Refer to your STOMP broker documentation for types
+ * and naming of destinations.
+ *
+ * STOMP protocol specifies and suggests some headers and also allows broker specific headers.
+ *
+ * `body` must be String.
+ * You will need to covert the payload to string in case it is not string (e.g. JSON).
+ *
+ * To send a binary message body use binaryBody parameter. It should be a
+ * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
+ * Sometimes brokers may not support binary frames out of the box.
+ * Please check your broker documentation.
+ *
+ * `content-length` header is automatically added to the STOMP Frame sent to the broker.
+ * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.
+ * For binary messages `content-length` header is always added.
+ *
+ * Caution: The broker will, most likely, report an error and disconnect if message body has NULL octet(s)
+ * and `content-length` header is missing.
+ *
+ * ```javascript
+ * client.publish({destination: "/queue/test", headers: {priority: 9}, body: "Hello, STOMP"});
+ *
+ * // Only destination is mandatory parameter
+ * client.publish({destination: "/queue/test", body: "Hello, STOMP"});
+ *
+ * // Skip content-length header in the frame to the broker
+ * client.publish({"/queue/test", body: "Hello, STOMP", skipContentLengthHeader: true});
+ *
+ * var binaryData = generateBinaryData(); // This need to be of type Uint8Array
+ * // setting content-type header is not mandatory, however a good practice
+ * client.publish({destination: '/topic/special', binaryBody: binaryData,
+ * headers: {'content-type': 'application/octet-stream'}});
+ * ```
+ */
+ publish(params) {
+ this._stompHandler.publish(params);
+ }
+ /**
+ * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.
+ * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.
+ * The value (say receipt-id) for this header needs to be unique for each use. Typically a sequence, a UUID, a
+ * random number or a combination may be used.
+ *
+ * A complaint broker will send a RECEIPT frame when an operation has actually been completed.
+ * The operation needs to be matched based in the value of the receipt-id.
+ *
+ * This method allow watching for a receipt and invoke the callback
+ * when corresponding receipt has been received.
+ *
+ * The actual {@link FrameImpl} will be passed as parameter to the callback.
+ *
+ * Example:
+ * ```javascript
+ * // Subscribing with acknowledgement
+ * let receiptId = randomText();
+ *
+ * client.watchForReceipt(receiptId, function() {
+ * // Will be called after server acknowledges
+ * });
+ *
+ * client.subscribe(TEST.destination, onMessage, {receipt: receiptId});
+ *
+ *
+ * // Publishing with acknowledgement
+ * receiptId = randomText();
+ *
+ * client.watchForReceipt(receiptId, function() {
+ * // Will be called after server acknowledges
+ * });
+ * client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});
+ * ```
+ */
+ watchForReceipt(receiptId, callback) {
+ this._stompHandler.watchForReceipt(receiptId, callback);
+ }
+ /**
+ * Subscribe to a STOMP Broker location. The callback will be invoked for each received message with
+ * the {@link IMessage} as argument.
+ *
+ * Note: The library will generate an unique ID if there is none provided in the headers.
+ * To use your own ID, pass it using the headers argument.
+ *
+ * ```javascript
+ * callback = function(message) {
+ * // called when the client receives a STOMP message from the server
+ * if (message.body) {
+ * alert("got message with body " + message.body)
+ * } else {
+ * alert("got empty message");
+ * }
+ * });
+ *
+ * var subscription = client.subscribe("/queue/test", callback);
+ *
+ * // Explicit subscription id
+ * var mySubId = 'my-subscription-id-001';
+ * var subscription = client.subscribe(destination, callback, { id: mySubId });
+ * ```
+ */
+ subscribe(destination, callback, headers = {}) {
+ return this._stompHandler.subscribe(destination, callback, headers);
+ }
+ /**
+ * It is preferable to unsubscribe from a subscription by calling
+ * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:
+ *
+ * ```javascript
+ * var subscription = client.subscribe(destination, onmessage);
+ * // ...
+ * subscription.unsubscribe();
+ * ```
+ *
+ * See: http://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame
+ */
+ unsubscribe(id, headers = {}) {
+ this._stompHandler.unsubscribe(id, headers);
+ }
+ /**
+ * Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit}
+ * and [abort]{@link ITransaction#abort}.
+ *
+ * `transactionId` is optional, if not passed the library will generate it internally.
+ */
+ begin(transactionId) {
+ return this._stompHandler.begin(transactionId);
+ }
+ /**
+ * Commit a transaction.
+ *
+ * It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on
+ * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+ *
+ * ```javascript
+ * var tx = client.begin(txId);
+ * //...
+ * tx.commit();
+ * ```
+ */
+ commit(transactionId) {
+ this._stompHandler.commit(transactionId);
+ }
+ /**
+ * Abort a transaction.
+ * It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on
+ * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+ *
+ * ```javascript
+ * var tx = client.begin(txId);
+ * //...
+ * tx.abort();
+ * ```
+ */
+ abort(transactionId) {
+ this._stompHandler.abort(transactionId);
+ }
+ /**
+ * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly
+ * on the {@link IMessage} handled by a subscription callback:
+ *
+ * ```javascript
+ * var callback = function (message) {
+ * // process the message
+ * // acknowledge it
+ * message.ack();
+ * };
+ * client.subscribe(destination, callback, {'ack': 'client'});
+ * ```
+ */
+ ack(messageId, subscriptionId, headers = {}) {
+ this._stompHandler.ack(messageId, subscriptionId, headers);
+ }
+ /**
+ * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly
+ * on the {@link IMessage} handled by a subscription callback:
+ *
+ * ```javascript
+ * var callback = function (message) {
+ * // process the message
+ * // an error occurs, nack it
+ * message.nack();
+ * };
+ * client.subscribe(destination, callback, {'ack': 'client'});
+ * ```
+ */
+ nack(messageId, subscriptionId, headers = {}) {
+ this._stompHandler.nack(messageId, subscriptionId, headers);
+ }
+}
+
+
+/***/ }),
+
+/***/ "./src/compatibility/compat-client.ts":
+/*!********************************************!*\
+ !*** ./src/compatibility/compat-client.ts ***!
+ \********************************************/
+/*! exports provided: CompatClient */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompatClient", function() { return CompatClient; });
+/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../client */ "./src/client.ts");
+/* harmony import */ var _heartbeat_info__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./heartbeat-info */ "./src/compatibility/heartbeat-info.ts");
+
+
+/**
+ * Available for backward compatibility, please shift to using {@link Client}.
+ *
+ * **Deprecated**
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+class CompatClient extends _client__WEBPACK_IMPORTED_MODULE_0__["Client"] {
+ /**
+ * Available for backward compatibility, please shift to using {@link Client}
+ * and [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ *
+ * **Deprecated**
+ *
+ * @internal
+ */
+ constructor(webSocketFactory) {
+ super();
+ /**
+ * It is no op now. No longer needed. Large packets work out of the box.
+ */
+ this.maxWebSocketFrameSize = 16 * 1024;
+ this._heartbeatInfo = new _heartbeat_info__WEBPACK_IMPORTED_MODULE_1__["HeartbeatInfo"](this);
+ this.reconnect_delay = 0;
+ this.webSocketFactory = webSocketFactory;
+ // Default from previous version
+ this.debug = (...message) => {
+ console.log(...message);
+ };
+ }
+ _parseConnect(...args) {
+ let closeEventCallback;
+ let connectCallback;
+ let errorCallback;
+ let headers = {};
+ if (args.length < 2) {
+ throw new Error('Connect requires at least 2 arguments');
+ }
+ if (typeof args[1] === 'function') {
+ [headers, connectCallback, errorCallback, closeEventCallback] = args;
+ }
+ else {
+ switch (args.length) {
+ case 6:
+ [
+ headers.login,
+ headers.passcode,
+ connectCallback,
+ errorCallback,
+ closeEventCallback,
+ headers.host,
+ ] = args;
+ break;
+ default:
+ [
+ headers.login,
+ headers.passcode,
+ connectCallback,
+ errorCallback,
+ closeEventCallback,
+ ] = args;
+ }
+ }
+ return [headers, connectCallback, errorCallback, closeEventCallback];
+ }
+ /**
+ * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.
+ *
+ * **Deprecated**
+ *
+ * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the
+ * version with headers to pass your broker specific options.
+ *
+ * overloads:
+ * - connect(headers, connectCallback)
+ * - connect(headers, connectCallback, errorCallback)
+ * - connect(login, passcode, connectCallback)
+ * - connect(login, passcode, connectCallback, errorCallback)
+ * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)
+ * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)
+ *
+ * params:
+ * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}
+ * - connectCallback, see [Client#onConnect]{@link Client#onConnect}
+ * - errorCallback, see [Client#onStompError]{@link Client#onStompError}
+ * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}
+ * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ connect(...args) {
+ const out = this._parseConnect(...args);
+ if (out[0]) {
+ this.connectHeaders = out[0];
+ }
+ if (out[1]) {
+ this.onConnect = out[1];
+ }
+ if (out[2]) {
+ this.onStompError = out[2];
+ }
+ if (out[3]) {
+ this.onWebSocketClose = out[3];
+ }
+ super.activate();
+ }
+ /**
+ * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.
+ *
+ * **Deprecated**
+ *
+ * See:
+ * [Client#onDisconnect]{@link Client#onDisconnect}, and
+ * [Client#disconnectHeaders]{@link Client#disconnectHeaders}
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ disconnect(disconnectCallback, headers = {}) {
+ if (disconnectCallback) {
+ this.onDisconnect = disconnectCallback;
+ }
+ this.disconnectHeaders = headers;
+ super.deactivate();
+ }
+ /**
+ * Available for backward compatibility, use [Client#publish]{@link Client#publish}.
+ *
+ * Send a message to a named destination. Refer to your STOMP broker documentation for types
+ * and naming of destinations. The headers will, typically, be available to the subscriber.
+ * However, there may be special purpose headers corresponding to your STOMP broker.
+ *
+ * **Deprecated**, use [Client#publish]{@link Client#publish}
+ *
+ * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)
+ *
+ * ```javascript
+ * client.send("/queue/test", {priority: 9}, "Hello, STOMP");
+ *
+ * // If you want to send a message with a body, you must also pass the headers argument.
+ * client.send("/queue/test", {}, "Hello, STOMP");
+ * ```
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ send(destination, headers = {}, body = '') {
+ headers = Object.assign({}, headers);
+ const skipContentLengthHeader = headers['content-length'] === false;
+ if (skipContentLengthHeader) {
+ delete headers['content-length'];
+ }
+ this.publish({
+ destination,
+ headers: headers,
+ body,
+ skipContentLengthHeader,
+ });
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.
+ *
+ * **Deprecated**
+ */
+ set reconnect_delay(value) {
+ this.reconnectDelay = value;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.
+ *
+ * **Deprecated**
+ */
+ get ws() {
+ return this.webSocket;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.
+ *
+ * **Deprecated**
+ */
+ get version() {
+ return this.connectedVersion;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ *
+ * **Deprecated**
+ */
+ get onreceive() {
+ return this.onUnhandledMessage;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ *
+ * **Deprecated**
+ */
+ set onreceive(value) {
+ this.onUnhandledMessage = value;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+ * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.
+ *
+ * **Deprecated**
+ */
+ get onreceipt() {
+ return this.onUnhandledReceipt;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+ *
+ * **Deprecated**
+ */
+ set onreceipt(value) {
+ this.onUnhandledReceipt = value;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+ * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+ *
+ * **Deprecated**
+ */
+ get heartbeat() {
+ return this._heartbeatInfo;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+ * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+ *
+ * **Deprecated**
+ */
+ set heartbeat(value) {
+ this.heartbeatIncoming = value.incoming;
+ this.heartbeatOutgoing = value.outgoing;
+ }
+}
+
+
+/***/ }),
+
+/***/ "./src/compatibility/heartbeat-info.ts":
+/*!*********************************************!*\
+ !*** ./src/compatibility/heartbeat-info.ts ***!
+ \*********************************************/
+/*! exports provided: HeartbeatInfo */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeartbeatInfo", function() { return HeartbeatInfo; });
+/**
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+class HeartbeatInfo {
+ constructor(client) {
+ this.client = client;
+ }
+ get outgoing() {
+ return this.client.heartbeatOutgoing;
+ }
+ set outgoing(value) {
+ this.client.heartbeatOutgoing = value;
+ }
+ get incoming() {
+ return this.client.heartbeatIncoming;
+ }
+ set incoming(value) {
+ this.client.heartbeatIncoming = value;
+ }
+}
+
+
+/***/ }),
+
+/***/ "./src/compatibility/stomp.ts":
+/*!************************************!*\
+ !*** ./src/compatibility/stomp.ts ***!
+ \************************************/
+/*! exports provided: Stomp */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Stomp", function() { return Stomp; });
+/* harmony import */ var _versions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../versions */ "./src/versions.ts");
+/* harmony import */ var _compat_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compat-client */ "./src/compatibility/compat-client.ts");
+
+
+/**
+ * STOMP Class, acts like a factory to create {@link Client}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}.
+ */
+class Stomp {
+ /**
+ * This method creates a WebSocket client that is connected to
+ * the STOMP server located at the url.
+ *
+ * ```javascript
+ * var url = "ws://localhost:61614/stomp";
+ * var client = Stomp.client(url);
+ * ```
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#brokerURL]{@link Client#brokerURL}.
+ */
+ static client(url, protocols) {
+ // This is a hack to allow another implementation than the standard
+ // HTML5 WebSocket class.
+ //
+ // It is possible to use another class by calling
+ //
+ // Stomp.WebSocketClass = MozWebSocket
+ //
+ // *prior* to call `Stomp.client()`.
+ //
+ // This hack is deprecated and `Stomp.over()` method should be used
+ // instead.
+ // See remarks on the function Stomp.over
+ if (protocols == null) {
+ protocols = _versions__WEBPACK_IMPORTED_MODULE_0__["Versions"].default.protocolVersions();
+ }
+ const wsFn = () => {
+ const klass = Stomp.WebSocketClass || WebSocket;
+ return new klass(url, protocols);
+ };
+ return new _compat_client__WEBPACK_IMPORTED_MODULE_1__["CompatClient"](wsFn);
+ }
+ /**
+ * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user
+ * specify the WebSocket to use (either a standard HTML5 WebSocket or
+ * a similar object).
+ *
+ * In order to support reconnection, the function Client._connect should be callable more than once.
+ * While reconnecting
+ * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function
+ * alternatively allows passing a function that should return a new instance of the underlying socket.
+ *
+ * ```javascript
+ * var client = Stomp.over(function(){
+ * return new WebSocket('ws://localhost:15674/ws')
+ * });
+ * ```
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+ static over(ws) {
+ let wsFn;
+ if (typeof ws === 'function') {
+ wsFn = ws;
+ }
+ else {
+ console.warn('Stomp.over did not receive a factory, auto reconnect will not work. ' +
+ 'Please see https://stomp-js.github.io/api-docs/latest/classes/Stomp.html#over');
+ wsFn = () => ws;
+ }
+ return new _compat_client__WEBPACK_IMPORTED_MODULE_1__["CompatClient"](wsFn);
+ }
+}
+/**
+ * In case you need to use a non standard class for WebSocket.
+ *
+ * For example when using within NodeJS environment:
+ *
+ * ```javascript
+ * StompJs = require('../../esm5/');
+ * Stomp = StompJs.Stomp;
+ * Stomp.WebSocketClass = require('websocket').w3cwebsocket;
+ * ```
+ *
+ * **Deprecated**
+ *
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+// tslint:disable-next-line:variable-name
+Stomp.WebSocketClass = null;
+
+
+/***/ }),
+
+/***/ "./src/frame-impl.ts":
+/*!***************************!*\
+ !*** ./src/frame-impl.ts ***!
+ \***************************/
+/*! exports provided: FrameImpl */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FrameImpl", function() { return FrameImpl; });
+/* harmony import */ var _byte__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte */ "./src/byte.ts");
+
+/**
+ * Frame class represents a STOMP frame.
+ *
+ * @internal
+ */
+class FrameImpl {
+ /**
+ * Frame constructor. `command`, `headers` and `body` are available as properties.
+ *
+ * @internal
+ */
+ constructor(params) {
+ const { command, headers, body, binaryBody, escapeHeaderValues, skipContentLengthHeader, } = params;
+ this.command = command;
+ this.headers = Object.assign({}, headers || {});
+ if (binaryBody) {
+ this._binaryBody = binaryBody;
+ this.isBinaryBody = true;
+ }
+ else {
+ this._body = body || '';
+ this.isBinaryBody = false;
+ }
+ this.escapeHeaderValues = escapeHeaderValues || false;
+ this.skipContentLengthHeader = skipContentLengthHeader || false;
+ }
+ /**
+ * body of the frame
+ */
+ get body() {
+ if (!this._body && this.isBinaryBody) {
+ this._body = new TextDecoder().decode(this._binaryBody);
+ }
+ return this._body;
+ }
+ /**
+ * body as Uint8Array
+ */
+ get binaryBody() {
+ if (!this._binaryBody && !this.isBinaryBody) {
+ this._binaryBody = new TextEncoder().encode(this._body);
+ }
+ return this._binaryBody;
+ }
+ /**
+ * deserialize a STOMP Frame from raw data.
+ *
+ * @internal
+ */
+ static fromRawFrame(rawFrame, escapeHeaderValues) {
+ const headers = {};
+ const trim = (str) => str.replace(/^\s+|\s+$/g, '');
+ // In case of repeated headers, as per standards, first value need to be used
+ for (const header of rawFrame.headers.reverse()) {
+ const idx = header.indexOf(':');
+ const key = trim(header[0]);
+ let value = trim(header[1]);
+ if (escapeHeaderValues &&
+ rawFrame.command !== 'CONNECT' &&
+ rawFrame.command !== 'CONNECTED') {
+ value = FrameImpl.hdrValueUnEscape(value);
+ }
+ headers[key] = value;
+ }
+ return new FrameImpl({
+ command: rawFrame.command,
+ headers,
+ binaryBody: rawFrame.binaryBody,
+ escapeHeaderValues,
+ });
+ }
+ /**
+ * @internal
+ */
+ toString() {
+ return this.serializeCmdAndHeaders();
+ }
+ /**
+ * serialize this Frame in a format suitable to be passed to WebSocket.
+ * If the body is string the output will be string.
+ * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.
+ *
+ * @internal
+ */
+ serialize() {
+ const cmdAndHeaders = this.serializeCmdAndHeaders();
+ if (this.isBinaryBody) {
+ return FrameImpl.toUnit8Array(cmdAndHeaders, this._binaryBody).buffer;
+ }
+ else {
+ return cmdAndHeaders + this._body + _byte__WEBPACK_IMPORTED_MODULE_0__["BYTE"].NULL;
+ }
+ }
+ serializeCmdAndHeaders() {
+ const lines = [this.command];
+ if (this.skipContentLengthHeader) {
+ delete this.headers['content-length'];
+ }
+ for (const name of Object.keys(this.headers || {})) {
+ const value = this.headers[name];
+ if (this.escapeHeaderValues &&
+ this.command !== 'CONNECT' &&
+ this.command !== 'CONNECTED') {
+ lines.push(`${name}:${FrameImpl.hdrValueEscape(`${value}`)}`);
+ }
+ else {
+ lines.push(`${name}:${value}`);
+ }
+ }
+ if (this.isBinaryBody ||
+ (!this.isBodyEmpty() && !this.skipContentLengthHeader)) {
+ lines.push(`content-length:${this.bodyLength()}`);
+ }
+ return lines.join(_byte__WEBPACK_IMPORTED_MODULE_0__["BYTE"].LF) + _byte__WEBPACK_IMPORTED_MODULE_0__["BYTE"].LF + _byte__WEBPACK_IMPORTED_MODULE_0__["BYTE"].LF;
+ }
+ isBodyEmpty() {
+ return this.bodyLength() === 0;
+ }
+ bodyLength() {
+ const binaryBody = this.binaryBody;
+ return binaryBody ? binaryBody.length : 0;
+ }
+ /**
+ * Compute the size of a UTF-8 string by counting its number of bytes
+ * (and not the number of characters composing the string)
+ */
+ static sizeOfUTF8(s) {
+ return s ? new TextEncoder().encode(s).length : 0;
+ }
+ static toUnit8Array(cmdAndHeaders, binaryBody) {
+ const uint8CmdAndHeaders = new TextEncoder().encode(cmdAndHeaders);
+ const nullTerminator = new Uint8Array([0]);
+ const uint8Frame = new Uint8Array(uint8CmdAndHeaders.length + binaryBody.length + nullTerminator.length);
+ uint8Frame.set(uint8CmdAndHeaders);
+ uint8Frame.set(binaryBody, uint8CmdAndHeaders.length);
+ uint8Frame.set(nullTerminator, uint8CmdAndHeaders.length + binaryBody.length);
+ return uint8Frame;
+ }
+ /**
+ * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.
+ *
+ * @internal
+ */
+ static marshall(params) {
+ const frame = new FrameImpl(params);
+ return frame.serialize();
+ }
+ /**
+ * Escape header values
+ */
+ static hdrValueEscape(str) {
+ return str
+ .replace(/\\/g, '\\\\')
+ .replace(/\r/g, '\\r')
+ .replace(/\n/g, '\\n')
+ .replace(/:/g, '\\c');
+ }
+ /**
+ * UnEscape header values
+ */
+ static hdrValueUnEscape(str) {
+ return str
+ .replace(/\\r/g, '\r')
+ .replace(/\\n/g, '\n')
+ .replace(/\\c/g, ':')
+ .replace(/\\\\/g, '\\');
+ }
+}
+
+
+/***/ }),
+
+/***/ "./src/index.ts":
+/*!**********************!*\
+ !*** ./src/index.ts ***!
+ \**********************/
+/*! exports provided: Client, FrameImpl, Parser, StompConfig, StompHeaders, StompSubscription, StompSocketState, ActivationState, Versions, CompatClient, Stomp */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./client */ "./src/client.ts");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Client", function() { return _client__WEBPACK_IMPORTED_MODULE_0__["Client"]; });
+
+/* harmony import */ var _frame_impl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./frame-impl */ "./src/frame-impl.ts");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FrameImpl", function() { return _frame_impl__WEBPACK_IMPORTED_MODULE_1__["FrameImpl"]; });
+
+/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser */ "./src/parser.ts");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return _parser__WEBPACK_IMPORTED_MODULE_2__["Parser"]; });
+
+/* harmony import */ var _stomp_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stomp-config */ "./src/stomp-config.ts");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StompConfig", function() { return _stomp_config__WEBPACK_IMPORTED_MODULE_3__["StompConfig"]; });
+
+/* harmony import */ var _stomp_headers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stomp-headers */ "./src/stomp-headers.ts");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StompHeaders", function() { return _stomp_headers__WEBPACK_IMPORTED_MODULE_4__["StompHeaders"]; });
+
+/* harmony import */ var _stomp_subscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./stomp-subscription */ "./src/stomp-subscription.ts");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StompSubscription", function() { return _stomp_subscription__WEBPACK_IMPORTED_MODULE_5__["StompSubscription"]; });
+
+/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./types */ "./src/types.ts");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StompSocketState", function() { return _types__WEBPACK_IMPORTED_MODULE_6__["StompSocketState"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActivationState", function() { return _types__WEBPACK_IMPORTED_MODULE_6__["ActivationState"]; });
+
+/* harmony import */ var _versions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./versions */ "./src/versions.ts");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Versions", function() { return _versions__WEBPACK_IMPORTED_MODULE_7__["Versions"]; });
+
+/* harmony import */ var _compatibility_compat_client__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./compatibility/compat-client */ "./src/compatibility/compat-client.ts");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompatClient", function() { return _compatibility_compat_client__WEBPACK_IMPORTED_MODULE_8__["CompatClient"]; });
+
+/* harmony import */ var _compatibility_stomp__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./compatibility/stomp */ "./src/compatibility/stomp.ts");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stomp", function() { return _compatibility_stomp__WEBPACK_IMPORTED_MODULE_9__["Stomp"]; });
+
+
+
+
+
+
+
+
+
+// Compatibility code
+
+
+
+
+/***/ }),
+
+/***/ "./src/parser.ts":
+/*!***********************!*\
+ !*** ./src/parser.ts ***!
+ \***********************/
+/*! exports provided: Parser */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return Parser; });
+/**
+ * @internal
+ */
+const NULL = 0;
+/**
+ * @internal
+ */
+const LF = 10;
+/**
+ * @internal
+ */
+const CR = 13;
+/**
+ * @internal
+ */
+const COLON = 58;
+/**
+ * This is an evented, rec descent parser.
+ * A stream of Octets can be passed and whenever it recognizes
+ * a complete Frame or an incoming ping it will invoke the registered callbacks.
+ *
+ * All incoming Octets are fed into _onByte function.
+ * Depending on current state the _onByte function keeps changing.
+ * Depending on the state it keeps accumulating into _token and _results.
+ * State is indicated by current value of _onByte, all states are named as _collect.
+ *
+ * STOMP standards https://stomp.github.io/stomp-specification-1.2.html
+ * imply that all lengths are considered in bytes (instead of string lengths).
+ * So, before actual parsing, if the incoming data is String it is converted to Octets.
+ * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.
+ *
+ * There is no peek function on the incoming data.
+ * When a state change occurs based on an Octet without consuming the Octet,
+ * the Octet, after state change, is fed again (_reinjectByte).
+ * This became possible as the state change can be determined by inspecting just one Octet.
+ *
+ * There are two modes to collect the body, if content-length header is there then it by counting Octets
+ * otherwise it is determined by NULL terminator.
+ *
+ * Following the standards, the command and headers are converted to Strings
+ * and the body is returned as Octets.
+ * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.
+ *
+ * This parser does not use Regular Expressions as that can only operate on Strings.
+ *
+ * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or
+ * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk
+ * is pushed.
+ *
+ * Typically the higher level function will convert headers to Hash, handle unescaping of header values
+ * (which is protocol version specific), and convert body to text.
+ *
+ * Check the parser.spec.js to understand cases that this parser is supposed to handle.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+class Parser {
+ constructor(onFrame, onIncomingPing) {
+ this.onFrame = onFrame;
+ this.onIncomingPing = onIncomingPing;
+ this._encoder = new TextEncoder();
+ this._decoder = new TextDecoder();
+ this._token = [];
+ this._initState();
+ }
+ parseChunk(segment, appendMissingNULLonIncoming = false) {
+ let chunk;
+ if (segment instanceof ArrayBuffer) {
+ chunk = new Uint8Array(segment);
+ }
+ else {
+ chunk = this._encoder.encode(segment);
+ }
+ // See https://github.com/stomp-js/stompjs/issues/89
+ // Remove when underlying issue is fixed.
+ //
+ // Send a NULL byte, if the last byte of a Text frame was not NULL.F
+ if (appendMissingNULLonIncoming && chunk[chunk.length - 1] !== 0) {
+ const chunkWithNull = new Uint8Array(chunk.length + 1);
+ chunkWithNull.set(chunk, 0);
+ chunkWithNull[chunk.length] = 0;
+ chunk = chunkWithNull;
+ }
+ // tslint:disable-next-line:prefer-for-of
+ for (let i = 0; i < chunk.length; i++) {
+ const byte = chunk[i];
+ this._onByte(byte);
+ }
+ }
+ // The following implements a simple Rec Descent Parser.
+ // The grammar is simple and just one byte tells what should be the next state
+ _collectFrame(byte) {
+ if (byte === NULL) {
+ // Ignore
+ return;
+ }
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ // Incoming Ping
+ this.onIncomingPing();
+ return;
+ }
+ this._onByte = this._collectCommand;
+ this._reinjectByte(byte);
+ }
+ _collectCommand(byte) {
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ this._results.command = this._consumeTokenAsUTF8();
+ this._onByte = this._collectHeaders;
+ return;
+ }
+ this._consumeByte(byte);
+ }
+ _collectHeaders(byte) {
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ this._setupCollectBody();
+ return;
+ }
+ this._onByte = this._collectHeaderKey;
+ this._reinjectByte(byte);
+ }
+ _reinjectByte(byte) {
+ this._onByte(byte);
+ }
+ _collectHeaderKey(byte) {
+ if (byte === COLON) {
+ this._headerKey = this._consumeTokenAsUTF8();
+ this._onByte = this._collectHeaderValue;
+ return;
+ }
+ this._consumeByte(byte);
+ }
+ _collectHeaderValue(byte) {
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ this._results.headers.push([this._headerKey, this._consumeTokenAsUTF8()]);
+ this._headerKey = undefined;
+ this._onByte = this._collectHeaders;
+ return;
+ }
+ this._consumeByte(byte);
+ }
+ _setupCollectBody() {
+ const contentLengthHeader = this._results.headers.filter((header) => {
+ return header[0] === 'content-length';
+ })[0];
+ if (contentLengthHeader) {
+ this._bodyBytesRemaining = parseInt(contentLengthHeader[1], 10);
+ this._onByte = this._collectBodyFixedSize;
+ }
+ else {
+ this._onByte = this._collectBodyNullTerminated;
+ }
+ }
+ _collectBodyNullTerminated(byte) {
+ if (byte === NULL) {
+ this._retrievedBody();
+ return;
+ }
+ this._consumeByte(byte);
+ }
+ _collectBodyFixedSize(byte) {
+ // It is post decrement, so that we discard the trailing NULL octet
+ if (this._bodyBytesRemaining-- === 0) {
+ this._retrievedBody();
+ return;
+ }
+ this._consumeByte(byte);
+ }
+ _retrievedBody() {
+ this._results.binaryBody = this._consumeTokenAsRaw();
+ this.onFrame(this._results);
+ this._initState();
+ }
+ // Rec Descent Parser helpers
+ _consumeByte(byte) {
+ this._token.push(byte);
+ }
+ _consumeTokenAsUTF8() {
+ return this._decoder.decode(this._consumeTokenAsRaw());
+ }
+ _consumeTokenAsRaw() {
+ const rawResult = new Uint8Array(this._token);
+ this._token = [];
+ return rawResult;
+ }
+ _initState() {
+ this._results = {
+ command: undefined,
+ headers: [],
+ binaryBody: undefined,
+ };
+ this._token = [];
+ this._headerKey = undefined;
+ this._onByte = this._collectFrame;
+ }
+}
+
+
+/***/ }),
+
+/***/ "./src/stomp-config.ts":
+/*!*****************************!*\
+ !*** ./src/stomp-config.ts ***!
+ \*****************************/
+/*! exports provided: StompConfig */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StompConfig", function() { return StompConfig; });
+/**
+ * Configuration options for STOMP Client, each key corresponds to
+ * field by the same name in {@link Client}. This can be passed to
+ * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.
+ *
+ * There used to be a class with the same name in `@stomp/ng2-stompjs`, which has been replaced by
+ * {@link RxStompConfig} and {@link InjectableRxStompConfig}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+class StompConfig {
+}
+
+
+/***/ }),
+
+/***/ "./src/stomp-handler.ts":
+/*!******************************!*\
+ !*** ./src/stomp-handler.ts ***!
+ \******************************/
+/*! exports provided: StompHandler */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StompHandler", function() { return StompHandler; });
+/* harmony import */ var _byte__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte */ "./src/byte.ts");
+/* harmony import */ var _frame_impl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./frame-impl */ "./src/frame-impl.ts");
+/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser */ "./src/parser.ts");
+/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./types */ "./src/types.ts");
+/* harmony import */ var _versions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./versions */ "./src/versions.ts");
+/* harmony import */ var _augment_websocket__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./augment-websocket */ "./src/augment-websocket.ts");
+
+
+
+
+
+
+/**
+ * The STOMP protocol handler
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+class StompHandler {
+ constructor(_client, _webSocket, config = {}) {
+ this._client = _client;
+ this._webSocket = _webSocket;
+ this._serverFrameHandlers = {
+ // [CONNECTED Frame](http://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame)
+ CONNECTED: frame => {
+ this.debug(`connected to server ${frame.headers.server}`);
+ this._connected = true;
+ this._connectedVersion = frame.headers.version;
+ // STOMP version 1.2 needs header values to be escaped
+ if (this._connectedVersion === _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_2) {
+ this._escapeHeaderValues = true;
+ }
+ this._setupHeartbeat(frame.headers);
+ this.onConnect(frame);
+ },
+ // [MESSAGE Frame](http://stomp.github.com/stomp-specification-1.2.html#MESSAGE)
+ MESSAGE: frame => {
+ // the callback is registered when the client calls
+ // `subscribe()`.
+ // If there is no registered subscription for the received message,
+ // the default `onUnhandledMessage` callback is used that the client can set.
+ // This is useful for subscriptions that are automatically created
+ // on the browser side (e.g. [RabbitMQ's temporary
+ // queues](http://www.rabbitmq.com/stomp.html)).
+ const subscription = frame.headers.subscription;
+ const onReceive = this._subscriptions[subscription] || this.onUnhandledMessage;
+ // bless the frame to be a Message
+ const message = frame;
+ const client = this;
+ const messageId = this._connectedVersion === _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_2
+ ? message.headers.ack
+ : message.headers['message-id'];
+ // add `ack()` and `nack()` methods directly to the returned frame
+ // so that a simple call to `message.ack()` can acknowledge the message.
+ message.ack = (headers = {}) => {
+ return client.ack(messageId, subscription, headers);
+ };
+ message.nack = (headers = {}) => {
+ return client.nack(messageId, subscription, headers);
+ };
+ onReceive(message);
+ },
+ // [RECEIPT Frame](http://stomp.github.com/stomp-specification-1.2.html#RECEIPT)
+ RECEIPT: frame => {
+ const callback = this._receiptWatchers[frame.headers['receipt-id']];
+ if (callback) {
+ callback(frame);
+ // Server will acknowledge only once, remove the callback
+ delete this._receiptWatchers[frame.headers['receipt-id']];
+ }
+ else {
+ this.onUnhandledReceipt(frame);
+ }
+ },
+ // [ERROR Frame](http://stomp.github.com/stomp-specification-1.2.html#ERROR)
+ ERROR: frame => {
+ this.onStompError(frame);
+ },
+ };
+ // used to index subscribers
+ this._counter = 0;
+ // subscription callbacks indexed by subscriber's ID
+ this._subscriptions = {};
+ // receipt-watchers indexed by receipts-ids
+ this._receiptWatchers = {};
+ this._partialData = '';
+ this._escapeHeaderValues = false;
+ this._lastServerActivityTS = Date.now();
+ this.configure(config);
+ }
+ get connectedVersion() {
+ return this._connectedVersion;
+ }
+ get connected() {
+ return this._connected;
+ }
+ configure(conf) {
+ // bulk assign all properties to this
+ Object.assign(this, conf);
+ }
+ start() {
+ const parser = new _parser__WEBPACK_IMPORTED_MODULE_2__["Parser"](
+ // On Frame
+ rawFrame => {
+ const frame = _frame_impl__WEBPACK_IMPORTED_MODULE_1__["FrameImpl"].fromRawFrame(rawFrame, this._escapeHeaderValues);
+ // if this.logRawCommunication is set, the rawChunk is logged at this._webSocket.onmessage
+ if (!this.logRawCommunication) {
+ this.debug(`<<< ${frame}`);
+ }
+ const serverFrameHandler = this._serverFrameHandlers[frame.command] || this.onUnhandledFrame;
+ serverFrameHandler(frame);
+ },
+ // On Incoming Ping
+ () => {
+ this.debug('<<< PONG');
+ });
+ this._webSocket.onmessage = (evt) => {
+ this.debug('Received data');
+ this._lastServerActivityTS = Date.now();
+ if (this.logRawCommunication) {
+ const rawChunkAsString = evt.data instanceof ArrayBuffer
+ ? new TextDecoder().decode(evt.data)
+ : evt.data;
+ this.debug(`<<< ${rawChunkAsString}`);
+ }
+ parser.parseChunk(evt.data, this.appendMissingNULLonIncoming);
+ };
+ this._onclose = (closeEvent) => {
+ this.debug(`Connection closed to ${this._client.brokerURL}`);
+ this._cleanUp();
+ this.onWebSocketClose(closeEvent);
+ };
+ this._webSocket.onclose = this._onclose;
+ this._webSocket.onerror = (errorEvent) => {
+ this.onWebSocketError(errorEvent);
+ };
+ this._webSocket.onopen = () => {
+ // Clone before updating
+ const connectHeaders = Object.assign({}, this.connectHeaders);
+ this.debug('Web Socket Opened...');
+ connectHeaders['accept-version'] = this.stompVersions.supportedVersions();
+ connectHeaders['heart-beat'] = [
+ this.heartbeatOutgoing,
+ this.heartbeatIncoming,
+ ].join(',');
+ this._transmit({ command: 'CONNECT', headers: connectHeaders });
+ };
+ }
+ _setupHeartbeat(headers) {
+ if (headers.version !== _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_1 &&
+ headers.version !== _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_2) {
+ return;
+ }
+ // It is valid for the server to not send this header
+ // https://stomp.github.io/stomp-specification-1.2.html#Heart-beating
+ if (!headers['heart-beat']) {
+ return;
+ }
+ // heart-beat header received from the server looks like:
+ //
+ // heart-beat: sx, sy
+ const [serverOutgoing, serverIncoming] = headers['heart-beat']
+ .split(',')
+ .map((v) => parseInt(v, 10));
+ if (this.heartbeatOutgoing !== 0 && serverIncoming !== 0) {
+ const ttl = Math.max(this.heartbeatOutgoing, serverIncoming);
+ this.debug(`send PING every ${ttl}ms`);
+ this._pinger = setInterval(() => {
+ if (this._webSocket.readyState === _types__WEBPACK_IMPORTED_MODULE_3__["StompSocketState"].OPEN) {
+ this._webSocket.send(_byte__WEBPACK_IMPORTED_MODULE_0__["BYTE"].LF);
+ this.debug('>>> PING');
+ }
+ }, ttl);
+ }
+ if (this.heartbeatIncoming !== 0 && serverOutgoing !== 0) {
+ const ttl = Math.max(this.heartbeatIncoming, serverOutgoing);
+ this.debug(`check PONG every ${ttl}ms`);
+ this._ponger = setInterval(() => {
+ const delta = Date.now() - this._lastServerActivityTS;
+ // We wait twice the TTL to be flexible on window's setInterval calls
+ if (delta > ttl * 2) {
+ this.debug(`did not receive server activity for the last ${delta}ms`);
+ this._closeOrDiscardWebsocket();
+ }
+ }, ttl);
+ }
+ }
+ _closeOrDiscardWebsocket() {
+ if (this.discardWebsocketOnCommFailure) {
+ this.debug('Discarding websocket, the underlying socket may linger for a while');
+ this._discardWebsocket();
+ }
+ else {
+ this.debug('Issuing close on the websocket');
+ this._closeWebsocket();
+ }
+ }
+ forceDisconnect() {
+ if (this._webSocket) {
+ if (this._webSocket.readyState === _types__WEBPACK_IMPORTED_MODULE_3__["StompSocketState"].CONNECTING ||
+ this._webSocket.readyState === _types__WEBPACK_IMPORTED_MODULE_3__["StompSocketState"].OPEN) {
+ this._closeOrDiscardWebsocket();
+ }
+ }
+ }
+ _closeWebsocket() {
+ this._webSocket.onmessage = () => { }; // ignore messages
+ this._webSocket.close();
+ }
+ _discardWebsocket() {
+ if (!this._webSocket.terminate) {
+ Object(_augment_websocket__WEBPACK_IMPORTED_MODULE_5__["augmentWebsocket"])(this._webSocket, (msg) => this.debug(msg));
+ }
+ this._webSocket.terminate();
+ }
+ _transmit(params) {
+ const { command, headers, body, binaryBody, skipContentLengthHeader } = params;
+ const frame = new _frame_impl__WEBPACK_IMPORTED_MODULE_1__["FrameImpl"]({
+ command,
+ headers,
+ body,
+ binaryBody,
+ escapeHeaderValues: this._escapeHeaderValues,
+ skipContentLengthHeader,
+ });
+ let rawChunk = frame.serialize();
+ if (this.logRawCommunication) {
+ this.debug(`>>> ${rawChunk}`);
+ }
+ else {
+ this.debug(`>>> ${frame}`);
+ }
+ if (this.forceBinaryWSFrames && typeof rawChunk === 'string') {
+ rawChunk = new TextEncoder().encode(rawChunk);
+ }
+ if (typeof rawChunk !== 'string' || !this.splitLargeFrames) {
+ this._webSocket.send(rawChunk);
+ }
+ else {
+ let out = rawChunk;
+ while (out.length > 0) {
+ const chunk = out.substring(0, this.maxWebSocketChunkSize);
+ out = out.substring(this.maxWebSocketChunkSize);
+ this._webSocket.send(chunk);
+ this.debug(`chunk sent = ${chunk.length}, remaining = ${out.length}`);
+ }
+ }
+ }
+ dispose() {
+ if (this.connected) {
+ try {
+ // clone before updating
+ const disconnectHeaders = Object.assign({}, this.disconnectHeaders);
+ if (!disconnectHeaders.receipt) {
+ disconnectHeaders.receipt = `close-${this._counter++}`;
+ }
+ this.watchForReceipt(disconnectHeaders.receipt, frame => {
+ this._closeWebsocket();
+ this._cleanUp();
+ this.onDisconnect(frame);
+ });
+ this._transmit({ command: 'DISCONNECT', headers: disconnectHeaders });
+ }
+ catch (error) {
+ this.debug(`Ignoring error during disconnect ${error}`);
+ }
+ }
+ else {
+ if (this._webSocket.readyState === _types__WEBPACK_IMPORTED_MODULE_3__["StompSocketState"].CONNECTING ||
+ this._webSocket.readyState === _types__WEBPACK_IMPORTED_MODULE_3__["StompSocketState"].OPEN) {
+ this._closeWebsocket();
+ }
+ }
+ }
+ _cleanUp() {
+ this._connected = false;
+ if (this._pinger) {
+ clearInterval(this._pinger);
+ }
+ if (this._ponger) {
+ clearInterval(this._ponger);
+ }
+ }
+ publish(params) {
+ const { destination, headers, body, binaryBody, skipContentLengthHeader } = params;
+ const hdrs = Object.assign({ destination }, headers);
+ this._transmit({
+ command: 'SEND',
+ headers: hdrs,
+ body,
+ binaryBody,
+ skipContentLengthHeader,
+ });
+ }
+ watchForReceipt(receiptId, callback) {
+ this._receiptWatchers[receiptId] = callback;
+ }
+ subscribe(destination, callback, headers = {}) {
+ headers = Object.assign({}, headers);
+ if (!headers.id) {
+ headers.id = `sub-${this._counter++}`;
+ }
+ headers.destination = destination;
+ this._subscriptions[headers.id] = callback;
+ this._transmit({ command: 'SUBSCRIBE', headers });
+ const client = this;
+ return {
+ id: headers.id,
+ unsubscribe(hdrs) {
+ return client.unsubscribe(headers.id, hdrs);
+ },
+ };
+ }
+ unsubscribe(id, headers = {}) {
+ headers = Object.assign({}, headers);
+ delete this._subscriptions[id];
+ headers.id = id;
+ this._transmit({ command: 'UNSUBSCRIBE', headers });
+ }
+ begin(transactionId) {
+ const txId = transactionId || `tx-${this._counter++}`;
+ this._transmit({
+ command: 'BEGIN',
+ headers: {
+ transaction: txId,
+ },
+ });
+ const client = this;
+ return {
+ id: txId,
+ commit() {
+ client.commit(txId);
+ },
+ abort() {
+ client.abort(txId);
+ },
+ };
+ }
+ commit(transactionId) {
+ this._transmit({
+ command: 'COMMIT',
+ headers: {
+ transaction: transactionId,
+ },
+ });
+ }
+ abort(transactionId) {
+ this._transmit({
+ command: 'ABORT',
+ headers: {
+ transaction: transactionId,
+ },
+ });
+ }
+ ack(messageId, subscriptionId, headers = {}) {
+ headers = Object.assign({}, headers);
+ if (this._connectedVersion === _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_2) {
+ headers.id = messageId;
+ }
+ else {
+ headers['message-id'] = messageId;
+ }
+ headers.subscription = subscriptionId;
+ this._transmit({ command: 'ACK', headers });
+ }
+ nack(messageId, subscriptionId, headers = {}) {
+ headers = Object.assign({}, headers);
+ if (this._connectedVersion === _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_2) {
+ headers.id = messageId;
+ }
+ else {
+ headers['message-id'] = messageId;
+ }
+ headers.subscription = subscriptionId;
+ return this._transmit({ command: 'NACK', headers });
+ }
+}
+
+
+/***/ }),
+
+/***/ "./src/stomp-headers.ts":
+/*!******************************!*\
+ !*** ./src/stomp-headers.ts ***!
+ \******************************/
+/*! exports provided: StompHeaders */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StompHeaders", function() { return StompHeaders; });
+/**
+ * STOMP headers. Many functions calls will accept headers as parameters.
+ * The headers sent by Broker will be available as [IFrame#headers]{@link IFrame#headers}.
+ *
+ * `key` and `value` must be valid strings.
+ * In addition, `key` must not contain `CR`, `LF`, or `:`.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+class StompHeaders {
+}
+
+
+/***/ }),
+
+/***/ "./src/stomp-subscription.ts":
+/*!***********************************!*\
+ !*** ./src/stomp-subscription.ts ***!
+ \***********************************/
+/*! exports provided: StompSubscription */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StompSubscription", function() { return StompSubscription; });
+/**
+ * Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+class StompSubscription {
+}
+
+
+/***/ }),
+
+/***/ "./src/types.ts":
+/*!**********************!*\
+ !*** ./src/types.ts ***!
+ \**********************/
+/*! exports provided: StompSocketState, ActivationState */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StompSocketState", function() { return StompSocketState; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivationState", function() { return ActivationState; });
+/**
+ * Possible states for the IStompSocket
+ */
+var StompSocketState;
+(function (StompSocketState) {
+ StompSocketState[StompSocketState["CONNECTING"] = 0] = "CONNECTING";
+ StompSocketState[StompSocketState["OPEN"] = 1] = "OPEN";
+ StompSocketState[StompSocketState["CLOSING"] = 2] = "CLOSING";
+ StompSocketState[StompSocketState["CLOSED"] = 3] = "CLOSED";
+})(StompSocketState || (StompSocketState = {}));
+/**
+ * Possible activation state
+ */
+var ActivationState;
+(function (ActivationState) {
+ ActivationState[ActivationState["ACTIVE"] = 0] = "ACTIVE";
+ ActivationState[ActivationState["DEACTIVATING"] = 1] = "DEACTIVATING";
+ ActivationState[ActivationState["INACTIVE"] = 2] = "INACTIVE";
+})(ActivationState || (ActivationState = {}));
+
+
+/***/ }),
+
+/***/ "./src/versions.ts":
+/*!*************************!*\
+ !*** ./src/versions.ts ***!
+ \*************************/
+/*! exports provided: Versions */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Versions", function() { return Versions; });
+/**
+ * Supported STOMP versions
+ *
+ * Part of `@stomp/stompjs`.
+ */
+class Versions {
+ /**
+ * Takes an array of string of versions, typical elements '1.0', '1.1', or '1.2'
+ *
+ * You will an instance if this class if you want to override supported versions to be declared during
+ * STOMP handshake.
+ */
+ constructor(versions) {
+ this.versions = versions;
+ }
+ /**
+ * Used as part of CONNECT STOMP Frame
+ */
+ supportedVersions() {
+ return this.versions.join(',');
+ }
+ /**
+ * Used while creating a WebSocket
+ */
+ protocolVersions() {
+ return this.versions.map(x => `v${x.replace('.', '')}.stomp`);
+ }
+}
+/**
+ * Indicates protocol version 1.0
+ */
+Versions.V1_0 = '1.0';
+/**
+ * Indicates protocol version 1.1
+ */
+Versions.V1_1 = '1.1';
+/**
+ * Indicates protocol version 1.2
+ */
+Versions.V1_2 = '1.2';
+/**
+ * @internal
+ */
+Versions.default = new Versions([
+ Versions.V1_0,
+ Versions.V1_1,
+ Versions.V1_2,
+]);
+
+
+/***/ }),
+
+/***/ 0:
+/*!****************************!*\
+ !*** multi ./src/index.ts ***!
+ \****************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(/*! /home/kdeepak/MyWork/Tech/stomp/stompjs/src/index.ts */"./src/index.ts");
+
+
+/***/ })
+
+/******/ });
+});
+//# sourceMappingURL=stomp.umd.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/bundles/stomp.umd.js.map b/node_modules/@stomp/stompjs/bundles/stomp.umd.js.map
new file mode 100644
index 0000000..c15f21a
--- /dev/null
+++ b/node_modules/@stomp/stompjs/bundles/stomp.umd.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack://StompJs/webpack/universalModuleDefinition","webpack://StompJs/webpack/bootstrap","webpack://StompJs/./src/augment-websocket.ts","webpack://StompJs/./src/byte.ts","webpack://StompJs/./src/client.ts","webpack://StompJs/./src/compatibility/compat-client.ts","webpack://StompJs/./src/compatibility/heartbeat-info.ts","webpack://StompJs/./src/compatibility/stomp.ts","webpack://StompJs/./src/frame-impl.ts","webpack://StompJs/./src/index.ts","webpack://StompJs/./src/parser.ts","webpack://StompJs/./src/stomp-config.ts","webpack://StompJs/./src/stomp-handler.ts","webpack://StompJs/./src/stomp-headers.ts","webpack://StompJs/./src/stomp-subscription.ts","webpack://StompJs/./src/types.ts","webpack://StompJs/./src/versions.ts"],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AI,GAAG,KAAK,CAAC;AAC3B;;GAEG;AACW,aAAI,GAAG,KAAK,CAAC;AAC3B;;GAEG;AACW,aAAI,GAAG,KAAK,CAAC;AAE3B;;GAEG;AACW,gBAAO,GAAG,IAAI,QAAQ,CAAC;IACnC,QAAQ,CAAC,IAAI;IACb,QAAQ,CAAC,IAAI;IACb,QAAQ,CAAC,IAAI;CACd,CAAC,CAAC","file":"stomp.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"StompJs\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"StompJs\"] = factory();\n\telse\n\t\troot[\"StompJs\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import { IStompSocket } from './types';\n\n/**\n * @internal\n */\nexport function augmentWebsocket(\n webSocket: IStompSocket,\n debug: (msg: string) => void\n) {\n webSocket.terminate = function () {\n const noOp = () => {};\n\n // set all callbacks to no op\n this.onerror = noOp;\n this.onmessage = noOp;\n this.onopen = noOp;\n\n const ts = new Date();\n\n const origOnClose = this.onclose;\n\n // Track delay in actual closure of the socket\n this.onclose = closeEvent => {\n const delay = new Date().getTime() - ts.getTime();\n debug(\n `Discarded socket closed after ${delay}ms, with code/reason: ${closeEvent.code}/${closeEvent.reason}`\n );\n };\n\n this.close();\n\n origOnClose.call(this, {\n code: 4001,\n reason: 'Heartbeat failure, discarding the socket',\n wasClean: false,\n });\n };\n}\n","/**\n * Some byte values, used as per STOMP specifications.\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport const BYTE = {\n // LINEFEED byte (octet 10)\n LF: '\\x0A',\n // NULL byte (octet 0)\n NULL: '\\x00',\n};\n","import { ITransaction } from './i-transaction';\nimport { StompConfig } from './stomp-config';\nimport { StompHandler } from './stomp-handler';\nimport { StompHeaders } from './stomp-headers';\nimport { StompSubscription } from './stomp-subscription';\nimport {\n ActivationState,\n closeEventCallbackType,\n debugFnType,\n frameCallbackType,\n IPublishParams,\n IStompSocket,\n messageCallbackType,\n StompSocketState,\n wsErrorCallbackType,\n} from './types';\nimport { Versions } from './versions';\n\n/**\n * @internal\n */\ndeclare const WebSocket: {\n prototype: IStompSocket;\n new (url: string, protocols?: string | string[]): IStompSocket;\n};\n\n/**\n * STOMP Client Class.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class Client {\n /**\n * The URL for the STOMP broker to connect to.\n * Typically like `\"ws://broker.329broker.com:15674/ws\"` or `\"wss://broker.329broker.com:15674/ws\"`.\n *\n * Only one of this or [Client#webSocketFactory]{@link Client#webSocketFactory} need to be set.\n * If both are set, [Client#webSocketFactory]{@link Client#webSocketFactory} will be used.\n *\n * If your environment does not support WebSockets natively, please refer to\n * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.\n */\n public brokerURL: string;\n\n /**\n * STOMP versions to attempt during STOMP handshake. By default versions `1.0`, `1.1`, and `1.2` are attempted.\n *\n * Example:\n * ```javascript\n * // Try only versions 1.0 and 1.1\n * client.stompVersions = new Versions(['1.0', '1.1'])\n * ```\n */\n public stompVersions = Versions.default;\n\n /**\n * This function should return a WebSocket or a similar (e.g. SockJS) object.\n * If your environment does not support WebSockets natively, please refer to\n * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.\n * If your STOMP Broker supports WebSockets, prefer setting [Client#brokerURL]{@link Client#brokerURL}.\n *\n * If both this and [Client#brokerURL]{@link Client#brokerURL} are set, this will be used.\n *\n * Example:\n * ```javascript\n * // use a WebSocket\n * client.webSocketFactory= function () {\n * return new WebSocket(\"wss://broker.329broker.com:15674/ws\");\n * };\n *\n * // Typical usage with SockJS\n * client.webSocketFactory= function () {\n * return new SockJS(\"http://broker.329broker.com/stomp\");\n * };\n * ```\n */\n public webSocketFactory: () => IStompSocket;\n\n /**\n * Will retry if Stomp connection is not established in specified milliseconds.\n * Default 0, which implies wait for ever.\n */\n public connectionTimeout: number = 0;\n\n private _connectionWatcher: number; // Timer\n\n /**\n * automatically reconnect with delay in milliseconds, set to 0 to disable.\n */\n public reconnectDelay: number = 5000;\n\n /**\n * Incoming heartbeat interval in milliseconds. Set to 0 to disable.\n */\n public heartbeatIncoming: number = 10000;\n\n /**\n * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.\n */\n public heartbeatOutgoing: number = 10000;\n\n /**\n * This switches on a non standard behavior while sending WebSocket packets.\n * It splits larger (text) packets into chunks of [maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.\n * Only Java Spring brokers seems to use this mode.\n *\n * WebSockets, by itself, split large (text) packets,\n * so it is not needed with a truly compliant STOMP/WebSocket broker.\n * Actually setting it for such broker will cause large messages to fail.\n *\n * `false` by default.\n *\n * Binary frames are never split.\n */\n public splitLargeFrames: boolean = false;\n\n /**\n * See [splitLargeFrames]{@link Client#splitLargeFrames}.\n * This has no effect if [splitLargeFrames]{@link Client#splitLargeFrames} is `false`.\n */\n public maxWebSocketChunkSize: number = 8 * 1024;\n\n /**\n * Usually the\n * [type of WebSocket frame]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send#Parameters}\n * is automatically decided by type of the payload.\n * Default is `false`, which should work with all compliant brokers.\n *\n * Set this flag to force binary frames.\n */\n public forceBinaryWSFrames: boolean = false;\n\n /**\n * A bug in ReactNative chops a string on occurrence of a NULL.\n * See issue [https://github.com/stomp-js/stompjs/issues/89]{@link https://github.com/stomp-js/stompjs/issues/89}.\n * This makes incoming WebSocket messages invalid STOMP packets.\n * Setting this flag attempts to reverse the damage by appending a NULL.\n * If the broker splits a large message into multiple WebSocket messages,\n * this flag will cause data loss and abnormal termination of connection.\n *\n * This is not an ideal solution, but a stop gap until the underlying issue is fixed at ReactNative library.\n */\n public appendMissingNULLonIncoming: boolean = false;\n\n /**\n * Underlying WebSocket instance, READONLY.\n */\n get webSocket(): IStompSocket {\n return this._stompHandler ? this._stompHandler._webSocket : undefined;\n }\n\n /**\n * Connection headers, important keys - `login`, `passcode`, `host`.\n * Though STOMP 1.2 standard marks these keys to be present, check your broker documentation for\n * details specific to your broker.\n */\n public connectHeaders: StompHeaders;\n\n /**\n * Disconnection headers.\n */\n get disconnectHeaders(): StompHeaders {\n return this._disconnectHeaders;\n }\n\n set disconnectHeaders(value: StompHeaders) {\n this._disconnectHeaders = value;\n if (this._stompHandler) {\n this._stompHandler.disconnectHeaders = this._disconnectHeaders;\n }\n }\n private _disconnectHeaders: StompHeaders;\n\n /**\n * This function will be called for any unhandled messages.\n * It is useful for receiving messages sent to RabbitMQ temporary queues.\n *\n * It can also get invoked with stray messages while the server is processing\n * a request to [Client#unsubscribe]{@link Client#unsubscribe}\n * from an endpoint.\n *\n * The actual {@link IMessage} will be passed as parameter to the callback.\n */\n public onUnhandledMessage: messageCallbackType;\n\n /**\n * STOMP brokers can be requested to notify when an operation is actually completed.\n * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}. See\n * [Client#watchForReceipt]{@link Client#watchForReceipt} for examples.\n *\n * The actual {@link FrameImpl} will be passed as parameter to the callback.\n */\n public onUnhandledReceipt: frameCallbackType;\n\n /**\n * Will be invoked if {@link FrameImpl} of unknown type is received from the STOMP broker.\n *\n * The actual {@link IFrame} will be passed as parameter to the callback.\n */\n public onUnhandledFrame: frameCallbackType;\n\n /**\n * `true` if there is a active connection with STOMP Broker\n */\n get connected(): boolean {\n return !!this._stompHandler && this._stompHandler.connected;\n }\n\n /**\n * Callback, invoked on before a connection connection to the STOMP broker.\n *\n * You can change options on the client, which will impact the immediate connect.\n * It is valid to call [Client#decativate]{@link Client#deactivate} in this callback.\n *\n * As of version 5.1, this callback can be\n * [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n * (i.e., it can return a\n * [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)).\n * In that case connect will be called only after the Promise is resolved.\n * This can be used to reliably fetch credentials, access token etc. from some other service\n * in an asynchronous way.\n */\n public beforeConnect: () => void | Promise;\n\n /**\n * Callback, invoked on every successful connection to the STOMP broker.\n *\n * The actual {@link FrameImpl} will be passed as parameter to the callback.\n * Sometimes clients will like to use headers from this frame.\n */\n public onConnect: frameCallbackType;\n\n /**\n * Callback, invoked on every successful disconnection from the STOMP broker. It will not be invoked if\n * the STOMP broker disconnected due to an error.\n *\n * The actual Receipt {@link FrameImpl} acknowledging the DISCONNECT will be passed as parameter to the callback.\n *\n * The way STOMP protocol is designed, the connection may close/terminate without the client\n * receiving the Receipt {@link FrameImpl} acknowledging the DISCONNECT.\n * You might find [Client#onWebSocketClose]{@link Client#onWebSocketClose} more appropriate to watch\n * STOMP broker disconnects.\n */\n public onDisconnect: frameCallbackType;\n\n /**\n * Callback, invoked on an ERROR frame received from the STOMP Broker.\n * A compliant STOMP Broker will close the connection after this type of frame.\n * Please check broker specific documentation for exact behavior.\n *\n * The actual {@link IFrame} will be passed as parameter to the callback.\n */\n public onStompError: frameCallbackType;\n\n /**\n * Callback, invoked when underlying WebSocket is closed.\n *\n * Actual [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}\n * is passed as parameter to the callback.\n */\n public onWebSocketClose: closeEventCallbackType;\n\n /**\n * Callback, invoked when underlying WebSocket raises an error.\n *\n * Actual [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}\n * is passed as parameter to the callback.\n */\n public onWebSocketError: wsErrorCallbackType;\n\n /**\n * Set it to log the actual raw communication with the broker.\n * When unset, it logs headers of the parsed frames.\n *\n * Change in this effects from next broker reconnect.\n *\n * **Caution: this assumes that frames only have valid UTF8 strings.**\n */\n public logRawCommunication: boolean;\n\n /**\n * By default, debug messages are discarded. To log to `console` following can be used:\n *\n * ```javascript\n * client.debug = function(str) {\n * console.log(str);\n * };\n * ```\n *\n * Currently this method does not support levels of log. Be aware that the output can be quite verbose\n * and may contain sensitive information (like passwords, tokens etc.).\n */\n public debug: debugFnType;\n\n /**\n * Browsers do not immediately close WebSockets when `.close` is issued.\n * This may cause reconnection to take a longer on certain type of failures.\n * In case of incoming heartbeat failure, this experimental flag instructs the library\n * to discard the socket immediately (even before it is actually closed).\n */\n public discardWebsocketOnCommFailure: boolean;\n\n /**\n * version of STOMP protocol negotiated with the server, READONLY\n */\n get connectedVersion(): string {\n return this._stompHandler ? this._stompHandler.connectedVersion : undefined;\n }\n\n private _stompHandler: StompHandler;\n\n /**\n * if the client is active (connected or going to reconnect)\n */\n get active(): boolean {\n return this.state === ActivationState.ACTIVE;\n }\n\n /**\n * It will be called on state change.\n *\n * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.\n */\n public onChangeState: (state: ActivationState) => void;\n\n private _changeState(state: ActivationState) {\n this.state = state;\n this.onChangeState(state);\n }\n\n // This will mark deactivate to complete, to be called after Websocket is closed\n private _resolveSocketClose: (value?: PromiseLike | void) => void;\n\n /**\n * Activation state.\n *\n * It will usually be ACTIVE or INACTIVE.\n * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.\n */\n public state: ActivationState = ActivationState.INACTIVE;\n\n private _reconnector: any;\n\n /**\n * Create an instance.\n */\n constructor(conf: StompConfig = {}) {\n // Dummy callbacks\n const noOp = () => {};\n this.debug = noOp;\n this.beforeConnect = noOp;\n this.onConnect = noOp;\n this.onDisconnect = noOp;\n this.onUnhandledMessage = noOp;\n this.onUnhandledReceipt = noOp;\n this.onUnhandledFrame = noOp;\n this.onStompError = noOp;\n this.onWebSocketClose = noOp;\n this.onWebSocketError = noOp;\n this.logRawCommunication = false;\n this.onChangeState = noOp;\n\n // These parameters would typically get proper values before connect is called\n this.connectHeaders = {};\n this._disconnectHeaders = {};\n\n // Apply configuration\n this.configure(conf);\n }\n\n /**\n * Update configuration.\n */\n public configure(conf: StompConfig): void {\n // bulk assign all properties to this\n (Object as any).assign(this, conf);\n }\n\n /**\n * Initiate the connection with the broker.\n * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},\n * it will keep trying to reconnect.\n *\n * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.\n */\n public activate(): void {\n if (this.state === ActivationState.DEACTIVATING) {\n this.debug(\n 'Still DEACTIVATING, please await call to deactivate before trying to re-activate'\n );\n throw new Error('Still DEACTIVATING, can not activate now');\n }\n\n if (this.active) {\n this.debug('Already ACTIVE, ignoring request to activate');\n return;\n }\n\n this._changeState(ActivationState.ACTIVE);\n\n this._connect();\n }\n\n private async _connect(): Promise {\n if (this.connected) {\n this.debug('STOMP: already connected, nothing to do');\n return;\n }\n\n await this.beforeConnect();\n\n if (!this.active) {\n this.debug(\n 'Client has been marked inactive, will not attempt to connect'\n );\n return;\n }\n\n // setup connection watcher\n if (this.connectionTimeout > 0) {\n // clear first\n if (this._connectionWatcher) {\n clearTimeout(this._connectionWatcher);\n }\n this._connectionWatcher = setTimeout(() => {\n if (this.connected) {\n return;\n }\n // Connection not established, close the underlying socket\n // a reconnection will be attempted\n this.debug(\n `Connection not established in ${this.connectionTimeout}ms, closing socket`\n );\n this.forceDisconnect();\n }, this.connectionTimeout);\n }\n\n this.debug('Opening Web Socket...');\n\n // Get the actual WebSocket (or a similar object)\n const webSocket = this._createWebSocket();\n\n this._stompHandler = new StompHandler(this, webSocket, {\n debug: this.debug,\n stompVersions: this.stompVersions,\n connectHeaders: this.connectHeaders,\n disconnectHeaders: this._disconnectHeaders,\n heartbeatIncoming: this.heartbeatIncoming,\n heartbeatOutgoing: this.heartbeatOutgoing,\n splitLargeFrames: this.splitLargeFrames,\n maxWebSocketChunkSize: this.maxWebSocketChunkSize,\n forceBinaryWSFrames: this.forceBinaryWSFrames,\n logRawCommunication: this.logRawCommunication,\n appendMissingNULLonIncoming: this.appendMissingNULLonIncoming,\n discardWebsocketOnCommFailure: this.discardWebsocketOnCommFailure,\n\n onConnect: frame => {\n // Successfully connected, stop the connection watcher\n if (this._connectionWatcher) {\n clearTimeout(this._connectionWatcher);\n this._connectionWatcher = undefined;\n }\n\n if (!this.active) {\n this.debug(\n 'STOMP got connected while deactivate was issued, will disconnect now'\n );\n this._disposeStompHandler();\n return;\n }\n this.onConnect(frame);\n },\n onDisconnect: frame => {\n this.onDisconnect(frame);\n },\n onStompError: frame => {\n this.onStompError(frame);\n },\n onWebSocketClose: evt => {\n this._stompHandler = undefined; // a new one will be created in case of a reconnect\n\n if (this.state === ActivationState.DEACTIVATING) {\n // Mark deactivation complete\n this._resolveSocketClose();\n this._resolveSocketClose = undefined;\n this._changeState(ActivationState.INACTIVE);\n }\n\n this.onWebSocketClose(evt);\n // The callback is called before attempting to reconnect, this would allow the client\n // to be `deactivated` in the callback.\n if (this.active) {\n this._schedule_reconnect();\n }\n },\n onWebSocketError: evt => {\n this.onWebSocketError(evt);\n },\n onUnhandledMessage: message => {\n this.onUnhandledMessage(message);\n },\n onUnhandledReceipt: frame => {\n this.onUnhandledReceipt(frame);\n },\n onUnhandledFrame: frame => {\n this.onUnhandledFrame(frame);\n },\n });\n\n this._stompHandler.start();\n }\n\n private _createWebSocket(): IStompSocket {\n let webSocket: IStompSocket;\n\n if (this.webSocketFactory) {\n webSocket = this.webSocketFactory();\n } else {\n webSocket = new WebSocket(\n this.brokerURL,\n this.stompVersions.protocolVersions()\n );\n }\n webSocket.binaryType = 'arraybuffer';\n return webSocket;\n }\n\n private _schedule_reconnect(): void {\n if (this.reconnectDelay > 0) {\n this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`);\n\n this._reconnector = setTimeout(() => {\n this._connect();\n }, this.reconnectDelay);\n }\n }\n\n /**\n * Disconnect if connected and stop auto reconnect loop.\n * Appropriate callbacks will be invoked if underlying STOMP connection was connected.\n *\n * This call is async, it will resolve immediately if there is no underlying active websocket,\n * otherwise, it will resolve after underlying websocket is properly disposed.\n *\n * To reactivate you can call [Client#activate]{@link Client#activate}.\n */\n public async deactivate(): Promise {\n let retPromise: Promise;\n\n if (this.state !== ActivationState.ACTIVE) {\n this.debug(\n `Already ${ActivationState[this.state]}, ignoring call to deactivate`\n );\n return Promise.resolve();\n }\n\n this._changeState(ActivationState.DEACTIVATING);\n\n // Clear if a reconnection was scheduled\n if (this._reconnector) {\n clearTimeout(this._reconnector);\n }\n\n if (\n this._stompHandler &&\n this.webSocket.readyState !== StompSocketState.CLOSED\n ) {\n // we need to wait for underlying websocket to close\n retPromise = new Promise((resolve, reject) => {\n this._resolveSocketClose = resolve;\n });\n } else {\n // indicate that auto reconnect loop should terminate\n this._changeState(ActivationState.INACTIVE);\n return Promise.resolve();\n }\n\n this._disposeStompHandler();\n\n return retPromise;\n }\n\n /**\n * Force disconnect if there is an active connection by directly closing the underlying WebSocket.\n * This is different than a normal disconnect where a DISCONNECT sequence is carried out with the broker.\n * After forcing disconnect, automatic reconnect will be attempted.\n * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.\n */\n public forceDisconnect() {\n if (this._stompHandler) {\n this._stompHandler.forceDisconnect();\n }\n }\n\n private _disposeStompHandler() {\n // Dispose STOMP Handler\n if (this._stompHandler) {\n this._stompHandler.dispose();\n this._stompHandler = null;\n }\n }\n\n /**\n * Send a message to a named destination. Refer to your STOMP broker documentation for types\n * and naming of destinations.\n *\n * STOMP protocol specifies and suggests some headers and also allows broker specific headers.\n *\n * `body` must be String.\n * You will need to covert the payload to string in case it is not string (e.g. JSON).\n *\n * To send a binary message body use binaryBody parameter. It should be a\n * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).\n * Sometimes brokers may not support binary frames out of the box.\n * Please check your broker documentation.\n *\n * `content-length` header is automatically added to the STOMP Frame sent to the broker.\n * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.\n * For binary messages `content-length` header is always added.\n *\n * Caution: The broker will, most likely, report an error and disconnect if message body has NULL octet(s)\n * and `content-length` header is missing.\n *\n * ```javascript\n * client.publish({destination: \"/queue/test\", headers: {priority: 9}, body: \"Hello, STOMP\"});\n *\n * // Only destination is mandatory parameter\n * client.publish({destination: \"/queue/test\", body: \"Hello, STOMP\"});\n *\n * // Skip content-length header in the frame to the broker\n * client.publish({\"/queue/test\", body: \"Hello, STOMP\", skipContentLengthHeader: true});\n *\n * var binaryData = generateBinaryData(); // This need to be of type Uint8Array\n * // setting content-type header is not mandatory, however a good practice\n * client.publish({destination: '/topic/special', binaryBody: binaryData,\n * headers: {'content-type': 'application/octet-stream'}});\n * ```\n */\n public publish(params: IPublishParams) {\n this._stompHandler.publish(params);\n }\n\n /**\n * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.\n * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.\n * The value (say receipt-id) for this header needs to be unique for each use. Typically a sequence, a UUID, a\n * random number or a combination may be used.\n *\n * A complaint broker will send a RECEIPT frame when an operation has actually been completed.\n * The operation needs to be matched based in the value of the receipt-id.\n *\n * This method allow watching for a receipt and invoke the callback\n * when corresponding receipt has been received.\n *\n * The actual {@link FrameImpl} will be passed as parameter to the callback.\n *\n * Example:\n * ```javascript\n * // Subscribing with acknowledgement\n * let receiptId = randomText();\n *\n * client.watchForReceipt(receiptId, function() {\n * // Will be called after server acknowledges\n * });\n *\n * client.subscribe(TEST.destination, onMessage, {receipt: receiptId});\n *\n *\n * // Publishing with acknowledgement\n * receiptId = randomText();\n *\n * client.watchForReceipt(receiptId, function() {\n * // Will be called after server acknowledges\n * });\n * client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});\n * ```\n */\n public watchForReceipt(receiptId: string, callback: frameCallbackType): void {\n this._stompHandler.watchForReceipt(receiptId, callback);\n }\n\n /**\n * Subscribe to a STOMP Broker location. The callback will be invoked for each received message with\n * the {@link IMessage} as argument.\n *\n * Note: The library will generate an unique ID if there is none provided in the headers.\n * To use your own ID, pass it using the headers argument.\n *\n * ```javascript\n * callback = function(message) {\n * // called when the client receives a STOMP message from the server\n * if (message.body) {\n * alert(\"got message with body \" + message.body)\n * } else {\n * alert(\"got empty message\");\n * }\n * });\n *\n * var subscription = client.subscribe(\"/queue/test\", callback);\n *\n * // Explicit subscription id\n * var mySubId = 'my-subscription-id-001';\n * var subscription = client.subscribe(destination, callback, { id: mySubId });\n * ```\n */\n public subscribe(\n destination: string,\n callback: messageCallbackType,\n headers: StompHeaders = {}\n ): StompSubscription {\n return this._stompHandler.subscribe(destination, callback, headers);\n }\n\n /**\n * It is preferable to unsubscribe from a subscription by calling\n * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:\n *\n * ```javascript\n * var subscription = client.subscribe(destination, onmessage);\n * // ...\n * subscription.unsubscribe();\n * ```\n *\n * See: http://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame\n */\n public unsubscribe(id: string, headers: StompHeaders = {}): void {\n this._stompHandler.unsubscribe(id, headers);\n }\n\n /**\n * Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit}\n * and [abort]{@link ITransaction#abort}.\n *\n * `transactionId` is optional, if not passed the library will generate it internally.\n */\n public begin(transactionId?: string): ITransaction {\n return this._stompHandler.begin(transactionId);\n }\n\n /**\n * Commit a transaction.\n *\n * It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on\n * {@link ITransaction} returned by [client.begin]{@link Client#begin}.\n *\n * ```javascript\n * var tx = client.begin(txId);\n * //...\n * tx.commit();\n * ```\n */\n public commit(transactionId: string): void {\n this._stompHandler.commit(transactionId);\n }\n\n /**\n * Abort a transaction.\n * It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on\n * {@link ITransaction} returned by [client.begin]{@link Client#begin}.\n *\n * ```javascript\n * var tx = client.begin(txId);\n * //...\n * tx.abort();\n * ```\n */\n public abort(transactionId: string): void {\n this._stompHandler.abort(transactionId);\n }\n\n /**\n * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly\n * on the {@link IMessage} handled by a subscription callback:\n *\n * ```javascript\n * var callback = function (message) {\n * // process the message\n * // acknowledge it\n * message.ack();\n * };\n * client.subscribe(destination, callback, {'ack': 'client'});\n * ```\n */\n public ack(\n messageId: string,\n subscriptionId: string,\n headers: StompHeaders = {}\n ): void {\n this._stompHandler.ack(messageId, subscriptionId, headers);\n }\n\n /**\n * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly\n * on the {@link IMessage} handled by a subscription callback:\n *\n * ```javascript\n * var callback = function (message) {\n * // process the message\n * // an error occurs, nack it\n * message.nack();\n * };\n * client.subscribe(destination, callback, {'ack': 'client'});\n * ```\n */\n public nack(\n messageId: string,\n subscriptionId: string,\n headers: StompHeaders = {}\n ): void {\n this._stompHandler.nack(messageId, subscriptionId, headers);\n }\n}\n","import { Client } from '../client';\nimport { StompHeaders } from '../stomp-headers';\nimport { frameCallbackType, messageCallbackType } from '../types';\nimport { HeartbeatInfo } from './heartbeat-info';\n\n/**\n * Available for backward compatibility, please shift to using {@link Client}.\n *\n * **Deprecated**\n *\n * Part of `@stomp/stompjs`.\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\nexport class CompatClient extends Client {\n /**\n * It is no op now. No longer needed. Large packets work out of the box.\n */\n public maxWebSocketFrameSize: number = 16 * 1024;\n\n /**\n * Available for backward compatibility, please shift to using {@link Client}\n * and [Client#webSocketFactory]{@link Client#webSocketFactory}.\n *\n * **Deprecated**\n *\n * @internal\n */\n constructor(webSocketFactory: () => any) {\n super();\n this.reconnect_delay = 0;\n this.webSocketFactory = webSocketFactory;\n // Default from previous version\n this.debug = (...message: any[]) => {\n console.log(...message);\n };\n }\n\n private _parseConnect(...args: any[]): any {\n let closeEventCallback;\n let connectCallback;\n let errorCallback;\n let headers: StompHeaders = {};\n if (args.length < 2) {\n throw new Error('Connect requires at least 2 arguments');\n }\n if (typeof args[1] === 'function') {\n [headers, connectCallback, errorCallback, closeEventCallback] = args;\n } else {\n switch (args.length) {\n case 6:\n [\n headers.login,\n headers.passcode,\n connectCallback,\n errorCallback,\n closeEventCallback,\n headers.host,\n ] = args;\n break;\n default:\n [\n headers.login,\n headers.passcode,\n connectCallback,\n errorCallback,\n closeEventCallback,\n ] = args;\n }\n }\n\n return [headers, connectCallback, errorCallback, closeEventCallback];\n }\n\n /**\n * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.\n *\n * **Deprecated**\n *\n * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the\n * version with headers to pass your broker specific options.\n *\n * overloads:\n * - connect(headers, connectCallback)\n * - connect(headers, connectCallback, errorCallback)\n * - connect(login, passcode, connectCallback)\n * - connect(login, passcode, connectCallback, errorCallback)\n * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)\n * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)\n *\n * params:\n * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}\n * - connectCallback, see [Client#onConnect]{@link Client#onConnect}\n * - errorCallback, see [Client#onStompError]{@link Client#onStompError}\n * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}\n * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)\n * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)\n * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public connect(...args: any[]): void {\n const out = this._parseConnect(...args);\n\n if (out[0]) {\n this.connectHeaders = out[0];\n }\n if (out[1]) {\n this.onConnect = out[1];\n }\n if (out[2]) {\n this.onStompError = out[2];\n }\n if (out[3]) {\n this.onWebSocketClose = out[3];\n }\n\n super.activate();\n }\n\n /**\n * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.\n *\n * **Deprecated**\n *\n * See:\n * [Client#onDisconnect]{@link Client#onDisconnect}, and\n * [Client#disconnectHeaders]{@link Client#disconnectHeaders}\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public disconnect(\n disconnectCallback?: any,\n headers: StompHeaders = {}\n ): void {\n if (disconnectCallback) {\n this.onDisconnect = disconnectCallback;\n }\n this.disconnectHeaders = headers;\n\n super.deactivate();\n }\n\n /**\n * Available for backward compatibility, use [Client#publish]{@link Client#publish}.\n *\n * Send a message to a named destination. Refer to your STOMP broker documentation for types\n * and naming of destinations. The headers will, typically, be available to the subscriber.\n * However, there may be special purpose headers corresponding to your STOMP broker.\n *\n * **Deprecated**, use [Client#publish]{@link Client#publish}\n *\n * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)\n *\n * ```javascript\n * client.send(\"/queue/test\", {priority: 9}, \"Hello, STOMP\");\n *\n * // If you want to send a message with a body, you must also pass the headers argument.\n * client.send(\"/queue/test\", {}, \"Hello, STOMP\");\n * ```\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public send(\n destination: string,\n headers: { [key: string]: any } = {},\n body: string = ''\n ): void {\n headers = (Object as any).assign({}, headers);\n\n const skipContentLengthHeader = headers['content-length'] === false;\n if (skipContentLengthHeader) {\n delete headers['content-length'];\n }\n this.publish({\n destination,\n headers: headers as StompHeaders,\n body,\n skipContentLengthHeader,\n });\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.\n *\n * **Deprecated**\n */\n set reconnect_delay(value: number) {\n this.reconnectDelay = value;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.\n *\n * **Deprecated**\n */\n get ws(): any {\n return this.webSocket;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.\n *\n * **Deprecated**\n */\n get version() {\n return this.connectedVersion;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n *\n * **Deprecated**\n */\n get onreceive(): messageCallbackType {\n return this.onUnhandledMessage;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n *\n * **Deprecated**\n */\n set onreceive(value: messageCallbackType) {\n this.onUnhandledMessage = value;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.\n *\n * **Deprecated**\n */\n get onreceipt(): frameCallbackType {\n return this.onUnhandledReceipt;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n *\n * **Deprecated**\n */\n set onreceipt(value: frameCallbackType) {\n this.onUnhandledReceipt = value;\n }\n\n private _heartbeatInfo: HeartbeatInfo = new HeartbeatInfo(this);\n\n /**\n * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}\n * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n *\n * **Deprecated**\n */\n get heartbeat() {\n return this._heartbeatInfo;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}\n * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n *\n * **Deprecated**\n */\n set heartbeat(value: { incoming: number; outgoing: number }) {\n this.heartbeatIncoming = value.incoming;\n this.heartbeatOutgoing = value.outgoing;\n }\n}\n","import { CompatClient } from './compat-client';\n\n/**\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport class HeartbeatInfo {\n constructor(private client: CompatClient) {}\n\n get outgoing(): number {\n return this.client.heartbeatOutgoing;\n }\n\n set outgoing(value: number) {\n this.client.heartbeatOutgoing = value;\n }\n\n get incoming(): number {\n return this.client.heartbeatIncoming;\n }\n\n set incoming(value: number) {\n this.client.heartbeatIncoming = value;\n }\n}\n","import { Versions } from '../versions';\nimport { CompatClient } from './compat-client';\nimport { IStompSocket } from '../types';\n\n/**\n * @internal\n */\ndeclare const WebSocket: {\n prototype: IStompSocket;\n new (url: string, protocols?: string | string[]): IStompSocket;\n};\n\n/**\n * STOMP Class, acts like a factory to create {@link Client}.\n *\n * Part of `@stomp/stompjs`.\n *\n * **Deprecated**\n *\n * It will be removed in next major version. Please switch to {@link Client}.\n */\nexport class Stomp {\n /**\n * In case you need to use a non standard class for WebSocket.\n *\n * For example when using within NodeJS environment:\n *\n * ```javascript\n * StompJs = require('../../esm5/');\n * Stomp = StompJs.Stomp;\n * Stomp.WebSocketClass = require('websocket').w3cwebsocket;\n * ```\n *\n * **Deprecated**\n *\n *\n * It will be removed in next major version. Please switch to {@link Client}\n * using [Client#webSocketFactory]{@link Client#webSocketFactory}.\n */\n // tslint:disable-next-line:variable-name\n public static WebSocketClass: any = null;\n\n /**\n * This method creates a WebSocket client that is connected to\n * the STOMP server located at the url.\n *\n * ```javascript\n * var url = \"ws://localhost:61614/stomp\";\n * var client = Stomp.client(url);\n * ```\n *\n * **Deprecated**\n *\n * It will be removed in next major version. Please switch to {@link Client}\n * using [Client#brokerURL]{@link Client#brokerURL}.\n */\n public static client(url: string, protocols?: string[]): CompatClient {\n // This is a hack to allow another implementation than the standard\n // HTML5 WebSocket class.\n //\n // It is possible to use another class by calling\n //\n // Stomp.WebSocketClass = MozWebSocket\n //\n // *prior* to call `Stomp.client()`.\n //\n // This hack is deprecated and `Stomp.over()` method should be used\n // instead.\n\n // See remarks on the function Stomp.over\n if (protocols == null) {\n protocols = Versions.default.protocolVersions();\n }\n const wsFn = () => {\n const klass = Stomp.WebSocketClass || WebSocket;\n return new klass(url, protocols);\n };\n\n return new CompatClient(wsFn);\n }\n\n /**\n * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user\n * specify the WebSocket to use (either a standard HTML5 WebSocket or\n * a similar object).\n *\n * In order to support reconnection, the function Client._connect should be callable more than once.\n * While reconnecting\n * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function\n * alternatively allows passing a function that should return a new instance of the underlying socket.\n *\n * ```javascript\n * var client = Stomp.over(function(){\n * return new WebSocket('ws://localhost:15674/ws')\n * });\n * ```\n *\n * **Deprecated**\n *\n * It will be removed in next major version. Please switch to {@link Client}\n * using [Client#webSocketFactory]{@link Client#webSocketFactory}.\n */\n public static over(ws: any): CompatClient {\n let wsFn: () => any;\n\n if (typeof ws === 'function') {\n wsFn = ws;\n } else {\n console.warn(\n 'Stomp.over did not receive a factory, auto reconnect will not work. ' +\n 'Please see https://stomp-js.github.io/api-docs/latest/classes/Stomp.html#over'\n );\n wsFn = () => ws;\n }\n\n return new CompatClient(wsFn);\n }\n}\n","import { BYTE } from './byte';\nimport { IFrame } from './i-frame';\nimport { StompHeaders } from './stomp-headers';\nimport { IRawFrameType } from './types';\n\n/**\n * Frame class represents a STOMP frame.\n *\n * @internal\n */\nexport class FrameImpl implements IFrame {\n /**\n * STOMP Command\n */\n public command: string;\n\n /**\n * Headers, key value pairs.\n */\n public headers: StompHeaders;\n\n /**\n * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).\n */\n public isBinaryBody: boolean;\n\n /**\n * body of the frame\n */\n get body(): string {\n if (!this._body && this.isBinaryBody) {\n this._body = new TextDecoder().decode(this._binaryBody);\n }\n return this._body;\n }\n private _body: string;\n\n /**\n * body as Uint8Array\n */\n get binaryBody(): Uint8Array {\n if (!this._binaryBody && !this.isBinaryBody) {\n this._binaryBody = new TextEncoder().encode(this._body);\n }\n return this._binaryBody;\n }\n private _binaryBody: Uint8Array;\n\n private escapeHeaderValues: boolean;\n private skipContentLengthHeader: boolean;\n\n /**\n * Frame constructor. `command`, `headers` and `body` are available as properties.\n *\n * @internal\n */\n constructor(params: {\n command: string;\n headers?: StompHeaders;\n body?: string;\n binaryBody?: Uint8Array;\n escapeHeaderValues?: boolean;\n skipContentLengthHeader?: boolean;\n }) {\n const {\n command,\n headers,\n body,\n binaryBody,\n escapeHeaderValues,\n skipContentLengthHeader,\n } = params;\n this.command = command;\n this.headers = (Object as any).assign({}, headers || {});\n\n if (binaryBody) {\n this._binaryBody = binaryBody;\n this.isBinaryBody = true;\n } else {\n this._body = body || '';\n this.isBinaryBody = false;\n }\n this.escapeHeaderValues = escapeHeaderValues || false;\n this.skipContentLengthHeader = skipContentLengthHeader || false;\n }\n\n /**\n * deserialize a STOMP Frame from raw data.\n *\n * @internal\n */\n public static fromRawFrame(\n rawFrame: IRawFrameType,\n escapeHeaderValues: boolean\n ): FrameImpl {\n const headers: StompHeaders = {};\n const trim = (str: string): string => str.replace(/^\\s+|\\s+$/g, '');\n\n // In case of repeated headers, as per standards, first value need to be used\n for (const header of rawFrame.headers.reverse()) {\n const idx = header.indexOf(':');\n\n const key = trim(header[0]);\n let value = trim(header[1]);\n\n if (\n escapeHeaderValues &&\n rawFrame.command !== 'CONNECT' &&\n rawFrame.command !== 'CONNECTED'\n ) {\n value = FrameImpl.hdrValueUnEscape(value);\n }\n\n headers[key] = value;\n }\n\n return new FrameImpl({\n command: rawFrame.command,\n headers,\n binaryBody: rawFrame.binaryBody,\n escapeHeaderValues,\n });\n }\n\n /**\n * @internal\n */\n public toString(): string {\n return this.serializeCmdAndHeaders();\n }\n\n /**\n * serialize this Frame in a format suitable to be passed to WebSocket.\n * If the body is string the output will be string.\n * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.\n *\n * @internal\n */\n public serialize(): string | ArrayBuffer {\n const cmdAndHeaders = this.serializeCmdAndHeaders();\n\n if (this.isBinaryBody) {\n return FrameImpl.toUnit8Array(cmdAndHeaders, this._binaryBody).buffer;\n } else {\n return cmdAndHeaders + this._body + BYTE.NULL;\n }\n }\n\n private serializeCmdAndHeaders(): string {\n const lines = [this.command];\n if (this.skipContentLengthHeader) {\n delete this.headers['content-length'];\n }\n\n for (const name of Object.keys(this.headers || {})) {\n const value = this.headers[name];\n if (\n this.escapeHeaderValues &&\n this.command !== 'CONNECT' &&\n this.command !== 'CONNECTED'\n ) {\n lines.push(`${name}:${FrameImpl.hdrValueEscape(`${value}`)}`);\n } else {\n lines.push(`${name}:${value}`);\n }\n }\n if (\n this.isBinaryBody ||\n (!this.isBodyEmpty() && !this.skipContentLengthHeader)\n ) {\n lines.push(`content-length:${this.bodyLength()}`);\n }\n return lines.join(BYTE.LF) + BYTE.LF + BYTE.LF;\n }\n\n private isBodyEmpty(): boolean {\n return this.bodyLength() === 0;\n }\n\n private bodyLength(): number {\n const binaryBody = this.binaryBody;\n return binaryBody ? binaryBody.length : 0;\n }\n\n /**\n * Compute the size of a UTF-8 string by counting its number of bytes\n * (and not the number of characters composing the string)\n */\n private static sizeOfUTF8(s: string): number {\n return s ? new TextEncoder().encode(s).length : 0;\n }\n\n private static toUnit8Array(\n cmdAndHeaders: string,\n binaryBody: Uint8Array\n ): Uint8Array {\n const uint8CmdAndHeaders = new TextEncoder().encode(cmdAndHeaders);\n const nullTerminator = new Uint8Array([0]);\n const uint8Frame = new Uint8Array(\n uint8CmdAndHeaders.length + binaryBody.length + nullTerminator.length\n );\n\n uint8Frame.set(uint8CmdAndHeaders);\n uint8Frame.set(binaryBody, uint8CmdAndHeaders.length);\n uint8Frame.set(\n nullTerminator,\n uint8CmdAndHeaders.length + binaryBody.length\n );\n\n return uint8Frame;\n }\n /**\n * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.\n *\n * @internal\n */\n public static marshall(params: {\n command: string;\n headers?: StompHeaders;\n body?: string;\n binaryBody?: Uint8Array;\n escapeHeaderValues?: boolean;\n skipContentLengthHeader?: boolean;\n }) {\n const frame = new FrameImpl(params);\n return frame.serialize();\n }\n\n /**\n * Escape header values\n */\n private static hdrValueEscape(str: string): string {\n return str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\r/g, '\\\\r')\n .replace(/\\n/g, '\\\\n')\n .replace(/:/g, '\\\\c');\n }\n\n /**\n * UnEscape header values\n */\n private static hdrValueUnEscape(str: string): string {\n return str\n .replace(/\\\\r/g, '\\r')\n .replace(/\\\\n/g, '\\n')\n .replace(/\\\\c/g, ':')\n .replace(/\\\\\\\\/g, '\\\\');\n }\n}\n","export * from './client';\nexport * from './frame-impl';\nexport * from './i-frame';\nexport * from './i-message';\nexport * from './parser';\nexport * from './stomp-config';\nexport * from './stomp-headers';\nexport * from './stomp-subscription';\nexport * from './i-transaction';\nexport * from './types';\nexport * from './versions';\n\n// Compatibility code\nexport * from './compatibility/compat-client';\nexport * from './compatibility/stomp';\n","import { IRawFrameType } from './types';\n\n/**\n * @internal\n */\nconst NULL = 0;\n/**\n * @internal\n */\nconst LF = 10;\n/**\n * @internal\n */\nconst CR = 13;\n/**\n * @internal\n */\nconst COLON = 58;\n\n/**\n * This is an evented, rec descent parser.\n * A stream of Octets can be passed and whenever it recognizes\n * a complete Frame or an incoming ping it will invoke the registered callbacks.\n *\n * All incoming Octets are fed into _onByte function.\n * Depending on current state the _onByte function keeps changing.\n * Depending on the state it keeps accumulating into _token and _results.\n * State is indicated by current value of _onByte, all states are named as _collect.\n *\n * STOMP standards https://stomp.github.io/stomp-specification-1.2.html\n * imply that all lengths are considered in bytes (instead of string lengths).\n * So, before actual parsing, if the incoming data is String it is converted to Octets.\n * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.\n *\n * There is no peek function on the incoming data.\n * When a state change occurs based on an Octet without consuming the Octet,\n * the Octet, after state change, is fed again (_reinjectByte).\n * This became possible as the state change can be determined by inspecting just one Octet.\n *\n * There are two modes to collect the body, if content-length header is there then it by counting Octets\n * otherwise it is determined by NULL terminator.\n *\n * Following the standards, the command and headers are converted to Strings\n * and the body is returned as Octets.\n * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.\n *\n * This parser does not use Regular Expressions as that can only operate on Strings.\n *\n * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or\n * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk\n * is pushed.\n *\n * Typically the higher level function will convert headers to Hash, handle unescaping of header values\n * (which is protocol version specific), and convert body to text.\n *\n * Check the parser.spec.js to understand cases that this parser is supposed to handle.\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport class Parser {\n private readonly _encoder = new TextEncoder();\n private readonly _decoder = new TextDecoder();\n\n private _results: IRawFrameType;\n\n private _token: number[] = [];\n private _headerKey: string;\n private _bodyBytesRemaining: number;\n\n private _onByte: (byte: number) => void;\n\n public constructor(\n public onFrame: (rawFrame: IRawFrameType) => void,\n public onIncomingPing: () => void\n ) {\n this._initState();\n }\n\n public parseChunk(\n segment: string | ArrayBuffer,\n appendMissingNULLonIncoming: boolean = false\n ) {\n let chunk: Uint8Array;\n\n if (segment instanceof ArrayBuffer) {\n chunk = new Uint8Array(segment);\n } else {\n chunk = this._encoder.encode(segment);\n }\n\n // See https://github.com/stomp-js/stompjs/issues/89\n // Remove when underlying issue is fixed.\n //\n // Send a NULL byte, if the last byte of a Text frame was not NULL.F\n if (appendMissingNULLonIncoming && chunk[chunk.length - 1] !== 0) {\n const chunkWithNull = new Uint8Array(chunk.length + 1);\n chunkWithNull.set(chunk, 0);\n chunkWithNull[chunk.length] = 0;\n chunk = chunkWithNull;\n }\n\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < chunk.length; i++) {\n const byte = chunk[i];\n this._onByte(byte);\n }\n }\n\n // The following implements a simple Rec Descent Parser.\n // The grammar is simple and just one byte tells what should be the next state\n\n private _collectFrame(byte: number): void {\n if (byte === NULL) {\n // Ignore\n return;\n }\n if (byte === CR) {\n // Ignore CR\n return;\n }\n if (byte === LF) {\n // Incoming Ping\n this.onIncomingPing();\n return;\n }\n\n this._onByte = this._collectCommand;\n this._reinjectByte(byte);\n }\n\n private _collectCommand(byte: number): void {\n if (byte === CR) {\n // Ignore CR\n return;\n }\n if (byte === LF) {\n this._results.command = this._consumeTokenAsUTF8();\n this._onByte = this._collectHeaders;\n return;\n }\n\n this._consumeByte(byte);\n }\n\n private _collectHeaders(byte: number): void {\n if (byte === CR) {\n // Ignore CR\n return;\n }\n if (byte === LF) {\n this._setupCollectBody();\n return;\n }\n this._onByte = this._collectHeaderKey;\n this._reinjectByte(byte);\n }\n\n private _reinjectByte(byte: number) {\n this._onByte(byte);\n }\n\n private _collectHeaderKey(byte: number): void {\n if (byte === COLON) {\n this._headerKey = this._consumeTokenAsUTF8();\n this._onByte = this._collectHeaderValue;\n return;\n }\n this._consumeByte(byte);\n }\n\n private _collectHeaderValue(byte: number): void {\n if (byte === CR) {\n // Ignore CR\n return;\n }\n if (byte === LF) {\n this._results.headers.push([this._headerKey, this._consumeTokenAsUTF8()]);\n this._headerKey = undefined;\n this._onByte = this._collectHeaders;\n return;\n }\n this._consumeByte(byte);\n }\n\n private _setupCollectBody() {\n const contentLengthHeader = this._results.headers.filter(\n (header: [string, string]) => {\n return header[0] === 'content-length';\n }\n )[0];\n\n if (contentLengthHeader) {\n this._bodyBytesRemaining = parseInt(contentLengthHeader[1], 10);\n this._onByte = this._collectBodyFixedSize;\n } else {\n this._onByte = this._collectBodyNullTerminated;\n }\n }\n\n private _collectBodyNullTerminated(byte: number): void {\n if (byte === NULL) {\n this._retrievedBody();\n return;\n }\n this._consumeByte(byte);\n }\n\n private _collectBodyFixedSize(byte: number): void {\n // It is post decrement, so that we discard the trailing NULL octet\n if (this._bodyBytesRemaining-- === 0) {\n this._retrievedBody();\n return;\n }\n this._consumeByte(byte);\n }\n\n private _retrievedBody() {\n this._results.binaryBody = this._consumeTokenAsRaw();\n\n this.onFrame(this._results);\n\n this._initState();\n }\n\n // Rec Descent Parser helpers\n\n private _consumeByte(byte: number) {\n this._token.push(byte);\n }\n\n private _consumeTokenAsUTF8() {\n return this._decoder.decode(this._consumeTokenAsRaw());\n }\n\n private _consumeTokenAsRaw() {\n const rawResult = new Uint8Array(this._token);\n this._token = [];\n return rawResult;\n }\n\n private _initState() {\n this._results = {\n command: undefined,\n headers: [],\n binaryBody: undefined,\n };\n\n this._token = [];\n this._headerKey = undefined;\n\n this._onByte = this._collectFrame;\n }\n}\n","import { StompHeaders } from './stomp-headers';\nimport {\n ActivationState,\n closeEventCallbackType,\n debugFnType,\n frameCallbackType,\n messageCallbackType,\n wsErrorCallbackType,\n} from './types';\nimport { Versions } from './versions';\n\n/**\n * Configuration options for STOMP Client, each key corresponds to\n * field by the same name in {@link Client}. This can be passed to\n * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.\n *\n * There used to be a class with the same name in `@stomp/ng2-stompjs`, which has been replaced by\n * {@link RxStompConfig} and {@link InjectableRxStompConfig}.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class StompConfig {\n /**\n * See [Client#brokerURL]{@link Client#brokerURL}.\n */\n public brokerURL?: string;\n\n /**\n * See See [Client#stompVersions]{@link Client#stompVersions}.\n */\n public stompVersions?: Versions;\n\n /**\n * See [Client#webSocketFactory]{@link Client#webSocketFactory}.\n */\n public webSocketFactory?: () => any;\n\n /**\n * See [Client#connectionTimeout]{@link Client#connectionTimeout}.\n */\n public connectionTimeout?: number;\n\n /**\n * See [Client#reconnectDelay]{@link Client#reconnectDelay}.\n */\n public reconnectDelay?: number;\n\n /**\n * See [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}.\n */\n public heartbeatIncoming?: number;\n\n /**\n * See [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n */\n public heartbeatOutgoing?: number;\n\n /**\n * See [Client#splitLargeFrames]{@link Client#splitLargeFrames}.\n */\n public splitLargeFrames?: boolean;\n\n /**\n * See [Client#forceBinaryWSFrames]{@link Client#forceBinaryWSFrames}.\n */\n public forceBinaryWSFrames?: boolean;\n\n /**\n * See [Client#appendMissingNULLonIncoming]{@link Client#appendMissingNULLonIncoming}.\n */\n public appendMissingNULLonIncoming?: boolean;\n\n /**\n * See [Client#maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.\n */\n public maxWebSocketChunkSize?: number;\n\n /**\n * See [Client#connectHeaders]{@link Client#connectHeaders}.\n */\n public connectHeaders?: StompHeaders;\n\n /**\n * See [Client#disconnectHeaders]{@link Client#disconnectHeaders}.\n */\n public disconnectHeaders?: StompHeaders;\n\n /**\n * See [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n */\n public onUnhandledMessage?: messageCallbackType;\n\n /**\n * See [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n */\n public onUnhandledReceipt?: frameCallbackType;\n\n /**\n * See [Client#onUnhandledFrame]{@link Client#onUnhandledFrame}.\n */\n public onUnhandledFrame?: frameCallbackType;\n\n /**\n * See [Client#beforeConnect]{@link Client#beforeConnect}.\n */\n public beforeConnect?: () => void | Promise;\n\n /**\n * See [Client#onConnect]{@link Client#onConnect}.\n */\n public onConnect?: frameCallbackType;\n\n /**\n * See [Client#onDisconnect]{@link Client#onDisconnect}.\n */\n public onDisconnect?: frameCallbackType;\n\n /**\n * See [Client#onStompError]{@link Client#onStompError}.\n */\n public onStompError?: frameCallbackType;\n\n /**\n * See [Client#onWebSocketClose]{@link Client#onWebSocketClose}.\n */\n public onWebSocketClose?: closeEventCallbackType;\n\n /**\n * See [Client#onWebSocketError]{@link Client#onWebSocketError}.\n */\n public onWebSocketError?: wsErrorCallbackType;\n\n /**\n * See [Client#logRawCommunication]{@link Client#logRawCommunication}.\n */\n public logRawCommunication?: boolean;\n\n /**\n * See [Client#debug]{@link Client#debug}.\n */\n public debug?: debugFnType;\n\n /**\n * See [Client#discardWebsocketOnCommFailure]{@link Client#discardWebsocketOnCommFailure}.\n */\n public discardWebsocketOnCommFailure?: boolean;\n\n /**\n * See [Client#onChangeState]{@link Client#onChangeState}.\n */\n public onChangeState?: (state: ActivationState) => void;\n}\n","import { BYTE } from './byte';\nimport { Client } from './client';\nimport { FrameImpl } from './frame-impl';\nimport { IMessage } from './i-message';\nimport { ITransaction } from './i-transaction';\nimport { Parser } from './parser';\nimport { StompConfig } from './stomp-config';\nimport { StompHeaders } from './stomp-headers';\nimport { StompSubscription } from './stomp-subscription';\nimport {\n closeEventCallbackType,\n debugFnType,\n frameCallbackType,\n IPublishParams,\n IStompSocket,\n IStompSocketMessageEvent,\n messageCallbackType,\n StompSocketState,\n wsErrorCallbackType,\n} from './types';\nimport { Versions } from './versions';\nimport { augmentWebsocket } from './augment-websocket';\n\n/**\n * The STOMP protocol handler\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport class StompHandler {\n public debug: debugFnType;\n\n public stompVersions: Versions;\n\n public connectHeaders: StompHeaders;\n\n public disconnectHeaders: StompHeaders;\n\n public heartbeatIncoming: number;\n\n public heartbeatOutgoing: number;\n\n public onUnhandledMessage: messageCallbackType;\n\n public onUnhandledReceipt: frameCallbackType;\n\n public onUnhandledFrame: frameCallbackType;\n\n public onConnect: frameCallbackType;\n\n public onDisconnect: frameCallbackType;\n\n public onStompError: frameCallbackType;\n\n public onWebSocketClose: closeEventCallbackType;\n\n public onWebSocketError: wsErrorCallbackType;\n\n public logRawCommunication: boolean;\n\n public splitLargeFrames: boolean;\n\n public maxWebSocketChunkSize: number;\n\n public forceBinaryWSFrames: boolean;\n\n public appendMissingNULLonIncoming: boolean;\n\n public discardWebsocketOnCommFailure: boolean;\n\n get connectedVersion(): string {\n return this._connectedVersion;\n }\n private _connectedVersion: string;\n\n get connected(): boolean {\n return this._connected;\n }\n\n private _connected: boolean;\n\n private readonly _subscriptions: { [key: string]: messageCallbackType };\n private readonly _receiptWatchers: { [key: string]: frameCallbackType };\n private _partialData: string;\n private _escapeHeaderValues: boolean;\n private _counter: number;\n private _pinger: any;\n private _ponger: any;\n private _lastServerActivityTS: number;\n\n private _onclose: (closeEvent: any) => void;\n\n constructor(\n private _client: Client,\n public _webSocket: IStompSocket,\n config: StompConfig = {}\n ) {\n // used to index subscribers\n this._counter = 0;\n\n // subscription callbacks indexed by subscriber's ID\n this._subscriptions = {};\n\n // receipt-watchers indexed by receipts-ids\n this._receiptWatchers = {};\n\n this._partialData = '';\n\n this._escapeHeaderValues = false;\n\n this._lastServerActivityTS = Date.now();\n\n this.configure(config);\n }\n\n public configure(conf: StompConfig): void {\n // bulk assign all properties to this\n (Object as any).assign(this, conf);\n }\n\n public start(): void {\n const parser = new Parser(\n // On Frame\n rawFrame => {\n const frame = FrameImpl.fromRawFrame(\n rawFrame,\n this._escapeHeaderValues\n );\n\n // if this.logRawCommunication is set, the rawChunk is logged at this._webSocket.onmessage\n if (!this.logRawCommunication) {\n this.debug(`<<< ${frame}`);\n }\n\n const serverFrameHandler =\n this._serverFrameHandlers[frame.command] || this.onUnhandledFrame;\n serverFrameHandler(frame);\n },\n // On Incoming Ping\n () => {\n this.debug('<<< PONG');\n }\n );\n\n this._webSocket.onmessage = (evt: IStompSocketMessageEvent) => {\n this.debug('Received data');\n this._lastServerActivityTS = Date.now();\n\n if (this.logRawCommunication) {\n const rawChunkAsString =\n evt.data instanceof ArrayBuffer\n ? new TextDecoder().decode(evt.data)\n : evt.data;\n this.debug(`<<< ${rawChunkAsString}`);\n }\n\n parser.parseChunk(evt.data, this.appendMissingNULLonIncoming);\n };\n\n this._onclose = (closeEvent): void => {\n this.debug(`Connection closed to ${this._client.brokerURL}`);\n this._cleanUp();\n this.onWebSocketClose(closeEvent);\n };\n\n this._webSocket.onclose = this._onclose;\n\n this._webSocket.onerror = (errorEvent): void => {\n this.onWebSocketError(errorEvent);\n };\n\n this._webSocket.onopen = () => {\n // Clone before updating\n const connectHeaders = (Object as any).assign({}, this.connectHeaders);\n\n this.debug('Web Socket Opened...');\n connectHeaders['accept-version'] = this.stompVersions.supportedVersions();\n connectHeaders['heart-beat'] = [\n this.heartbeatOutgoing,\n this.heartbeatIncoming,\n ].join(',');\n this._transmit({ command: 'CONNECT', headers: connectHeaders });\n };\n }\n\n private readonly _serverFrameHandlers: {\n [key: string]: frameCallbackType;\n } = {\n // [CONNECTED Frame](http://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame)\n CONNECTED: frame => {\n this.debug(`connected to server ${frame.headers.server}`);\n this._connected = true;\n this._connectedVersion = frame.headers.version;\n // STOMP version 1.2 needs header values to be escaped\n if (this._connectedVersion === Versions.V1_2) {\n this._escapeHeaderValues = true;\n }\n\n this._setupHeartbeat(frame.headers);\n this.onConnect(frame);\n },\n\n // [MESSAGE Frame](http://stomp.github.com/stomp-specification-1.2.html#MESSAGE)\n MESSAGE: frame => {\n // the callback is registered when the client calls\n // `subscribe()`.\n // If there is no registered subscription for the received message,\n // the default `onUnhandledMessage` callback is used that the client can set.\n // This is useful for subscriptions that are automatically created\n // on the browser side (e.g. [RabbitMQ's temporary\n // queues](http://www.rabbitmq.com/stomp.html)).\n const subscription = frame.headers.subscription;\n const onReceive =\n this._subscriptions[subscription] || this.onUnhandledMessage;\n\n // bless the frame to be a Message\n const message = frame as IMessage;\n\n const client = this;\n const messageId =\n this._connectedVersion === Versions.V1_2\n ? message.headers.ack\n : message.headers['message-id'];\n\n // add `ack()` and `nack()` methods directly to the returned frame\n // so that a simple call to `message.ack()` can acknowledge the message.\n message.ack = (headers: StompHeaders = {}): void => {\n return client.ack(messageId, subscription, headers);\n };\n message.nack = (headers: StompHeaders = {}): void => {\n return client.nack(messageId, subscription, headers);\n };\n onReceive(message);\n },\n\n // [RECEIPT Frame](http://stomp.github.com/stomp-specification-1.2.html#RECEIPT)\n RECEIPT: frame => {\n const callback = this._receiptWatchers[frame.headers['receipt-id']];\n if (callback) {\n callback(frame);\n // Server will acknowledge only once, remove the callback\n delete this._receiptWatchers[frame.headers['receipt-id']];\n } else {\n this.onUnhandledReceipt(frame);\n }\n },\n\n // [ERROR Frame](http://stomp.github.com/stomp-specification-1.2.html#ERROR)\n ERROR: frame => {\n this.onStompError(frame);\n },\n };\n\n private _setupHeartbeat(headers: StompHeaders): void {\n if (\n headers.version !== Versions.V1_1 &&\n headers.version !== Versions.V1_2\n ) {\n return;\n }\n\n // It is valid for the server to not send this header\n // https://stomp.github.io/stomp-specification-1.2.html#Heart-beating\n if (!headers['heart-beat']) {\n return;\n }\n\n // heart-beat header received from the server looks like:\n //\n // heart-beat: sx, sy\n const [serverOutgoing, serverIncoming] = headers['heart-beat']\n .split(',')\n .map((v: string) => parseInt(v, 10));\n\n if (this.heartbeatOutgoing !== 0 && serverIncoming !== 0) {\n const ttl: number = Math.max(this.heartbeatOutgoing, serverIncoming);\n this.debug(`send PING every ${ttl}ms`);\n this._pinger = setInterval(() => {\n if (this._webSocket.readyState === StompSocketState.OPEN) {\n this._webSocket.send(BYTE.LF);\n this.debug('>>> PING');\n }\n }, ttl);\n }\n\n if (this.heartbeatIncoming !== 0 && serverOutgoing !== 0) {\n const ttl: number = Math.max(this.heartbeatIncoming, serverOutgoing);\n this.debug(`check PONG every ${ttl}ms`);\n this._ponger = setInterval(() => {\n const delta = Date.now() - this._lastServerActivityTS;\n // We wait twice the TTL to be flexible on window's setInterval calls\n if (delta > ttl * 2) {\n this.debug(`did not receive server activity for the last ${delta}ms`);\n this._closeOrDiscardWebsocket();\n }\n }, ttl);\n }\n }\n\n private _closeOrDiscardWebsocket() {\n if (this.discardWebsocketOnCommFailure) {\n this.debug(\n 'Discarding websocket, the underlying socket may linger for a while'\n );\n this._discardWebsocket();\n } else {\n this.debug('Issuing close on the websocket');\n this._closeWebsocket();\n }\n }\n\n public forceDisconnect() {\n if (this._webSocket) {\n if (\n this._webSocket.readyState === StompSocketState.CONNECTING ||\n this._webSocket.readyState === StompSocketState.OPEN\n ) {\n this._closeOrDiscardWebsocket();\n }\n }\n }\n\n public _closeWebsocket() {\n this._webSocket.onmessage = () => {}; // ignore messages\n this._webSocket.close();\n }\n\n private _discardWebsocket() {\n if (!this._webSocket.terminate) {\n augmentWebsocket(this._webSocket, (msg: string) => this.debug(msg));\n }\n\n this._webSocket.terminate();\n }\n\n private _transmit(params: {\n command: string;\n headers?: StompHeaders;\n body?: string;\n binaryBody?: Uint8Array;\n skipContentLengthHeader?: boolean;\n }): void {\n const { command, headers, body, binaryBody, skipContentLengthHeader } =\n params;\n const frame = new FrameImpl({\n command,\n headers,\n body,\n binaryBody,\n escapeHeaderValues: this._escapeHeaderValues,\n skipContentLengthHeader,\n });\n\n let rawChunk = frame.serialize();\n\n if (this.logRawCommunication) {\n this.debug(`>>> ${rawChunk}`);\n } else {\n this.debug(`>>> ${frame}`);\n }\n\n if (this.forceBinaryWSFrames && typeof rawChunk === 'string') {\n rawChunk = new TextEncoder().encode(rawChunk);\n }\n\n if (typeof rawChunk !== 'string' || !this.splitLargeFrames) {\n this._webSocket.send(rawChunk);\n } else {\n let out = rawChunk as string;\n while (out.length > 0) {\n const chunk = out.substring(0, this.maxWebSocketChunkSize);\n out = out.substring(this.maxWebSocketChunkSize);\n this._webSocket.send(chunk);\n this.debug(`chunk sent = ${chunk.length}, remaining = ${out.length}`);\n }\n }\n }\n\n public dispose(): void {\n if (this.connected) {\n try {\n // clone before updating\n const disconnectHeaders = (Object as any).assign(\n {},\n this.disconnectHeaders\n );\n\n if (!disconnectHeaders.receipt) {\n disconnectHeaders.receipt = `close-${this._counter++}`;\n }\n this.watchForReceipt(disconnectHeaders.receipt, frame => {\n this._closeWebsocket();\n this._cleanUp();\n this.onDisconnect(frame);\n });\n this._transmit({ command: 'DISCONNECT', headers: disconnectHeaders });\n } catch (error) {\n this.debug(`Ignoring error during disconnect ${error}`);\n }\n } else {\n if (\n this._webSocket.readyState === StompSocketState.CONNECTING ||\n this._webSocket.readyState === StompSocketState.OPEN\n ) {\n this._closeWebsocket();\n }\n }\n }\n\n private _cleanUp() {\n this._connected = false;\n\n if (this._pinger) {\n clearInterval(this._pinger);\n }\n if (this._ponger) {\n clearInterval(this._ponger);\n }\n }\n\n public publish(params: IPublishParams): void {\n const { destination, headers, body, binaryBody, skipContentLengthHeader } =\n params;\n const hdrs: StompHeaders = (Object as any).assign({ destination }, headers);\n this._transmit({\n command: 'SEND',\n headers: hdrs,\n body,\n binaryBody,\n skipContentLengthHeader,\n });\n }\n\n public watchForReceipt(receiptId: string, callback: frameCallbackType): void {\n this._receiptWatchers[receiptId] = callback;\n }\n\n public subscribe(\n destination: string,\n callback: messageCallbackType,\n headers: StompHeaders = {}\n ): StompSubscription {\n headers = (Object as any).assign({}, headers);\n\n if (!headers.id) {\n headers.id = `sub-${this._counter++}`;\n }\n headers.destination = destination;\n this._subscriptions[headers.id] = callback;\n this._transmit({ command: 'SUBSCRIBE', headers });\n const client = this;\n return {\n id: headers.id,\n\n unsubscribe(hdrs) {\n return client.unsubscribe(headers.id, hdrs);\n },\n };\n }\n\n public unsubscribe(id: string, headers: StompHeaders = {}): void {\n headers = (Object as any).assign({}, headers);\n\n delete this._subscriptions[id];\n headers.id = id;\n this._transmit({ command: 'UNSUBSCRIBE', headers });\n }\n\n public begin(transactionId: string): ITransaction {\n const txId = transactionId || `tx-${this._counter++}`;\n this._transmit({\n command: 'BEGIN',\n headers: {\n transaction: txId,\n },\n });\n const client = this;\n return {\n id: txId,\n commit(): void {\n client.commit(txId);\n },\n abort(): void {\n client.abort(txId);\n },\n };\n }\n\n public commit(transactionId: string): void {\n this._transmit({\n command: 'COMMIT',\n headers: {\n transaction: transactionId,\n },\n });\n }\n\n public abort(transactionId: string): void {\n this._transmit({\n command: 'ABORT',\n headers: {\n transaction: transactionId,\n },\n });\n }\n\n public ack(\n messageId: string,\n subscriptionId: string,\n headers: StompHeaders = {}\n ): void {\n headers = (Object as any).assign({}, headers);\n\n if (this._connectedVersion === Versions.V1_2) {\n headers.id = messageId;\n } else {\n headers['message-id'] = messageId;\n }\n headers.subscription = subscriptionId;\n this._transmit({ command: 'ACK', headers });\n }\n\n public nack(\n messageId: string,\n subscriptionId: string,\n headers: StompHeaders = {}\n ): void {\n headers = (Object as any).assign({}, headers);\n\n if (this._connectedVersion === Versions.V1_2) {\n headers.id = messageId;\n } else {\n headers['message-id'] = messageId;\n }\n headers.subscription = subscriptionId;\n return this._transmit({ command: 'NACK', headers });\n }\n}\n","/**\n * STOMP headers. Many functions calls will accept headers as parameters.\n * The headers sent by Broker will be available as [IFrame#headers]{@link IFrame#headers}.\n *\n * `key` and `value` must be valid strings.\n * In addition, `key` must not contain `CR`, `LF`, or `:`.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class StompHeaders {\n [key: string]: string;\n}\n","import { StompHeaders } from './stomp-headers';\n\n/**\n * Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class StompSubscription {\n /**\n * Id associated with this subscription.\n */\n public id: string;\n\n /**\n * Unsubscribe. See [Client#unsubscribe]{@link Client#unsubscribe} for an example.\n */\n public unsubscribe: (headers?: StompHeaders) => void;\n}\n","import { IFrame } from './i-frame';\nimport { IMessage } from './i-message';\nimport { StompHeaders } from './stomp-headers';\n\n/**\n * This callback will receive a `string` as parameter.\n *\n * Part of `@stomp/stompjs`.\n */\nexport type debugFnType = (msg: string) => void;\n\n/**\n * This callback will receive a {@link IMessage} as parameter.\n *\n * Part of `@stomp/stompjs`.\n */\nexport type messageCallbackType = (message: IMessage) => void;\n\n/**\n * This callback will receive a {@link IFrame} as parameter.\n *\n * Part of `@stomp/stompjs`.\n */\nexport type frameCallbackType = (receipt: IFrame) => void;\n\n/**\n * This callback will receive a [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}\n * as parameter.\n *\n * Part of `@stomp/stompjs`.\n */\nexport type closeEventCallbackType = (evt: T) => void;\n\n/**\n * This callback will receive an [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}\n * as parameter.\n *\n * Part of `@stomp/stompjs`.\n */\nexport type wsErrorCallbackType = (evt: T) => void;\n\n/**\n * Parameters for [Client#publish]{@link Client#publish}.\n * Aliased as publishParams as well.\n *\n * Part of `@stomp/stompjs`.\n */\nexport interface IPublishParams {\n /**\n * destination end point\n */\n destination: string;\n /**\n * headers (optional)\n */\n headers?: StompHeaders;\n /**\n * body (optional)\n */\n body?: string;\n /**\n * binary body (optional)\n */\n binaryBody?: Uint8Array;\n /**\n * By default a `content-length` header will be added in the Frame to the broker.\n * Set it to `true` for the header to be skipped.\n */\n skipContentLengthHeader?: boolean;\n}\n\n/**\n * Backward compatibility, switch to {@link IPublishParams}.\n */\nexport type publishParams = IPublishParams;\n\n/**\n * Used in {@link IRawFrameType}\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport type RawHeaderType = [string, string];\n\n/**\n * The parser yield frames in this structure\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport interface IRawFrameType {\n command: string;\n headers: RawHeaderType[];\n binaryBody: Uint8Array;\n}\n\n/**\n * @internal\n */\nexport interface IStompSocketMessageEvent {\n data?: string | ArrayBuffer;\n}\n\n/**\n * Copied from Websocket interface to avoid dom typelib dependency.\n *\n * @internal\n */\nexport interface IStompSocket {\n onclose: ((this: IStompSocket, ev?: any) => any) | null;\n onerror: ((this: IStompSocket, ev: any) => any) | null;\n onmessage: ((this: IStompSocket, ev: IStompSocketMessageEvent) => any) | null;\n onopen: ((this: IStompSocket, ev?: any) => any) | null;\n terminate?: ((this: IStompSocket) => any) | null;\n\n /**\n * Returns a string that indicates how binary data from the socket is exposed to scripts:\n * We support only 'arraybuffer'.\n */\n binaryType: 'arraybuffer';\n\n /**\n * Returns the state of the socket connection. It can have the values of StompSocketState.\n */\n readonly readyState: number;\n\n /**\n * Closes the connection.\n */\n close(): void;\n /**\n * Transmits data using the connection. data can be a string or an ArrayBuffer.\n */\n send(data: string | ArrayBuffer): void;\n}\n\n/**\n * Possible states for the IStompSocket\n */\nexport enum StompSocketState {\n CONNECTING,\n OPEN,\n CLOSING,\n CLOSED,\n}\n\n/**\n * Possible activation state\n */\nexport enum ActivationState {\n ACTIVE,\n DEACTIVATING,\n INACTIVE,\n}\n","/**\n * Supported STOMP versions\n *\n * Part of `@stomp/stompjs`.\n */\nexport class Versions {\n /**\n * Indicates protocol version 1.0\n */\n public static V1_0 = '1.0';\n /**\n * Indicates protocol version 1.1\n */\n public static V1_1 = '1.1';\n /**\n * Indicates protocol version 1.2\n */\n public static V1_2 = '1.2';\n\n /**\n * @internal\n */\n public static default = new Versions([\n Versions.V1_0,\n Versions.V1_1,\n Versions.V1_2,\n ]);\n\n /**\n * Takes an array of string of versions, typical elements '1.0', '1.1', or '1.2'\n *\n * You will an instance if this class if you want to override supported versions to be declared during\n * STOMP handshake.\n */\n constructor(public versions: string[]) {}\n\n /**\n * Used as part of CONNECT STOMP Frame\n */\n public supportedVersions() {\n return this.versions.join(',');\n }\n\n /**\n * Used while creating a WebSocket\n */\n public protocolVersions() {\n return this.versions.map(x => `v${x.replace('.', '')}.stomp`);\n }\n}\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/bundles/stomp.umd.min.js b/node_modules/@stomp/stompjs/bundles/stomp.umd.min.js
new file mode 100644
index 0000000..068a321
--- /dev/null
+++ b/node_modules/@stomp/stompjs/bundles/stomp.umd.min.js
@@ -0,0 +1,2 @@
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("StompJs",[],t):"object"==typeof exports?exports.StompJs=t():e.StompJs=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function s(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,s),i.l=!0,i.exports}return s.m=e,s.c=t,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)s.d(n,i,function(t){return e[t]}.bind(null,i));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=0)}([function(e,t,s){e.exports=s(1)},function(e,t,s){"use strict";s.r(t),s.d(t,"Client",(function(){return u})),s.d(t,"FrameImpl",(function(){return o})),s.d(t,"Parser",(function(){return r})),s.d(t,"StompConfig",(function(){return m})),s.d(t,"StompHeaders",(function(){return _})),s.d(t,"StompSubscription",(function(){return b})),s.d(t,"StompSocketState",(function(){return c})),s.d(t,"ActivationState",(function(){return a})),s.d(t,"Versions",(function(){return h})),s.d(t,"CompatClient",(function(){return p})),s.d(t,"Stomp",(function(){return y}));const n="\n",i="\0";class o{constructor(e){const{command:t,headers:s,body:n,binaryBody:i,escapeHeaderValues:o,skipContentLengthHeader:r}=e;this.command=t,this.headers=Object.assign({},s||{}),i?(this._binaryBody=i,this.isBinaryBody=!0):(this._body=n||"",this.isBinaryBody=!1),this.escapeHeaderValues=o||!1,this.skipContentLengthHeader=r||!1}get body(){return!this._body&&this.isBinaryBody&&(this._body=(new TextDecoder).decode(this._binaryBody)),this._body}get binaryBody(){return this._binaryBody||this.isBinaryBody||(this._binaryBody=(new TextEncoder).encode(this._body)),this._binaryBody}static fromRawFrame(e,t){const s={},n=e=>e.replace(/^\s+|\s+$/g,"");for(const i of e.headers.reverse()){i.indexOf(":");const r=n(i[0]);let c=n(i[1]);t&&"CONNECT"!==e.command&&"CONNECTED"!==e.command&&(c=o.hdrValueUnEscape(c)),s[r]=c}return new o({command:e.command,headers:s,binaryBody:e.binaryBody,escapeHeaderValues:t})}toString(){return this.serializeCmdAndHeaders()}serialize(){const e=this.serializeCmdAndHeaders();return this.isBinaryBody?o.toUnit8Array(e,this._binaryBody).buffer:e+this._body+i}serializeCmdAndHeaders(){const e=[this.command];this.skipContentLengthHeader&&delete this.headers["content-length"];for(const t of Object.keys(this.headers||{})){const s=this.headers[t];this.escapeHeaderValues&&"CONNECT"!==this.command&&"CONNECTED"!==this.command?e.push(`${t}:${o.hdrValueEscape(""+s)}`):e.push(`${t}:${s}`)}return(this.isBinaryBody||!this.isBodyEmpty()&&!this.skipContentLengthHeader)&&e.push("content-length:"+this.bodyLength()),e.join(n)+n+n}isBodyEmpty(){return 0===this.bodyLength()}bodyLength(){const e=this.binaryBody;return e?e.length:0}static sizeOfUTF8(e){return e?(new TextEncoder).encode(e).length:0}static toUnit8Array(e,t){const s=(new TextEncoder).encode(e),n=new Uint8Array([0]),i=new Uint8Array(s.length+t.length+n.length);return i.set(s),i.set(t,s.length),i.set(n,s.length+t.length),i}static marshall(e){return new o(e).serialize()}static hdrValueEscape(e){return e.replace(/\\/g,"\\\\").replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/:/g,"\\c")}static hdrValueUnEscape(e){return e.replace(/\\r/g,"\r").replace(/\\n/g,"\n").replace(/\\c/g,":").replace(/\\\\/g,"\\")}}class r{constructor(e,t){this.onFrame=e,this.onIncomingPing=t,this._encoder=new TextEncoder,this._decoder=new TextDecoder,this._token=[],this._initState()}parseChunk(e,t=!1){let s;if(s=e instanceof ArrayBuffer?new Uint8Array(e):this._encoder.encode(e),t&&0!==s[s.length-1]){const e=new Uint8Array(s.length+1);e.set(s,0),e[s.length]=0,s=e}for(let e=0;e"content-length"===e[0])[0];e?(this._bodyBytesRemaining=parseInt(e[1],10),this._onByte=this._collectBodyFixedSize):this._onByte=this._collectBodyNullTerminated}_collectBodyNullTerminated(e){0!==e?this._consumeByte(e):this._retrievedBody()}_collectBodyFixedSize(e){0!=this._bodyBytesRemaining--?this._consumeByte(e):this._retrievedBody()}_retrievedBody(){this._results.binaryBody=this._consumeTokenAsRaw(),this.onFrame(this._results),this._initState()}_consumeByte(e){this._token.push(e)}_consumeTokenAsUTF8(){return this._decoder.decode(this._consumeTokenAsRaw())}_consumeTokenAsRaw(){const e=new Uint8Array(this._token);return this._token=[],e}_initState(){this._results={command:void 0,headers:[],binaryBody:void 0},this._token=[],this._headerKey=void 0,this._onByte=this._collectFrame}}var c,a;!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"}(c||(c={})),function(e){e[e.ACTIVE=0]="ACTIVE",e[e.DEACTIVATING=1]="DEACTIVATING",e[e.INACTIVE=2]="INACTIVE"}(a||(a={}));class h{constructor(e){this.versions=e}supportedVersions(){return this.versions.join(",")}protocolVersions(){return this.versions.map(e=>`v${e.replace(".","")}.stomp`)}}h.V1_0="1.0",h.V1_1="1.1",h.V1_2="1.2",h.default=new h([h.V1_0,h.V1_1,h.V1_2]);class d{constructor(e,t,s={}){this._client=e,this._webSocket=t,this._serverFrameHandlers={CONNECTED:e=>{this.debug("connected to server "+e.headers.server),this._connected=!0,this._connectedVersion=e.headers.version,this._connectedVersion===h.V1_2&&(this._escapeHeaderValues=!0),this._setupHeartbeat(e.headers),this.onConnect(e)},MESSAGE:e=>{const t=e.headers.subscription,s=this._subscriptions[t]||this.onUnhandledMessage,n=e,i=this,o=this._connectedVersion===h.V1_2?n.headers.ack:n.headers["message-id"];n.ack=(e={})=>i.ack(o,t,e),n.nack=(e={})=>i.nack(o,t,e),s(n)},RECEIPT:e=>{const t=this._receiptWatchers[e.headers["receipt-id"]];t?(t(e),delete this._receiptWatchers[e.headers["receipt-id"]]):this.onUnhandledReceipt(e)},ERROR:e=>{this.onStompError(e)}},this._counter=0,this._subscriptions={},this._receiptWatchers={},this._partialData="",this._escapeHeaderValues=!1,this._lastServerActivityTS=Date.now(),this.configure(s)}get connectedVersion(){return this._connectedVersion}get connected(){return this._connected}configure(e){Object.assign(this,e)}start(){const e=new r(e=>{const t=o.fromRawFrame(e,this._escapeHeaderValues);this.logRawCommunication||this.debug("<<< "+t);(this._serverFrameHandlers[t.command]||this.onUnhandledFrame)(t)},()=>{this.debug("<<< PONG")});this._webSocket.onmessage=t=>{if(this.debug("Received data"),this._lastServerActivityTS=Date.now(),this.logRawCommunication){const e=t.data instanceof ArrayBuffer?(new TextDecoder).decode(t.data):t.data;this.debug("<<< "+e)}e.parseChunk(t.data,this.appendMissingNULLonIncoming)},this._onclose=e=>{this.debug("Connection closed to "+this._client.brokerURL),this._cleanUp(),this.onWebSocketClose(e)},this._webSocket.onclose=this._onclose,this._webSocket.onerror=e=>{this.onWebSocketError(e)},this._webSocket.onopen=()=>{const e=Object.assign({},this.connectHeaders);this.debug("Web Socket Opened..."),e["accept-version"]=this.stompVersions.supportedVersions(),e["heart-beat"]=[this.heartbeatOutgoing,this.heartbeatIncoming].join(","),this._transmit({command:"CONNECT",headers:e})}}_setupHeartbeat(e){if(e.version!==h.V1_1&&e.version!==h.V1_2)return;if(!e["heart-beat"])return;const[t,s]=e["heart-beat"].split(",").map(e=>parseInt(e,10));if(0!==this.heartbeatOutgoing&&0!==s){const e=Math.max(this.heartbeatOutgoing,s);this.debug(`send PING every ${e}ms`),this._pinger=setInterval(()=>{this._webSocket.readyState===c.OPEN&&(this._webSocket.send(n),this.debug(">>> PING"))},e)}if(0!==this.heartbeatIncoming&&0!==t){const e=Math.max(this.heartbeatIncoming,t);this.debug(`check PONG every ${e}ms`),this._ponger=setInterval(()=>{const t=Date.now()-this._lastServerActivityTS;t>2*e&&(this.debug(`did not receive server activity for the last ${t}ms`),this._closeOrDiscardWebsocket())},e)}}_closeOrDiscardWebsocket(){this.discardWebsocketOnCommFailure?(this.debug("Discarding websocket, the underlying socket may linger for a while"),this._discardWebsocket()):(this.debug("Issuing close on the websocket"),this._closeWebsocket())}forceDisconnect(){this._webSocket&&(this._webSocket.readyState!==c.CONNECTING&&this._webSocket.readyState!==c.OPEN||this._closeOrDiscardWebsocket())}_closeWebsocket(){this._webSocket.onmessage=()=>{},this._webSocket.close()}_discardWebsocket(){var e,t;this._webSocket.terminate||(e=this._webSocket,t=e=>this.debug(e),e.terminate=function(){const e=()=>{};this.onerror=e,this.onmessage=e,this.onopen=e;const s=new Date,n=this.onclose;this.onclose=e=>{const n=(new Date).getTime()-s.getTime();t(`Discarded socket closed after ${n}ms, with code/reason: ${e.code}/${e.reason}`)},this.close(),n.call(this,{code:4001,reason:"Heartbeat failure, discarding the socket",wasClean:!1})}),this._webSocket.terminate()}_transmit(e){const{command:t,headers:s,body:n,binaryBody:i,skipContentLengthHeader:r}=e,c=new o({command:t,headers:s,body:n,binaryBody:i,escapeHeaderValues:this._escapeHeaderValues,skipContentLengthHeader:r});let a=c.serialize();if(this.logRawCommunication?this.debug(">>> "+a):this.debug(">>> "+c),this.forceBinaryWSFrames&&"string"==typeof a&&(a=(new TextEncoder).encode(a)),"string"==typeof a&&this.splitLargeFrames){let e=a;for(;e.length>0;){const t=e.substring(0,this.maxWebSocketChunkSize);e=e.substring(this.maxWebSocketChunkSize),this._webSocket.send(t),this.debug(`chunk sent = ${t.length}, remaining = ${e.length}`)}}else this._webSocket.send(a)}dispose(){if(this.connected)try{const e=Object.assign({},this.disconnectHeaders);e.receipt||(e.receipt="close-"+this._counter++),this.watchForReceipt(e.receipt,e=>{this._closeWebsocket(),this._cleanUp(),this.onDisconnect(e)}),this._transmit({command:"DISCONNECT",headers:e})}catch(e){this.debug("Ignoring error during disconnect "+e)}else this._webSocket.readyState!==c.CONNECTING&&this._webSocket.readyState!==c.OPEN||this._closeWebsocket()}_cleanUp(){this._connected=!1,this._pinger&&clearInterval(this._pinger),this._ponger&&clearInterval(this._ponger)}publish(e){const{destination:t,headers:s,body:n,binaryBody:i,skipContentLengthHeader:o}=e,r=Object.assign({destination:t},s);this._transmit({command:"SEND",headers:r,body:n,binaryBody:i,skipContentLengthHeader:o})}watchForReceipt(e,t){this._receiptWatchers[e]=t}subscribe(e,t,s={}){(s=Object.assign({},s)).id||(s.id="sub-"+this._counter++),s.destination=e,this._subscriptions[s.id]=t,this._transmit({command:"SUBSCRIBE",headers:s});const n=this;return{id:s.id,unsubscribe:e=>n.unsubscribe(s.id,e)}}unsubscribe(e,t={}){t=Object.assign({},t),delete this._subscriptions[e],t.id=e,this._transmit({command:"UNSUBSCRIBE",headers:t})}begin(e){const t=e||"tx-"+this._counter++;this._transmit({command:"BEGIN",headers:{transaction:t}});const s=this;return{id:t,commit(){s.commit(t)},abort(){s.abort(t)}}}commit(e){this._transmit({command:"COMMIT",headers:{transaction:e}})}abort(e){this._transmit({command:"ABORT",headers:{transaction:e}})}ack(e,t,s={}){s=Object.assign({},s),this._connectedVersion===h.V1_2?s.id=e:s["message-id"]=e,s.subscription=t,this._transmit({command:"ACK",headers:s})}nack(e,t,s={}){return s=Object.assign({},s),this._connectedVersion===h.V1_2?s.id=e:s["message-id"]=e,s.subscription=t,this._transmit({command:"NACK",headers:s})}}var l=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{a(n.next(e))}catch(e){o(e)}}function c(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,c)}a((n=n.apply(e,t||[])).next())}))};class u{constructor(e={}){this.stompVersions=h.default,this.connectionTimeout=0,this.reconnectDelay=5e3,this.heartbeatIncoming=1e4,this.heartbeatOutgoing=1e4,this.splitLargeFrames=!1,this.maxWebSocketChunkSize=8192,this.forceBinaryWSFrames=!1,this.appendMissingNULLonIncoming=!1,this.state=a.INACTIVE;const t=()=>{};this.debug=t,this.beforeConnect=t,this.onConnect=t,this.onDisconnect=t,this.onUnhandledMessage=t,this.onUnhandledReceipt=t,this.onUnhandledFrame=t,this.onStompError=t,this.onWebSocketClose=t,this.onWebSocketError=t,this.logRawCommunication=!1,this.onChangeState=t,this.connectHeaders={},this._disconnectHeaders={},this.configure(e)}get webSocket(){return this._stompHandler?this._stompHandler._webSocket:void 0}get disconnectHeaders(){return this._disconnectHeaders}set disconnectHeaders(e){this._disconnectHeaders=e,this._stompHandler&&(this._stompHandler.disconnectHeaders=this._disconnectHeaders)}get connected(){return!!this._stompHandler&&this._stompHandler.connected}get connectedVersion(){return this._stompHandler?this._stompHandler.connectedVersion:void 0}get active(){return this.state===a.ACTIVE}_changeState(e){this.state=e,this.onChangeState(e)}configure(e){Object.assign(this,e)}activate(){if(this.state===a.DEACTIVATING)throw this.debug("Still DEACTIVATING, please await call to deactivate before trying to re-activate"),new Error("Still DEACTIVATING, can not activate now");this.active?this.debug("Already ACTIVE, ignoring request to activate"):(this._changeState(a.ACTIVE),this._connect())}_connect(){return l(this,void 0,void 0,(function*(){if(this.connected)return void this.debug("STOMP: already connected, nothing to do");if(yield this.beforeConnect(),!this.active)return void this.debug("Client has been marked inactive, will not attempt to connect");this.connectionTimeout>0&&(this._connectionWatcher&&clearTimeout(this._connectionWatcher),this._connectionWatcher=setTimeout(()=>{this.connected||(this.debug(`Connection not established in ${this.connectionTimeout}ms, closing socket`),this.forceDisconnect())},this.connectionTimeout)),this.debug("Opening Web Socket...");const e=this._createWebSocket();this._stompHandler=new d(this,e,{debug:this.debug,stompVersions:this.stompVersions,connectHeaders:this.connectHeaders,disconnectHeaders:this._disconnectHeaders,heartbeatIncoming:this.heartbeatIncoming,heartbeatOutgoing:this.heartbeatOutgoing,splitLargeFrames:this.splitLargeFrames,maxWebSocketChunkSize:this.maxWebSocketChunkSize,forceBinaryWSFrames:this.forceBinaryWSFrames,logRawCommunication:this.logRawCommunication,appendMissingNULLonIncoming:this.appendMissingNULLonIncoming,discardWebsocketOnCommFailure:this.discardWebsocketOnCommFailure,onConnect:e=>{if(this._connectionWatcher&&(clearTimeout(this._connectionWatcher),this._connectionWatcher=void 0),!this.active)return this.debug("STOMP got connected while deactivate was issued, will disconnect now"),void this._disposeStompHandler();this.onConnect(e)},onDisconnect:e=>{this.onDisconnect(e)},onStompError:e=>{this.onStompError(e)},onWebSocketClose:e=>{this._stompHandler=void 0,this.state===a.DEACTIVATING&&(this._resolveSocketClose(),this._resolveSocketClose=void 0,this._changeState(a.INACTIVE)),this.onWebSocketClose(e),this.active&&this._schedule_reconnect()},onWebSocketError:e=>{this.onWebSocketError(e)},onUnhandledMessage:e=>{this.onUnhandledMessage(e)},onUnhandledReceipt:e=>{this.onUnhandledReceipt(e)},onUnhandledFrame:e=>{this.onUnhandledFrame(e)}}),this._stompHandler.start()}))}_createWebSocket(){let e;return e=this.webSocketFactory?this.webSocketFactory():new WebSocket(this.brokerURL,this.stompVersions.protocolVersions()),e.binaryType="arraybuffer",e}_schedule_reconnect(){this.reconnectDelay>0&&(this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`),this._reconnector=setTimeout(()=>{this._connect()},this.reconnectDelay))}deactivate(){return l(this,void 0,void 0,(function*(){let e;return this.state!==a.ACTIVE?(this.debug(`Already ${a[this.state]}, ignoring call to deactivate`),Promise.resolve()):(this._changeState(a.DEACTIVATING),this._reconnector&&clearTimeout(this._reconnector),this._stompHandler&&this.webSocket.readyState!==c.CLOSED?(e=new Promise((e,t)=>{this._resolveSocketClose=e}),this._disposeStompHandler(),e):(this._changeState(a.INACTIVE),Promise.resolve()))}))}forceDisconnect(){this._stompHandler&&this._stompHandler.forceDisconnect()}_disposeStompHandler(){this._stompHandler&&(this._stompHandler.dispose(),this._stompHandler=null)}publish(e){this._stompHandler.publish(e)}watchForReceipt(e,t){this._stompHandler.watchForReceipt(e,t)}subscribe(e,t,s={}){return this._stompHandler.subscribe(e,t,s)}unsubscribe(e,t={}){this._stompHandler.unsubscribe(e,t)}begin(e){return this._stompHandler.begin(e)}commit(e){this._stompHandler.commit(e)}abort(e){this._stompHandler.abort(e)}ack(e,t,s={}){this._stompHandler.ack(e,t,s)}nack(e,t,s={}){this._stompHandler.nack(e,t,s)}}class m{}class _{}class b{}class g{constructor(e){this.client=e}get outgoing(){return this.client.heartbeatOutgoing}set outgoing(e){this.client.heartbeatOutgoing=e}get incoming(){return this.client.heartbeatIncoming}set incoming(e){this.client.heartbeatIncoming=e}}class p extends u{constructor(e){super(),this.maxWebSocketFrameSize=16384,this._heartbeatInfo=new g(this),this.reconnect_delay=0,this.webSocketFactory=e,this.debug=(...e)=>{console.log(...e)}}_parseConnect(...e){let t,s,n,i={};if(e.length<2)throw new Error("Connect requires at least 2 arguments");if("function"==typeof e[1])[i,s,n,t]=e;else switch(e.length){case 6:[i.login,i.passcode,s,n,t,i.host]=e;break;default:[i.login,i.passcode,s,n,t]=e}return[i,s,n,t]}connect(...e){const t=this._parseConnect(...e);t[0]&&(this.connectHeaders=t[0]),t[1]&&(this.onConnect=t[1]),t[2]&&(this.onStompError=t[2]),t[3]&&(this.onWebSocketClose=t[3]),super.activate()}disconnect(e,t={}){e&&(this.onDisconnect=e),this.disconnectHeaders=t,super.deactivate()}send(e,t={},s=""){const n=!1===(t=Object.assign({},t))["content-length"];n&&delete t["content-length"],this.publish({destination:e,headers:t,body:s,skipContentLengthHeader:n})}set reconnect_delay(e){this.reconnectDelay=e}get ws(){return this.webSocket}get version(){return this.connectedVersion}get onreceive(){return this.onUnhandledMessage}set onreceive(e){this.onUnhandledMessage=e}get onreceipt(){return this.onUnhandledReceipt}set onreceipt(e){this.onUnhandledReceipt=e}get heartbeat(){return this._heartbeatInfo}set heartbeat(e){this.heartbeatIncoming=e.incoming,this.heartbeatOutgoing=e.outgoing}}class y{static client(e,t){null==t&&(t=h.default.protocolVersions());return new p(()=>new(y.WebSocketClass||WebSocket)(e,t))}static over(e){let t;return"function"==typeof e?t=e:(console.warn("Stomp.over did not receive a factory, auto reconnect will not work. Please see https://stomp-js.github.io/api-docs/latest/classes/Stomp.html#over"),t=()=>e),new p(t)}}y.WebSocketClass=null}])}));
+//# sourceMappingURL=stomp.umd.min.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/bundles/stomp.umd.min.js.map b/node_modules/@stomp/stompjs/bundles/stomp.umd.min.js.map
new file mode 100644
index 0000000..1495d5c
--- /dev/null
+++ b/node_modules/@stomp/stompjs/bundles/stomp.umd.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack://StompJs/webpack/universalModuleDefinition","webpack://StompJs/webpack/bootstrap","webpack://StompJs/./src/byte.ts","webpack://StompJs/./src/frame-impl.ts","webpack://StompJs/./src/parser.ts","webpack://StompJs/./src/types.ts","webpack://StompJs/./src/versions.ts","webpack://StompJs/./src/stomp-handler.ts","webpack://StompJs/./src/augment-websocket.ts","webpack://StompJs/./src/client.ts","webpack://StompJs/./src/stomp-config.ts","webpack://StompJs/./src/stomp-headers.ts","webpack://StompJs/./src/stomp-subscription.ts","webpack://StompJs/./src/compatibility/heartbeat-info.ts","webpack://StompJs/./src/compatibility/compat-client.ts","webpack://StompJs/./src/compatibility/stomp.ts"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","BYTE","params","command","headers","body","binaryBody","escapeHeaderValues","skipContentLengthHeader","assign","_binaryBody","isBinaryBody","_body","TextDecoder","decode","TextEncoder","encode","rawFrame","trim","str","replace","header","reverse","indexOf","hdrValueUnEscape","serializeCmdAndHeaders","cmdAndHeaders","toUnit8Array","buffer","lines","keys","push","hdrValueEscape","isBodyEmpty","bodyLength","join","length","uint8CmdAndHeaders","nullTerminator","Uint8Array","uint8Frame","set","serialize","Parser","onFrame","onIncomingPing","_encoder","_decoder","_token","_initState","segment","appendMissingNULLonIncoming","chunk","ArrayBuffer","chunkWithNull","byte","_onByte","_collectCommand","_reinjectByte","_results","_consumeTokenAsUTF8","_collectHeaders","_consumeByte","_collectHeaderKey","_setupCollectBody","_headerKey","_collectHeaderValue","undefined","contentLengthHeader","filter","_bodyBytesRemaining","parseInt","_collectBodyFixedSize","_collectBodyNullTerminated","_retrievedBody","_consumeTokenAsRaw","rawResult","_collectFrame","StompSocketState","ActivationState","Versions","versions","map","x","V1_0","V1_1","V1_2","default","_client","_webSocket","config","_serverFrameHandlers","CONNECTED","frame","debug","server","_connected","_connectedVersion","version","_escapeHeaderValues","_setupHeartbeat","onConnect","MESSAGE","subscription","onReceive","_subscriptions","onUnhandledMessage","message","client","messageId","ack","nack","RECEIPT","callback","_receiptWatchers","onUnhandledReceipt","ERROR","onStompError","_counter","_partialData","_lastServerActivityTS","Date","now","configure","conf","parser","fromRawFrame","logRawCommunication","onUnhandledFrame","onmessage","evt","rawChunkAsString","data","parseChunk","_onclose","closeEvent","brokerURL","_cleanUp","onWebSocketClose","onclose","onerror","errorEvent","onWebSocketError","onopen","connectHeaders","stompVersions","supportedVersions","heartbeatOutgoing","heartbeatIncoming","_transmit","serverOutgoing","serverIncoming","split","v","ttl","Math","max","_pinger","setInterval","readyState","OPEN","send","_ponger","delta","_closeOrDiscardWebsocket","discardWebsocketOnCommFailure","_discardWebsocket","_closeWebsocket","CONNECTING","close","webSocket","terminate","msg","noOp","ts","origOnClose","delay","getTime","code","reason","wasClean","rawChunk","forceBinaryWSFrames","splitLargeFrames","out","substring","maxWebSocketChunkSize","connected","disconnectHeaders","receipt","watchForReceipt","onDisconnect","error","clearInterval","destination","hdrs","receiptId","id","unsubscribe","transactionId","txId","transaction","commit","abort","subscriptionId","connectionTimeout","reconnectDelay","state","INACTIVE","beforeConnect","onChangeState","_disconnectHeaders","_stompHandler","connectedVersion","ACTIVE","DEACTIVATING","Error","active","_changeState","_connect","_connectionWatcher","clearTimeout","setTimeout","forceDisconnect","_createWebSocket","_disposeStompHandler","_resolveSocketClose","_schedule_reconnect","start","webSocketFactory","WebSocket","protocolVersions","binaryType","_reconnector","retPromise","Promise","resolve","CLOSED","reject","dispose","publish","subscribe","begin","StompConfig","StompHeaders","StompSubscription","HeartbeatInfo","super","maxWebSocketFrameSize","_heartbeatInfo","reconnect_delay","console","log","args","closeEventCallback","connectCallback","errorCallback","login","passcode","host","_parseConnect","activate","disconnectCallback","deactivate","incoming","outgoing","url","protocols","WebSocketClass","ws","wsFn","warn"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1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cf,MAAbA,IACFA,EAAY3L,EAASO,QAAQgJ,oBAO/B,OAAO,IAAI,EALE,IAEJ,IADO,EAAMqC,gBAAkBtC,WACrBoC,EAAKC,IA2BnB,YAAYE,GACjB,IAAIC,EAYJ,MAVkB,mBAAPD,EACTC,EAAOD,GAEPlB,QAAQoB,KACN,qJAGFD,EAAO,IAAMD,GAGR,IAAI,EAAaC,IA3EZ,EAAAF,eAAsB","file":"stomp.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"StompJs\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"StompJs\"] = factory();\n\telse\n\t\troot[\"StompJs\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/**\n * Some byte values, used as per STOMP specifications.\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport const BYTE = {\n // LINEFEED byte (octet 10)\n LF: '\\x0A',\n // NULL byte (octet 0)\n NULL: '\\x00',\n};\n","import { BYTE } from './byte';\nimport { IFrame } from './i-frame';\nimport { StompHeaders } from './stomp-headers';\nimport { IRawFrameType } from './types';\n\n/**\n * Frame class represents a STOMP frame.\n *\n * @internal\n */\nexport class FrameImpl implements IFrame {\n /**\n * STOMP Command\n */\n public command: string;\n\n /**\n * Headers, key value pairs.\n */\n public headers: StompHeaders;\n\n /**\n * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).\n */\n public isBinaryBody: boolean;\n\n /**\n * body of the frame\n */\n get body(): string {\n if (!this._body && this.isBinaryBody) {\n this._body = new TextDecoder().decode(this._binaryBody);\n }\n return this._body;\n }\n private _body: string;\n\n /**\n * body as Uint8Array\n */\n get binaryBody(): Uint8Array {\n if (!this._binaryBody && !this.isBinaryBody) {\n this._binaryBody = new TextEncoder().encode(this._body);\n }\n return this._binaryBody;\n }\n private _binaryBody: Uint8Array;\n\n private escapeHeaderValues: boolean;\n private skipContentLengthHeader: boolean;\n\n /**\n * Frame constructor. `command`, `headers` and `body` are available as properties.\n *\n * @internal\n */\n constructor(params: {\n command: string;\n headers?: StompHeaders;\n body?: string;\n binaryBody?: Uint8Array;\n escapeHeaderValues?: boolean;\n skipContentLengthHeader?: boolean;\n }) {\n const {\n command,\n headers,\n body,\n binaryBody,\n escapeHeaderValues,\n skipContentLengthHeader,\n } = params;\n this.command = command;\n this.headers = (Object as any).assign({}, headers || {});\n\n if (binaryBody) {\n this._binaryBody = binaryBody;\n this.isBinaryBody = true;\n } else {\n this._body = body || '';\n this.isBinaryBody = false;\n }\n this.escapeHeaderValues = escapeHeaderValues || false;\n this.skipContentLengthHeader = skipContentLengthHeader || false;\n }\n\n /**\n * deserialize a STOMP Frame from raw data.\n *\n * @internal\n */\n public static fromRawFrame(\n rawFrame: IRawFrameType,\n escapeHeaderValues: boolean\n ): FrameImpl {\n const headers: StompHeaders = {};\n const trim = (str: string): string => str.replace(/^\\s+|\\s+$/g, '');\n\n // In case of repeated headers, as per standards, first value need to be used\n for (const header of rawFrame.headers.reverse()) {\n const idx = header.indexOf(':');\n\n const key = trim(header[0]);\n let value = trim(header[1]);\n\n if (\n escapeHeaderValues &&\n rawFrame.command !== 'CONNECT' &&\n rawFrame.command !== 'CONNECTED'\n ) {\n value = FrameImpl.hdrValueUnEscape(value);\n }\n\n headers[key] = value;\n }\n\n return new FrameImpl({\n command: rawFrame.command,\n headers,\n binaryBody: rawFrame.binaryBody,\n escapeHeaderValues,\n });\n }\n\n /**\n * @internal\n */\n public toString(): string {\n return this.serializeCmdAndHeaders();\n }\n\n /**\n * serialize this Frame in a format suitable to be passed to WebSocket.\n * If the body is string the output will be string.\n * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.\n *\n * @internal\n */\n public serialize(): string | ArrayBuffer {\n const cmdAndHeaders = this.serializeCmdAndHeaders();\n\n if (this.isBinaryBody) {\n return FrameImpl.toUnit8Array(cmdAndHeaders, this._binaryBody).buffer;\n } else {\n return cmdAndHeaders + this._body + BYTE.NULL;\n }\n }\n\n private serializeCmdAndHeaders(): string {\n const lines = [this.command];\n if (this.skipContentLengthHeader) {\n delete this.headers['content-length'];\n }\n\n for (const name of Object.keys(this.headers || {})) {\n const value = this.headers[name];\n if (\n this.escapeHeaderValues &&\n this.command !== 'CONNECT' &&\n this.command !== 'CONNECTED'\n ) {\n lines.push(`${name}:${FrameImpl.hdrValueEscape(`${value}`)}`);\n } else {\n lines.push(`${name}:${value}`);\n }\n }\n if (\n this.isBinaryBody ||\n (!this.isBodyEmpty() && !this.skipContentLengthHeader)\n ) {\n lines.push(`content-length:${this.bodyLength()}`);\n }\n return lines.join(BYTE.LF) + BYTE.LF + BYTE.LF;\n }\n\n private isBodyEmpty(): boolean {\n return this.bodyLength() === 0;\n }\n\n private bodyLength(): number {\n const binaryBody = this.binaryBody;\n return binaryBody ? binaryBody.length : 0;\n }\n\n /**\n * Compute the size of a UTF-8 string by counting its number of bytes\n * (and not the number of characters composing the string)\n */\n private static sizeOfUTF8(s: string): number {\n return s ? new TextEncoder().encode(s).length : 0;\n }\n\n private static toUnit8Array(\n cmdAndHeaders: string,\n binaryBody: Uint8Array\n ): Uint8Array {\n const uint8CmdAndHeaders = new TextEncoder().encode(cmdAndHeaders);\n const nullTerminator = new Uint8Array([0]);\n const uint8Frame = new Uint8Array(\n uint8CmdAndHeaders.length + binaryBody.length + nullTerminator.length\n );\n\n uint8Frame.set(uint8CmdAndHeaders);\n uint8Frame.set(binaryBody, uint8CmdAndHeaders.length);\n uint8Frame.set(\n nullTerminator,\n uint8CmdAndHeaders.length + binaryBody.length\n );\n\n return uint8Frame;\n }\n /**\n * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.\n *\n * @internal\n */\n public static marshall(params: {\n command: string;\n headers?: StompHeaders;\n body?: string;\n binaryBody?: Uint8Array;\n escapeHeaderValues?: boolean;\n skipContentLengthHeader?: boolean;\n }) {\n const frame = new FrameImpl(params);\n return frame.serialize();\n }\n\n /**\n * Escape header values\n */\n private static hdrValueEscape(str: string): string {\n return str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\r/g, '\\\\r')\n .replace(/\\n/g, '\\\\n')\n .replace(/:/g, '\\\\c');\n }\n\n /**\n * UnEscape header values\n */\n private static hdrValueUnEscape(str: string): string {\n return str\n .replace(/\\\\r/g, '\\r')\n .replace(/\\\\n/g, '\\n')\n .replace(/\\\\c/g, ':')\n .replace(/\\\\\\\\/g, '\\\\');\n }\n}\n","import { IRawFrameType } from './types';\n\n/**\n * @internal\n */\nconst NULL = 0;\n/**\n * @internal\n */\nconst LF = 10;\n/**\n * @internal\n */\nconst CR = 13;\n/**\n * @internal\n */\nconst COLON = 58;\n\n/**\n * This is an evented, rec descent parser.\n * A stream of Octets can be passed and whenever it recognizes\n * a complete Frame or an incoming ping it will invoke the registered callbacks.\n *\n * All incoming Octets are fed into _onByte function.\n * Depending on current state the _onByte function keeps changing.\n * Depending on the state it keeps accumulating into _token and _results.\n * State is indicated by current value of _onByte, all states are named as _collect.\n *\n * STOMP standards https://stomp.github.io/stomp-specification-1.2.html\n * imply that all lengths are considered in bytes (instead of string lengths).\n * So, before actual parsing, if the incoming data is String it is converted to Octets.\n * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.\n *\n * There is no peek function on the incoming data.\n * When a state change occurs based on an Octet without consuming the Octet,\n * the Octet, after state change, is fed again (_reinjectByte).\n * This became possible as the state change can be determined by inspecting just one Octet.\n *\n * There are two modes to collect the body, if content-length header is there then it by counting Octets\n * otherwise it is determined by NULL terminator.\n *\n * Following the standards, the command and headers are converted to Strings\n * and the body is returned as Octets.\n * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.\n *\n * This parser does not use Regular Expressions as that can only operate on Strings.\n *\n * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or\n * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk\n * is pushed.\n *\n * Typically the higher level function will convert headers to Hash, handle unescaping of header values\n * (which is protocol version specific), and convert body to text.\n *\n * Check the parser.spec.js to understand cases that this parser is supposed to handle.\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport class Parser {\n private readonly _encoder = new TextEncoder();\n private readonly _decoder = new TextDecoder();\n\n private _results: IRawFrameType;\n\n private _token: number[] = [];\n private _headerKey: string;\n private _bodyBytesRemaining: number;\n\n private _onByte: (byte: number) => void;\n\n public constructor(\n public onFrame: (rawFrame: IRawFrameType) => void,\n public onIncomingPing: () => void\n ) {\n this._initState();\n }\n\n public parseChunk(\n segment: string | ArrayBuffer,\n appendMissingNULLonIncoming: boolean = false\n ) {\n let chunk: Uint8Array;\n\n if (segment instanceof ArrayBuffer) {\n chunk = new Uint8Array(segment);\n } else {\n chunk = this._encoder.encode(segment);\n }\n\n // See https://github.com/stomp-js/stompjs/issues/89\n // Remove when underlying issue is fixed.\n //\n // Send a NULL byte, if the last byte of a Text frame was not NULL.F\n if (appendMissingNULLonIncoming && chunk[chunk.length - 1] !== 0) {\n const chunkWithNull = new Uint8Array(chunk.length + 1);\n chunkWithNull.set(chunk, 0);\n chunkWithNull[chunk.length] = 0;\n chunk = chunkWithNull;\n }\n\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < chunk.length; i++) {\n const byte = chunk[i];\n this._onByte(byte);\n }\n }\n\n // The following implements a simple Rec Descent Parser.\n // The grammar is simple and just one byte tells what should be the next state\n\n private _collectFrame(byte: number): void {\n if (byte === NULL) {\n // Ignore\n return;\n }\n if (byte === CR) {\n // Ignore CR\n return;\n }\n if (byte === LF) {\n // Incoming Ping\n this.onIncomingPing();\n return;\n }\n\n this._onByte = this._collectCommand;\n this._reinjectByte(byte);\n }\n\n private _collectCommand(byte: number): void {\n if (byte === CR) {\n // Ignore CR\n return;\n }\n if (byte === LF) {\n this._results.command = this._consumeTokenAsUTF8();\n this._onByte = this._collectHeaders;\n return;\n }\n\n this._consumeByte(byte);\n }\n\n private _collectHeaders(byte: number): void {\n if (byte === CR) {\n // Ignore CR\n return;\n }\n if (byte === LF) {\n this._setupCollectBody();\n return;\n }\n this._onByte = this._collectHeaderKey;\n this._reinjectByte(byte);\n }\n\n private _reinjectByte(byte: number) {\n this._onByte(byte);\n }\n\n private _collectHeaderKey(byte: number): void {\n if (byte === COLON) {\n this._headerKey = this._consumeTokenAsUTF8();\n this._onByte = this._collectHeaderValue;\n return;\n }\n this._consumeByte(byte);\n }\n\n private _collectHeaderValue(byte: number): void {\n if (byte === CR) {\n // Ignore CR\n return;\n }\n if (byte === LF) {\n this._results.headers.push([this._headerKey, this._consumeTokenAsUTF8()]);\n this._headerKey = undefined;\n this._onByte = this._collectHeaders;\n return;\n }\n this._consumeByte(byte);\n }\n\n private _setupCollectBody() {\n const contentLengthHeader = this._results.headers.filter(\n (header: [string, string]) => {\n return header[0] === 'content-length';\n }\n )[0];\n\n if (contentLengthHeader) {\n this._bodyBytesRemaining = parseInt(contentLengthHeader[1], 10);\n this._onByte = this._collectBodyFixedSize;\n } else {\n this._onByte = this._collectBodyNullTerminated;\n }\n }\n\n private _collectBodyNullTerminated(byte: number): void {\n if (byte === NULL) {\n this._retrievedBody();\n return;\n }\n this._consumeByte(byte);\n }\n\n private _collectBodyFixedSize(byte: number): void {\n // It is post decrement, so that we discard the trailing NULL octet\n if (this._bodyBytesRemaining-- === 0) {\n this._retrievedBody();\n return;\n }\n this._consumeByte(byte);\n }\n\n private _retrievedBody() {\n this._results.binaryBody = this._consumeTokenAsRaw();\n\n this.onFrame(this._results);\n\n this._initState();\n }\n\n // Rec Descent Parser helpers\n\n private _consumeByte(byte: number) {\n this._token.push(byte);\n }\n\n private _consumeTokenAsUTF8() {\n return this._decoder.decode(this._consumeTokenAsRaw());\n }\n\n private _consumeTokenAsRaw() {\n const rawResult = new Uint8Array(this._token);\n this._token = [];\n return rawResult;\n }\n\n private _initState() {\n this._results = {\n command: undefined,\n headers: [],\n binaryBody: undefined,\n };\n\n this._token = [];\n this._headerKey = undefined;\n\n this._onByte = this._collectFrame;\n }\n}\n","import { IFrame } from './i-frame';\nimport { IMessage } from './i-message';\nimport { StompHeaders } from './stomp-headers';\n\n/**\n * This callback will receive a `string` as parameter.\n *\n * Part of `@stomp/stompjs`.\n */\nexport type debugFnType = (msg: string) => void;\n\n/**\n * This callback will receive a {@link IMessage} as parameter.\n *\n * Part of `@stomp/stompjs`.\n */\nexport type messageCallbackType = (message: IMessage) => void;\n\n/**\n * This callback will receive a {@link IFrame} as parameter.\n *\n * Part of `@stomp/stompjs`.\n */\nexport type frameCallbackType = (receipt: IFrame) => void;\n\n/**\n * This callback will receive a [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}\n * as parameter.\n *\n * Part of `@stomp/stompjs`.\n */\nexport type closeEventCallbackType = (evt: T) => void;\n\n/**\n * This callback will receive an [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}\n * as parameter.\n *\n * Part of `@stomp/stompjs`.\n */\nexport type wsErrorCallbackType = (evt: T) => void;\n\n/**\n * Parameters for [Client#publish]{@link Client#publish}.\n * Aliased as publishParams as well.\n *\n * Part of `@stomp/stompjs`.\n */\nexport interface IPublishParams {\n /**\n * destination end point\n */\n destination: string;\n /**\n * headers (optional)\n */\n headers?: StompHeaders;\n /**\n * body (optional)\n */\n body?: string;\n /**\n * binary body (optional)\n */\n binaryBody?: Uint8Array;\n /**\n * By default a `content-length` header will be added in the Frame to the broker.\n * Set it to `true` for the header to be skipped.\n */\n skipContentLengthHeader?: boolean;\n}\n\n/**\n * Backward compatibility, switch to {@link IPublishParams}.\n */\nexport type publishParams = IPublishParams;\n\n/**\n * Used in {@link IRawFrameType}\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport type RawHeaderType = [string, string];\n\n/**\n * The parser yield frames in this structure\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport interface IRawFrameType {\n command: string;\n headers: RawHeaderType[];\n binaryBody: Uint8Array;\n}\n\n/**\n * @internal\n */\nexport interface IStompSocketMessageEvent {\n data?: string | ArrayBuffer;\n}\n\n/**\n * Copied from Websocket interface to avoid dom typelib dependency.\n *\n * @internal\n */\nexport interface IStompSocket {\n onclose: ((this: IStompSocket, ev?: any) => any) | null;\n onerror: ((this: IStompSocket, ev: any) => any) | null;\n onmessage: ((this: IStompSocket, ev: IStompSocketMessageEvent) => any) | null;\n onopen: ((this: IStompSocket, ev?: any) => any) | null;\n terminate?: ((this: IStompSocket) => any) | null;\n\n /**\n * Returns a string that indicates how binary data from the socket is exposed to scripts:\n * We support only 'arraybuffer'.\n */\n binaryType: 'arraybuffer';\n\n /**\n * Returns the state of the socket connection. It can have the values of StompSocketState.\n */\n readonly readyState: number;\n\n /**\n * Closes the connection.\n */\n close(): void;\n /**\n * Transmits data using the connection. data can be a string or an ArrayBuffer.\n */\n send(data: string | ArrayBuffer): void;\n}\n\n/**\n * Possible states for the IStompSocket\n */\nexport enum StompSocketState {\n CONNECTING,\n OPEN,\n CLOSING,\n CLOSED,\n}\n\n/**\n * Possible activation state\n */\nexport enum ActivationState {\n ACTIVE,\n DEACTIVATING,\n INACTIVE,\n}\n","/**\n * Supported STOMP versions\n *\n * Part of `@stomp/stompjs`.\n */\nexport class Versions {\n /**\n * Indicates protocol version 1.0\n */\n public static V1_0 = '1.0';\n /**\n * Indicates protocol version 1.1\n */\n public static V1_1 = '1.1';\n /**\n * Indicates protocol version 1.2\n */\n public static V1_2 = '1.2';\n\n /**\n * @internal\n */\n public static default = new Versions([\n Versions.V1_0,\n Versions.V1_1,\n Versions.V1_2,\n ]);\n\n /**\n * Takes an array of string of versions, typical elements '1.0', '1.1', or '1.2'\n *\n * You will an instance if this class if you want to override supported versions to be declared during\n * STOMP handshake.\n */\n constructor(public versions: string[]) {}\n\n /**\n * Used as part of CONNECT STOMP Frame\n */\n public supportedVersions() {\n return this.versions.join(',');\n }\n\n /**\n * Used while creating a WebSocket\n */\n public protocolVersions() {\n return this.versions.map(x => `v${x.replace('.', '')}.stomp`);\n }\n}\n","import { BYTE } from './byte';\nimport { Client } from './client';\nimport { FrameImpl } from './frame-impl';\nimport { IMessage } from './i-message';\nimport { ITransaction } from './i-transaction';\nimport { Parser } from './parser';\nimport { StompConfig } from './stomp-config';\nimport { StompHeaders } from './stomp-headers';\nimport { StompSubscription } from './stomp-subscription';\nimport {\n closeEventCallbackType,\n debugFnType,\n frameCallbackType,\n IPublishParams,\n IStompSocket,\n IStompSocketMessageEvent,\n messageCallbackType,\n StompSocketState,\n wsErrorCallbackType,\n} from './types';\nimport { Versions } from './versions';\nimport { augmentWebsocket } from './augment-websocket';\n\n/**\n * The STOMP protocol handler\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport class StompHandler {\n public debug: debugFnType;\n\n public stompVersions: Versions;\n\n public connectHeaders: StompHeaders;\n\n public disconnectHeaders: StompHeaders;\n\n public heartbeatIncoming: number;\n\n public heartbeatOutgoing: number;\n\n public onUnhandledMessage: messageCallbackType;\n\n public onUnhandledReceipt: frameCallbackType;\n\n public onUnhandledFrame: frameCallbackType;\n\n public onConnect: frameCallbackType;\n\n public onDisconnect: frameCallbackType;\n\n public onStompError: frameCallbackType;\n\n public onWebSocketClose: closeEventCallbackType;\n\n public onWebSocketError: wsErrorCallbackType;\n\n public logRawCommunication: boolean;\n\n public splitLargeFrames: boolean;\n\n public maxWebSocketChunkSize: number;\n\n public forceBinaryWSFrames: boolean;\n\n public appendMissingNULLonIncoming: boolean;\n\n public discardWebsocketOnCommFailure: boolean;\n\n get connectedVersion(): string {\n return this._connectedVersion;\n }\n private _connectedVersion: string;\n\n get connected(): boolean {\n return this._connected;\n }\n\n private _connected: boolean;\n\n private readonly _subscriptions: { [key: string]: messageCallbackType };\n private readonly _receiptWatchers: { [key: string]: frameCallbackType };\n private _partialData: string;\n private _escapeHeaderValues: boolean;\n private _counter: number;\n private _pinger: any;\n private _ponger: any;\n private _lastServerActivityTS: number;\n\n private _onclose: (closeEvent: any) => void;\n\n constructor(\n private _client: Client,\n public _webSocket: IStompSocket,\n config: StompConfig = {}\n ) {\n // used to index subscribers\n this._counter = 0;\n\n // subscription callbacks indexed by subscriber's ID\n this._subscriptions = {};\n\n // receipt-watchers indexed by receipts-ids\n this._receiptWatchers = {};\n\n this._partialData = '';\n\n this._escapeHeaderValues = false;\n\n this._lastServerActivityTS = Date.now();\n\n this.configure(config);\n }\n\n public configure(conf: StompConfig): void {\n // bulk assign all properties to this\n (Object as any).assign(this, conf);\n }\n\n public start(): void {\n const parser = new Parser(\n // On Frame\n rawFrame => {\n const frame = FrameImpl.fromRawFrame(\n rawFrame,\n this._escapeHeaderValues\n );\n\n // if this.logRawCommunication is set, the rawChunk is logged at this._webSocket.onmessage\n if (!this.logRawCommunication) {\n this.debug(`<<< ${frame}`);\n }\n\n const serverFrameHandler =\n this._serverFrameHandlers[frame.command] || this.onUnhandledFrame;\n serverFrameHandler(frame);\n },\n // On Incoming Ping\n () => {\n this.debug('<<< PONG');\n }\n );\n\n this._webSocket.onmessage = (evt: IStompSocketMessageEvent) => {\n this.debug('Received data');\n this._lastServerActivityTS = Date.now();\n\n if (this.logRawCommunication) {\n const rawChunkAsString =\n evt.data instanceof ArrayBuffer\n ? new TextDecoder().decode(evt.data)\n : evt.data;\n this.debug(`<<< ${rawChunkAsString}`);\n }\n\n parser.parseChunk(evt.data, this.appendMissingNULLonIncoming);\n };\n\n this._onclose = (closeEvent): void => {\n this.debug(`Connection closed to ${this._client.brokerURL}`);\n this._cleanUp();\n this.onWebSocketClose(closeEvent);\n };\n\n this._webSocket.onclose = this._onclose;\n\n this._webSocket.onerror = (errorEvent): void => {\n this.onWebSocketError(errorEvent);\n };\n\n this._webSocket.onopen = () => {\n // Clone before updating\n const connectHeaders = (Object as any).assign({}, this.connectHeaders);\n\n this.debug('Web Socket Opened...');\n connectHeaders['accept-version'] = this.stompVersions.supportedVersions();\n connectHeaders['heart-beat'] = [\n this.heartbeatOutgoing,\n this.heartbeatIncoming,\n ].join(',');\n this._transmit({ command: 'CONNECT', headers: connectHeaders });\n };\n }\n\n private readonly _serverFrameHandlers: {\n [key: string]: frameCallbackType;\n } = {\n // [CONNECTED Frame](http://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame)\n CONNECTED: frame => {\n this.debug(`connected to server ${frame.headers.server}`);\n this._connected = true;\n this._connectedVersion = frame.headers.version;\n // STOMP version 1.2 needs header values to be escaped\n if (this._connectedVersion === Versions.V1_2) {\n this._escapeHeaderValues = true;\n }\n\n this._setupHeartbeat(frame.headers);\n this.onConnect(frame);\n },\n\n // [MESSAGE Frame](http://stomp.github.com/stomp-specification-1.2.html#MESSAGE)\n MESSAGE: frame => {\n // the callback is registered when the client calls\n // `subscribe()`.\n // If there is no registered subscription for the received message,\n // the default `onUnhandledMessage` callback is used that the client can set.\n // This is useful for subscriptions that are automatically created\n // on the browser side (e.g. [RabbitMQ's temporary\n // queues](http://www.rabbitmq.com/stomp.html)).\n const subscription = frame.headers.subscription;\n const onReceive =\n this._subscriptions[subscription] || this.onUnhandledMessage;\n\n // bless the frame to be a Message\n const message = frame as IMessage;\n\n const client = this;\n const messageId =\n this._connectedVersion === Versions.V1_2\n ? message.headers.ack\n : message.headers['message-id'];\n\n // add `ack()` and `nack()` methods directly to the returned frame\n // so that a simple call to `message.ack()` can acknowledge the message.\n message.ack = (headers: StompHeaders = {}): void => {\n return client.ack(messageId, subscription, headers);\n };\n message.nack = (headers: StompHeaders = {}): void => {\n return client.nack(messageId, subscription, headers);\n };\n onReceive(message);\n },\n\n // [RECEIPT Frame](http://stomp.github.com/stomp-specification-1.2.html#RECEIPT)\n RECEIPT: frame => {\n const callback = this._receiptWatchers[frame.headers['receipt-id']];\n if (callback) {\n callback(frame);\n // Server will acknowledge only once, remove the callback\n delete this._receiptWatchers[frame.headers['receipt-id']];\n } else {\n this.onUnhandledReceipt(frame);\n }\n },\n\n // [ERROR Frame](http://stomp.github.com/stomp-specification-1.2.html#ERROR)\n ERROR: frame => {\n this.onStompError(frame);\n },\n };\n\n private _setupHeartbeat(headers: StompHeaders): void {\n if (\n headers.version !== Versions.V1_1 &&\n headers.version !== Versions.V1_2\n ) {\n return;\n }\n\n // It is valid for the server to not send this header\n // https://stomp.github.io/stomp-specification-1.2.html#Heart-beating\n if (!headers['heart-beat']) {\n return;\n }\n\n // heart-beat header received from the server looks like:\n //\n // heart-beat: sx, sy\n const [serverOutgoing, serverIncoming] = headers['heart-beat']\n .split(',')\n .map((v: string) => parseInt(v, 10));\n\n if (this.heartbeatOutgoing !== 0 && serverIncoming !== 0) {\n const ttl: number = Math.max(this.heartbeatOutgoing, serverIncoming);\n this.debug(`send PING every ${ttl}ms`);\n this._pinger = setInterval(() => {\n if (this._webSocket.readyState === StompSocketState.OPEN) {\n this._webSocket.send(BYTE.LF);\n this.debug('>>> PING');\n }\n }, ttl);\n }\n\n if (this.heartbeatIncoming !== 0 && serverOutgoing !== 0) {\n const ttl: number = Math.max(this.heartbeatIncoming, serverOutgoing);\n this.debug(`check PONG every ${ttl}ms`);\n this._ponger = setInterval(() => {\n const delta = Date.now() - this._lastServerActivityTS;\n // We wait twice the TTL to be flexible on window's setInterval calls\n if (delta > ttl * 2) {\n this.debug(`did not receive server activity for the last ${delta}ms`);\n this._closeOrDiscardWebsocket();\n }\n }, ttl);\n }\n }\n\n private _closeOrDiscardWebsocket() {\n if (this.discardWebsocketOnCommFailure) {\n this.debug(\n 'Discarding websocket, the underlying socket may linger for a while'\n );\n this._discardWebsocket();\n } else {\n this.debug('Issuing close on the websocket');\n this._closeWebsocket();\n }\n }\n\n public forceDisconnect() {\n if (this._webSocket) {\n if (\n this._webSocket.readyState === StompSocketState.CONNECTING ||\n this._webSocket.readyState === StompSocketState.OPEN\n ) {\n this._closeOrDiscardWebsocket();\n }\n }\n }\n\n public _closeWebsocket() {\n this._webSocket.onmessage = () => {}; // ignore messages\n this._webSocket.close();\n }\n\n private _discardWebsocket() {\n if (!this._webSocket.terminate) {\n augmentWebsocket(this._webSocket, (msg: string) => this.debug(msg));\n }\n\n this._webSocket.terminate();\n }\n\n private _transmit(params: {\n command: string;\n headers?: StompHeaders;\n body?: string;\n binaryBody?: Uint8Array;\n skipContentLengthHeader?: boolean;\n }): void {\n const { command, headers, body, binaryBody, skipContentLengthHeader } =\n params;\n const frame = new FrameImpl({\n command,\n headers,\n body,\n binaryBody,\n escapeHeaderValues: this._escapeHeaderValues,\n skipContentLengthHeader,\n });\n\n let rawChunk = frame.serialize();\n\n if (this.logRawCommunication) {\n this.debug(`>>> ${rawChunk}`);\n } else {\n this.debug(`>>> ${frame}`);\n }\n\n if (this.forceBinaryWSFrames && typeof rawChunk === 'string') {\n rawChunk = new TextEncoder().encode(rawChunk);\n }\n\n if (typeof rawChunk !== 'string' || !this.splitLargeFrames) {\n this._webSocket.send(rawChunk);\n } else {\n let out = rawChunk as string;\n while (out.length > 0) {\n const chunk = out.substring(0, this.maxWebSocketChunkSize);\n out = out.substring(this.maxWebSocketChunkSize);\n this._webSocket.send(chunk);\n this.debug(`chunk sent = ${chunk.length}, remaining = ${out.length}`);\n }\n }\n }\n\n public dispose(): void {\n if (this.connected) {\n try {\n // clone before updating\n const disconnectHeaders = (Object as any).assign(\n {},\n this.disconnectHeaders\n );\n\n if (!disconnectHeaders.receipt) {\n disconnectHeaders.receipt = `close-${this._counter++}`;\n }\n this.watchForReceipt(disconnectHeaders.receipt, frame => {\n this._closeWebsocket();\n this._cleanUp();\n this.onDisconnect(frame);\n });\n this._transmit({ command: 'DISCONNECT', headers: disconnectHeaders });\n } catch (error) {\n this.debug(`Ignoring error during disconnect ${error}`);\n }\n } else {\n if (\n this._webSocket.readyState === StompSocketState.CONNECTING ||\n this._webSocket.readyState === StompSocketState.OPEN\n ) {\n this._closeWebsocket();\n }\n }\n }\n\n private _cleanUp() {\n this._connected = false;\n\n if (this._pinger) {\n clearInterval(this._pinger);\n }\n if (this._ponger) {\n clearInterval(this._ponger);\n }\n }\n\n public publish(params: IPublishParams): void {\n const { destination, headers, body, binaryBody, skipContentLengthHeader } =\n params;\n const hdrs: StompHeaders = (Object as any).assign({ destination }, headers);\n this._transmit({\n command: 'SEND',\n headers: hdrs,\n body,\n binaryBody,\n skipContentLengthHeader,\n });\n }\n\n public watchForReceipt(receiptId: string, callback: frameCallbackType): void {\n this._receiptWatchers[receiptId] = callback;\n }\n\n public subscribe(\n destination: string,\n callback: messageCallbackType,\n headers: StompHeaders = {}\n ): StompSubscription {\n headers = (Object as any).assign({}, headers);\n\n if (!headers.id) {\n headers.id = `sub-${this._counter++}`;\n }\n headers.destination = destination;\n this._subscriptions[headers.id] = callback;\n this._transmit({ command: 'SUBSCRIBE', headers });\n const client = this;\n return {\n id: headers.id,\n\n unsubscribe(hdrs) {\n return client.unsubscribe(headers.id, hdrs);\n },\n };\n }\n\n public unsubscribe(id: string, headers: StompHeaders = {}): void {\n headers = (Object as any).assign({}, headers);\n\n delete this._subscriptions[id];\n headers.id = id;\n this._transmit({ command: 'UNSUBSCRIBE', headers });\n }\n\n public begin(transactionId: string): ITransaction {\n const txId = transactionId || `tx-${this._counter++}`;\n this._transmit({\n command: 'BEGIN',\n headers: {\n transaction: txId,\n },\n });\n const client = this;\n return {\n id: txId,\n commit(): void {\n client.commit(txId);\n },\n abort(): void {\n client.abort(txId);\n },\n };\n }\n\n public commit(transactionId: string): void {\n this._transmit({\n command: 'COMMIT',\n headers: {\n transaction: transactionId,\n },\n });\n }\n\n public abort(transactionId: string): void {\n this._transmit({\n command: 'ABORT',\n headers: {\n transaction: transactionId,\n },\n });\n }\n\n public ack(\n messageId: string,\n subscriptionId: string,\n headers: StompHeaders = {}\n ): void {\n headers = (Object as any).assign({}, headers);\n\n if (this._connectedVersion === Versions.V1_2) {\n headers.id = messageId;\n } else {\n headers['message-id'] = messageId;\n }\n headers.subscription = subscriptionId;\n this._transmit({ command: 'ACK', headers });\n }\n\n public nack(\n messageId: string,\n subscriptionId: string,\n headers: StompHeaders = {}\n ): void {\n headers = (Object as any).assign({}, headers);\n\n if (this._connectedVersion === Versions.V1_2) {\n headers.id = messageId;\n } else {\n headers['message-id'] = messageId;\n }\n headers.subscription = subscriptionId;\n return this._transmit({ command: 'NACK', headers });\n }\n}\n","import { IStompSocket } from './types';\n\n/**\n * @internal\n */\nexport function augmentWebsocket(\n webSocket: IStompSocket,\n debug: (msg: string) => void\n) {\n webSocket.terminate = function () {\n const noOp = () => {};\n\n // set all callbacks to no op\n this.onerror = noOp;\n this.onmessage = noOp;\n this.onopen = noOp;\n\n const ts = new Date();\n\n const origOnClose = this.onclose;\n\n // Track delay in actual closure of the socket\n this.onclose = closeEvent => {\n const delay = new Date().getTime() - ts.getTime();\n debug(\n `Discarded socket closed after ${delay}ms, with code/reason: ${closeEvent.code}/${closeEvent.reason}`\n );\n };\n\n this.close();\n\n origOnClose.call(this, {\n code: 4001,\n reason: 'Heartbeat failure, discarding the socket',\n wasClean: false,\n });\n };\n}\n","import { ITransaction } from './i-transaction';\nimport { StompConfig } from './stomp-config';\nimport { StompHandler } from './stomp-handler';\nimport { StompHeaders } from './stomp-headers';\nimport { StompSubscription } from './stomp-subscription';\nimport {\n ActivationState,\n closeEventCallbackType,\n debugFnType,\n frameCallbackType,\n IPublishParams,\n IStompSocket,\n messageCallbackType,\n StompSocketState,\n wsErrorCallbackType,\n} from './types';\nimport { Versions } from './versions';\n\n/**\n * @internal\n */\ndeclare const WebSocket: {\n prototype: IStompSocket;\n new (url: string, protocols?: string | string[]): IStompSocket;\n};\n\n/**\n * STOMP Client Class.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class Client {\n /**\n * The URL for the STOMP broker to connect to.\n * Typically like `\"ws://broker.329broker.com:15674/ws\"` or `\"wss://broker.329broker.com:15674/ws\"`.\n *\n * Only one of this or [Client#webSocketFactory]{@link Client#webSocketFactory} need to be set.\n * If both are set, [Client#webSocketFactory]{@link Client#webSocketFactory} will be used.\n *\n * If your environment does not support WebSockets natively, please refer to\n * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.\n */\n public brokerURL: string;\n\n /**\n * STOMP versions to attempt during STOMP handshake. By default versions `1.0`, `1.1`, and `1.2` are attempted.\n *\n * Example:\n * ```javascript\n * // Try only versions 1.0 and 1.1\n * client.stompVersions = new Versions(['1.0', '1.1'])\n * ```\n */\n public stompVersions = Versions.default;\n\n /**\n * This function should return a WebSocket or a similar (e.g. SockJS) object.\n * If your environment does not support WebSockets natively, please refer to\n * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.\n * If your STOMP Broker supports WebSockets, prefer setting [Client#brokerURL]{@link Client#brokerURL}.\n *\n * If both this and [Client#brokerURL]{@link Client#brokerURL} are set, this will be used.\n *\n * Example:\n * ```javascript\n * // use a WebSocket\n * client.webSocketFactory= function () {\n * return new WebSocket(\"wss://broker.329broker.com:15674/ws\");\n * };\n *\n * // Typical usage with SockJS\n * client.webSocketFactory= function () {\n * return new SockJS(\"http://broker.329broker.com/stomp\");\n * };\n * ```\n */\n public webSocketFactory: () => IStompSocket;\n\n /**\n * Will retry if Stomp connection is not established in specified milliseconds.\n * Default 0, which implies wait for ever.\n */\n public connectionTimeout: number = 0;\n\n private _connectionWatcher: number; // Timer\n\n /**\n * automatically reconnect with delay in milliseconds, set to 0 to disable.\n */\n public reconnectDelay: number = 5000;\n\n /**\n * Incoming heartbeat interval in milliseconds. Set to 0 to disable.\n */\n public heartbeatIncoming: number = 10000;\n\n /**\n * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.\n */\n public heartbeatOutgoing: number = 10000;\n\n /**\n * This switches on a non standard behavior while sending WebSocket packets.\n * It splits larger (text) packets into chunks of [maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.\n * Only Java Spring brokers seems to use this mode.\n *\n * WebSockets, by itself, split large (text) packets,\n * so it is not needed with a truly compliant STOMP/WebSocket broker.\n * Actually setting it for such broker will cause large messages to fail.\n *\n * `false` by default.\n *\n * Binary frames are never split.\n */\n public splitLargeFrames: boolean = false;\n\n /**\n * See [splitLargeFrames]{@link Client#splitLargeFrames}.\n * This has no effect if [splitLargeFrames]{@link Client#splitLargeFrames} is `false`.\n */\n public maxWebSocketChunkSize: number = 8 * 1024;\n\n /**\n * Usually the\n * [type of WebSocket frame]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send#Parameters}\n * is automatically decided by type of the payload.\n * Default is `false`, which should work with all compliant brokers.\n *\n * Set this flag to force binary frames.\n */\n public forceBinaryWSFrames: boolean = false;\n\n /**\n * A bug in ReactNative chops a string on occurrence of a NULL.\n * See issue [https://github.com/stomp-js/stompjs/issues/89]{@link https://github.com/stomp-js/stompjs/issues/89}.\n * This makes incoming WebSocket messages invalid STOMP packets.\n * Setting this flag attempts to reverse the damage by appending a NULL.\n * If the broker splits a large message into multiple WebSocket messages,\n * this flag will cause data loss and abnormal termination of connection.\n *\n * This is not an ideal solution, but a stop gap until the underlying issue is fixed at ReactNative library.\n */\n public appendMissingNULLonIncoming: boolean = false;\n\n /**\n * Underlying WebSocket instance, READONLY.\n */\n get webSocket(): IStompSocket {\n return this._stompHandler ? this._stompHandler._webSocket : undefined;\n }\n\n /**\n * Connection headers, important keys - `login`, `passcode`, `host`.\n * Though STOMP 1.2 standard marks these keys to be present, check your broker documentation for\n * details specific to your broker.\n */\n public connectHeaders: StompHeaders;\n\n /**\n * Disconnection headers.\n */\n get disconnectHeaders(): StompHeaders {\n return this._disconnectHeaders;\n }\n\n set disconnectHeaders(value: StompHeaders) {\n this._disconnectHeaders = value;\n if (this._stompHandler) {\n this._stompHandler.disconnectHeaders = this._disconnectHeaders;\n }\n }\n private _disconnectHeaders: StompHeaders;\n\n /**\n * This function will be called for any unhandled messages.\n * It is useful for receiving messages sent to RabbitMQ temporary queues.\n *\n * It can also get invoked with stray messages while the server is processing\n * a request to [Client#unsubscribe]{@link Client#unsubscribe}\n * from an endpoint.\n *\n * The actual {@link IMessage} will be passed as parameter to the callback.\n */\n public onUnhandledMessage: messageCallbackType;\n\n /**\n * STOMP brokers can be requested to notify when an operation is actually completed.\n * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}. See\n * [Client#watchForReceipt]{@link Client#watchForReceipt} for examples.\n *\n * The actual {@link FrameImpl} will be passed as parameter to the callback.\n */\n public onUnhandledReceipt: frameCallbackType;\n\n /**\n * Will be invoked if {@link FrameImpl} of unknown type is received from the STOMP broker.\n *\n * The actual {@link IFrame} will be passed as parameter to the callback.\n */\n public onUnhandledFrame: frameCallbackType;\n\n /**\n * `true` if there is a active connection with STOMP Broker\n */\n get connected(): boolean {\n return !!this._stompHandler && this._stompHandler.connected;\n }\n\n /**\n * Callback, invoked on before a connection connection to the STOMP broker.\n *\n * You can change options on the client, which will impact the immediate connect.\n * It is valid to call [Client#decativate]{@link Client#deactivate} in this callback.\n *\n * As of version 5.1, this callback can be\n * [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)\n * (i.e., it can return a\n * [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)).\n * In that case connect will be called only after the Promise is resolved.\n * This can be used to reliably fetch credentials, access token etc. from some other service\n * in an asynchronous way.\n */\n public beforeConnect: () => void | Promise;\n\n /**\n * Callback, invoked on every successful connection to the STOMP broker.\n *\n * The actual {@link FrameImpl} will be passed as parameter to the callback.\n * Sometimes clients will like to use headers from this frame.\n */\n public onConnect: frameCallbackType;\n\n /**\n * Callback, invoked on every successful disconnection from the STOMP broker. It will not be invoked if\n * the STOMP broker disconnected due to an error.\n *\n * The actual Receipt {@link FrameImpl} acknowledging the DISCONNECT will be passed as parameter to the callback.\n *\n * The way STOMP protocol is designed, the connection may close/terminate without the client\n * receiving the Receipt {@link FrameImpl} acknowledging the DISCONNECT.\n * You might find [Client#onWebSocketClose]{@link Client#onWebSocketClose} more appropriate to watch\n * STOMP broker disconnects.\n */\n public onDisconnect: frameCallbackType;\n\n /**\n * Callback, invoked on an ERROR frame received from the STOMP Broker.\n * A compliant STOMP Broker will close the connection after this type of frame.\n * Please check broker specific documentation for exact behavior.\n *\n * The actual {@link IFrame} will be passed as parameter to the callback.\n */\n public onStompError: frameCallbackType;\n\n /**\n * Callback, invoked when underlying WebSocket is closed.\n *\n * Actual [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}\n * is passed as parameter to the callback.\n */\n public onWebSocketClose: closeEventCallbackType;\n\n /**\n * Callback, invoked when underlying WebSocket raises an error.\n *\n * Actual [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}\n * is passed as parameter to the callback.\n */\n public onWebSocketError: wsErrorCallbackType;\n\n /**\n * Set it to log the actual raw communication with the broker.\n * When unset, it logs headers of the parsed frames.\n *\n * Change in this effects from next broker reconnect.\n *\n * **Caution: this assumes that frames only have valid UTF8 strings.**\n */\n public logRawCommunication: boolean;\n\n /**\n * By default, debug messages are discarded. To log to `console` following can be used:\n *\n * ```javascript\n * client.debug = function(str) {\n * console.log(str);\n * };\n * ```\n *\n * Currently this method does not support levels of log. Be aware that the output can be quite verbose\n * and may contain sensitive information (like passwords, tokens etc.).\n */\n public debug: debugFnType;\n\n /**\n * Browsers do not immediately close WebSockets when `.close` is issued.\n * This may cause reconnection to take a longer on certain type of failures.\n * In case of incoming heartbeat failure, this experimental flag instructs the library\n * to discard the socket immediately (even before it is actually closed).\n */\n public discardWebsocketOnCommFailure: boolean;\n\n /**\n * version of STOMP protocol negotiated with the server, READONLY\n */\n get connectedVersion(): string {\n return this._stompHandler ? this._stompHandler.connectedVersion : undefined;\n }\n\n private _stompHandler: StompHandler;\n\n /**\n * if the client is active (connected or going to reconnect)\n */\n get active(): boolean {\n return this.state === ActivationState.ACTIVE;\n }\n\n /**\n * It will be called on state change.\n *\n * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.\n */\n public onChangeState: (state: ActivationState) => void;\n\n private _changeState(state: ActivationState) {\n this.state = state;\n this.onChangeState(state);\n }\n\n // This will mark deactivate to complete, to be called after Websocket is closed\n private _resolveSocketClose: (value?: PromiseLike | void) => void;\n\n /**\n * Activation state.\n *\n * It will usually be ACTIVE or INACTIVE.\n * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.\n */\n public state: ActivationState = ActivationState.INACTIVE;\n\n private _reconnector: any;\n\n /**\n * Create an instance.\n */\n constructor(conf: StompConfig = {}) {\n // Dummy callbacks\n const noOp = () => {};\n this.debug = noOp;\n this.beforeConnect = noOp;\n this.onConnect = noOp;\n this.onDisconnect = noOp;\n this.onUnhandledMessage = noOp;\n this.onUnhandledReceipt = noOp;\n this.onUnhandledFrame = noOp;\n this.onStompError = noOp;\n this.onWebSocketClose = noOp;\n this.onWebSocketError = noOp;\n this.logRawCommunication = false;\n this.onChangeState = noOp;\n\n // These parameters would typically get proper values before connect is called\n this.connectHeaders = {};\n this._disconnectHeaders = {};\n\n // Apply configuration\n this.configure(conf);\n }\n\n /**\n * Update configuration.\n */\n public configure(conf: StompConfig): void {\n // bulk assign all properties to this\n (Object as any).assign(this, conf);\n }\n\n /**\n * Initiate the connection with the broker.\n * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},\n * it will keep trying to reconnect.\n *\n * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.\n */\n public activate(): void {\n if (this.state === ActivationState.DEACTIVATING) {\n this.debug(\n 'Still DEACTIVATING, please await call to deactivate before trying to re-activate'\n );\n throw new Error('Still DEACTIVATING, can not activate now');\n }\n\n if (this.active) {\n this.debug('Already ACTIVE, ignoring request to activate');\n return;\n }\n\n this._changeState(ActivationState.ACTIVE);\n\n this._connect();\n }\n\n private async _connect(): Promise {\n if (this.connected) {\n this.debug('STOMP: already connected, nothing to do');\n return;\n }\n\n await this.beforeConnect();\n\n if (!this.active) {\n this.debug(\n 'Client has been marked inactive, will not attempt to connect'\n );\n return;\n }\n\n // setup connection watcher\n if (this.connectionTimeout > 0) {\n // clear first\n if (this._connectionWatcher) {\n clearTimeout(this._connectionWatcher);\n }\n this._connectionWatcher = setTimeout(() => {\n if (this.connected) {\n return;\n }\n // Connection not established, close the underlying socket\n // a reconnection will be attempted\n this.debug(\n `Connection not established in ${this.connectionTimeout}ms, closing socket`\n );\n this.forceDisconnect();\n }, this.connectionTimeout);\n }\n\n this.debug('Opening Web Socket...');\n\n // Get the actual WebSocket (or a similar object)\n const webSocket = this._createWebSocket();\n\n this._stompHandler = new StompHandler(this, webSocket, {\n debug: this.debug,\n stompVersions: this.stompVersions,\n connectHeaders: this.connectHeaders,\n disconnectHeaders: this._disconnectHeaders,\n heartbeatIncoming: this.heartbeatIncoming,\n heartbeatOutgoing: this.heartbeatOutgoing,\n splitLargeFrames: this.splitLargeFrames,\n maxWebSocketChunkSize: this.maxWebSocketChunkSize,\n forceBinaryWSFrames: this.forceBinaryWSFrames,\n logRawCommunication: this.logRawCommunication,\n appendMissingNULLonIncoming: this.appendMissingNULLonIncoming,\n discardWebsocketOnCommFailure: this.discardWebsocketOnCommFailure,\n\n onConnect: frame => {\n // Successfully connected, stop the connection watcher\n if (this._connectionWatcher) {\n clearTimeout(this._connectionWatcher);\n this._connectionWatcher = undefined;\n }\n\n if (!this.active) {\n this.debug(\n 'STOMP got connected while deactivate was issued, will disconnect now'\n );\n this._disposeStompHandler();\n return;\n }\n this.onConnect(frame);\n },\n onDisconnect: frame => {\n this.onDisconnect(frame);\n },\n onStompError: frame => {\n this.onStompError(frame);\n },\n onWebSocketClose: evt => {\n this._stompHandler = undefined; // a new one will be created in case of a reconnect\n\n if (this.state === ActivationState.DEACTIVATING) {\n // Mark deactivation complete\n this._resolveSocketClose();\n this._resolveSocketClose = undefined;\n this._changeState(ActivationState.INACTIVE);\n }\n\n this.onWebSocketClose(evt);\n // The callback is called before attempting to reconnect, this would allow the client\n // to be `deactivated` in the callback.\n if (this.active) {\n this._schedule_reconnect();\n }\n },\n onWebSocketError: evt => {\n this.onWebSocketError(evt);\n },\n onUnhandledMessage: message => {\n this.onUnhandledMessage(message);\n },\n onUnhandledReceipt: frame => {\n this.onUnhandledReceipt(frame);\n },\n onUnhandledFrame: frame => {\n this.onUnhandledFrame(frame);\n },\n });\n\n this._stompHandler.start();\n }\n\n private _createWebSocket(): IStompSocket {\n let webSocket: IStompSocket;\n\n if (this.webSocketFactory) {\n webSocket = this.webSocketFactory();\n } else {\n webSocket = new WebSocket(\n this.brokerURL,\n this.stompVersions.protocolVersions()\n );\n }\n webSocket.binaryType = 'arraybuffer';\n return webSocket;\n }\n\n private _schedule_reconnect(): void {\n if (this.reconnectDelay > 0) {\n this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`);\n\n this._reconnector = setTimeout(() => {\n this._connect();\n }, this.reconnectDelay);\n }\n }\n\n /**\n * Disconnect if connected and stop auto reconnect loop.\n * Appropriate callbacks will be invoked if underlying STOMP connection was connected.\n *\n * This call is async, it will resolve immediately if there is no underlying active websocket,\n * otherwise, it will resolve after underlying websocket is properly disposed.\n *\n * To reactivate you can call [Client#activate]{@link Client#activate}.\n */\n public async deactivate(): Promise {\n let retPromise: Promise;\n\n if (this.state !== ActivationState.ACTIVE) {\n this.debug(\n `Already ${ActivationState[this.state]}, ignoring call to deactivate`\n );\n return Promise.resolve();\n }\n\n this._changeState(ActivationState.DEACTIVATING);\n\n // Clear if a reconnection was scheduled\n if (this._reconnector) {\n clearTimeout(this._reconnector);\n }\n\n if (\n this._stompHandler &&\n this.webSocket.readyState !== StompSocketState.CLOSED\n ) {\n // we need to wait for underlying websocket to close\n retPromise = new Promise((resolve, reject) => {\n this._resolveSocketClose = resolve;\n });\n } else {\n // indicate that auto reconnect loop should terminate\n this._changeState(ActivationState.INACTIVE);\n return Promise.resolve();\n }\n\n this._disposeStompHandler();\n\n return retPromise;\n }\n\n /**\n * Force disconnect if there is an active connection by directly closing the underlying WebSocket.\n * This is different than a normal disconnect where a DISCONNECT sequence is carried out with the broker.\n * After forcing disconnect, automatic reconnect will be attempted.\n * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.\n */\n public forceDisconnect() {\n if (this._stompHandler) {\n this._stompHandler.forceDisconnect();\n }\n }\n\n private _disposeStompHandler() {\n // Dispose STOMP Handler\n if (this._stompHandler) {\n this._stompHandler.dispose();\n this._stompHandler = null;\n }\n }\n\n /**\n * Send a message to a named destination. Refer to your STOMP broker documentation for types\n * and naming of destinations.\n *\n * STOMP protocol specifies and suggests some headers and also allows broker specific headers.\n *\n * `body` must be String.\n * You will need to covert the payload to string in case it is not string (e.g. JSON).\n *\n * To send a binary message body use binaryBody parameter. It should be a\n * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).\n * Sometimes brokers may not support binary frames out of the box.\n * Please check your broker documentation.\n *\n * `content-length` header is automatically added to the STOMP Frame sent to the broker.\n * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.\n * For binary messages `content-length` header is always added.\n *\n * Caution: The broker will, most likely, report an error and disconnect if message body has NULL octet(s)\n * and `content-length` header is missing.\n *\n * ```javascript\n * client.publish({destination: \"/queue/test\", headers: {priority: 9}, body: \"Hello, STOMP\"});\n *\n * // Only destination is mandatory parameter\n * client.publish({destination: \"/queue/test\", body: \"Hello, STOMP\"});\n *\n * // Skip content-length header in the frame to the broker\n * client.publish({\"/queue/test\", body: \"Hello, STOMP\", skipContentLengthHeader: true});\n *\n * var binaryData = generateBinaryData(); // This need to be of type Uint8Array\n * // setting content-type header is not mandatory, however a good practice\n * client.publish({destination: '/topic/special', binaryBody: binaryData,\n * headers: {'content-type': 'application/octet-stream'}});\n * ```\n */\n public publish(params: IPublishParams) {\n this._stompHandler.publish(params);\n }\n\n /**\n * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.\n * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.\n * The value (say receipt-id) for this header needs to be unique for each use. Typically a sequence, a UUID, a\n * random number or a combination may be used.\n *\n * A complaint broker will send a RECEIPT frame when an operation has actually been completed.\n * The operation needs to be matched based in the value of the receipt-id.\n *\n * This method allow watching for a receipt and invoke the callback\n * when corresponding receipt has been received.\n *\n * The actual {@link FrameImpl} will be passed as parameter to the callback.\n *\n * Example:\n * ```javascript\n * // Subscribing with acknowledgement\n * let receiptId = randomText();\n *\n * client.watchForReceipt(receiptId, function() {\n * // Will be called after server acknowledges\n * });\n *\n * client.subscribe(TEST.destination, onMessage, {receipt: receiptId});\n *\n *\n * // Publishing with acknowledgement\n * receiptId = randomText();\n *\n * client.watchForReceipt(receiptId, function() {\n * // Will be called after server acknowledges\n * });\n * client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});\n * ```\n */\n public watchForReceipt(receiptId: string, callback: frameCallbackType): void {\n this._stompHandler.watchForReceipt(receiptId, callback);\n }\n\n /**\n * Subscribe to a STOMP Broker location. The callback will be invoked for each received message with\n * the {@link IMessage} as argument.\n *\n * Note: The library will generate an unique ID if there is none provided in the headers.\n * To use your own ID, pass it using the headers argument.\n *\n * ```javascript\n * callback = function(message) {\n * // called when the client receives a STOMP message from the server\n * if (message.body) {\n * alert(\"got message with body \" + message.body)\n * } else {\n * alert(\"got empty message\");\n * }\n * });\n *\n * var subscription = client.subscribe(\"/queue/test\", callback);\n *\n * // Explicit subscription id\n * var mySubId = 'my-subscription-id-001';\n * var subscription = client.subscribe(destination, callback, { id: mySubId });\n * ```\n */\n public subscribe(\n destination: string,\n callback: messageCallbackType,\n headers: StompHeaders = {}\n ): StompSubscription {\n return this._stompHandler.subscribe(destination, callback, headers);\n }\n\n /**\n * It is preferable to unsubscribe from a subscription by calling\n * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:\n *\n * ```javascript\n * var subscription = client.subscribe(destination, onmessage);\n * // ...\n * subscription.unsubscribe();\n * ```\n *\n * See: http://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame\n */\n public unsubscribe(id: string, headers: StompHeaders = {}): void {\n this._stompHandler.unsubscribe(id, headers);\n }\n\n /**\n * Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit}\n * and [abort]{@link ITransaction#abort}.\n *\n * `transactionId` is optional, if not passed the library will generate it internally.\n */\n public begin(transactionId?: string): ITransaction {\n return this._stompHandler.begin(transactionId);\n }\n\n /**\n * Commit a transaction.\n *\n * It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on\n * {@link ITransaction} returned by [client.begin]{@link Client#begin}.\n *\n * ```javascript\n * var tx = client.begin(txId);\n * //...\n * tx.commit();\n * ```\n */\n public commit(transactionId: string): void {\n this._stompHandler.commit(transactionId);\n }\n\n /**\n * Abort a transaction.\n * It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on\n * {@link ITransaction} returned by [client.begin]{@link Client#begin}.\n *\n * ```javascript\n * var tx = client.begin(txId);\n * //...\n * tx.abort();\n * ```\n */\n public abort(transactionId: string): void {\n this._stompHandler.abort(transactionId);\n }\n\n /**\n * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly\n * on the {@link IMessage} handled by a subscription callback:\n *\n * ```javascript\n * var callback = function (message) {\n * // process the message\n * // acknowledge it\n * message.ack();\n * };\n * client.subscribe(destination, callback, {'ack': 'client'});\n * ```\n */\n public ack(\n messageId: string,\n subscriptionId: string,\n headers: StompHeaders = {}\n ): void {\n this._stompHandler.ack(messageId, subscriptionId, headers);\n }\n\n /**\n * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly\n * on the {@link IMessage} handled by a subscription callback:\n *\n * ```javascript\n * var callback = function (message) {\n * // process the message\n * // an error occurs, nack it\n * message.nack();\n * };\n * client.subscribe(destination, callback, {'ack': 'client'});\n * ```\n */\n public nack(\n messageId: string,\n subscriptionId: string,\n headers: StompHeaders = {}\n ): void {\n this._stompHandler.nack(messageId, subscriptionId, headers);\n }\n}\n","import { StompHeaders } from './stomp-headers';\nimport {\n ActivationState,\n closeEventCallbackType,\n debugFnType,\n frameCallbackType,\n messageCallbackType,\n wsErrorCallbackType,\n} from './types';\nimport { Versions } from './versions';\n\n/**\n * Configuration options for STOMP Client, each key corresponds to\n * field by the same name in {@link Client}. This can be passed to\n * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.\n *\n * There used to be a class with the same name in `@stomp/ng2-stompjs`, which has been replaced by\n * {@link RxStompConfig} and {@link InjectableRxStompConfig}.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class StompConfig {\n /**\n * See [Client#brokerURL]{@link Client#brokerURL}.\n */\n public brokerURL?: string;\n\n /**\n * See See [Client#stompVersions]{@link Client#stompVersions}.\n */\n public stompVersions?: Versions;\n\n /**\n * See [Client#webSocketFactory]{@link Client#webSocketFactory}.\n */\n public webSocketFactory?: () => any;\n\n /**\n * See [Client#connectionTimeout]{@link Client#connectionTimeout}.\n */\n public connectionTimeout?: number;\n\n /**\n * See [Client#reconnectDelay]{@link Client#reconnectDelay}.\n */\n public reconnectDelay?: number;\n\n /**\n * See [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}.\n */\n public heartbeatIncoming?: number;\n\n /**\n * See [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n */\n public heartbeatOutgoing?: number;\n\n /**\n * See [Client#splitLargeFrames]{@link Client#splitLargeFrames}.\n */\n public splitLargeFrames?: boolean;\n\n /**\n * See [Client#forceBinaryWSFrames]{@link Client#forceBinaryWSFrames}.\n */\n public forceBinaryWSFrames?: boolean;\n\n /**\n * See [Client#appendMissingNULLonIncoming]{@link Client#appendMissingNULLonIncoming}.\n */\n public appendMissingNULLonIncoming?: boolean;\n\n /**\n * See [Client#maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.\n */\n public maxWebSocketChunkSize?: number;\n\n /**\n * See [Client#connectHeaders]{@link Client#connectHeaders}.\n */\n public connectHeaders?: StompHeaders;\n\n /**\n * See [Client#disconnectHeaders]{@link Client#disconnectHeaders}.\n */\n public disconnectHeaders?: StompHeaders;\n\n /**\n * See [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n */\n public onUnhandledMessage?: messageCallbackType;\n\n /**\n * See [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n */\n public onUnhandledReceipt?: frameCallbackType;\n\n /**\n * See [Client#onUnhandledFrame]{@link Client#onUnhandledFrame}.\n */\n public onUnhandledFrame?: frameCallbackType;\n\n /**\n * See [Client#beforeConnect]{@link Client#beforeConnect}.\n */\n public beforeConnect?: () => void | Promise;\n\n /**\n * See [Client#onConnect]{@link Client#onConnect}.\n */\n public onConnect?: frameCallbackType;\n\n /**\n * See [Client#onDisconnect]{@link Client#onDisconnect}.\n */\n public onDisconnect?: frameCallbackType;\n\n /**\n * See [Client#onStompError]{@link Client#onStompError}.\n */\n public onStompError?: frameCallbackType;\n\n /**\n * See [Client#onWebSocketClose]{@link Client#onWebSocketClose}.\n */\n public onWebSocketClose?: closeEventCallbackType;\n\n /**\n * See [Client#onWebSocketError]{@link Client#onWebSocketError}.\n */\n public onWebSocketError?: wsErrorCallbackType;\n\n /**\n * See [Client#logRawCommunication]{@link Client#logRawCommunication}.\n */\n public logRawCommunication?: boolean;\n\n /**\n * See [Client#debug]{@link Client#debug}.\n */\n public debug?: debugFnType;\n\n /**\n * See [Client#discardWebsocketOnCommFailure]{@link Client#discardWebsocketOnCommFailure}.\n */\n public discardWebsocketOnCommFailure?: boolean;\n\n /**\n * See [Client#onChangeState]{@link Client#onChangeState}.\n */\n public onChangeState?: (state: ActivationState) => void;\n}\n","/**\n * STOMP headers. Many functions calls will accept headers as parameters.\n * The headers sent by Broker will be available as [IFrame#headers]{@link IFrame#headers}.\n *\n * `key` and `value` must be valid strings.\n * In addition, `key` must not contain `CR`, `LF`, or `:`.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class StompHeaders {\n [key: string]: string;\n}\n","import { StompHeaders } from './stomp-headers';\n\n/**\n * Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class StompSubscription {\n /**\n * Id associated with this subscription.\n */\n public id: string;\n\n /**\n * Unsubscribe. See [Client#unsubscribe]{@link Client#unsubscribe} for an example.\n */\n public unsubscribe: (headers?: StompHeaders) => void;\n}\n","import { CompatClient } from './compat-client';\n\n/**\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport class HeartbeatInfo {\n constructor(private client: CompatClient) {}\n\n get outgoing(): number {\n return this.client.heartbeatOutgoing;\n }\n\n set outgoing(value: number) {\n this.client.heartbeatOutgoing = value;\n }\n\n get incoming(): number {\n return this.client.heartbeatIncoming;\n }\n\n set incoming(value: number) {\n this.client.heartbeatIncoming = value;\n }\n}\n","import { Client } from '../client';\nimport { StompHeaders } from '../stomp-headers';\nimport { frameCallbackType, messageCallbackType } from '../types';\nimport { HeartbeatInfo } from './heartbeat-info';\n\n/**\n * Available for backward compatibility, please shift to using {@link Client}.\n *\n * **Deprecated**\n *\n * Part of `@stomp/stompjs`.\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\nexport class CompatClient extends Client {\n /**\n * It is no op now. No longer needed. Large packets work out of the box.\n */\n public maxWebSocketFrameSize: number = 16 * 1024;\n\n /**\n * Available for backward compatibility, please shift to using {@link Client}\n * and [Client#webSocketFactory]{@link Client#webSocketFactory}.\n *\n * **Deprecated**\n *\n * @internal\n */\n constructor(webSocketFactory: () => any) {\n super();\n this.reconnect_delay = 0;\n this.webSocketFactory = webSocketFactory;\n // Default from previous version\n this.debug = (...message: any[]) => {\n console.log(...message);\n };\n }\n\n private _parseConnect(...args: any[]): any {\n let closeEventCallback;\n let connectCallback;\n let errorCallback;\n let headers: StompHeaders = {};\n if (args.length < 2) {\n throw new Error('Connect requires at least 2 arguments');\n }\n if (typeof args[1] === 'function') {\n [headers, connectCallback, errorCallback, closeEventCallback] = args;\n } else {\n switch (args.length) {\n case 6:\n [\n headers.login,\n headers.passcode,\n connectCallback,\n errorCallback,\n closeEventCallback,\n headers.host,\n ] = args;\n break;\n default:\n [\n headers.login,\n headers.passcode,\n connectCallback,\n errorCallback,\n closeEventCallback,\n ] = args;\n }\n }\n\n return [headers, connectCallback, errorCallback, closeEventCallback];\n }\n\n /**\n * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.\n *\n * **Deprecated**\n *\n * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the\n * version with headers to pass your broker specific options.\n *\n * overloads:\n * - connect(headers, connectCallback)\n * - connect(headers, connectCallback, errorCallback)\n * - connect(login, passcode, connectCallback)\n * - connect(login, passcode, connectCallback, errorCallback)\n * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)\n * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)\n *\n * params:\n * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}\n * - connectCallback, see [Client#onConnect]{@link Client#onConnect}\n * - errorCallback, see [Client#onStompError]{@link Client#onStompError}\n * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}\n * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)\n * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)\n * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public connect(...args: any[]): void {\n const out = this._parseConnect(...args);\n\n if (out[0]) {\n this.connectHeaders = out[0];\n }\n if (out[1]) {\n this.onConnect = out[1];\n }\n if (out[2]) {\n this.onStompError = out[2];\n }\n if (out[3]) {\n this.onWebSocketClose = out[3];\n }\n\n super.activate();\n }\n\n /**\n * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.\n *\n * **Deprecated**\n *\n * See:\n * [Client#onDisconnect]{@link Client#onDisconnect}, and\n * [Client#disconnectHeaders]{@link Client#disconnectHeaders}\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public disconnect(\n disconnectCallback?: any,\n headers: StompHeaders = {}\n ): void {\n if (disconnectCallback) {\n this.onDisconnect = disconnectCallback;\n }\n this.disconnectHeaders = headers;\n\n super.deactivate();\n }\n\n /**\n * Available for backward compatibility, use [Client#publish]{@link Client#publish}.\n *\n * Send a message to a named destination. Refer to your STOMP broker documentation for types\n * and naming of destinations. The headers will, typically, be available to the subscriber.\n * However, there may be special purpose headers corresponding to your STOMP broker.\n *\n * **Deprecated**, use [Client#publish]{@link Client#publish}\n *\n * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)\n *\n * ```javascript\n * client.send(\"/queue/test\", {priority: 9}, \"Hello, STOMP\");\n *\n * // If you want to send a message with a body, you must also pass the headers argument.\n * client.send(\"/queue/test\", {}, \"Hello, STOMP\");\n * ```\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public send(\n destination: string,\n headers: { [key: string]: any } = {},\n body: string = ''\n ): void {\n headers = (Object as any).assign({}, headers);\n\n const skipContentLengthHeader = headers['content-length'] === false;\n if (skipContentLengthHeader) {\n delete headers['content-length'];\n }\n this.publish({\n destination,\n headers: headers as StompHeaders,\n body,\n skipContentLengthHeader,\n });\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.\n *\n * **Deprecated**\n */\n set reconnect_delay(value: number) {\n this.reconnectDelay = value;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.\n *\n * **Deprecated**\n */\n get ws(): any {\n return this.webSocket;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.\n *\n * **Deprecated**\n */\n get version() {\n return this.connectedVersion;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n *\n * **Deprecated**\n */\n get onreceive(): messageCallbackType {\n return this.onUnhandledMessage;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n *\n * **Deprecated**\n */\n set onreceive(value: messageCallbackType) {\n this.onUnhandledMessage = value;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.\n *\n * **Deprecated**\n */\n get onreceipt(): frameCallbackType {\n return this.onUnhandledReceipt;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n *\n * **Deprecated**\n */\n set onreceipt(value: frameCallbackType) {\n this.onUnhandledReceipt = value;\n }\n\n private _heartbeatInfo: HeartbeatInfo = new HeartbeatInfo(this);\n\n /**\n * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}\n * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n *\n * **Deprecated**\n */\n get heartbeat() {\n return this._heartbeatInfo;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}\n * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n *\n * **Deprecated**\n */\n set heartbeat(value: { incoming: number; outgoing: number }) {\n this.heartbeatIncoming = value.incoming;\n this.heartbeatOutgoing = value.outgoing;\n }\n}\n","import { Versions } from '../versions';\nimport { CompatClient } from './compat-client';\nimport { IStompSocket } from '../types';\n\n/**\n * @internal\n */\ndeclare const WebSocket: {\n prototype: IStompSocket;\n new (url: string, protocols?: string | string[]): IStompSocket;\n};\n\n/**\n * STOMP Class, acts like a factory to create {@link Client}.\n *\n * Part of `@stomp/stompjs`.\n *\n * **Deprecated**\n *\n * It will be removed in next major version. Please switch to {@link Client}.\n */\nexport class Stomp {\n /**\n * In case you need to use a non standard class for WebSocket.\n *\n * For example when using within NodeJS environment:\n *\n * ```javascript\n * StompJs = require('../../esm5/');\n * Stomp = StompJs.Stomp;\n * Stomp.WebSocketClass = require('websocket').w3cwebsocket;\n * ```\n *\n * **Deprecated**\n *\n *\n * It will be removed in next major version. Please switch to {@link Client}\n * using [Client#webSocketFactory]{@link Client#webSocketFactory}.\n */\n // tslint:disable-next-line:variable-name\n public static WebSocketClass: any = null;\n\n /**\n * This method creates a WebSocket client that is connected to\n * the STOMP server located at the url.\n *\n * ```javascript\n * var url = \"ws://localhost:61614/stomp\";\n * var client = Stomp.client(url);\n * ```\n *\n * **Deprecated**\n *\n * It will be removed in next major version. Please switch to {@link Client}\n * using [Client#brokerURL]{@link Client#brokerURL}.\n */\n public static client(url: string, protocols?: string[]): CompatClient {\n // This is a hack to allow another implementation than the standard\n // HTML5 WebSocket class.\n //\n // It is possible to use another class by calling\n //\n // Stomp.WebSocketClass = MozWebSocket\n //\n // *prior* to call `Stomp.client()`.\n //\n // This hack is deprecated and `Stomp.over()` method should be used\n // instead.\n\n // See remarks on the function Stomp.over\n if (protocols == null) {\n protocols = Versions.default.protocolVersions();\n }\n const wsFn = () => {\n const klass = Stomp.WebSocketClass || WebSocket;\n return new klass(url, protocols);\n };\n\n return new CompatClient(wsFn);\n }\n\n /**\n * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user\n * specify the WebSocket to use (either a standard HTML5 WebSocket or\n * a similar object).\n *\n * In order to support reconnection, the function Client._connect should be callable more than once.\n * While reconnecting\n * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function\n * alternatively allows passing a function that should return a new instance of the underlying socket.\n *\n * ```javascript\n * var client = Stomp.over(function(){\n * return new WebSocket('ws://localhost:15674/ws')\n * });\n * ```\n *\n * **Deprecated**\n *\n * It will be removed in next major version. Please switch to {@link Client}\n * using [Client#webSocketFactory]{@link Client#webSocketFactory}.\n */\n public static over(ws: any): CompatClient {\n let wsFn: () => any;\n\n if (typeof ws === 'function') {\n wsFn = ws;\n } else {\n console.warn(\n 'Stomp.over did not receive a factory, auto reconnect will not work. ' +\n 'Please see https://stomp-js.github.io/api-docs/latest/classes/Stomp.html#over'\n );\n wsFn = () => ws;\n }\n\n return new CompatClient(wsFn);\n }\n}\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/augment-websocket.d.ts b/node_modules/@stomp/stompjs/esm6/augment-websocket.d.ts
new file mode 100644
index 0000000..326d749
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/augment-websocket.d.ts
@@ -0,0 +1,5 @@
+import { IStompSocket } from './types';
+/**
+ * @internal
+ */
+export declare function augmentWebsocket(webSocket: IStompSocket, debug: (msg: string) => void): void;
diff --git a/node_modules/@stomp/stompjs/esm6/augment-websocket.js b/node_modules/@stomp/stompjs/esm6/augment-websocket.js
new file mode 100644
index 0000000..b77ae72
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/augment-websocket.js
@@ -0,0 +1,26 @@
+/**
+ * @internal
+ */
+export function augmentWebsocket(webSocket, debug) {
+ webSocket.terminate = function () {
+ const noOp = () => { };
+ // set all callbacks to no op
+ this.onerror = noOp;
+ this.onmessage = noOp;
+ this.onopen = noOp;
+ const ts = new Date();
+ const origOnClose = this.onclose;
+ // Track delay in actual closure of the socket
+ this.onclose = closeEvent => {
+ const delay = new Date().getTime() - ts.getTime();
+ debug(`Discarded socket closed after ${delay}ms, with code/reason: ${closeEvent.code}/${closeEvent.reason}`);
+ };
+ this.close();
+ origOnClose.call(this, {
+ code: 4001,
+ reason: 'Heartbeat failure, discarding the socket',
+ wasClean: false,
+ });
+ };
+}
+//# sourceMappingURL=augment-websocket.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/augment-websocket.js.map b/node_modules/@stomp/stompjs/esm6/augment-websocket.js.map
new file mode 100644
index 0000000..f424f9d
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/augment-websocket.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"augment-websocket.js","sourceRoot":"","sources":["../src/augment-websocket.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAuB,EACvB,KAA4B;IAE5B,SAAS,CAAC,SAAS,GAAG;QACpB,MAAM,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QAEtB,6BAA6B;QAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAEnB,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;QAEtB,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;QAEjC,8CAA8C;QAC9C,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,EAAE;YAC1B,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;YAClD,KAAK,CACH,iCAAiC,KAAK,yBAAyB,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,MAAM,EAAE,CACtG,CAAC;QACJ,CAAC,CAAC;QAEF,IAAI,CAAC,KAAK,EAAE,CAAC;QAEb,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE;YACrB,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,0CAA0C;YAClD,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/byte.d.ts b/node_modules/@stomp/stompjs/esm6/byte.d.ts
new file mode 100644
index 0000000..ebce42d
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/byte.d.ts
@@ -0,0 +1,11 @@
+/**
+ * Some byte values, used as per STOMP specifications.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export declare const BYTE: {
+ LF: string;
+ NULL: string;
+};
diff --git a/node_modules/@stomp/stompjs/esm6/byte.js b/node_modules/@stomp/stompjs/esm6/byte.js
new file mode 100644
index 0000000..30714c1
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/byte.js
@@ -0,0 +1,14 @@
+/**
+ * Some byte values, used as per STOMP specifications.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export const BYTE = {
+ // LINEFEED byte (octet 10)
+ LF: '\x0A',
+ // NULL byte (octet 0)
+ NULL: '\x00',
+};
+//# sourceMappingURL=byte.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/byte.js.map b/node_modules/@stomp/stompjs/esm6/byte.js.map
new file mode 100644
index 0000000..da432f3
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/byte.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"byte.js","sourceRoot":"","sources":["../src/byte.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,2BAA2B;IAC3B,EAAE,EAAE,MAAM;IACV,sBAAsB;IACtB,IAAI,EAAE,MAAM;CACb,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/client.d.ts b/node_modules/@stomp/stompjs/esm6/client.d.ts
new file mode 100644
index 0000000..936b344
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/client.d.ts
@@ -0,0 +1,475 @@
+import { ITransaction } from './i-transaction';
+import { StompConfig } from './stomp-config';
+import { StompHeaders } from './stomp-headers';
+import { StompSubscription } from './stomp-subscription';
+import { ActivationState, closeEventCallbackType, debugFnType, frameCallbackType, IPublishParams, IStompSocket, messageCallbackType, wsErrorCallbackType } from './types';
+import { Versions } from './versions';
+/**
+ * STOMP Client Class.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare class Client {
+ /**
+ * The URL for the STOMP broker to connect to.
+ * Typically like `"ws://broker.329broker.com:15674/ws"` or `"wss://broker.329broker.com:15674/ws"`.
+ *
+ * Only one of this or [Client#webSocketFactory]{@link Client#webSocketFactory} need to be set.
+ * If both are set, [Client#webSocketFactory]{@link Client#webSocketFactory} will be used.
+ *
+ * If your environment does not support WebSockets natively, please refer to
+ * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.
+ */
+ brokerURL: string;
+ /**
+ * STOMP versions to attempt during STOMP handshake. By default versions `1.0`, `1.1`, and `1.2` are attempted.
+ *
+ * Example:
+ * ```javascript
+ * // Try only versions 1.0 and 1.1
+ * client.stompVersions = new Versions(['1.0', '1.1'])
+ * ```
+ */
+ stompVersions: Versions;
+ /**
+ * This function should return a WebSocket or a similar (e.g. SockJS) object.
+ * If your environment does not support WebSockets natively, please refer to
+ * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.
+ * If your STOMP Broker supports WebSockets, prefer setting [Client#brokerURL]{@link Client#brokerURL}.
+ *
+ * If both this and [Client#brokerURL]{@link Client#brokerURL} are set, this will be used.
+ *
+ * Example:
+ * ```javascript
+ * // use a WebSocket
+ * client.webSocketFactory= function () {
+ * return new WebSocket("wss://broker.329broker.com:15674/ws");
+ * };
+ *
+ * // Typical usage with SockJS
+ * client.webSocketFactory= function () {
+ * return new SockJS("http://broker.329broker.com/stomp");
+ * };
+ * ```
+ */
+ webSocketFactory: () => IStompSocket;
+ /**
+ * Will retry if Stomp connection is not established in specified milliseconds.
+ * Default 0, which implies wait for ever.
+ */
+ connectionTimeout: number;
+ private _connectionWatcher;
+ /**
+ * automatically reconnect with delay in milliseconds, set to 0 to disable.
+ */
+ reconnectDelay: number;
+ /**
+ * Incoming heartbeat interval in milliseconds. Set to 0 to disable.
+ */
+ heartbeatIncoming: number;
+ /**
+ * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.
+ */
+ heartbeatOutgoing: number;
+ /**
+ * This switches on a non standard behavior while sending WebSocket packets.
+ * It splits larger (text) packets into chunks of [maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+ * Only Java Spring brokers seems to use this mode.
+ *
+ * WebSockets, by itself, split large (text) packets,
+ * so it is not needed with a truly compliant STOMP/WebSocket broker.
+ * Actually setting it for such broker will cause large messages to fail.
+ *
+ * `false` by default.
+ *
+ * Binary frames are never split.
+ */
+ splitLargeFrames: boolean;
+ /**
+ * See [splitLargeFrames]{@link Client#splitLargeFrames}.
+ * This has no effect if [splitLargeFrames]{@link Client#splitLargeFrames} is `false`.
+ */
+ maxWebSocketChunkSize: number;
+ /**
+ * Usually the
+ * [type of WebSocket frame]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send#Parameters}
+ * is automatically decided by type of the payload.
+ * Default is `false`, which should work with all compliant brokers.
+ *
+ * Set this flag to force binary frames.
+ */
+ forceBinaryWSFrames: boolean;
+ /**
+ * A bug in ReactNative chops a string on occurrence of a NULL.
+ * See issue [https://github.com/stomp-js/stompjs/issues/89]{@link https://github.com/stomp-js/stompjs/issues/89}.
+ * This makes incoming WebSocket messages invalid STOMP packets.
+ * Setting this flag attempts to reverse the damage by appending a NULL.
+ * If the broker splits a large message into multiple WebSocket messages,
+ * this flag will cause data loss and abnormal termination of connection.
+ *
+ * This is not an ideal solution, but a stop gap until the underlying issue is fixed at ReactNative library.
+ */
+ appendMissingNULLonIncoming: boolean;
+ /**
+ * Underlying WebSocket instance, READONLY.
+ */
+ readonly webSocket: IStompSocket;
+ /**
+ * Connection headers, important keys - `login`, `passcode`, `host`.
+ * Though STOMP 1.2 standard marks these keys to be present, check your broker documentation for
+ * details specific to your broker.
+ */
+ connectHeaders: StompHeaders;
+ /**
+ * Disconnection headers.
+ */
+ disconnectHeaders: StompHeaders;
+ private _disconnectHeaders;
+ /**
+ * This function will be called for any unhandled messages.
+ * It is useful for receiving messages sent to RabbitMQ temporary queues.
+ *
+ * It can also get invoked with stray messages while the server is processing
+ * a request to [Client#unsubscribe]{@link Client#unsubscribe}
+ * from an endpoint.
+ *
+ * The actual {@link IMessage} will be passed as parameter to the callback.
+ */
+ onUnhandledMessage: messageCallbackType;
+ /**
+ * STOMP brokers can be requested to notify when an operation is actually completed.
+ * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}. See
+ * [Client#watchForReceipt]{@link Client#watchForReceipt} for examples.
+ *
+ * The actual {@link FrameImpl} will be passed as parameter to the callback.
+ */
+ onUnhandledReceipt: frameCallbackType;
+ /**
+ * Will be invoked if {@link FrameImpl} of unknown type is received from the STOMP broker.
+ *
+ * The actual {@link IFrame} will be passed as parameter to the callback.
+ */
+ onUnhandledFrame: frameCallbackType;
+ /**
+ * `true` if there is a active connection with STOMP Broker
+ */
+ readonly connected: boolean;
+ /**
+ * Callback, invoked on before a connection connection to the STOMP broker.
+ *
+ * You can change options on the client, which will impact the immediate connect.
+ * It is valid to call [Client#decativate]{@link Client#deactivate} in this callback.
+ *
+ * As of version 5.1, this callback can be
+ * [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
+ * (i.e., it can return a
+ * [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)).
+ * In that case connect will be called only after the Promise is resolved.
+ * This can be used to reliably fetch credentials, access token etc. from some other service
+ * in an asynchronous way.
+ */
+ beforeConnect: () => void | Promise;
+ /**
+ * Callback, invoked on every successful connection to the STOMP broker.
+ *
+ * The actual {@link FrameImpl} will be passed as parameter to the callback.
+ * Sometimes clients will like to use headers from this frame.
+ */
+ onConnect: frameCallbackType;
+ /**
+ * Callback, invoked on every successful disconnection from the STOMP broker. It will not be invoked if
+ * the STOMP broker disconnected due to an error.
+ *
+ * The actual Receipt {@link FrameImpl} acknowledging the DISCONNECT will be passed as parameter to the callback.
+ *
+ * The way STOMP protocol is designed, the connection may close/terminate without the client
+ * receiving the Receipt {@link FrameImpl} acknowledging the DISCONNECT.
+ * You might find [Client#onWebSocketClose]{@link Client#onWebSocketClose} more appropriate to watch
+ * STOMP broker disconnects.
+ */
+ onDisconnect: frameCallbackType;
+ /**
+ * Callback, invoked on an ERROR frame received from the STOMP Broker.
+ * A compliant STOMP Broker will close the connection after this type of frame.
+ * Please check broker specific documentation for exact behavior.
+ *
+ * The actual {@link IFrame} will be passed as parameter to the callback.
+ */
+ onStompError: frameCallbackType;
+ /**
+ * Callback, invoked when underlying WebSocket is closed.
+ *
+ * Actual [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
+ * is passed as parameter to the callback.
+ */
+ onWebSocketClose: closeEventCallbackType;
+ /**
+ * Callback, invoked when underlying WebSocket raises an error.
+ *
+ * Actual [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}
+ * is passed as parameter to the callback.
+ */
+ onWebSocketError: wsErrorCallbackType;
+ /**
+ * Set it to log the actual raw communication with the broker.
+ * When unset, it logs headers of the parsed frames.
+ *
+ * Change in this effects from next broker reconnect.
+ *
+ * **Caution: this assumes that frames only have valid UTF8 strings.**
+ */
+ logRawCommunication: boolean;
+ /**
+ * By default, debug messages are discarded. To log to `console` following can be used:
+ *
+ * ```javascript
+ * client.debug = function(str) {
+ * console.log(str);
+ * };
+ * ```
+ *
+ * Currently this method does not support levels of log. Be aware that the output can be quite verbose
+ * and may contain sensitive information (like passwords, tokens etc.).
+ */
+ debug: debugFnType;
+ /**
+ * Browsers do not immediately close WebSockets when `.close` is issued.
+ * This may cause reconnection to take a longer on certain type of failures.
+ * In case of incoming heartbeat failure, this experimental flag instructs the library
+ * to discard the socket immediately (even before it is actually closed).
+ */
+ discardWebsocketOnCommFailure: boolean;
+ /**
+ * version of STOMP protocol negotiated with the server, READONLY
+ */
+ readonly connectedVersion: string;
+ private _stompHandler;
+ /**
+ * if the client is active (connected or going to reconnect)
+ */
+ readonly active: boolean;
+ /**
+ * It will be called on state change.
+ *
+ * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+ */
+ onChangeState: (state: ActivationState) => void;
+ private _changeState;
+ private _resolveSocketClose;
+ /**
+ * Activation state.
+ *
+ * It will usually be ACTIVE or INACTIVE.
+ * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+ */
+ state: ActivationState;
+ private _reconnector;
+ /**
+ * Create an instance.
+ */
+ constructor(conf?: StompConfig);
+ /**
+ * Update configuration.
+ */
+ configure(conf: StompConfig): void;
+ /**
+ * Initiate the connection with the broker.
+ * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},
+ * it will keep trying to reconnect.
+ *
+ * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.
+ */
+ activate(): void;
+ private _connect;
+ private _createWebSocket;
+ private _schedule_reconnect;
+ /**
+ * Disconnect if connected and stop auto reconnect loop.
+ * Appropriate callbacks will be invoked if underlying STOMP connection was connected.
+ *
+ * This call is async, it will resolve immediately if there is no underlying active websocket,
+ * otherwise, it will resolve after underlying websocket is properly disposed.
+ *
+ * To reactivate you can call [Client#activate]{@link Client#activate}.
+ */
+ deactivate(): Promise;
+ /**
+ * Force disconnect if there is an active connection by directly closing the underlying WebSocket.
+ * This is different than a normal disconnect where a DISCONNECT sequence is carried out with the broker.
+ * After forcing disconnect, automatic reconnect will be attempted.
+ * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.
+ */
+ forceDisconnect(): void;
+ private _disposeStompHandler;
+ /**
+ * Send a message to a named destination. Refer to your STOMP broker documentation for types
+ * and naming of destinations.
+ *
+ * STOMP protocol specifies and suggests some headers and also allows broker specific headers.
+ *
+ * `body` must be String.
+ * You will need to covert the payload to string in case it is not string (e.g. JSON).
+ *
+ * To send a binary message body use binaryBody parameter. It should be a
+ * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
+ * Sometimes brokers may not support binary frames out of the box.
+ * Please check your broker documentation.
+ *
+ * `content-length` header is automatically added to the STOMP Frame sent to the broker.
+ * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.
+ * For binary messages `content-length` header is always added.
+ *
+ * Caution: The broker will, most likely, report an error and disconnect if message body has NULL octet(s)
+ * and `content-length` header is missing.
+ *
+ * ```javascript
+ * client.publish({destination: "/queue/test", headers: {priority: 9}, body: "Hello, STOMP"});
+ *
+ * // Only destination is mandatory parameter
+ * client.publish({destination: "/queue/test", body: "Hello, STOMP"});
+ *
+ * // Skip content-length header in the frame to the broker
+ * client.publish({"/queue/test", body: "Hello, STOMP", skipContentLengthHeader: true});
+ *
+ * var binaryData = generateBinaryData(); // This need to be of type Uint8Array
+ * // setting content-type header is not mandatory, however a good practice
+ * client.publish({destination: '/topic/special', binaryBody: binaryData,
+ * headers: {'content-type': 'application/octet-stream'}});
+ * ```
+ */
+ publish(params: IPublishParams): void;
+ /**
+ * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.
+ * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.
+ * The value (say receipt-id) for this header needs to be unique for each use. Typically a sequence, a UUID, a
+ * random number or a combination may be used.
+ *
+ * A complaint broker will send a RECEIPT frame when an operation has actually been completed.
+ * The operation needs to be matched based in the value of the receipt-id.
+ *
+ * This method allow watching for a receipt and invoke the callback
+ * when corresponding receipt has been received.
+ *
+ * The actual {@link FrameImpl} will be passed as parameter to the callback.
+ *
+ * Example:
+ * ```javascript
+ * // Subscribing with acknowledgement
+ * let receiptId = randomText();
+ *
+ * client.watchForReceipt(receiptId, function() {
+ * // Will be called after server acknowledges
+ * });
+ *
+ * client.subscribe(TEST.destination, onMessage, {receipt: receiptId});
+ *
+ *
+ * // Publishing with acknowledgement
+ * receiptId = randomText();
+ *
+ * client.watchForReceipt(receiptId, function() {
+ * // Will be called after server acknowledges
+ * });
+ * client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});
+ * ```
+ */
+ watchForReceipt(receiptId: string, callback: frameCallbackType): void;
+ /**
+ * Subscribe to a STOMP Broker location. The callback will be invoked for each received message with
+ * the {@link IMessage} as argument.
+ *
+ * Note: The library will generate an unique ID if there is none provided in the headers.
+ * To use your own ID, pass it using the headers argument.
+ *
+ * ```javascript
+ * callback = function(message) {
+ * // called when the client receives a STOMP message from the server
+ * if (message.body) {
+ * alert("got message with body " + message.body)
+ * } else {
+ * alert("got empty message");
+ * }
+ * });
+ *
+ * var subscription = client.subscribe("/queue/test", callback);
+ *
+ * // Explicit subscription id
+ * var mySubId = 'my-subscription-id-001';
+ * var subscription = client.subscribe(destination, callback, { id: mySubId });
+ * ```
+ */
+ subscribe(destination: string, callback: messageCallbackType, headers?: StompHeaders): StompSubscription;
+ /**
+ * It is preferable to unsubscribe from a subscription by calling
+ * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:
+ *
+ * ```javascript
+ * var subscription = client.subscribe(destination, onmessage);
+ * // ...
+ * subscription.unsubscribe();
+ * ```
+ *
+ * See: http://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame
+ */
+ unsubscribe(id: string, headers?: StompHeaders): void;
+ /**
+ * Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit}
+ * and [abort]{@link ITransaction#abort}.
+ *
+ * `transactionId` is optional, if not passed the library will generate it internally.
+ */
+ begin(transactionId?: string): ITransaction;
+ /**
+ * Commit a transaction.
+ *
+ * It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on
+ * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+ *
+ * ```javascript
+ * var tx = client.begin(txId);
+ * //...
+ * tx.commit();
+ * ```
+ */
+ commit(transactionId: string): void;
+ /**
+ * Abort a transaction.
+ * It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on
+ * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+ *
+ * ```javascript
+ * var tx = client.begin(txId);
+ * //...
+ * tx.abort();
+ * ```
+ */
+ abort(transactionId: string): void;
+ /**
+ * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly
+ * on the {@link IMessage} handled by a subscription callback:
+ *
+ * ```javascript
+ * var callback = function (message) {
+ * // process the message
+ * // acknowledge it
+ * message.ack();
+ * };
+ * client.subscribe(destination, callback, {'ack': 'client'});
+ * ```
+ */
+ ack(messageId: string, subscriptionId: string, headers?: StompHeaders): void;
+ /**
+ * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly
+ * on the {@link IMessage} handled by a subscription callback:
+ *
+ * ```javascript
+ * var callback = function (message) {
+ * // process the message
+ * // an error occurs, nack it
+ * message.nack();
+ * };
+ * client.subscribe(destination, callback, {'ack': 'client'});
+ * ```
+ */
+ nack(messageId: string, subscriptionId: string, headers?: StompHeaders): void;
+}
diff --git a/node_modules/@stomp/stompjs/esm6/client.js b/node_modules/@stomp/stompjs/esm6/client.js
new file mode 100644
index 0000000..c3e1b71
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/client.js
@@ -0,0 +1,539 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+import { StompHandler } from './stomp-handler';
+import { ActivationState, StompSocketState, } from './types';
+import { Versions } from './versions';
+/**
+ * STOMP Client Class.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class Client {
+ /**
+ * Create an instance.
+ */
+ constructor(conf = {}) {
+ /**
+ * STOMP versions to attempt during STOMP handshake. By default versions `1.0`, `1.1`, and `1.2` are attempted.
+ *
+ * Example:
+ * ```javascript
+ * // Try only versions 1.0 and 1.1
+ * client.stompVersions = new Versions(['1.0', '1.1'])
+ * ```
+ */
+ this.stompVersions = Versions.default;
+ /**
+ * Will retry if Stomp connection is not established in specified milliseconds.
+ * Default 0, which implies wait for ever.
+ */
+ this.connectionTimeout = 0;
+ /**
+ * automatically reconnect with delay in milliseconds, set to 0 to disable.
+ */
+ this.reconnectDelay = 5000;
+ /**
+ * Incoming heartbeat interval in milliseconds. Set to 0 to disable.
+ */
+ this.heartbeatIncoming = 10000;
+ /**
+ * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.
+ */
+ this.heartbeatOutgoing = 10000;
+ /**
+ * This switches on a non standard behavior while sending WebSocket packets.
+ * It splits larger (text) packets into chunks of [maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+ * Only Java Spring brokers seems to use this mode.
+ *
+ * WebSockets, by itself, split large (text) packets,
+ * so it is not needed with a truly compliant STOMP/WebSocket broker.
+ * Actually setting it for such broker will cause large messages to fail.
+ *
+ * `false` by default.
+ *
+ * Binary frames are never split.
+ */
+ this.splitLargeFrames = false;
+ /**
+ * See [splitLargeFrames]{@link Client#splitLargeFrames}.
+ * This has no effect if [splitLargeFrames]{@link Client#splitLargeFrames} is `false`.
+ */
+ this.maxWebSocketChunkSize = 8 * 1024;
+ /**
+ * Usually the
+ * [type of WebSocket frame]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send#Parameters}
+ * is automatically decided by type of the payload.
+ * Default is `false`, which should work with all compliant brokers.
+ *
+ * Set this flag to force binary frames.
+ */
+ this.forceBinaryWSFrames = false;
+ /**
+ * A bug in ReactNative chops a string on occurrence of a NULL.
+ * See issue [https://github.com/stomp-js/stompjs/issues/89]{@link https://github.com/stomp-js/stompjs/issues/89}.
+ * This makes incoming WebSocket messages invalid STOMP packets.
+ * Setting this flag attempts to reverse the damage by appending a NULL.
+ * If the broker splits a large message into multiple WebSocket messages,
+ * this flag will cause data loss and abnormal termination of connection.
+ *
+ * This is not an ideal solution, but a stop gap until the underlying issue is fixed at ReactNative library.
+ */
+ this.appendMissingNULLonIncoming = false;
+ /**
+ * Activation state.
+ *
+ * It will usually be ACTIVE or INACTIVE.
+ * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+ */
+ this.state = ActivationState.INACTIVE;
+ // Dummy callbacks
+ const noOp = () => { };
+ this.debug = noOp;
+ this.beforeConnect = noOp;
+ this.onConnect = noOp;
+ this.onDisconnect = noOp;
+ this.onUnhandledMessage = noOp;
+ this.onUnhandledReceipt = noOp;
+ this.onUnhandledFrame = noOp;
+ this.onStompError = noOp;
+ this.onWebSocketClose = noOp;
+ this.onWebSocketError = noOp;
+ this.logRawCommunication = false;
+ this.onChangeState = noOp;
+ // These parameters would typically get proper values before connect is called
+ this.connectHeaders = {};
+ this._disconnectHeaders = {};
+ // Apply configuration
+ this.configure(conf);
+ }
+ /**
+ * Underlying WebSocket instance, READONLY.
+ */
+ get webSocket() {
+ return this._stompHandler ? this._stompHandler._webSocket : undefined;
+ }
+ /**
+ * Disconnection headers.
+ */
+ get disconnectHeaders() {
+ return this._disconnectHeaders;
+ }
+ set disconnectHeaders(value) {
+ this._disconnectHeaders = value;
+ if (this._stompHandler) {
+ this._stompHandler.disconnectHeaders = this._disconnectHeaders;
+ }
+ }
+ /**
+ * `true` if there is a active connection with STOMP Broker
+ */
+ get connected() {
+ return !!this._stompHandler && this._stompHandler.connected;
+ }
+ /**
+ * version of STOMP protocol negotiated with the server, READONLY
+ */
+ get connectedVersion() {
+ return this._stompHandler ? this._stompHandler.connectedVersion : undefined;
+ }
+ /**
+ * if the client is active (connected or going to reconnect)
+ */
+ get active() {
+ return this.state === ActivationState.ACTIVE;
+ }
+ _changeState(state) {
+ this.state = state;
+ this.onChangeState(state);
+ }
+ /**
+ * Update configuration.
+ */
+ configure(conf) {
+ // bulk assign all properties to this
+ Object.assign(this, conf);
+ }
+ /**
+ * Initiate the connection with the broker.
+ * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},
+ * it will keep trying to reconnect.
+ *
+ * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.
+ */
+ activate() {
+ if (this.state === ActivationState.DEACTIVATING) {
+ this.debug('Still DEACTIVATING, please await call to deactivate before trying to re-activate');
+ throw new Error('Still DEACTIVATING, can not activate now');
+ }
+ if (this.active) {
+ this.debug('Already ACTIVE, ignoring request to activate');
+ return;
+ }
+ this._changeState(ActivationState.ACTIVE);
+ this._connect();
+ }
+ _connect() {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this.connected) {
+ this.debug('STOMP: already connected, nothing to do');
+ return;
+ }
+ yield this.beforeConnect();
+ if (!this.active) {
+ this.debug('Client has been marked inactive, will not attempt to connect');
+ return;
+ }
+ // setup connection watcher
+ if (this.connectionTimeout > 0) {
+ // clear first
+ if (this._connectionWatcher) {
+ clearTimeout(this._connectionWatcher);
+ }
+ this._connectionWatcher = setTimeout(() => {
+ if (this.connected) {
+ return;
+ }
+ // Connection not established, close the underlying socket
+ // a reconnection will be attempted
+ this.debug(`Connection not established in ${this.connectionTimeout}ms, closing socket`);
+ this.forceDisconnect();
+ }, this.connectionTimeout);
+ }
+ this.debug('Opening Web Socket...');
+ // Get the actual WebSocket (or a similar object)
+ const webSocket = this._createWebSocket();
+ this._stompHandler = new StompHandler(this, webSocket, {
+ debug: this.debug,
+ stompVersions: this.stompVersions,
+ connectHeaders: this.connectHeaders,
+ disconnectHeaders: this._disconnectHeaders,
+ heartbeatIncoming: this.heartbeatIncoming,
+ heartbeatOutgoing: this.heartbeatOutgoing,
+ splitLargeFrames: this.splitLargeFrames,
+ maxWebSocketChunkSize: this.maxWebSocketChunkSize,
+ forceBinaryWSFrames: this.forceBinaryWSFrames,
+ logRawCommunication: this.logRawCommunication,
+ appendMissingNULLonIncoming: this.appendMissingNULLonIncoming,
+ discardWebsocketOnCommFailure: this.discardWebsocketOnCommFailure,
+ onConnect: frame => {
+ // Successfully connected, stop the connection watcher
+ if (this._connectionWatcher) {
+ clearTimeout(this._connectionWatcher);
+ this._connectionWatcher = undefined;
+ }
+ if (!this.active) {
+ this.debug('STOMP got connected while deactivate was issued, will disconnect now');
+ this._disposeStompHandler();
+ return;
+ }
+ this.onConnect(frame);
+ },
+ onDisconnect: frame => {
+ this.onDisconnect(frame);
+ },
+ onStompError: frame => {
+ this.onStompError(frame);
+ },
+ onWebSocketClose: evt => {
+ this._stompHandler = undefined; // a new one will be created in case of a reconnect
+ if (this.state === ActivationState.DEACTIVATING) {
+ // Mark deactivation complete
+ this._resolveSocketClose();
+ this._resolveSocketClose = undefined;
+ this._changeState(ActivationState.INACTIVE);
+ }
+ this.onWebSocketClose(evt);
+ // The callback is called before attempting to reconnect, this would allow the client
+ // to be `deactivated` in the callback.
+ if (this.active) {
+ this._schedule_reconnect();
+ }
+ },
+ onWebSocketError: evt => {
+ this.onWebSocketError(evt);
+ },
+ onUnhandledMessage: message => {
+ this.onUnhandledMessage(message);
+ },
+ onUnhandledReceipt: frame => {
+ this.onUnhandledReceipt(frame);
+ },
+ onUnhandledFrame: frame => {
+ this.onUnhandledFrame(frame);
+ },
+ });
+ this._stompHandler.start();
+ });
+ }
+ _createWebSocket() {
+ let webSocket;
+ if (this.webSocketFactory) {
+ webSocket = this.webSocketFactory();
+ }
+ else {
+ webSocket = new WebSocket(this.brokerURL, this.stompVersions.protocolVersions());
+ }
+ webSocket.binaryType = 'arraybuffer';
+ return webSocket;
+ }
+ _schedule_reconnect() {
+ if (this.reconnectDelay > 0) {
+ this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`);
+ this._reconnector = setTimeout(() => {
+ this._connect();
+ }, this.reconnectDelay);
+ }
+ }
+ /**
+ * Disconnect if connected and stop auto reconnect loop.
+ * Appropriate callbacks will be invoked if underlying STOMP connection was connected.
+ *
+ * This call is async, it will resolve immediately if there is no underlying active websocket,
+ * otherwise, it will resolve after underlying websocket is properly disposed.
+ *
+ * To reactivate you can call [Client#activate]{@link Client#activate}.
+ */
+ deactivate() {
+ return __awaiter(this, void 0, void 0, function* () {
+ let retPromise;
+ if (this.state !== ActivationState.ACTIVE) {
+ this.debug(`Already ${ActivationState[this.state]}, ignoring call to deactivate`);
+ return Promise.resolve();
+ }
+ this._changeState(ActivationState.DEACTIVATING);
+ // Clear if a reconnection was scheduled
+ if (this._reconnector) {
+ clearTimeout(this._reconnector);
+ }
+ if (this._stompHandler &&
+ this.webSocket.readyState !== StompSocketState.CLOSED) {
+ // we need to wait for underlying websocket to close
+ retPromise = new Promise((resolve, reject) => {
+ this._resolveSocketClose = resolve;
+ });
+ }
+ else {
+ // indicate that auto reconnect loop should terminate
+ this._changeState(ActivationState.INACTIVE);
+ return Promise.resolve();
+ }
+ this._disposeStompHandler();
+ return retPromise;
+ });
+ }
+ /**
+ * Force disconnect if there is an active connection by directly closing the underlying WebSocket.
+ * This is different than a normal disconnect where a DISCONNECT sequence is carried out with the broker.
+ * After forcing disconnect, automatic reconnect will be attempted.
+ * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.
+ */
+ forceDisconnect() {
+ if (this._stompHandler) {
+ this._stompHandler.forceDisconnect();
+ }
+ }
+ _disposeStompHandler() {
+ // Dispose STOMP Handler
+ if (this._stompHandler) {
+ this._stompHandler.dispose();
+ this._stompHandler = null;
+ }
+ }
+ /**
+ * Send a message to a named destination. Refer to your STOMP broker documentation for types
+ * and naming of destinations.
+ *
+ * STOMP protocol specifies and suggests some headers and also allows broker specific headers.
+ *
+ * `body` must be String.
+ * You will need to covert the payload to string in case it is not string (e.g. JSON).
+ *
+ * To send a binary message body use binaryBody parameter. It should be a
+ * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
+ * Sometimes brokers may not support binary frames out of the box.
+ * Please check your broker documentation.
+ *
+ * `content-length` header is automatically added to the STOMP Frame sent to the broker.
+ * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.
+ * For binary messages `content-length` header is always added.
+ *
+ * Caution: The broker will, most likely, report an error and disconnect if message body has NULL octet(s)
+ * and `content-length` header is missing.
+ *
+ * ```javascript
+ * client.publish({destination: "/queue/test", headers: {priority: 9}, body: "Hello, STOMP"});
+ *
+ * // Only destination is mandatory parameter
+ * client.publish({destination: "/queue/test", body: "Hello, STOMP"});
+ *
+ * // Skip content-length header in the frame to the broker
+ * client.publish({"/queue/test", body: "Hello, STOMP", skipContentLengthHeader: true});
+ *
+ * var binaryData = generateBinaryData(); // This need to be of type Uint8Array
+ * // setting content-type header is not mandatory, however a good practice
+ * client.publish({destination: '/topic/special', binaryBody: binaryData,
+ * headers: {'content-type': 'application/octet-stream'}});
+ * ```
+ */
+ publish(params) {
+ this._stompHandler.publish(params);
+ }
+ /**
+ * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.
+ * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.
+ * The value (say receipt-id) for this header needs to be unique for each use. Typically a sequence, a UUID, a
+ * random number or a combination may be used.
+ *
+ * A complaint broker will send a RECEIPT frame when an operation has actually been completed.
+ * The operation needs to be matched based in the value of the receipt-id.
+ *
+ * This method allow watching for a receipt and invoke the callback
+ * when corresponding receipt has been received.
+ *
+ * The actual {@link FrameImpl} will be passed as parameter to the callback.
+ *
+ * Example:
+ * ```javascript
+ * // Subscribing with acknowledgement
+ * let receiptId = randomText();
+ *
+ * client.watchForReceipt(receiptId, function() {
+ * // Will be called after server acknowledges
+ * });
+ *
+ * client.subscribe(TEST.destination, onMessage, {receipt: receiptId});
+ *
+ *
+ * // Publishing with acknowledgement
+ * receiptId = randomText();
+ *
+ * client.watchForReceipt(receiptId, function() {
+ * // Will be called after server acknowledges
+ * });
+ * client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});
+ * ```
+ */
+ watchForReceipt(receiptId, callback) {
+ this._stompHandler.watchForReceipt(receiptId, callback);
+ }
+ /**
+ * Subscribe to a STOMP Broker location. The callback will be invoked for each received message with
+ * the {@link IMessage} as argument.
+ *
+ * Note: The library will generate an unique ID if there is none provided in the headers.
+ * To use your own ID, pass it using the headers argument.
+ *
+ * ```javascript
+ * callback = function(message) {
+ * // called when the client receives a STOMP message from the server
+ * if (message.body) {
+ * alert("got message with body " + message.body)
+ * } else {
+ * alert("got empty message");
+ * }
+ * });
+ *
+ * var subscription = client.subscribe("/queue/test", callback);
+ *
+ * // Explicit subscription id
+ * var mySubId = 'my-subscription-id-001';
+ * var subscription = client.subscribe(destination, callback, { id: mySubId });
+ * ```
+ */
+ subscribe(destination, callback, headers = {}) {
+ return this._stompHandler.subscribe(destination, callback, headers);
+ }
+ /**
+ * It is preferable to unsubscribe from a subscription by calling
+ * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:
+ *
+ * ```javascript
+ * var subscription = client.subscribe(destination, onmessage);
+ * // ...
+ * subscription.unsubscribe();
+ * ```
+ *
+ * See: http://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame
+ */
+ unsubscribe(id, headers = {}) {
+ this._stompHandler.unsubscribe(id, headers);
+ }
+ /**
+ * Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit}
+ * and [abort]{@link ITransaction#abort}.
+ *
+ * `transactionId` is optional, if not passed the library will generate it internally.
+ */
+ begin(transactionId) {
+ return this._stompHandler.begin(transactionId);
+ }
+ /**
+ * Commit a transaction.
+ *
+ * It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on
+ * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+ *
+ * ```javascript
+ * var tx = client.begin(txId);
+ * //...
+ * tx.commit();
+ * ```
+ */
+ commit(transactionId) {
+ this._stompHandler.commit(transactionId);
+ }
+ /**
+ * Abort a transaction.
+ * It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on
+ * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+ *
+ * ```javascript
+ * var tx = client.begin(txId);
+ * //...
+ * tx.abort();
+ * ```
+ */
+ abort(transactionId) {
+ this._stompHandler.abort(transactionId);
+ }
+ /**
+ * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly
+ * on the {@link IMessage} handled by a subscription callback:
+ *
+ * ```javascript
+ * var callback = function (message) {
+ * // process the message
+ * // acknowledge it
+ * message.ack();
+ * };
+ * client.subscribe(destination, callback, {'ack': 'client'});
+ * ```
+ */
+ ack(messageId, subscriptionId, headers = {}) {
+ this._stompHandler.ack(messageId, subscriptionId, headers);
+ }
+ /**
+ * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly
+ * on the {@link IMessage} handled by a subscription callback:
+ *
+ * ```javascript
+ * var callback = function (message) {
+ * // process the message
+ * // an error occurs, nack it
+ * message.nack();
+ * };
+ * client.subscribe(destination, callback, {'ack': 'client'});
+ * ```
+ */
+ nack(messageId, subscriptionId, headers = {}) {
+ this._stompHandler.nack(messageId, subscriptionId, headers);
+ }
+}
+//# sourceMappingURL=client.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/client.js.map b/node_modules/@stomp/stompjs/esm6/client.js.map
new file mode 100644
index 0000000..855b3e2
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/client.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAAO,EACL,eAAe,EAOf,gBAAgB,GAEjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUtC;;;;GAIG;AACH,MAAM,OAAO,MAAM;IAwTjB;;OAEG;IACH,YAAY,OAAoB,EAAE;QA9SlC;;;;;;;;WAQG;QACI,kBAAa,GAAG,QAAQ,CAAC,OAAO,CAAC;QAyBxC;;;WAGG;QACI,sBAAiB,GAAW,CAAC,CAAC;QAIr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AAC;IAED;;;;;;;;;;;;OAYG;IACI,GAAG,CACR,SAAiB,EACjB,cAAsB,EACtB,UAAwB,EAAE;QAE1B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;OAYG;IACI,IAAI,CACT,SAAiB,EACjB,cAAsB,EACtB,UAAwB,EAAE;QAE1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/compatibility/compat-client.d.ts b/node_modules/@stomp/stompjs/esm6/compatibility/compat-client.d.ts
new file mode 100644
index 0000000..630a566
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/compatibility/compat-client.d.ts
@@ -0,0 +1,149 @@
+import { Client } from '../client';
+import { StompHeaders } from '../stomp-headers';
+import { frameCallbackType, messageCallbackType } from '../types';
+/**
+ * Available for backward compatibility, please shift to using {@link Client}.
+ *
+ * **Deprecated**
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+export declare class CompatClient extends Client {
+ /**
+ * It is no op now. No longer needed. Large packets work out of the box.
+ */
+ maxWebSocketFrameSize: number;
+ /**
+ * Available for backward compatibility, please shift to using {@link Client}
+ * and [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ *
+ * **Deprecated**
+ *
+ * @internal
+ */
+ constructor(webSocketFactory: () => any);
+ private _parseConnect;
+ /**
+ * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.
+ *
+ * **Deprecated**
+ *
+ * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the
+ * version with headers to pass your broker specific options.
+ *
+ * overloads:
+ * - connect(headers, connectCallback)
+ * - connect(headers, connectCallback, errorCallback)
+ * - connect(login, passcode, connectCallback)
+ * - connect(login, passcode, connectCallback, errorCallback)
+ * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)
+ * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)
+ *
+ * params:
+ * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}
+ * - connectCallback, see [Client#onConnect]{@link Client#onConnect}
+ * - errorCallback, see [Client#onStompError]{@link Client#onStompError}
+ * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}
+ * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ connect(...args: any[]): void;
+ /**
+ * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.
+ *
+ * **Deprecated**
+ *
+ * See:
+ * [Client#onDisconnect]{@link Client#onDisconnect}, and
+ * [Client#disconnectHeaders]{@link Client#disconnectHeaders}
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ disconnect(disconnectCallback?: any, headers?: StompHeaders): void;
+ /**
+ * Available for backward compatibility, use [Client#publish]{@link Client#publish}.
+ *
+ * Send a message to a named destination. Refer to your STOMP broker documentation for types
+ * and naming of destinations. The headers will, typically, be available to the subscriber.
+ * However, there may be special purpose headers corresponding to your STOMP broker.
+ *
+ * **Deprecated**, use [Client#publish]{@link Client#publish}
+ *
+ * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)
+ *
+ * ```javascript
+ * client.send("/queue/test", {priority: 9}, "Hello, STOMP");
+ *
+ * // If you want to send a message with a body, you must also pass the headers argument.
+ * client.send("/queue/test", {}, "Hello, STOMP");
+ * ```
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ send(destination: string, headers?: {
+ [key: string]: any;
+ }, body?: string): void;
+ /**
+ * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.
+ *
+ * **Deprecated**
+ */
+ reconnect_delay: number;
+ /**
+ * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.
+ *
+ * **Deprecated**
+ */
+ readonly ws: any;
+ /**
+ * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.
+ *
+ * **Deprecated**
+ */
+ readonly version: string;
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ *
+ * **Deprecated**
+ */
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ *
+ * **Deprecated**
+ */
+ onreceive: messageCallbackType;
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+ * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.
+ *
+ * **Deprecated**
+ */
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+ *
+ * **Deprecated**
+ */
+ onreceipt: frameCallbackType;
+ private _heartbeatInfo;
+ /**
+ * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+ * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+ *
+ * **Deprecated**
+ */
+ /**
+ * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+ * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+ *
+ * **Deprecated**
+ */
+ heartbeat: {
+ incoming: number;
+ outgoing: number;
+ };
+}
diff --git a/node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js b/node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js
new file mode 100644
index 0000000..483e2c8
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js
@@ -0,0 +1,241 @@
+import { Client } from '../client';
+import { HeartbeatInfo } from './heartbeat-info';
+/**
+ * Available for backward compatibility, please shift to using {@link Client}.
+ *
+ * **Deprecated**
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+export class CompatClient extends Client {
+ /**
+ * Available for backward compatibility, please shift to using {@link Client}
+ * and [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ *
+ * **Deprecated**
+ *
+ * @internal
+ */
+ constructor(webSocketFactory) {
+ super();
+ /**
+ * It is no op now. No longer needed. Large packets work out of the box.
+ */
+ this.maxWebSocketFrameSize = 16 * 1024;
+ this._heartbeatInfo = new HeartbeatInfo(this);
+ this.reconnect_delay = 0;
+ this.webSocketFactory = webSocketFactory;
+ // Default from previous version
+ this.debug = (...message) => {
+ console.log(...message);
+ };
+ }
+ _parseConnect(...args) {
+ let closeEventCallback;
+ let connectCallback;
+ let errorCallback;
+ let headers = {};
+ if (args.length < 2) {
+ throw new Error('Connect requires at least 2 arguments');
+ }
+ if (typeof args[1] === 'function') {
+ [headers, connectCallback, errorCallback, closeEventCallback] = args;
+ }
+ else {
+ switch (args.length) {
+ case 6:
+ [
+ headers.login,
+ headers.passcode,
+ connectCallback,
+ errorCallback,
+ closeEventCallback,
+ headers.host,
+ ] = args;
+ break;
+ default:
+ [
+ headers.login,
+ headers.passcode,
+ connectCallback,
+ errorCallback,
+ closeEventCallback,
+ ] = args;
+ }
+ }
+ return [headers, connectCallback, errorCallback, closeEventCallback];
+ }
+ /**
+ * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.
+ *
+ * **Deprecated**
+ *
+ * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the
+ * version with headers to pass your broker specific options.
+ *
+ * overloads:
+ * - connect(headers, connectCallback)
+ * - connect(headers, connectCallback, errorCallback)
+ * - connect(login, passcode, connectCallback)
+ * - connect(login, passcode, connectCallback, errorCallback)
+ * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)
+ * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)
+ *
+ * params:
+ * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}
+ * - connectCallback, see [Client#onConnect]{@link Client#onConnect}
+ * - errorCallback, see [Client#onStompError]{@link Client#onStompError}
+ * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}
+ * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ connect(...args) {
+ const out = this._parseConnect(...args);
+ if (out[0]) {
+ this.connectHeaders = out[0];
+ }
+ if (out[1]) {
+ this.onConnect = out[1];
+ }
+ if (out[2]) {
+ this.onStompError = out[2];
+ }
+ if (out[3]) {
+ this.onWebSocketClose = out[3];
+ }
+ super.activate();
+ }
+ /**
+ * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.
+ *
+ * **Deprecated**
+ *
+ * See:
+ * [Client#onDisconnect]{@link Client#onDisconnect}, and
+ * [Client#disconnectHeaders]{@link Client#disconnectHeaders}
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ disconnect(disconnectCallback, headers = {}) {
+ if (disconnectCallback) {
+ this.onDisconnect = disconnectCallback;
+ }
+ this.disconnectHeaders = headers;
+ super.deactivate();
+ }
+ /**
+ * Available for backward compatibility, use [Client#publish]{@link Client#publish}.
+ *
+ * Send a message to a named destination. Refer to your STOMP broker documentation for types
+ * and naming of destinations. The headers will, typically, be available to the subscriber.
+ * However, there may be special purpose headers corresponding to your STOMP broker.
+ *
+ * **Deprecated**, use [Client#publish]{@link Client#publish}
+ *
+ * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)
+ *
+ * ```javascript
+ * client.send("/queue/test", {priority: 9}, "Hello, STOMP");
+ *
+ * // If you want to send a message with a body, you must also pass the headers argument.
+ * client.send("/queue/test", {}, "Hello, STOMP");
+ * ```
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ send(destination, headers = {}, body = '') {
+ headers = Object.assign({}, headers);
+ const skipContentLengthHeader = headers['content-length'] === false;
+ if (skipContentLengthHeader) {
+ delete headers['content-length'];
+ }
+ this.publish({
+ destination,
+ headers: headers,
+ body,
+ skipContentLengthHeader,
+ });
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.
+ *
+ * **Deprecated**
+ */
+ set reconnect_delay(value) {
+ this.reconnectDelay = value;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.
+ *
+ * **Deprecated**
+ */
+ get ws() {
+ return this.webSocket;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.
+ *
+ * **Deprecated**
+ */
+ get version() {
+ return this.connectedVersion;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ *
+ * **Deprecated**
+ */
+ get onreceive() {
+ return this.onUnhandledMessage;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ *
+ * **Deprecated**
+ */
+ set onreceive(value) {
+ this.onUnhandledMessage = value;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+ * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.
+ *
+ * **Deprecated**
+ */
+ get onreceipt() {
+ return this.onUnhandledReceipt;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+ *
+ * **Deprecated**
+ */
+ set onreceipt(value) {
+ this.onUnhandledReceipt = value;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+ * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+ *
+ * **Deprecated**
+ */
+ get heartbeat() {
+ return this._heartbeatInfo;
+ }
+ /**
+ * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+ * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+ *
+ * **Deprecated**
+ */
+ set heartbeat(value) {
+ this.heartbeatIncoming = value.incoming;
+ this.heartbeatOutgoing = value.outgoing;
+ }
+}
+//# sourceMappingURL=compat-client.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js.map b/node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js.map
new file mode 100644
index 0000000..5fbada4
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/compatibility/compat-client.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"compat-client.js","sourceRoot":"","sources":["../../src/compatibility/compat-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM;IAMtC;;;;;;;OAOG;IACH,YAAY,gBAA2B;QACrC,KAAK,EAAE,CAAC;QAdV;;WAEG;QACI,0BAAqB,GAAW,EAAE,GAAG,IAAI,CAAC;QAoOzC,mBAAc,GAAkB,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;QAxN9D,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,gCAAgC;QAChC,IAAI,CAAC,KAAK,GAAG,CAAC,GAAG,OAAc,EAAE,EAAE;YACjC,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC;IAE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AAC;IAED;;;;OAIG;IACH,IAAI,SAAS,CAAC,KAA0B;QACtC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACH,IAAI,SAAS,CAAC,KAAwB;QACpC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClC,CAAC;IAID;;;;;OAKG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACH,IAAI,SAAS,CAAC,KAA6C;QACzD,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,QAAQ,CAAC;QACxC,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,QAAQ,CAAC;IAC1C,CAAC;CACF"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.d.ts b/node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.d.ts
new file mode 100644
index 0000000..6378a13
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.d.ts
@@ -0,0 +1,12 @@
+import { CompatClient } from './compat-client';
+/**
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export declare class HeartbeatInfo {
+ private client;
+ constructor(client: CompatClient);
+ outgoing: number;
+ incoming: number;
+}
diff --git a/node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js b/node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js
new file mode 100644
index 0000000..ecc7ad2
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js
@@ -0,0 +1,23 @@
+/**
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class HeartbeatInfo {
+ constructor(client) {
+ this.client = client;
+ }
+ get outgoing() {
+ return this.client.heartbeatOutgoing;
+ }
+ set outgoing(value) {
+ this.client.heartbeatOutgoing = value;
+ }
+ get incoming() {
+ return this.client.heartbeatIncoming;
+ }
+ set incoming(value) {
+ this.client.heartbeatIncoming = value;
+ }
+}
+//# sourceMappingURL=heartbeat-info.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js.map b/node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js.map
new file mode 100644
index 0000000..979c2a5
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/compatibility/heartbeat-info.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"heartbeat-info.js","sourceRoot":"","sources":["../../src/compatibility/heartbeat-info.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,OAAO,aAAa;IACxB,YAAoB,MAAoB;QAApB,WAAM,GAAN,MAAM,CAAc;IAAG,CAAC;IAE5C,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC;IACvC,CAAC;IAED,IAAI,QAAQ,CAAC,KAAa;QACxB,IAAI,CAAC,MAAM,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACxC,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC;IACvC,CAAC;IAED,IAAI,QAAQ,CAAC,KAAa;QACxB,IAAI,CAAC,MAAM,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACxC,CAAC;CACF"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/compatibility/stomp.d.ts b/node_modules/@stomp/stompjs/esm6/compatibility/stomp.d.ts
new file mode 100644
index 0000000..520c49c
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/compatibility/stomp.d.ts
@@ -0,0 +1,67 @@
+import { CompatClient } from './compat-client';
+/**
+ * STOMP Class, acts like a factory to create {@link Client}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}.
+ */
+export declare class Stomp {
+ /**
+ * In case you need to use a non standard class for WebSocket.
+ *
+ * For example when using within NodeJS environment:
+ *
+ * ```javascript
+ * StompJs = require('../../esm5/');
+ * Stomp = StompJs.Stomp;
+ * Stomp.WebSocketClass = require('websocket').w3cwebsocket;
+ * ```
+ *
+ * **Deprecated**
+ *
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+ static WebSocketClass: any;
+ /**
+ * This method creates a WebSocket client that is connected to
+ * the STOMP server located at the url.
+ *
+ * ```javascript
+ * var url = "ws://localhost:61614/stomp";
+ * var client = Stomp.client(url);
+ * ```
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#brokerURL]{@link Client#brokerURL}.
+ */
+ static client(url: string, protocols?: string[]): CompatClient;
+ /**
+ * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user
+ * specify the WebSocket to use (either a standard HTML5 WebSocket or
+ * a similar object).
+ *
+ * In order to support reconnection, the function Client._connect should be callable more than once.
+ * While reconnecting
+ * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function
+ * alternatively allows passing a function that should return a new instance of the underlying socket.
+ *
+ * ```javascript
+ * var client = Stomp.over(function(){
+ * return new WebSocket('ws://localhost:15674/ws')
+ * });
+ * ```
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+ static over(ws: any): CompatClient;
+}
diff --git a/node_modules/@stomp/stompjs/esm6/compatibility/stomp.js b/node_modules/@stomp/stompjs/esm6/compatibility/stomp.js
new file mode 100644
index 0000000..9b93565
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/compatibility/stomp.js
@@ -0,0 +1,102 @@
+import { Versions } from '../versions';
+import { CompatClient } from './compat-client';
+/**
+ * STOMP Class, acts like a factory to create {@link Client}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}.
+ */
+export class Stomp {
+ /**
+ * This method creates a WebSocket client that is connected to
+ * the STOMP server located at the url.
+ *
+ * ```javascript
+ * var url = "ws://localhost:61614/stomp";
+ * var client = Stomp.client(url);
+ * ```
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#brokerURL]{@link Client#brokerURL}.
+ */
+ static client(url, protocols) {
+ // This is a hack to allow another implementation than the standard
+ // HTML5 WebSocket class.
+ //
+ // It is possible to use another class by calling
+ //
+ // Stomp.WebSocketClass = MozWebSocket
+ //
+ // *prior* to call `Stomp.client()`.
+ //
+ // This hack is deprecated and `Stomp.over()` method should be used
+ // instead.
+ // See remarks on the function Stomp.over
+ if (protocols == null) {
+ protocols = Versions.default.protocolVersions();
+ }
+ const wsFn = () => {
+ const klass = Stomp.WebSocketClass || WebSocket;
+ return new klass(url, protocols);
+ };
+ return new CompatClient(wsFn);
+ }
+ /**
+ * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user
+ * specify the WebSocket to use (either a standard HTML5 WebSocket or
+ * a similar object).
+ *
+ * In order to support reconnection, the function Client._connect should be callable more than once.
+ * While reconnecting
+ * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function
+ * alternatively allows passing a function that should return a new instance of the underlying socket.
+ *
+ * ```javascript
+ * var client = Stomp.over(function(){
+ * return new WebSocket('ws://localhost:15674/ws')
+ * });
+ * ```
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+ static over(ws) {
+ let wsFn;
+ if (typeof ws === 'function') {
+ wsFn = ws;
+ }
+ else {
+ console.warn('Stomp.over did not receive a factory, auto reconnect will not work. ' +
+ 'Please see https://stomp-js.github.io/api-docs/latest/classes/Stomp.html#over');
+ wsFn = () => ws;
+ }
+ return new CompatClient(wsFn);
+ }
+}
+/**
+ * In case you need to use a non standard class for WebSocket.
+ *
+ * For example when using within NodeJS environment:
+ *
+ * ```javascript
+ * StompJs = require('../../esm5/');
+ * Stomp = StompJs.Stomp;
+ * Stomp.WebSocketClass = require('websocket').w3cwebsocket;
+ * ```
+ *
+ * **Deprecated**
+ *
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+// tslint:disable-next-line:variable-name
+Stomp.WebSocketClass = null;
+//# sourceMappingURL=stomp.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/compatibility/stomp.js.map b/node_modules/@stomp/stompjs/esm6/compatibility/stomp.js.map
new file mode 100644
index 0000000..d22433c
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/compatibility/stomp.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stomp.js","sourceRoot":"","sources":["../../src/compatibility/stomp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAW/C;;;;;;;;GAQG;AACH,MAAM,OAAO,KAAK;IAqBhB;;;;;;;;;;;;;OAaG;IACI,MAAM,CAAC,MAAM,CAAC,GAAW,EAAE,SAAoB;QACpD,mEAAmE;QACnE,yBAAyB;QACzB,EAAE;QACF,iDAAiD;QACjD,EAAE;QACF,0CAA0C;QAC1C,EAAE;QACF,oCAAoC;QACpC,EAAE;QACF,mEAAmE;QACnE,WAAW;QAEX,yCAAyC;QACzC,IAAI,SAAS,IAAI,IAAI,EAAE;YACrB,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;SACjD;QACD,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,MAAM,KAAK,GAAG,KAAK,CAAC,cAAc,IAAI,SAAS,CAAC;YAChD,OAAO,IAAI,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACnC,CAAC,CAAC;QAEF,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACI,MAAM,CAAC,IAAI,CAAC,EAAO;QACxB,IAAI,IAAe,CAAC;QAEpB,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE;YAC5B,IAAI,GAAG,EAAE,CAAC;SACX;aAAM;YACL,OAAO,CAAC,IAAI,CACV,sEAAsE;gBACpE,+EAA+E,CAClF,CAAC;YACF,IAAI,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC;SACjB;QAED,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;;AA9FD;;;;;;;;;;;;;;;;GAgBG;AACH,yCAAyC;AAC3B,oBAAc,GAAQ,IAAI,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/frame-impl.d.ts b/node_modules/@stomp/stompjs/esm6/frame-impl.d.ts
new file mode 100644
index 0000000..44b7802
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/frame-impl.d.ts
@@ -0,0 +1,95 @@
+import { IFrame } from './i-frame';
+import { StompHeaders } from './stomp-headers';
+import { IRawFrameType } from './types';
+/**
+ * Frame class represents a STOMP frame.
+ *
+ * @internal
+ */
+export declare class FrameImpl implements IFrame {
+ /**
+ * STOMP Command
+ */
+ command: string;
+ /**
+ * Headers, key value pairs.
+ */
+ headers: StompHeaders;
+ /**
+ * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
+ */
+ isBinaryBody: boolean;
+ /**
+ * body of the frame
+ */
+ readonly body: string;
+ private _body;
+ /**
+ * body as Uint8Array
+ */
+ readonly binaryBody: Uint8Array;
+ private _binaryBody;
+ private escapeHeaderValues;
+ private skipContentLengthHeader;
+ /**
+ * Frame constructor. `command`, `headers` and `body` are available as properties.
+ *
+ * @internal
+ */
+ constructor(params: {
+ command: string;
+ headers?: StompHeaders;
+ body?: string;
+ binaryBody?: Uint8Array;
+ escapeHeaderValues?: boolean;
+ skipContentLengthHeader?: boolean;
+ });
+ /**
+ * deserialize a STOMP Frame from raw data.
+ *
+ * @internal
+ */
+ static fromRawFrame(rawFrame: IRawFrameType, escapeHeaderValues: boolean): FrameImpl;
+ /**
+ * @internal
+ */
+ toString(): string;
+ /**
+ * serialize this Frame in a format suitable to be passed to WebSocket.
+ * If the body is string the output will be string.
+ * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.
+ *
+ * @internal
+ */
+ serialize(): string | ArrayBuffer;
+ private serializeCmdAndHeaders;
+ private isBodyEmpty;
+ private bodyLength;
+ /**
+ * Compute the size of a UTF-8 string by counting its number of bytes
+ * (and not the number of characters composing the string)
+ */
+ private static sizeOfUTF8;
+ private static toUnit8Array;
+ /**
+ * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.
+ *
+ * @internal
+ */
+ static marshall(params: {
+ command: string;
+ headers?: StompHeaders;
+ body?: string;
+ binaryBody?: Uint8Array;
+ escapeHeaderValues?: boolean;
+ skipContentLengthHeader?: boolean;
+ }): string | ArrayBuffer;
+ /**
+ * Escape header values
+ */
+ private static hdrValueEscape;
+ /**
+ * UnEscape header values
+ */
+ private static hdrValueUnEscape;
+}
diff --git a/node_modules/@stomp/stompjs/esm6/frame-impl.js b/node_modules/@stomp/stompjs/esm6/frame-impl.js
new file mode 100644
index 0000000..916dfad
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/frame-impl.js
@@ -0,0 +1,170 @@
+import { BYTE } from './byte';
+/**
+ * Frame class represents a STOMP frame.
+ *
+ * @internal
+ */
+export class FrameImpl {
+ /**
+ * Frame constructor. `command`, `headers` and `body` are available as properties.
+ *
+ * @internal
+ */
+ constructor(params) {
+ const { command, headers, body, binaryBody, escapeHeaderValues, skipContentLengthHeader, } = params;
+ this.command = command;
+ this.headers = Object.assign({}, headers || {});
+ if (binaryBody) {
+ this._binaryBody = binaryBody;
+ this.isBinaryBody = true;
+ }
+ else {
+ this._body = body || '';
+ this.isBinaryBody = false;
+ }
+ this.escapeHeaderValues = escapeHeaderValues || false;
+ this.skipContentLengthHeader = skipContentLengthHeader || false;
+ }
+ /**
+ * body of the frame
+ */
+ get body() {
+ if (!this._body && this.isBinaryBody) {
+ this._body = new TextDecoder().decode(this._binaryBody);
+ }
+ return this._body;
+ }
+ /**
+ * body as Uint8Array
+ */
+ get binaryBody() {
+ if (!this._binaryBody && !this.isBinaryBody) {
+ this._binaryBody = new TextEncoder().encode(this._body);
+ }
+ return this._binaryBody;
+ }
+ /**
+ * deserialize a STOMP Frame from raw data.
+ *
+ * @internal
+ */
+ static fromRawFrame(rawFrame, escapeHeaderValues) {
+ const headers = {};
+ const trim = (str) => str.replace(/^\s+|\s+$/g, '');
+ // In case of repeated headers, as per standards, first value need to be used
+ for (const header of rawFrame.headers.reverse()) {
+ const idx = header.indexOf(':');
+ const key = trim(header[0]);
+ let value = trim(header[1]);
+ if (escapeHeaderValues &&
+ rawFrame.command !== 'CONNECT' &&
+ rawFrame.command !== 'CONNECTED') {
+ value = FrameImpl.hdrValueUnEscape(value);
+ }
+ headers[key] = value;
+ }
+ return new FrameImpl({
+ command: rawFrame.command,
+ headers,
+ binaryBody: rawFrame.binaryBody,
+ escapeHeaderValues,
+ });
+ }
+ /**
+ * @internal
+ */
+ toString() {
+ return this.serializeCmdAndHeaders();
+ }
+ /**
+ * serialize this Frame in a format suitable to be passed to WebSocket.
+ * If the body is string the output will be string.
+ * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.
+ *
+ * @internal
+ */
+ serialize() {
+ const cmdAndHeaders = this.serializeCmdAndHeaders();
+ if (this.isBinaryBody) {
+ return FrameImpl.toUnit8Array(cmdAndHeaders, this._binaryBody).buffer;
+ }
+ else {
+ return cmdAndHeaders + this._body + BYTE.NULL;
+ }
+ }
+ serializeCmdAndHeaders() {
+ const lines = [this.command];
+ if (this.skipContentLengthHeader) {
+ delete this.headers['content-length'];
+ }
+ for (const name of Object.keys(this.headers || {})) {
+ const value = this.headers[name];
+ if (this.escapeHeaderValues &&
+ this.command !== 'CONNECT' &&
+ this.command !== 'CONNECTED') {
+ lines.push(`${name}:${FrameImpl.hdrValueEscape(`${value}`)}`);
+ }
+ else {
+ lines.push(`${name}:${value}`);
+ }
+ }
+ if (this.isBinaryBody ||
+ (!this.isBodyEmpty() && !this.skipContentLengthHeader)) {
+ lines.push(`content-length:${this.bodyLength()}`);
+ }
+ return lines.join(BYTE.LF) + BYTE.LF + BYTE.LF;
+ }
+ isBodyEmpty() {
+ return this.bodyLength() === 0;
+ }
+ bodyLength() {
+ const binaryBody = this.binaryBody;
+ return binaryBody ? binaryBody.length : 0;
+ }
+ /**
+ * Compute the size of a UTF-8 string by counting its number of bytes
+ * (and not the number of characters composing the string)
+ */
+ static sizeOfUTF8(s) {
+ return s ? new TextEncoder().encode(s).length : 0;
+ }
+ static toUnit8Array(cmdAndHeaders, binaryBody) {
+ const uint8CmdAndHeaders = new TextEncoder().encode(cmdAndHeaders);
+ const nullTerminator = new Uint8Array([0]);
+ const uint8Frame = new Uint8Array(uint8CmdAndHeaders.length + binaryBody.length + nullTerminator.length);
+ uint8Frame.set(uint8CmdAndHeaders);
+ uint8Frame.set(binaryBody, uint8CmdAndHeaders.length);
+ uint8Frame.set(nullTerminator, uint8CmdAndHeaders.length + binaryBody.length);
+ return uint8Frame;
+ }
+ /**
+ * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.
+ *
+ * @internal
+ */
+ static marshall(params) {
+ const frame = new FrameImpl(params);
+ return frame.serialize();
+ }
+ /**
+ * Escape header values
+ */
+ static hdrValueEscape(str) {
+ return str
+ .replace(/\\/g, '\\\\')
+ .replace(/\r/g, '\\r')
+ .replace(/\n/g, '\\n')
+ .replace(/:/g, '\\c');
+ }
+ /**
+ * UnEscape header values
+ */
+ static hdrValueUnEscape(str) {
+ return str
+ .replace(/\\r/g, '\r')
+ .replace(/\\n/g, '\n')
+ .replace(/\\c/g, ':')
+ .replace(/\\\\/g, '\\');
+ }
+}
+//# sourceMappingURL=frame-impl.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/frame-impl.js.map b/node_modules/@stomp/stompjs/esm6/frame-impl.js.map
new file mode 100644
index 0000000..4ce7b9f
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/frame-impl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"frame-impl.js","sourceRoot":"","sources":["../src/frame-impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAK9B;;;;GAIG;AACH,MAAM,OAAO,SAAS;IAyCpB;;;;OAIG;IACH,YAAY,MAOX;QACC,MAAM,EACJ,OAAO,EACP,OAAO,EACP,IAAI,EACJ,UAAU,EACV,kBAAkB,EAClB,uBAAuB,GACxB,GAAG,MAAM,CAAC;QACX,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAI,MAAc,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;QAEzD,IAAI,UAAU,EAAE;YACd,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;YAC9B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;SAC1B;aAAM;YACL,IAAI,CAAC,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;SAC3B;QACD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,IAAI,KAAK,CAAC;QACtD,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,IAAI,KAAK,CAAC;IAClE,CAAC;IA1DD;;OAEG;IACH,IAAI,IAAI;QACN,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,YAAY,EAAE;YACpC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CA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AAS,CAAC,MAAM,CAAC,CAAC;QACpC,OAAO,KAAK,CAAC,SAAS,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,cAAc,CAAC,GAAW;QACvC,OAAO,GAAG;aACP,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;aACtB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;aACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;aACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,gBAAgB,CAAC,GAAW;QACzC,OAAO,GAAG;aACP,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;aACrB,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;aACrB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;aACpB,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/i-frame.d.ts b/node_modules/@stomp/stompjs/esm6/i-frame.d.ts
new file mode 100644
index 0000000..23b922e
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/i-frame.d.ts
@@ -0,0 +1,35 @@
+import { StompHeaders } from './stomp-headers';
+/**
+ * It represents a STOMP frame. Many of the callbacks pass an IFrame received from
+ * the STOMP broker. For advanced usage you might need to access [headers]{@link IFrame#headers}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * {@link IMessage} is an extended IFrame.
+ */
+export interface IFrame {
+ /**
+ * STOMP Command
+ */
+ command: string;
+ /**
+ * Headers, key value pairs.
+ */
+ headers: StompHeaders;
+ /**
+ * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
+ */
+ isBinaryBody: boolean;
+ /**
+ * body of the frame as string
+ */
+ readonly body: string;
+ /**
+ * body as Uint8Array
+ */
+ readonly binaryBody: Uint8Array;
+}
+/**
+ * Alias for {@link IFrame}
+ */
+export declare type Frame = IFrame;
diff --git a/node_modules/@stomp/stompjs/esm6/i-frame.js b/node_modules/@stomp/stompjs/esm6/i-frame.js
new file mode 100644
index 0000000..59ecd05
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/i-frame.js
@@ -0,0 +1 @@
+//# sourceMappingURL=i-frame.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/i-frame.js.map b/node_modules/@stomp/stompjs/esm6/i-frame.js.map
new file mode 100644
index 0000000..5d74572
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/i-frame.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"i-frame.js","sourceRoot":"","sources":["../src/i-frame.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/i-message.d.ts b/node_modules/@stomp/stompjs/esm6/i-message.d.ts
new file mode 100644
index 0000000..d515e44
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/i-message.d.ts
@@ -0,0 +1,32 @@
+import { IFrame } from './i-frame';
+import { StompHeaders } from './stomp-headers';
+/**
+ * Instance of Message will be passed to [subscription callback]{@link Client#subscribe}
+ * and [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ * Since it is an extended {@link FrameImpl}, you can access [headers]{@link FrameImpl#headers}
+ * and [body]{@link FrameImpl#body} as properties.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * See [Client#subscribe]{@link Client#subscribe} for example.
+ */
+export interface IMessage extends IFrame {
+ /**
+ * When subscribing with manual acknowledgement, call this method on the message to ACK the message.
+ *
+ * See [Client#ack]{@link Client#ack} for an example.
+ */
+ ack: (headers?: StompHeaders) => void;
+ /**
+ * When subscribing with manual acknowledgement, call this method on the message to NACK the message.
+ *
+ * See [Client#nack]{@link Client#nack} for an example.
+ */
+ nack: (headers?: StompHeaders) => void;
+}
+/**
+ * Aliased to {@link IMessage}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type Message = IMessage;
diff --git a/node_modules/@stomp/stompjs/esm6/i-message.js b/node_modules/@stomp/stompjs/esm6/i-message.js
new file mode 100644
index 0000000..2281f07
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/i-message.js
@@ -0,0 +1 @@
+//# sourceMappingURL=i-message.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/i-message.js.map b/node_modules/@stomp/stompjs/esm6/i-message.js.map
new file mode 100644
index 0000000..69299a6
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/i-message.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"i-message.js","sourceRoot":"","sources":["../src/i-message.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/i-transaction.d.ts b/node_modules/@stomp/stompjs/esm6/i-transaction.d.ts
new file mode 100644
index 0000000..43726ff
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/i-transaction.d.ts
@@ -0,0 +1,21 @@
+/**
+ * A Transaction is created by calling [Client#begin]{@link Client#begin}
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * TODO: Example and caveat
+ */
+export interface ITransaction {
+ /**
+ * You will need to access this to send, ack, or nack within this transaction.
+ */
+ id: string;
+ /**
+ * Commit this transaction. See [Client#commit]{@link Client#commit} for an example.
+ */
+ commit: () => void;
+ /**
+ * Abort this transaction. See [Client#abort]{@link Client#abort} for an example.
+ */
+ abort: () => void;
+}
diff --git a/node_modules/@stomp/stompjs/esm6/i-transaction.js b/node_modules/@stomp/stompjs/esm6/i-transaction.js
new file mode 100644
index 0000000..5bd747b
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/i-transaction.js
@@ -0,0 +1 @@
+//# sourceMappingURL=i-transaction.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/i-transaction.js.map b/node_modules/@stomp/stompjs/esm6/i-transaction.js.map
new file mode 100644
index 0000000..9a5533e
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/i-transaction.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"i-transaction.js","sourceRoot":"","sources":["../src/i-transaction.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/index.d.ts b/node_modules/@stomp/stompjs/esm6/index.d.ts
new file mode 100644
index 0000000..eb90abd
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/index.d.ts
@@ -0,0 +1,13 @@
+export * from './client';
+export * from './frame-impl';
+export * from './i-frame';
+export * from './i-message';
+export * from './parser';
+export * from './stomp-config';
+export * from './stomp-headers';
+export * from './stomp-subscription';
+export * from './i-transaction';
+export * from './types';
+export * from './versions';
+export * from './compatibility/compat-client';
+export * from './compatibility/stomp';
diff --git a/node_modules/@stomp/stompjs/esm6/index.js b/node_modules/@stomp/stompjs/esm6/index.js
new file mode 100644
index 0000000..fe18f9b
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/index.js
@@ -0,0 +1,12 @@
+export * from './client';
+export * from './frame-impl';
+export * from './parser';
+export * from './stomp-config';
+export * from './stomp-headers';
+export * from './stomp-subscription';
+export * from './types';
+export * from './versions';
+// Compatibility code
+export * from './compatibility/compat-client';
+export * from './compatibility/stomp';
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/index.js.map b/node_modules/@stomp/stompjs/esm6/index.js.map
new file mode 100644
index 0000000..575d317
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAG7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AAErC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAE3B,qBAAqB;AACrB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/parser.d.ts b/node_modules/@stomp/stompjs/esm6/parser.d.ts
new file mode 100644
index 0000000..754d06e
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/parser.d.ts
@@ -0,0 +1,70 @@
+import { IRawFrameType } from './types';
+/**
+ * This is an evented, rec descent parser.
+ * A stream of Octets can be passed and whenever it recognizes
+ * a complete Frame or an incoming ping it will invoke the registered callbacks.
+ *
+ * All incoming Octets are fed into _onByte function.
+ * Depending on current state the _onByte function keeps changing.
+ * Depending on the state it keeps accumulating into _token and _results.
+ * State is indicated by current value of _onByte, all states are named as _collect.
+ *
+ * STOMP standards https://stomp.github.io/stomp-specification-1.2.html
+ * imply that all lengths are considered in bytes (instead of string lengths).
+ * So, before actual parsing, if the incoming data is String it is converted to Octets.
+ * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.
+ *
+ * There is no peek function on the incoming data.
+ * When a state change occurs based on an Octet without consuming the Octet,
+ * the Octet, after state change, is fed again (_reinjectByte).
+ * This became possible as the state change can be determined by inspecting just one Octet.
+ *
+ * There are two modes to collect the body, if content-length header is there then it by counting Octets
+ * otherwise it is determined by NULL terminator.
+ *
+ * Following the standards, the command and headers are converted to Strings
+ * and the body is returned as Octets.
+ * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.
+ *
+ * This parser does not use Regular Expressions as that can only operate on Strings.
+ *
+ * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or
+ * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk
+ * is pushed.
+ *
+ * Typically the higher level function will convert headers to Hash, handle unescaping of header values
+ * (which is protocol version specific), and convert body to text.
+ *
+ * Check the parser.spec.js to understand cases that this parser is supposed to handle.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export declare class Parser {
+ onFrame: (rawFrame: IRawFrameType) => void;
+ onIncomingPing: () => void;
+ private readonly _encoder;
+ private readonly _decoder;
+ private _results;
+ private _token;
+ private _headerKey;
+ private _bodyBytesRemaining;
+ private _onByte;
+ constructor(onFrame: (rawFrame: IRawFrameType) => void, onIncomingPing: () => void);
+ parseChunk(segment: string | ArrayBuffer, appendMissingNULLonIncoming?: boolean): void;
+ private _collectFrame;
+ private _collectCommand;
+ private _collectHeaders;
+ private _reinjectByte;
+ private _collectHeaderKey;
+ private _collectHeaderValue;
+ private _setupCollectBody;
+ private _collectBodyNullTerminated;
+ private _collectBodyFixedSize;
+ private _retrievedBody;
+ private _consumeByte;
+ private _consumeTokenAsUTF8;
+ private _consumeTokenAsRaw;
+ private _initState;
+}
diff --git a/node_modules/@stomp/stompjs/esm6/parser.js b/node_modules/@stomp/stompjs/esm6/parser.js
new file mode 100644
index 0000000..1d87aa5
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/parser.js
@@ -0,0 +1,214 @@
+/**
+ * @internal
+ */
+const NULL = 0;
+/**
+ * @internal
+ */
+const LF = 10;
+/**
+ * @internal
+ */
+const CR = 13;
+/**
+ * @internal
+ */
+const COLON = 58;
+/**
+ * This is an evented, rec descent parser.
+ * A stream of Octets can be passed and whenever it recognizes
+ * a complete Frame or an incoming ping it will invoke the registered callbacks.
+ *
+ * All incoming Octets are fed into _onByte function.
+ * Depending on current state the _onByte function keeps changing.
+ * Depending on the state it keeps accumulating into _token and _results.
+ * State is indicated by current value of _onByte, all states are named as _collect.
+ *
+ * STOMP standards https://stomp.github.io/stomp-specification-1.2.html
+ * imply that all lengths are considered in bytes (instead of string lengths).
+ * So, before actual parsing, if the incoming data is String it is converted to Octets.
+ * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.
+ *
+ * There is no peek function on the incoming data.
+ * When a state change occurs based on an Octet without consuming the Octet,
+ * the Octet, after state change, is fed again (_reinjectByte).
+ * This became possible as the state change can be determined by inspecting just one Octet.
+ *
+ * There are two modes to collect the body, if content-length header is there then it by counting Octets
+ * otherwise it is determined by NULL terminator.
+ *
+ * Following the standards, the command and headers are converted to Strings
+ * and the body is returned as Octets.
+ * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.
+ *
+ * This parser does not use Regular Expressions as that can only operate on Strings.
+ *
+ * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or
+ * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk
+ * is pushed.
+ *
+ * Typically the higher level function will convert headers to Hash, handle unescaping of header values
+ * (which is protocol version specific), and convert body to text.
+ *
+ * Check the parser.spec.js to understand cases that this parser is supposed to handle.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class Parser {
+ constructor(onFrame, onIncomingPing) {
+ this.onFrame = onFrame;
+ this.onIncomingPing = onIncomingPing;
+ this._encoder = new TextEncoder();
+ this._decoder = new TextDecoder();
+ this._token = [];
+ this._initState();
+ }
+ parseChunk(segment, appendMissingNULLonIncoming = false) {
+ let chunk;
+ if (segment instanceof ArrayBuffer) {
+ chunk = new Uint8Array(segment);
+ }
+ else {
+ chunk = this._encoder.encode(segment);
+ }
+ // See https://github.com/stomp-js/stompjs/issues/89
+ // Remove when underlying issue is fixed.
+ //
+ // Send a NULL byte, if the last byte of a Text frame was not NULL.F
+ if (appendMissingNULLonIncoming && chunk[chunk.length - 1] !== 0) {
+ const chunkWithNull = new Uint8Array(chunk.length + 1);
+ chunkWithNull.set(chunk, 0);
+ chunkWithNull[chunk.length] = 0;
+ chunk = chunkWithNull;
+ }
+ // tslint:disable-next-line:prefer-for-of
+ for (let i = 0; i < chunk.length; i++) {
+ const byte = chunk[i];
+ this._onByte(byte);
+ }
+ }
+ // The following implements a simple Rec Descent Parser.
+ // The grammar is simple and just one byte tells what should be the next state
+ _collectFrame(byte) {
+ if (byte === NULL) {
+ // Ignore
+ return;
+ }
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ // Incoming Ping
+ this.onIncomingPing();
+ return;
+ }
+ this._onByte = this._collectCommand;
+ this._reinjectByte(byte);
+ }
+ _collectCommand(byte) {
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ this._results.command = this._consumeTokenAsUTF8();
+ this._onByte = this._collectHeaders;
+ return;
+ }
+ this._consumeByte(byte);
+ }
+ _collectHeaders(byte) {
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ this._setupCollectBody();
+ return;
+ }
+ this._onByte = this._collectHeaderKey;
+ this._reinjectByte(byte);
+ }
+ _reinjectByte(byte) {
+ this._onByte(byte);
+ }
+ _collectHeaderKey(byte) {
+ if (byte === COLON) {
+ this._headerKey = this._consumeTokenAsUTF8();
+ this._onByte = this._collectHeaderValue;
+ return;
+ }
+ this._consumeByte(byte);
+ }
+ _collectHeaderValue(byte) {
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ this._results.headers.push([this._headerKey, this._consumeTokenAsUTF8()]);
+ this._headerKey = undefined;
+ this._onByte = this._collectHeaders;
+ return;
+ }
+ this._consumeByte(byte);
+ }
+ _setupCollectBody() {
+ const contentLengthHeader = this._results.headers.filter((header) => {
+ return header[0] === 'content-length';
+ })[0];
+ if (contentLengthHeader) {
+ this._bodyBytesRemaining = parseInt(contentLengthHeader[1], 10);
+ this._onByte = this._collectBodyFixedSize;
+ }
+ else {
+ this._onByte = this._collectBodyNullTerminated;
+ }
+ }
+ _collectBodyNullTerminated(byte) {
+ if (byte === NULL) {
+ this._retrievedBody();
+ return;
+ }
+ this._consumeByte(byte);
+ }
+ _collectBodyFixedSize(byte) {
+ // It is post decrement, so that we discard the trailing NULL octet
+ if (this._bodyBytesRemaining-- === 0) {
+ this._retrievedBody();
+ return;
+ }
+ this._consumeByte(byte);
+ }
+ _retrievedBody() {
+ this._results.binaryBody = this._consumeTokenAsRaw();
+ this.onFrame(this._results);
+ this._initState();
+ }
+ // Rec Descent Parser helpers
+ _consumeByte(byte) {
+ this._token.push(byte);
+ }
+ _consumeTokenAsUTF8() {
+ return this._decoder.decode(this._consumeTokenAsRaw());
+ }
+ _consumeTokenAsRaw() {
+ const rawResult = new Uint8Array(this._token);
+ this._token = [];
+ return rawResult;
+ }
+ _initState() {
+ this._results = {
+ command: undefined,
+ headers: [],
+ binaryBody: undefined,
+ };
+ this._token = [];
+ this._headerKey = undefined;
+ this._onByte = this._collectFrame;
+ }
+}
+//# sourceMappingURL=parser.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/parser.js.map b/node_modules/@stomp/stompjs/esm6/parser.js.map
new file mode 100644
index 0000000..e47d028
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/parser.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,IAAI,GAAG,CAAC,CAAC;AACf;;GAEG;AACH,MAAM,EAAE,GAAG,EAAE,CAAC;AACd;;GAEG;AACH,MAAM,EAAE,GAAG,EAAE,CAAC;AACd;;GAEG;AACH,MAAM,KAAK,GAAG,EAAE,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,OAAO,MAAM;IAYjB,YACS,OAA0C,EAC1C,cAA0B;QAD1B,YAAO,GAAP,OAAO,CAAmC;QAC1C,mBAAc,GAAd,cAAc,CAAY;QAblB,aAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;QAC7B,aAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;QAItC,WAAM,GAAa,EAAE,CAAC;QAU5B,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAEM,UAAU,CACf,OAA6B,EAC7B,8BAAuC,KAAK;QAE5C,IAAI,KAAiB,CAAC;QAEtB,IAAI,OAAO,YAAY,WAAW,EAAE;YAClC,KAAK,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;SACjC;aAAM;YACL,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC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BAAkB,EAAE,CAAC,CAAC;IACzD,CAAC;IAEO,kBAAkB;QACxB,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,UAAU;QAChB,IAAI,CAAC,QAAQ,GAAG;YACd,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,SAAS;SACtB,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAE5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC;IACpC,CAAC;CACF"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-config.d.ts b/node_modules/@stomp/stompjs/esm6/stomp-config.d.ts
new file mode 100644
index 0000000..dfd3542
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-config.d.ts
@@ -0,0 +1,119 @@
+import { StompHeaders } from './stomp-headers';
+import { ActivationState, closeEventCallbackType, debugFnType, frameCallbackType, messageCallbackType, wsErrorCallbackType } from './types';
+import { Versions } from './versions';
+/**
+ * Configuration options for STOMP Client, each key corresponds to
+ * field by the same name in {@link Client}. This can be passed to
+ * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.
+ *
+ * There used to be a class with the same name in `@stomp/ng2-stompjs`, which has been replaced by
+ * {@link RxStompConfig} and {@link InjectableRxStompConfig}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare class StompConfig {
+ /**
+ * See [Client#brokerURL]{@link Client#brokerURL}.
+ */
+ brokerURL?: string;
+ /**
+ * See See [Client#stompVersions]{@link Client#stompVersions}.
+ */
+ stompVersions?: Versions;
+ /**
+ * See [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+ webSocketFactory?: () => any;
+ /**
+ * See [Client#connectionTimeout]{@link Client#connectionTimeout}.
+ */
+ connectionTimeout?: number;
+ /**
+ * See [Client#reconnectDelay]{@link Client#reconnectDelay}.
+ */
+ reconnectDelay?: number;
+ /**
+ * See [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}.
+ */
+ heartbeatIncoming?: number;
+ /**
+ * See [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+ */
+ heartbeatOutgoing?: number;
+ /**
+ * See [Client#splitLargeFrames]{@link Client#splitLargeFrames}.
+ */
+ splitLargeFrames?: boolean;
+ /**
+ * See [Client#forceBinaryWSFrames]{@link Client#forceBinaryWSFrames}.
+ */
+ forceBinaryWSFrames?: boolean;
+ /**
+ * See [Client#appendMissingNULLonIncoming]{@link Client#appendMissingNULLonIncoming}.
+ */
+ appendMissingNULLonIncoming?: boolean;
+ /**
+ * See [Client#maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+ */
+ maxWebSocketChunkSize?: number;
+ /**
+ * See [Client#connectHeaders]{@link Client#connectHeaders}.
+ */
+ connectHeaders?: StompHeaders;
+ /**
+ * See [Client#disconnectHeaders]{@link Client#disconnectHeaders}.
+ */
+ disconnectHeaders?: StompHeaders;
+ /**
+ * See [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ */
+ onUnhandledMessage?: messageCallbackType;
+ /**
+ * See [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+ */
+ onUnhandledReceipt?: frameCallbackType;
+ /**
+ * See [Client#onUnhandledFrame]{@link Client#onUnhandledFrame}.
+ */
+ onUnhandledFrame?: frameCallbackType;
+ /**
+ * See [Client#beforeConnect]{@link Client#beforeConnect}.
+ */
+ beforeConnect?: () => void | Promise;
+ /**
+ * See [Client#onConnect]{@link Client#onConnect}.
+ */
+ onConnect?: frameCallbackType;
+ /**
+ * See [Client#onDisconnect]{@link Client#onDisconnect}.
+ */
+ onDisconnect?: frameCallbackType;
+ /**
+ * See [Client#onStompError]{@link Client#onStompError}.
+ */
+ onStompError?: frameCallbackType;
+ /**
+ * See [Client#onWebSocketClose]{@link Client#onWebSocketClose}.
+ */
+ onWebSocketClose?: closeEventCallbackType;
+ /**
+ * See [Client#onWebSocketError]{@link Client#onWebSocketError}.
+ */
+ onWebSocketError?: wsErrorCallbackType;
+ /**
+ * See [Client#logRawCommunication]{@link Client#logRawCommunication}.
+ */
+ logRawCommunication?: boolean;
+ /**
+ * See [Client#debug]{@link Client#debug}.
+ */
+ debug?: debugFnType;
+ /**
+ * See [Client#discardWebsocketOnCommFailure]{@link Client#discardWebsocketOnCommFailure}.
+ */
+ discardWebsocketOnCommFailure?: boolean;
+ /**
+ * See [Client#onChangeState]{@link Client#onChangeState}.
+ */
+ onChangeState?: (state: ActivationState) => void;
+}
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-config.js b/node_modules/@stomp/stompjs/esm6/stomp-config.js
new file mode 100644
index 0000000..51056b1
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-config.js
@@ -0,0 +1,13 @@
+/**
+ * Configuration options for STOMP Client, each key corresponds to
+ * field by the same name in {@link Client}. This can be passed to
+ * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.
+ *
+ * There used to be a class with the same name in `@stomp/ng2-stompjs`, which has been replaced by
+ * {@link RxStompConfig} and {@link InjectableRxStompConfig}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class StompConfig {
+}
+//# sourceMappingURL=stomp-config.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-config.js.map b/node_modules/@stomp/stompjs/esm6/stomp-config.js.map
new file mode 100644
index 0000000..83757ca
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-config.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stomp-config.js","sourceRoot":"","sources":["../src/stomp-config.ts"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH,MAAM,OAAO,WAAW;CAkIvB"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-handler.d.ts b/node_modules/@stomp/stompjs/esm6/stomp-handler.d.ts
new file mode 100644
index 0000000..0fafa29
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-handler.d.ts
@@ -0,0 +1,72 @@
+import { Client } from './client';
+import { ITransaction } from './i-transaction';
+import { StompConfig } from './stomp-config';
+import { StompHeaders } from './stomp-headers';
+import { StompSubscription } from './stomp-subscription';
+import { closeEventCallbackType, debugFnType, frameCallbackType, IPublishParams, IStompSocket, messageCallbackType, wsErrorCallbackType } from './types';
+import { Versions } from './versions';
+/**
+ * The STOMP protocol handler
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export declare class StompHandler {
+ private _client;
+ _webSocket: IStompSocket;
+ debug: debugFnType;
+ stompVersions: Versions;
+ connectHeaders: StompHeaders;
+ disconnectHeaders: StompHeaders;
+ heartbeatIncoming: number;
+ heartbeatOutgoing: number;
+ onUnhandledMessage: messageCallbackType;
+ onUnhandledReceipt: frameCallbackType;
+ onUnhandledFrame: frameCallbackType;
+ onConnect: frameCallbackType;
+ onDisconnect: frameCallbackType;
+ onStompError: frameCallbackType;
+ onWebSocketClose: closeEventCallbackType;
+ onWebSocketError: wsErrorCallbackType;
+ logRawCommunication: boolean;
+ splitLargeFrames: boolean;
+ maxWebSocketChunkSize: number;
+ forceBinaryWSFrames: boolean;
+ appendMissingNULLonIncoming: boolean;
+ discardWebsocketOnCommFailure: boolean;
+ readonly connectedVersion: string;
+ private _connectedVersion;
+ readonly connected: boolean;
+ private _connected;
+ private readonly _subscriptions;
+ private readonly _receiptWatchers;
+ private _partialData;
+ private _escapeHeaderValues;
+ private _counter;
+ private _pinger;
+ private _ponger;
+ private _lastServerActivityTS;
+ private _onclose;
+ constructor(_client: Client, _webSocket: IStompSocket, config?: StompConfig);
+ configure(conf: StompConfig): void;
+ start(): void;
+ private readonly _serverFrameHandlers;
+ private _setupHeartbeat;
+ private _closeOrDiscardWebsocket;
+ forceDisconnect(): void;
+ _closeWebsocket(): void;
+ private _discardWebsocket;
+ private _transmit;
+ dispose(): void;
+ private _cleanUp;
+ publish(params: IPublishParams): void;
+ watchForReceipt(receiptId: string, callback: frameCallbackType): void;
+ subscribe(destination: string, callback: messageCallbackType, headers?: StompHeaders): StompSubscription;
+ unsubscribe(id: string, headers?: StompHeaders): void;
+ begin(transactionId: string): ITransaction;
+ commit(transactionId: string): void;
+ abort(transactionId: string): void;
+ ack(messageId: string, subscriptionId: string, headers?: StompHeaders): void;
+ nack(messageId: string, subscriptionId: string, headers?: StompHeaders): void;
+}
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-handler.js b/node_modules/@stomp/stompjs/esm6/stomp-handler.js
new file mode 100644
index 0000000..0ead8cb
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-handler.js
@@ -0,0 +1,373 @@
+import { BYTE } from './byte';
+import { FrameImpl } from './frame-impl';
+import { Parser } from './parser';
+import { StompSocketState, } from './types';
+import { Versions } from './versions';
+import { augmentWebsocket } from './augment-websocket';
+/**
+ * The STOMP protocol handler
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class StompHandler {
+ constructor(_client, _webSocket, config = {}) {
+ this._client = _client;
+ this._webSocket = _webSocket;
+ this._serverFrameHandlers = {
+ // [CONNECTED Frame](http://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame)
+ CONNECTED: frame => {
+ this.debug(`connected to server ${frame.headers.server}`);
+ this._connected = true;
+ this._connectedVersion = frame.headers.version;
+ // STOMP version 1.2 needs header values to be escaped
+ if (this._connectedVersion === Versions.V1_2) {
+ this._escapeHeaderValues = true;
+ }
+ this._setupHeartbeat(frame.headers);
+ this.onConnect(frame);
+ },
+ // [MESSAGE Frame](http://stomp.github.com/stomp-specification-1.2.html#MESSAGE)
+ MESSAGE: frame => {
+ // the callback is registered when the client calls
+ // `subscribe()`.
+ // If there is no registered subscription for the received message,
+ // the default `onUnhandledMessage` callback is used that the client can set.
+ // This is useful for subscriptions that are automatically created
+ // on the browser side (e.g. [RabbitMQ's temporary
+ // queues](http://www.rabbitmq.com/stomp.html)).
+ const subscription = frame.headers.subscription;
+ const onReceive = this._subscriptions[subscription] || this.onUnhandledMessage;
+ // bless the frame to be a Message
+ const message = frame;
+ const client = this;
+ const messageId = this._connectedVersion === Versions.V1_2
+ ? message.headers.ack
+ : message.headers['message-id'];
+ // add `ack()` and `nack()` methods directly to the returned frame
+ // so that a simple call to `message.ack()` can acknowledge the message.
+ message.ack = (headers = {}) => {
+ return client.ack(messageId, subscription, headers);
+ };
+ message.nack = (headers = {}) => {
+ return client.nack(messageId, subscription, headers);
+ };
+ onReceive(message);
+ },
+ // [RECEIPT Frame](http://stomp.github.com/stomp-specification-1.2.html#RECEIPT)
+ RECEIPT: frame => {
+ const callback = this._receiptWatchers[frame.headers['receipt-id']];
+ if (callback) {
+ callback(frame);
+ // Server will acknowledge only once, remove the callback
+ delete this._receiptWatchers[frame.headers['receipt-id']];
+ }
+ else {
+ this.onUnhandledReceipt(frame);
+ }
+ },
+ // [ERROR Frame](http://stomp.github.com/stomp-specification-1.2.html#ERROR)
+ ERROR: frame => {
+ this.onStompError(frame);
+ },
+ };
+ // used to index subscribers
+ this._counter = 0;
+ // subscription callbacks indexed by subscriber's ID
+ this._subscriptions = {};
+ // receipt-watchers indexed by receipts-ids
+ this._receiptWatchers = {};
+ this._partialData = '';
+ this._escapeHeaderValues = false;
+ this._lastServerActivityTS = Date.now();
+ this.configure(config);
+ }
+ get connectedVersion() {
+ return this._connectedVersion;
+ }
+ get connected() {
+ return this._connected;
+ }
+ configure(conf) {
+ // bulk assign all properties to this
+ Object.assign(this, conf);
+ }
+ start() {
+ const parser = new Parser(
+ // On Frame
+ rawFrame => {
+ const frame = FrameImpl.fromRawFrame(rawFrame, this._escapeHeaderValues);
+ // if this.logRawCommunication is set, the rawChunk is logged at this._webSocket.onmessage
+ if (!this.logRawCommunication) {
+ this.debug(`<<< ${frame}`);
+ }
+ const serverFrameHandler = this._serverFrameHandlers[frame.command] || this.onUnhandledFrame;
+ serverFrameHandler(frame);
+ },
+ // On Incoming Ping
+ () => {
+ this.debug('<<< PONG');
+ });
+ this._webSocket.onmessage = (evt) => {
+ this.debug('Received data');
+ this._lastServerActivityTS = Date.now();
+ if (this.logRawCommunication) {
+ const rawChunkAsString = evt.data instanceof ArrayBuffer
+ ? new TextDecoder().decode(evt.data)
+ : evt.data;
+ this.debug(`<<< ${rawChunkAsString}`);
+ }
+ parser.parseChunk(evt.data, this.appendMissingNULLonIncoming);
+ };
+ this._onclose = (closeEvent) => {
+ this.debug(`Connection closed to ${this._client.brokerURL}`);
+ this._cleanUp();
+ this.onWebSocketClose(closeEvent);
+ };
+ this._webSocket.onclose = this._onclose;
+ this._webSocket.onerror = (errorEvent) => {
+ this.onWebSocketError(errorEvent);
+ };
+ this._webSocket.onopen = () => {
+ // Clone before updating
+ const connectHeaders = Object.assign({}, this.connectHeaders);
+ this.debug('Web Socket Opened...');
+ connectHeaders['accept-version'] = this.stompVersions.supportedVersions();
+ connectHeaders['heart-beat'] = [
+ this.heartbeatOutgoing,
+ this.heartbeatIncoming,
+ ].join(',');
+ this._transmit({ command: 'CONNECT', headers: connectHeaders });
+ };
+ }
+ _setupHeartbeat(headers) {
+ if (headers.version !== Versions.V1_1 &&
+ headers.version !== Versions.V1_2) {
+ return;
+ }
+ // It is valid for the server to not send this header
+ // https://stomp.github.io/stomp-specification-1.2.html#Heart-beating
+ if (!headers['heart-beat']) {
+ return;
+ }
+ // heart-beat header received from the server looks like:
+ //
+ // heart-beat: sx, sy
+ const [serverOutgoing, serverIncoming] = headers['heart-beat']
+ .split(',')
+ .map((v) => parseInt(v, 10));
+ if (this.heartbeatOutgoing !== 0 && serverIncoming !== 0) {
+ const ttl = Math.max(this.heartbeatOutgoing, serverIncoming);
+ this.debug(`send PING every ${ttl}ms`);
+ this._pinger = setInterval(() => {
+ if (this._webSocket.readyState === StompSocketState.OPEN) {
+ this._webSocket.send(BYTE.LF);
+ this.debug('>>> PING');
+ }
+ }, ttl);
+ }
+ if (this.heartbeatIncoming !== 0 && serverOutgoing !== 0) {
+ const ttl = Math.max(this.heartbeatIncoming, serverOutgoing);
+ this.debug(`check PONG every ${ttl}ms`);
+ this._ponger = setInterval(() => {
+ const delta = Date.now() - this._lastServerActivityTS;
+ // We wait twice the TTL to be flexible on window's setInterval calls
+ if (delta > ttl * 2) {
+ this.debug(`did not receive server activity for the last ${delta}ms`);
+ this._closeOrDiscardWebsocket();
+ }
+ }, ttl);
+ }
+ }
+ _closeOrDiscardWebsocket() {
+ if (this.discardWebsocketOnCommFailure) {
+ this.debug('Discarding websocket, the underlying socket may linger for a while');
+ this._discardWebsocket();
+ }
+ else {
+ this.debug('Issuing close on the websocket');
+ this._closeWebsocket();
+ }
+ }
+ forceDisconnect() {
+ if (this._webSocket) {
+ if (this._webSocket.readyState === StompSocketState.CONNECTING ||
+ this._webSocket.readyState === StompSocketState.OPEN) {
+ this._closeOrDiscardWebsocket();
+ }
+ }
+ }
+ _closeWebsocket() {
+ this._webSocket.onmessage = () => { }; // ignore messages
+ this._webSocket.close();
+ }
+ _discardWebsocket() {
+ if (!this._webSocket.terminate) {
+ augmentWebsocket(this._webSocket, (msg) => this.debug(msg));
+ }
+ this._webSocket.terminate();
+ }
+ _transmit(params) {
+ const { command, headers, body, binaryBody, skipContentLengthHeader } = params;
+ const frame = new FrameImpl({
+ command,
+ headers,
+ body,
+ binaryBody,
+ escapeHeaderValues: this._escapeHeaderValues,
+ skipContentLengthHeader,
+ });
+ let rawChunk = frame.serialize();
+ if (this.logRawCommunication) {
+ this.debug(`>>> ${rawChunk}`);
+ }
+ else {
+ this.debug(`>>> ${frame}`);
+ }
+ if (this.forceBinaryWSFrames && typeof rawChunk === 'string') {
+ rawChunk = new TextEncoder().encode(rawChunk);
+ }
+ if (typeof rawChunk !== 'string' || !this.splitLargeFrames) {
+ this._webSocket.send(rawChunk);
+ }
+ else {
+ let out = rawChunk;
+ while (out.length > 0) {
+ const chunk = out.substring(0, this.maxWebSocketChunkSize);
+ out = out.substring(this.maxWebSocketChunkSize);
+ this._webSocket.send(chunk);
+ this.debug(`chunk sent = ${chunk.length}, remaining = ${out.length}`);
+ }
+ }
+ }
+ dispose() {
+ if (this.connected) {
+ try {
+ // clone before updating
+ const disconnectHeaders = Object.assign({}, this.disconnectHeaders);
+ if (!disconnectHeaders.receipt) {
+ disconnectHeaders.receipt = `close-${this._counter++}`;
+ }
+ this.watchForReceipt(disconnectHeaders.receipt, frame => {
+ this._closeWebsocket();
+ this._cleanUp();
+ this.onDisconnect(frame);
+ });
+ this._transmit({ command: 'DISCONNECT', headers: disconnectHeaders });
+ }
+ catch (error) {
+ this.debug(`Ignoring error during disconnect ${error}`);
+ }
+ }
+ else {
+ if (this._webSocket.readyState === StompSocketState.CONNECTING ||
+ this._webSocket.readyState === StompSocketState.OPEN) {
+ this._closeWebsocket();
+ }
+ }
+ }
+ _cleanUp() {
+ this._connected = false;
+ if (this._pinger) {
+ clearInterval(this._pinger);
+ }
+ if (this._ponger) {
+ clearInterval(this._ponger);
+ }
+ }
+ publish(params) {
+ const { destination, headers, body, binaryBody, skipContentLengthHeader } = params;
+ const hdrs = Object.assign({ destination }, headers);
+ this._transmit({
+ command: 'SEND',
+ headers: hdrs,
+ body,
+ binaryBody,
+ skipContentLengthHeader,
+ });
+ }
+ watchForReceipt(receiptId, callback) {
+ this._receiptWatchers[receiptId] = callback;
+ }
+ subscribe(destination, callback, headers = {}) {
+ headers = Object.assign({}, headers);
+ if (!headers.id) {
+ headers.id = `sub-${this._counter++}`;
+ }
+ headers.destination = destination;
+ this._subscriptions[headers.id] = callback;
+ this._transmit({ command: 'SUBSCRIBE', headers });
+ const client = this;
+ return {
+ id: headers.id,
+ unsubscribe(hdrs) {
+ return client.unsubscribe(headers.id, hdrs);
+ },
+ };
+ }
+ unsubscribe(id, headers = {}) {
+ headers = Object.assign({}, headers);
+ delete this._subscriptions[id];
+ headers.id = id;
+ this._transmit({ command: 'UNSUBSCRIBE', headers });
+ }
+ begin(transactionId) {
+ const txId = transactionId || `tx-${this._counter++}`;
+ this._transmit({
+ command: 'BEGIN',
+ headers: {
+ transaction: txId,
+ },
+ });
+ const client = this;
+ return {
+ id: txId,
+ commit() {
+ client.commit(txId);
+ },
+ abort() {
+ client.abort(txId);
+ },
+ };
+ }
+ commit(transactionId) {
+ this._transmit({
+ command: 'COMMIT',
+ headers: {
+ transaction: transactionId,
+ },
+ });
+ }
+ abort(transactionId) {
+ this._transmit({
+ command: 'ABORT',
+ headers: {
+ transaction: transactionId,
+ },
+ });
+ }
+ ack(messageId, subscriptionId, headers = {}) {
+ headers = Object.assign({}, headers);
+ if (this._connectedVersion === Versions.V1_2) {
+ headers.id = messageId;
+ }
+ else {
+ headers['message-id'] = messageId;
+ }
+ headers.subscription = subscriptionId;
+ this._transmit({ command: 'ACK', headers });
+ }
+ nack(messageId, subscriptionId, headers = {}) {
+ headers = Object.assign({}, headers);
+ if (this._connectedVersion === Versions.V1_2) {
+ headers.id = messageId;
+ }
+ else {
+ headers['message-id'] = messageId;
+ }
+ headers.subscription = subscriptionId;
+ return this._transmit({ command: 'NACK', headers });
+ }
+}
+//# sourceMappingURL=stomp-handler.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-handler.js.map b/node_modules/@stomp/stompjs/esm6/stomp-handler.js.map
new file mode 100644
index 0000000..0fbe52b
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-handler.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stomp-handler.js","sourceRoot":"","sources":["../src/stomp-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,OAAO,EAQL,gBAAgB,GAEjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE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AsB,EACtB,UAAwB,EAAE;QAE1B,OAAO,GAAI,MAAc,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAE9C,IAAI,IAAI,CAAC,iBAAiB,KAAK,QAAQ,CAAC,IAAI,EAAE;YAC5C,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;SACxB;aAAM;YACL,OAAO,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;SACnC;QACD,OAAO,CAAC,YAAY,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IAC9C,CAAC;IAEM,IAAI,CACT,SAAiB,EACjB,cAAsB,EACtB,UAAwB,EAAE;QAE1B,OAAO,GAAI,MAAc,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAE9C,IAAI,IAAI,CAAC,iBAAiB,KAAK,QAAQ,CAAC,IAAI,EAAE;YAC5C,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;SACxB;aAAM;YACL,OAAO,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;SACnC;QACD,OAAO,CAAC,YAAY,GAAG,cAAc,CAAC;QACtC,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IACtD,CAAC;CACF"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-headers.d.ts b/node_modules/@stomp/stompjs/esm6/stomp-headers.d.ts
new file mode 100644
index 0000000..ec31b2b
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-headers.d.ts
@@ -0,0 +1,12 @@
+/**
+ * STOMP headers. Many functions calls will accept headers as parameters.
+ * The headers sent by Broker will be available as [IFrame#headers]{@link IFrame#headers}.
+ *
+ * `key` and `value` must be valid strings.
+ * In addition, `key` must not contain `CR`, `LF`, or `:`.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare class StompHeaders {
+ [key: string]: string;
+}
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-headers.js b/node_modules/@stomp/stompjs/esm6/stomp-headers.js
new file mode 100644
index 0000000..47f3655
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-headers.js
@@ -0,0 +1,12 @@
+/**
+ * STOMP headers. Many functions calls will accept headers as parameters.
+ * The headers sent by Broker will be available as [IFrame#headers]{@link IFrame#headers}.
+ *
+ * `key` and `value` must be valid strings.
+ * In addition, `key` must not contain `CR`, `LF`, or `:`.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class StompHeaders {
+}
+//# sourceMappingURL=stomp-headers.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-headers.js.map b/node_modules/@stomp/stompjs/esm6/stomp-headers.js.map
new file mode 100644
index 0000000..c7c257a
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-headers.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stomp-headers.js","sourceRoot":"","sources":["../src/stomp-headers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,OAAO,YAAY;CAExB"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-subscription.d.ts b/node_modules/@stomp/stompjs/esm6/stomp-subscription.d.ts
new file mode 100644
index 0000000..bb0df43
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-subscription.d.ts
@@ -0,0 +1,16 @@
+import { StompHeaders } from './stomp-headers';
+/**
+ * Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare class StompSubscription {
+ /**
+ * Id associated with this subscription.
+ */
+ id: string;
+ /**
+ * Unsubscribe. See [Client#unsubscribe]{@link Client#unsubscribe} for an example.
+ */
+ unsubscribe: (headers?: StompHeaders) => void;
+}
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-subscription.js b/node_modules/@stomp/stompjs/esm6/stomp-subscription.js
new file mode 100644
index 0000000..06b068d
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-subscription.js
@@ -0,0 +1,8 @@
+/**
+ * Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class StompSubscription {
+}
+//# sourceMappingURL=stomp-subscription.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/stomp-subscription.js.map b/node_modules/@stomp/stompjs/esm6/stomp-subscription.js.map
new file mode 100644
index 0000000..d0b89b7
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/stomp-subscription.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"stomp-subscription.js","sourceRoot":"","sources":["../src/stomp-subscription.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,OAAO,iBAAiB;CAU7B"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/types.d.ts b/node_modules/@stomp/stompjs/esm6/types.d.ts
new file mode 100644
index 0000000..9aee517
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/types.d.ts
@@ -0,0 +1,140 @@
+import { IFrame } from './i-frame';
+import { IMessage } from './i-message';
+import { StompHeaders } from './stomp-headers';
+/**
+ * This callback will receive a `string` as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type debugFnType = (msg: string) => void;
+/**
+ * This callback will receive a {@link IMessage} as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type messageCallbackType = (message: IMessage) => void;
+/**
+ * This callback will receive a {@link IFrame} as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type frameCallbackType = (receipt: IFrame) => void;
+/**
+ * This callback will receive a [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
+ * as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type closeEventCallbackType = (evt: T) => void;
+/**
+ * This callback will receive an [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}
+ * as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare type wsErrorCallbackType = (evt: T) => void;
+/**
+ * Parameters for [Client#publish]{@link Client#publish}.
+ * Aliased as publishParams as well.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export interface IPublishParams {
+ /**
+ * destination end point
+ */
+ destination: string;
+ /**
+ * headers (optional)
+ */
+ headers?: StompHeaders;
+ /**
+ * body (optional)
+ */
+ body?: string;
+ /**
+ * binary body (optional)
+ */
+ binaryBody?: Uint8Array;
+ /**
+ * By default a `content-length` header will be added in the Frame to the broker.
+ * Set it to `true` for the header to be skipped.
+ */
+ skipContentLengthHeader?: boolean;
+}
+/**
+ * Backward compatibility, switch to {@link IPublishParams}.
+ */
+export declare type publishParams = IPublishParams;
+/**
+ * Used in {@link IRawFrameType}
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export declare type RawHeaderType = [string, string];
+/**
+ * The parser yield frames in this structure
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export interface IRawFrameType {
+ command: string;
+ headers: RawHeaderType[];
+ binaryBody: Uint8Array;
+}
+/**
+ * @internal
+ */
+export interface IStompSocketMessageEvent {
+ data?: string | ArrayBuffer;
+}
+/**
+ * Copied from Websocket interface to avoid dom typelib dependency.
+ *
+ * @internal
+ */
+export interface IStompSocket {
+ onclose: ((this: IStompSocket, ev?: any) => any) | null;
+ onerror: ((this: IStompSocket, ev: any) => any) | null;
+ onmessage: ((this: IStompSocket, ev: IStompSocketMessageEvent) => any) | null;
+ onopen: ((this: IStompSocket, ev?: any) => any) | null;
+ terminate?: ((this: IStompSocket) => any) | null;
+ /**
+ * Returns a string that indicates how binary data from the socket is exposed to scripts:
+ * We support only 'arraybuffer'.
+ */
+ binaryType: 'arraybuffer';
+ /**
+ * Returns the state of the socket connection. It can have the values of StompSocketState.
+ */
+ readonly readyState: number;
+ /**
+ * Closes the connection.
+ */
+ close(): void;
+ /**
+ * Transmits data using the connection. data can be a string or an ArrayBuffer.
+ */
+ send(data: string | ArrayBuffer): void;
+}
+/**
+ * Possible states for the IStompSocket
+ */
+export declare enum StompSocketState {
+ CONNECTING = 0,
+ OPEN = 1,
+ CLOSING = 2,
+ CLOSED = 3
+}
+/**
+ * Possible activation state
+ */
+export declare enum ActivationState {
+ ACTIVE = 0,
+ DEACTIVATING = 1,
+ INACTIVE = 2
+}
diff --git a/node_modules/@stomp/stompjs/esm6/types.js b/node_modules/@stomp/stompjs/esm6/types.js
new file mode 100644
index 0000000..87b2ece
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/types.js
@@ -0,0 +1,20 @@
+/**
+ * Possible states for the IStompSocket
+ */
+export var StompSocketState;
+(function (StompSocketState) {
+ StompSocketState[StompSocketState["CONNECTING"] = 0] = "CONNECTING";
+ StompSocketState[StompSocketState["OPEN"] = 1] = "OPEN";
+ StompSocketState[StompSocketState["CLOSING"] = 2] = "CLOSING";
+ StompSocketState[StompSocketState["CLOSED"] = 3] = "CLOSED";
+})(StompSocketState || (StompSocketState = {}));
+/**
+ * Possible activation state
+ */
+export var ActivationState;
+(function (ActivationState) {
+ ActivationState[ActivationState["ACTIVE"] = 0] = "ACTIVE";
+ ActivationState[ActivationState["DEACTIVATING"] = 1] = "DEACTIVATING";
+ ActivationState[ActivationState["INACTIVE"] = 2] = "INACTIVE";
+})(ActivationState || (ActivationState = {}));
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/types.js.map b/node_modules/@stomp/stompjs/esm6/types.js.map
new file mode 100644
index 0000000..4cbdf7d
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA0IA;;GAEG;AACH,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,mEAAU,CAAA;IACV,uDAAI,CAAA;IACJ,6DAAO,CAAA;IACP,2DAAM,CAAA;AACR,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,yDAAM,CAAA;IACN,qEAAY,CAAA;IACZ,6DAAQ,CAAA;AACV,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/versions.d.ts b/node_modules/@stomp/stompjs/esm6/versions.d.ts
new file mode 100644
index 0000000..fd1d298
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/versions.d.ts
@@ -0,0 +1,39 @@
+/**
+ * Supported STOMP versions
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export declare class Versions {
+ versions: string[];
+ /**
+ * Indicates protocol version 1.0
+ */
+ static V1_0: string;
+ /**
+ * Indicates protocol version 1.1
+ */
+ static V1_1: string;
+ /**
+ * Indicates protocol version 1.2
+ */
+ static V1_2: string;
+ /**
+ * @internal
+ */
+ static default: Versions;
+ /**
+ * Takes an array of string of versions, typical elements '1.0', '1.1', or '1.2'
+ *
+ * You will an instance if this class if you want to override supported versions to be declared during
+ * STOMP handshake.
+ */
+ constructor(versions: string[]);
+ /**
+ * Used as part of CONNECT STOMP Frame
+ */
+ supportedVersions(): string;
+ /**
+ * Used while creating a WebSocket
+ */
+ protocolVersions(): string[];
+}
diff --git a/node_modules/@stomp/stompjs/esm6/versions.js b/node_modules/@stomp/stompjs/esm6/versions.js
new file mode 100644
index 0000000..b22da92
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/versions.js
@@ -0,0 +1,49 @@
+/**
+ * Supported STOMP versions
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class Versions {
+ /**
+ * Takes an array of string of versions, typical elements '1.0', '1.1', or '1.2'
+ *
+ * You will an instance if this class if you want to override supported versions to be declared during
+ * STOMP handshake.
+ */
+ constructor(versions) {
+ this.versions = versions;
+ }
+ /**
+ * Used as part of CONNECT STOMP Frame
+ */
+ supportedVersions() {
+ return this.versions.join(',');
+ }
+ /**
+ * Used while creating a WebSocket
+ */
+ protocolVersions() {
+ return this.versions.map(x => `v${x.replace('.', '')}.stomp`);
+ }
+}
+/**
+ * Indicates protocol version 1.0
+ */
+Versions.V1_0 = '1.0';
+/**
+ * Indicates protocol version 1.1
+ */
+Versions.V1_1 = '1.1';
+/**
+ * Indicates protocol version 1.2
+ */
+Versions.V1_2 = '1.2';
+/**
+ * @internal
+ */
+Versions.default = new Versions([
+ Versions.V1_0,
+ Versions.V1_1,
+ Versions.V1_2,
+]);
+//# sourceMappingURL=versions.js.map
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/esm6/versions.js.map b/node_modules/@stomp/stompjs/esm6/versions.js.map
new file mode 100644
index 0000000..2928445
--- /dev/null
+++ b/node_modules/@stomp/stompjs/esm6/versions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"versions.js","sourceRoot":"","sources":["../src/versions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,OAAO,QAAQ;IAuBnB;;;;;OAKG;IACH,YAAmB,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEzC;;OAEG;IACI,iBAAiB;QACtB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,gBAAgB;QACrB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC;IAChE,CAAC;;AA1CD;;GAEG;AACW,aAAI,GAAG,KAAK,CAAC;AAC3B;;GAEG;AACW,aAAI,GAAG,KAAK,CAAC;AAC3B;;GAEG;AACW,aAAI,GAAG,KAAK,CAAC;AAE3B;;GAEG;AACW,gBAAO,GAAG,IAAI,QAAQ,CAAC;IACnC,QAAQ,CAAC,IAAI;IACb,QAAQ,CAAC,IAAI;IACb,QAAQ,CAAC,IAAI;CACd,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@stomp/stompjs/index.d.ts b/node_modules/@stomp/stompjs/index.d.ts
new file mode 100644
index 0000000..4116e1b
--- /dev/null
+++ b/node_modules/@stomp/stompjs/index.d.ts
@@ -0,0 +1 @@
+export * from './esm6/';
diff --git a/node_modules/@stomp/stompjs/package.json b/node_modules/@stomp/stompjs/package.json
new file mode 100644
index 0000000..eaa5b87
--- /dev/null
+++ b/node_modules/@stomp/stompjs/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "@stomp/stompjs",
+ "version": "6.1.2",
+ "description": "STOMP client for Javascript and Typescript",
+ "scripts": {
+ "clean": "rm -rf bundles esm6",
+ "build-webpack": "webpack && webpack --mode=production --output-filename=stomp.umd.min.js",
+ "build": "npm run clean && npx tsc && npm run build-webpack",
+ "test": "jasmine",
+ "karma": "karma start --single-run",
+ "lint": "tslint 'src/**/*.ts'",
+ "prettier": "prettier --write .",
+ "prepublishOnly": "npm run lint && npm run build && npm run karma && npm run test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/stomp-js/stompjs.git"
+ },
+ "keywords": [
+ "STOMP",
+ "RabbitMQ",
+ "ActiveMQ",
+ "Websocket",
+ "messaging",
+ "queue",
+ "SockJS"
+ ],
+ "author": "deepak@kreatio.com",
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/stomp-js/stompjs/issues"
+ },
+ "homepage": "https://github.com/stomp-js/stompjs#readme",
+ "devDependencies": {
+ "@chiragrupani/karma-chromium-edge-launcher": "^2.0.0",
+ "awesome-typescript-loader": "^5.2.0",
+ "jasmine": "^3.1.0",
+ "karma": "^5.0.3",
+ "karma-chrome-launcher": "^3.0.0",
+ "karma-firefox-launcher": "^2.0.0",
+ "karma-jasmine": "^4.0.0",
+ "karma-safari-launcher": "git://github.com/RLovelett/karma-safari-launcher.git#safari-webdriver",
+ "karma-summary-reporter": "^2.0.2",
+ "prettier": "^2.1.2",
+ "text-encoding": "^0.7.0",
+ "tslint": "^6.0.0",
+ "tslint-config-prettier": "^1.18.0",
+ "typescript": "=3.6.4",
+ "webpack": "^4.33.0",
+ "webpack-cli": "^3.3.2",
+ "ws": "^8.2.0"
+ },
+ "module": "./esm6/index.js",
+ "main": "bundles/stomp.umd.js",
+ "typings": "index.d.ts",
+ "sideEffects": false,
+ "dependencies": {}
+}
diff --git a/node_modules/@stomp/stompjs/src/augment-websocket.ts b/node_modules/@stomp/stompjs/src/augment-websocket.ts
new file mode 100644
index 0000000..c87cee7
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/augment-websocket.ts
@@ -0,0 +1,38 @@
+import { IStompSocket } from './types';
+
+/**
+ * @internal
+ */
+export function augmentWebsocket(
+ webSocket: IStompSocket,
+ debug: (msg: string) => void
+) {
+ webSocket.terminate = function () {
+ const noOp = () => {};
+
+ // set all callbacks to no op
+ this.onerror = noOp;
+ this.onmessage = noOp;
+ this.onopen = noOp;
+
+ const ts = new Date();
+
+ const origOnClose = this.onclose;
+
+ // Track delay in actual closure of the socket
+ this.onclose = closeEvent => {
+ const delay = new Date().getTime() - ts.getTime();
+ debug(
+ `Discarded socket closed after ${delay}ms, with code/reason: ${closeEvent.code}/${closeEvent.reason}`
+ );
+ };
+
+ this.close();
+
+ origOnClose.call(this, {
+ code: 4001,
+ reason: 'Heartbeat failure, discarding the socket',
+ wasClean: false,
+ });
+ };
+}
diff --git a/node_modules/@stomp/stompjs/src/byte.ts b/node_modules/@stomp/stompjs/src/byte.ts
new file mode 100644
index 0000000..d056861
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/byte.ts
@@ -0,0 +1,13 @@
+/**
+ * Some byte values, used as per STOMP specifications.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export const BYTE = {
+ // LINEFEED byte (octet 10)
+ LF: '\x0A',
+ // NULL byte (octet 0)
+ NULL: '\x00',
+};
diff --git a/node_modules/@stomp/stompjs/src/client.ts b/node_modules/@stomp/stompjs/src/client.ts
new file mode 100644
index 0000000..3e02ef4
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/client.ts
@@ -0,0 +1,812 @@
+import { ITransaction } from './i-transaction';
+import { StompConfig } from './stomp-config';
+import { StompHandler } from './stomp-handler';
+import { StompHeaders } from './stomp-headers';
+import { StompSubscription } from './stomp-subscription';
+import {
+ ActivationState,
+ closeEventCallbackType,
+ debugFnType,
+ frameCallbackType,
+ IPublishParams,
+ IStompSocket,
+ messageCallbackType,
+ StompSocketState,
+ wsErrorCallbackType,
+} from './types';
+import { Versions } from './versions';
+
+/**
+ * @internal
+ */
+declare const WebSocket: {
+ prototype: IStompSocket;
+ new (url: string, protocols?: string | string[]): IStompSocket;
+};
+
+/**
+ * STOMP Client Class.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class Client {
+ /**
+ * The URL for the STOMP broker to connect to.
+ * Typically like `"ws://broker.329broker.com:15674/ws"` or `"wss://broker.329broker.com:15674/ws"`.
+ *
+ * Only one of this or [Client#webSocketFactory]{@link Client#webSocketFactory} need to be set.
+ * If both are set, [Client#webSocketFactory]{@link Client#webSocketFactory} will be used.
+ *
+ * If your environment does not support WebSockets natively, please refer to
+ * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.
+ */
+ public brokerURL: string;
+
+ /**
+ * STOMP versions to attempt during STOMP handshake. By default versions `1.0`, `1.1`, and `1.2` are attempted.
+ *
+ * Example:
+ * ```javascript
+ * // Try only versions 1.0 and 1.1
+ * client.stompVersions = new Versions(['1.0', '1.1'])
+ * ```
+ */
+ public stompVersions = Versions.default;
+
+ /**
+ * This function should return a WebSocket or a similar (e.g. SockJS) object.
+ * If your environment does not support WebSockets natively, please refer to
+ * [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.
+ * If your STOMP Broker supports WebSockets, prefer setting [Client#brokerURL]{@link Client#brokerURL}.
+ *
+ * If both this and [Client#brokerURL]{@link Client#brokerURL} are set, this will be used.
+ *
+ * Example:
+ * ```javascript
+ * // use a WebSocket
+ * client.webSocketFactory= function () {
+ * return new WebSocket("wss://broker.329broker.com:15674/ws");
+ * };
+ *
+ * // Typical usage with SockJS
+ * client.webSocketFactory= function () {
+ * return new SockJS("http://broker.329broker.com/stomp");
+ * };
+ * ```
+ */
+ public webSocketFactory: () => IStompSocket;
+
+ /**
+ * Will retry if Stomp connection is not established in specified milliseconds.
+ * Default 0, which implies wait for ever.
+ */
+ public connectionTimeout: number = 0;
+
+ private _connectionWatcher: number; // Timer
+
+ /**
+ * automatically reconnect with delay in milliseconds, set to 0 to disable.
+ */
+ public reconnectDelay: number = 5000;
+
+ /**
+ * Incoming heartbeat interval in milliseconds. Set to 0 to disable.
+ */
+ public heartbeatIncoming: number = 10000;
+
+ /**
+ * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.
+ */
+ public heartbeatOutgoing: number = 10000;
+
+ /**
+ * This switches on a non standard behavior while sending WebSocket packets.
+ * It splits larger (text) packets into chunks of [maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+ * Only Java Spring brokers seems to use this mode.
+ *
+ * WebSockets, by itself, split large (text) packets,
+ * so it is not needed with a truly compliant STOMP/WebSocket broker.
+ * Actually setting it for such broker will cause large messages to fail.
+ *
+ * `false` by default.
+ *
+ * Binary frames are never split.
+ */
+ public splitLargeFrames: boolean = false;
+
+ /**
+ * See [splitLargeFrames]{@link Client#splitLargeFrames}.
+ * This has no effect if [splitLargeFrames]{@link Client#splitLargeFrames} is `false`.
+ */
+ public maxWebSocketChunkSize: number = 8 * 1024;
+
+ /**
+ * Usually the
+ * [type of WebSocket frame]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send#Parameters}
+ * is automatically decided by type of the payload.
+ * Default is `false`, which should work with all compliant brokers.
+ *
+ * Set this flag to force binary frames.
+ */
+ public forceBinaryWSFrames: boolean = false;
+
+ /**
+ * A bug in ReactNative chops a string on occurrence of a NULL.
+ * See issue [https://github.com/stomp-js/stompjs/issues/89]{@link https://github.com/stomp-js/stompjs/issues/89}.
+ * This makes incoming WebSocket messages invalid STOMP packets.
+ * Setting this flag attempts to reverse the damage by appending a NULL.
+ * If the broker splits a large message into multiple WebSocket messages,
+ * this flag will cause data loss and abnormal termination of connection.
+ *
+ * This is not an ideal solution, but a stop gap until the underlying issue is fixed at ReactNative library.
+ */
+ public appendMissingNULLonIncoming: boolean = false;
+
+ /**
+ * Underlying WebSocket instance, READONLY.
+ */
+ get webSocket(): IStompSocket {
+ return this._stompHandler ? this._stompHandler._webSocket : undefined;
+ }
+
+ /**
+ * Connection headers, important keys - `login`, `passcode`, `host`.
+ * Though STOMP 1.2 standard marks these keys to be present, check your broker documentation for
+ * details specific to your broker.
+ */
+ public connectHeaders: StompHeaders;
+
+ /**
+ * Disconnection headers.
+ */
+ get disconnectHeaders(): StompHeaders {
+ return this._disconnectHeaders;
+ }
+
+ set disconnectHeaders(value: StompHeaders) {
+ this._disconnectHeaders = value;
+ if (this._stompHandler) {
+ this._stompHandler.disconnectHeaders = this._disconnectHeaders;
+ }
+ }
+ private _disconnectHeaders: StompHeaders;
+
+ /**
+ * This function will be called for any unhandled messages.
+ * It is useful for receiving messages sent to RabbitMQ temporary queues.
+ *
+ * It can also get invoked with stray messages while the server is processing
+ * a request to [Client#unsubscribe]{@link Client#unsubscribe}
+ * from an endpoint.
+ *
+ * The actual {@link IMessage} will be passed as parameter to the callback.
+ */
+ public onUnhandledMessage: messageCallbackType;
+
+ /**
+ * STOMP brokers can be requested to notify when an operation is actually completed.
+ * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}. See
+ * [Client#watchForReceipt]{@link Client#watchForReceipt} for examples.
+ *
+ * The actual {@link FrameImpl} will be passed as parameter to the callback.
+ */
+ public onUnhandledReceipt: frameCallbackType;
+
+ /**
+ * Will be invoked if {@link FrameImpl} of unknown type is received from the STOMP broker.
+ *
+ * The actual {@link IFrame} will be passed as parameter to the callback.
+ */
+ public onUnhandledFrame: frameCallbackType;
+
+ /**
+ * `true` if there is a active connection with STOMP Broker
+ */
+ get connected(): boolean {
+ return !!this._stompHandler && this._stompHandler.connected;
+ }
+
+ /**
+ * Callback, invoked on before a connection connection to the STOMP broker.
+ *
+ * You can change options on the client, which will impact the immediate connect.
+ * It is valid to call [Client#decativate]{@link Client#deactivate} in this callback.
+ *
+ * As of version 5.1, this callback can be
+ * [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
+ * (i.e., it can return a
+ * [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)).
+ * In that case connect will be called only after the Promise is resolved.
+ * This can be used to reliably fetch credentials, access token etc. from some other service
+ * in an asynchronous way.
+ */
+ public beforeConnect: () => void | Promise;
+
+ /**
+ * Callback, invoked on every successful connection to the STOMP broker.
+ *
+ * The actual {@link FrameImpl} will be passed as parameter to the callback.
+ * Sometimes clients will like to use headers from this frame.
+ */
+ public onConnect: frameCallbackType;
+
+ /**
+ * Callback, invoked on every successful disconnection from the STOMP broker. It will not be invoked if
+ * the STOMP broker disconnected due to an error.
+ *
+ * The actual Receipt {@link FrameImpl} acknowledging the DISCONNECT will be passed as parameter to the callback.
+ *
+ * The way STOMP protocol is designed, the connection may close/terminate without the client
+ * receiving the Receipt {@link FrameImpl} acknowledging the DISCONNECT.
+ * You might find [Client#onWebSocketClose]{@link Client#onWebSocketClose} more appropriate to watch
+ * STOMP broker disconnects.
+ */
+ public onDisconnect: frameCallbackType;
+
+ /**
+ * Callback, invoked on an ERROR frame received from the STOMP Broker.
+ * A compliant STOMP Broker will close the connection after this type of frame.
+ * Please check broker specific documentation for exact behavior.
+ *
+ * The actual {@link IFrame} will be passed as parameter to the callback.
+ */
+ public onStompError: frameCallbackType;
+
+ /**
+ * Callback, invoked when underlying WebSocket is closed.
+ *
+ * Actual [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
+ * is passed as parameter to the callback.
+ */
+ public onWebSocketClose: closeEventCallbackType;
+
+ /**
+ * Callback, invoked when underlying WebSocket raises an error.
+ *
+ * Actual [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}
+ * is passed as parameter to the callback.
+ */
+ public onWebSocketError: wsErrorCallbackType;
+
+ /**
+ * Set it to log the actual raw communication with the broker.
+ * When unset, it logs headers of the parsed frames.
+ *
+ * Change in this effects from next broker reconnect.
+ *
+ * **Caution: this assumes that frames only have valid UTF8 strings.**
+ */
+ public logRawCommunication: boolean;
+
+ /**
+ * By default, debug messages are discarded. To log to `console` following can be used:
+ *
+ * ```javascript
+ * client.debug = function(str) {
+ * console.log(str);
+ * };
+ * ```
+ *
+ * Currently this method does not support levels of log. Be aware that the output can be quite verbose
+ * and may contain sensitive information (like passwords, tokens etc.).
+ */
+ public debug: debugFnType;
+
+ /**
+ * Browsers do not immediately close WebSockets when `.close` is issued.
+ * This may cause reconnection to take a longer on certain type of failures.
+ * In case of incoming heartbeat failure, this experimental flag instructs the library
+ * to discard the socket immediately (even before it is actually closed).
+ */
+ public discardWebsocketOnCommFailure: boolean;
+
+ /**
+ * version of STOMP protocol negotiated with the server, READONLY
+ */
+ get connectedVersion(): string {
+ return this._stompHandler ? this._stompHandler.connectedVersion : undefined;
+ }
+
+ private _stompHandler: StompHandler;
+
+ /**
+ * if the client is active (connected or going to reconnect)
+ */
+ get active(): boolean {
+ return this.state === ActivationState.ACTIVE;
+ }
+
+ /**
+ * It will be called on state change.
+ *
+ * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+ */
+ public onChangeState: (state: ActivationState) => void;
+
+ private _changeState(state: ActivationState) {
+ this.state = state;
+ this.onChangeState(state);
+ }
+
+ // This will mark deactivate to complete, to be called after Websocket is closed
+ private _resolveSocketClose: (value?: PromiseLike | void) => void;
+
+ /**
+ * Activation state.
+ *
+ * It will usually be ACTIVE or INACTIVE.
+ * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
+ */
+ public state: ActivationState = ActivationState.INACTIVE;
+
+ private _reconnector: any;
+
+ /**
+ * Create an instance.
+ */
+ constructor(conf: StompConfig = {}) {
+ // Dummy callbacks
+ const noOp = () => {};
+ this.debug = noOp;
+ this.beforeConnect = noOp;
+ this.onConnect = noOp;
+ this.onDisconnect = noOp;
+ this.onUnhandledMessage = noOp;
+ this.onUnhandledReceipt = noOp;
+ this.onUnhandledFrame = noOp;
+ this.onStompError = noOp;
+ this.onWebSocketClose = noOp;
+ this.onWebSocketError = noOp;
+ this.logRawCommunication = false;
+ this.onChangeState = noOp;
+
+ // These parameters would typically get proper values before connect is called
+ this.connectHeaders = {};
+ this._disconnectHeaders = {};
+
+ // Apply configuration
+ this.configure(conf);
+ }
+
+ /**
+ * Update configuration.
+ */
+ public configure(conf: StompConfig): void {
+ // bulk assign all properties to this
+ (Object as any).assign(this, conf);
+ }
+
+ /**
+ * Initiate the connection with the broker.
+ * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},
+ * it will keep trying to reconnect.
+ *
+ * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.
+ */
+ public activate(): void {
+ if (this.state === ActivationState.DEACTIVATING) {
+ this.debug(
+ 'Still DEACTIVATING, please await call to deactivate before trying to re-activate'
+ );
+ throw new Error('Still DEACTIVATING, can not activate now');
+ }
+
+ if (this.active) {
+ this.debug('Already ACTIVE, ignoring request to activate');
+ return;
+ }
+
+ this._changeState(ActivationState.ACTIVE);
+
+ this._connect();
+ }
+
+ private async _connect(): Promise {
+ if (this.connected) {
+ this.debug('STOMP: already connected, nothing to do');
+ return;
+ }
+
+ await this.beforeConnect();
+
+ if (!this.active) {
+ this.debug(
+ 'Client has been marked inactive, will not attempt to connect'
+ );
+ return;
+ }
+
+ // setup connection watcher
+ if (this.connectionTimeout > 0) {
+ // clear first
+ if (this._connectionWatcher) {
+ clearTimeout(this._connectionWatcher);
+ }
+ this._connectionWatcher = setTimeout(() => {
+ if (this.connected) {
+ return;
+ }
+ // Connection not established, close the underlying socket
+ // a reconnection will be attempted
+ this.debug(
+ `Connection not established in ${this.connectionTimeout}ms, closing socket`
+ );
+ this.forceDisconnect();
+ }, this.connectionTimeout);
+ }
+
+ this.debug('Opening Web Socket...');
+
+ // Get the actual WebSocket (or a similar object)
+ const webSocket = this._createWebSocket();
+
+ this._stompHandler = new StompHandler(this, webSocket, {
+ debug: this.debug,
+ stompVersions: this.stompVersions,
+ connectHeaders: this.connectHeaders,
+ disconnectHeaders: this._disconnectHeaders,
+ heartbeatIncoming: this.heartbeatIncoming,
+ heartbeatOutgoing: this.heartbeatOutgoing,
+ splitLargeFrames: this.splitLargeFrames,
+ maxWebSocketChunkSize: this.maxWebSocketChunkSize,
+ forceBinaryWSFrames: this.forceBinaryWSFrames,
+ logRawCommunication: this.logRawCommunication,
+ appendMissingNULLonIncoming: this.appendMissingNULLonIncoming,
+ discardWebsocketOnCommFailure: this.discardWebsocketOnCommFailure,
+
+ onConnect: frame => {
+ // Successfully connected, stop the connection watcher
+ if (this._connectionWatcher) {
+ clearTimeout(this._connectionWatcher);
+ this._connectionWatcher = undefined;
+ }
+
+ if (!this.active) {
+ this.debug(
+ 'STOMP got connected while deactivate was issued, will disconnect now'
+ );
+ this._disposeStompHandler();
+ return;
+ }
+ this.onConnect(frame);
+ },
+ onDisconnect: frame => {
+ this.onDisconnect(frame);
+ },
+ onStompError: frame => {
+ this.onStompError(frame);
+ },
+ onWebSocketClose: evt => {
+ this._stompHandler = undefined; // a new one will be created in case of a reconnect
+
+ if (this.state === ActivationState.DEACTIVATING) {
+ // Mark deactivation complete
+ this._resolveSocketClose();
+ this._resolveSocketClose = undefined;
+ this._changeState(ActivationState.INACTIVE);
+ }
+
+ this.onWebSocketClose(evt);
+ // The callback is called before attempting to reconnect, this would allow the client
+ // to be `deactivated` in the callback.
+ if (this.active) {
+ this._schedule_reconnect();
+ }
+ },
+ onWebSocketError: evt => {
+ this.onWebSocketError(evt);
+ },
+ onUnhandledMessage: message => {
+ this.onUnhandledMessage(message);
+ },
+ onUnhandledReceipt: frame => {
+ this.onUnhandledReceipt(frame);
+ },
+ onUnhandledFrame: frame => {
+ this.onUnhandledFrame(frame);
+ },
+ });
+
+ this._stompHandler.start();
+ }
+
+ private _createWebSocket(): IStompSocket {
+ let webSocket: IStompSocket;
+
+ if (this.webSocketFactory) {
+ webSocket = this.webSocketFactory();
+ } else {
+ webSocket = new WebSocket(
+ this.brokerURL,
+ this.stompVersions.protocolVersions()
+ );
+ }
+ webSocket.binaryType = 'arraybuffer';
+ return webSocket;
+ }
+
+ private _schedule_reconnect(): void {
+ if (this.reconnectDelay > 0) {
+ this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`);
+
+ this._reconnector = setTimeout(() => {
+ this._connect();
+ }, this.reconnectDelay);
+ }
+ }
+
+ /**
+ * Disconnect if connected and stop auto reconnect loop.
+ * Appropriate callbacks will be invoked if underlying STOMP connection was connected.
+ *
+ * This call is async, it will resolve immediately if there is no underlying active websocket,
+ * otherwise, it will resolve after underlying websocket is properly disposed.
+ *
+ * To reactivate you can call [Client#activate]{@link Client#activate}.
+ */
+ public async deactivate(): Promise {
+ let retPromise: Promise;
+
+ if (this.state !== ActivationState.ACTIVE) {
+ this.debug(
+ `Already ${ActivationState[this.state]}, ignoring call to deactivate`
+ );
+ return Promise.resolve();
+ }
+
+ this._changeState(ActivationState.DEACTIVATING);
+
+ // Clear if a reconnection was scheduled
+ if (this._reconnector) {
+ clearTimeout(this._reconnector);
+ }
+
+ if (
+ this._stompHandler &&
+ this.webSocket.readyState !== StompSocketState.CLOSED
+ ) {
+ // we need to wait for underlying websocket to close
+ retPromise = new Promise((resolve, reject) => {
+ this._resolveSocketClose = resolve;
+ });
+ } else {
+ // indicate that auto reconnect loop should terminate
+ this._changeState(ActivationState.INACTIVE);
+ return Promise.resolve();
+ }
+
+ this._disposeStompHandler();
+
+ return retPromise;
+ }
+
+ /**
+ * Force disconnect if there is an active connection by directly closing the underlying WebSocket.
+ * This is different than a normal disconnect where a DISCONNECT sequence is carried out with the broker.
+ * After forcing disconnect, automatic reconnect will be attempted.
+ * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.
+ */
+ public forceDisconnect() {
+ if (this._stompHandler) {
+ this._stompHandler.forceDisconnect();
+ }
+ }
+
+ private _disposeStompHandler() {
+ // Dispose STOMP Handler
+ if (this._stompHandler) {
+ this._stompHandler.dispose();
+ this._stompHandler = null;
+ }
+ }
+
+ /**
+ * Send a message to a named destination. Refer to your STOMP broker documentation for types
+ * and naming of destinations.
+ *
+ * STOMP protocol specifies and suggests some headers and also allows broker specific headers.
+ *
+ * `body` must be String.
+ * You will need to covert the payload to string in case it is not string (e.g. JSON).
+ *
+ * To send a binary message body use binaryBody parameter. It should be a
+ * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
+ * Sometimes brokers may not support binary frames out of the box.
+ * Please check your broker documentation.
+ *
+ * `content-length` header is automatically added to the STOMP Frame sent to the broker.
+ * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.
+ * For binary messages `content-length` header is always added.
+ *
+ * Caution: The broker will, most likely, report an error and disconnect if message body has NULL octet(s)
+ * and `content-length` header is missing.
+ *
+ * ```javascript
+ * client.publish({destination: "/queue/test", headers: {priority: 9}, body: "Hello, STOMP"});
+ *
+ * // Only destination is mandatory parameter
+ * client.publish({destination: "/queue/test", body: "Hello, STOMP"});
+ *
+ * // Skip content-length header in the frame to the broker
+ * client.publish({"/queue/test", body: "Hello, STOMP", skipContentLengthHeader: true});
+ *
+ * var binaryData = generateBinaryData(); // This need to be of type Uint8Array
+ * // setting content-type header is not mandatory, however a good practice
+ * client.publish({destination: '/topic/special', binaryBody: binaryData,
+ * headers: {'content-type': 'application/octet-stream'}});
+ * ```
+ */
+ public publish(params: IPublishParams) {
+ this._stompHandler.publish(params);
+ }
+
+ /**
+ * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.
+ * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.
+ * The value (say receipt-id) for this header needs to be unique for each use. Typically a sequence, a UUID, a
+ * random number or a combination may be used.
+ *
+ * A complaint broker will send a RECEIPT frame when an operation has actually been completed.
+ * The operation needs to be matched based in the value of the receipt-id.
+ *
+ * This method allow watching for a receipt and invoke the callback
+ * when corresponding receipt has been received.
+ *
+ * The actual {@link FrameImpl} will be passed as parameter to the callback.
+ *
+ * Example:
+ * ```javascript
+ * // Subscribing with acknowledgement
+ * let receiptId = randomText();
+ *
+ * client.watchForReceipt(receiptId, function() {
+ * // Will be called after server acknowledges
+ * });
+ *
+ * client.subscribe(TEST.destination, onMessage, {receipt: receiptId});
+ *
+ *
+ * // Publishing with acknowledgement
+ * receiptId = randomText();
+ *
+ * client.watchForReceipt(receiptId, function() {
+ * // Will be called after server acknowledges
+ * });
+ * client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});
+ * ```
+ */
+ public watchForReceipt(receiptId: string, callback: frameCallbackType): void {
+ this._stompHandler.watchForReceipt(receiptId, callback);
+ }
+
+ /**
+ * Subscribe to a STOMP Broker location. The callback will be invoked for each received message with
+ * the {@link IMessage} as argument.
+ *
+ * Note: The library will generate an unique ID if there is none provided in the headers.
+ * To use your own ID, pass it using the headers argument.
+ *
+ * ```javascript
+ * callback = function(message) {
+ * // called when the client receives a STOMP message from the server
+ * if (message.body) {
+ * alert("got message with body " + message.body)
+ * } else {
+ * alert("got empty message");
+ * }
+ * });
+ *
+ * var subscription = client.subscribe("/queue/test", callback);
+ *
+ * // Explicit subscription id
+ * var mySubId = 'my-subscription-id-001';
+ * var subscription = client.subscribe(destination, callback, { id: mySubId });
+ * ```
+ */
+ public subscribe(
+ destination: string,
+ callback: messageCallbackType,
+ headers: StompHeaders = {}
+ ): StompSubscription {
+ return this._stompHandler.subscribe(destination, callback, headers);
+ }
+
+ /**
+ * It is preferable to unsubscribe from a subscription by calling
+ * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:
+ *
+ * ```javascript
+ * var subscription = client.subscribe(destination, onmessage);
+ * // ...
+ * subscription.unsubscribe();
+ * ```
+ *
+ * See: http://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame
+ */
+ public unsubscribe(id: string, headers: StompHeaders = {}): void {
+ this._stompHandler.unsubscribe(id, headers);
+ }
+
+ /**
+ * Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit}
+ * and [abort]{@link ITransaction#abort}.
+ *
+ * `transactionId` is optional, if not passed the library will generate it internally.
+ */
+ public begin(transactionId?: string): ITransaction {
+ return this._stompHandler.begin(transactionId);
+ }
+
+ /**
+ * Commit a transaction.
+ *
+ * It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on
+ * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+ *
+ * ```javascript
+ * var tx = client.begin(txId);
+ * //...
+ * tx.commit();
+ * ```
+ */
+ public commit(transactionId: string): void {
+ this._stompHandler.commit(transactionId);
+ }
+
+ /**
+ * Abort a transaction.
+ * It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on
+ * {@link ITransaction} returned by [client.begin]{@link Client#begin}.
+ *
+ * ```javascript
+ * var tx = client.begin(txId);
+ * //...
+ * tx.abort();
+ * ```
+ */
+ public abort(transactionId: string): void {
+ this._stompHandler.abort(transactionId);
+ }
+
+ /**
+ * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly
+ * on the {@link IMessage} handled by a subscription callback:
+ *
+ * ```javascript
+ * var callback = function (message) {
+ * // process the message
+ * // acknowledge it
+ * message.ack();
+ * };
+ * client.subscribe(destination, callback, {'ack': 'client'});
+ * ```
+ */
+ public ack(
+ messageId: string,
+ subscriptionId: string,
+ headers: StompHeaders = {}
+ ): void {
+ this._stompHandler.ack(messageId, subscriptionId, headers);
+ }
+
+ /**
+ * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly
+ * on the {@link IMessage} handled by a subscription callback:
+ *
+ * ```javascript
+ * var callback = function (message) {
+ * // process the message
+ * // an error occurs, nack it
+ * message.nack();
+ * };
+ * client.subscribe(destination, callback, {'ack': 'client'});
+ * ```
+ */
+ public nack(
+ messageId: string,
+ subscriptionId: string,
+ headers: StompHeaders = {}
+ ): void {
+ this._stompHandler.nack(messageId, subscriptionId, headers);
+ }
+}
diff --git a/node_modules/@stomp/stompjs/src/compatibility/compat-client.ts b/node_modules/@stomp/stompjs/src/compatibility/compat-client.ts
new file mode 100644
index 0000000..8185788
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/compatibility/compat-client.ts
@@ -0,0 +1,269 @@
+import { Client } from '../client';
+import { StompHeaders } from '../stomp-headers';
+import { frameCallbackType, messageCallbackType } from '../types';
+import { HeartbeatInfo } from './heartbeat-info';
+
+/**
+ * Available for backward compatibility, please shift to using {@link Client}.
+ *
+ * **Deprecated**
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+export class CompatClient extends Client {
+ /**
+ * It is no op now. No longer needed. Large packets work out of the box.
+ */
+ public maxWebSocketFrameSize: number = 16 * 1024;
+
+ /**
+ * Available for backward compatibility, please shift to using {@link Client}
+ * and [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ *
+ * **Deprecated**
+ *
+ * @internal
+ */
+ constructor(webSocketFactory: () => any) {
+ super();
+ this.reconnect_delay = 0;
+ this.webSocketFactory = webSocketFactory;
+ // Default from previous version
+ this.debug = (...message: any[]) => {
+ console.log(...message);
+ };
+ }
+
+ private _parseConnect(...args: any[]): any {
+ let closeEventCallback;
+ let connectCallback;
+ let errorCallback;
+ let headers: StompHeaders = {};
+ if (args.length < 2) {
+ throw new Error('Connect requires at least 2 arguments');
+ }
+ if (typeof args[1] === 'function') {
+ [headers, connectCallback, errorCallback, closeEventCallback] = args;
+ } else {
+ switch (args.length) {
+ case 6:
+ [
+ headers.login,
+ headers.passcode,
+ connectCallback,
+ errorCallback,
+ closeEventCallback,
+ headers.host,
+ ] = args;
+ break;
+ default:
+ [
+ headers.login,
+ headers.passcode,
+ connectCallback,
+ errorCallback,
+ closeEventCallback,
+ ] = args;
+ }
+ }
+
+ return [headers, connectCallback, errorCallback, closeEventCallback];
+ }
+
+ /**
+ * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.
+ *
+ * **Deprecated**
+ *
+ * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the
+ * version with headers to pass your broker specific options.
+ *
+ * overloads:
+ * - connect(headers, connectCallback)
+ * - connect(headers, connectCallback, errorCallback)
+ * - connect(login, passcode, connectCallback)
+ * - connect(login, passcode, connectCallback, errorCallback)
+ * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)
+ * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)
+ *
+ * params:
+ * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}
+ * - connectCallback, see [Client#onConnect]{@link Client#onConnect}
+ * - errorCallback, see [Client#onStompError]{@link Client#onStompError}
+ * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}
+ * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ public connect(...args: any[]): void {
+ const out = this._parseConnect(...args);
+
+ if (out[0]) {
+ this.connectHeaders = out[0];
+ }
+ if (out[1]) {
+ this.onConnect = out[1];
+ }
+ if (out[2]) {
+ this.onStompError = out[2];
+ }
+ if (out[3]) {
+ this.onWebSocketClose = out[3];
+ }
+
+ super.activate();
+ }
+
+ /**
+ * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.
+ *
+ * **Deprecated**
+ *
+ * See:
+ * [Client#onDisconnect]{@link Client#onDisconnect}, and
+ * [Client#disconnectHeaders]{@link Client#disconnectHeaders}
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ public disconnect(
+ disconnectCallback?: any,
+ headers: StompHeaders = {}
+ ): void {
+ if (disconnectCallback) {
+ this.onDisconnect = disconnectCallback;
+ }
+ this.disconnectHeaders = headers;
+
+ super.deactivate();
+ }
+
+ /**
+ * Available for backward compatibility, use [Client#publish]{@link Client#publish}.
+ *
+ * Send a message to a named destination. Refer to your STOMP broker documentation for types
+ * and naming of destinations. The headers will, typically, be available to the subscriber.
+ * However, there may be special purpose headers corresponding to your STOMP broker.
+ *
+ * **Deprecated**, use [Client#publish]{@link Client#publish}
+ *
+ * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)
+ *
+ * ```javascript
+ * client.send("/queue/test", {priority: 9}, "Hello, STOMP");
+ *
+ * // If you want to send a message with a body, you must also pass the headers argument.
+ * client.send("/queue/test", {}, "Hello, STOMP");
+ * ```
+ *
+ * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)
+ */
+ public send(
+ destination: string,
+ headers: { [key: string]: any } = {},
+ body: string = ''
+ ): void {
+ headers = (Object as any).assign({}, headers);
+
+ const skipContentLengthHeader = headers['content-length'] === false;
+ if (skipContentLengthHeader) {
+ delete headers['content-length'];
+ }
+ this.publish({
+ destination,
+ headers: headers as StompHeaders,
+ body,
+ skipContentLengthHeader,
+ });
+ }
+
+ /**
+ * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.
+ *
+ * **Deprecated**
+ */
+ set reconnect_delay(value: number) {
+ this.reconnectDelay = value;
+ }
+
+ /**
+ * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.
+ *
+ * **Deprecated**
+ */
+ get ws(): any {
+ return this.webSocket;
+ }
+
+ /**
+ * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.
+ *
+ * **Deprecated**
+ */
+ get version() {
+ return this.connectedVersion;
+ }
+
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ *
+ * **Deprecated**
+ */
+ get onreceive(): messageCallbackType {
+ return this.onUnhandledMessage;
+ }
+
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ *
+ * **Deprecated**
+ */
+ set onreceive(value: messageCallbackType) {
+ this.onUnhandledMessage = value;
+ }
+
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+ * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.
+ *
+ * **Deprecated**
+ */
+ get onreceipt(): frameCallbackType {
+ return this.onUnhandledReceipt;
+ }
+
+ /**
+ * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+ *
+ * **Deprecated**
+ */
+ set onreceipt(value: frameCallbackType) {
+ this.onUnhandledReceipt = value;
+ }
+
+ private _heartbeatInfo: HeartbeatInfo = new HeartbeatInfo(this);
+
+ /**
+ * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+ * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+ *
+ * **Deprecated**
+ */
+ get heartbeat() {
+ return this._heartbeatInfo;
+ }
+
+ /**
+ * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}
+ * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+ *
+ * **Deprecated**
+ */
+ set heartbeat(value: { incoming: number; outgoing: number }) {
+ this.heartbeatIncoming = value.incoming;
+ this.heartbeatOutgoing = value.outgoing;
+ }
+}
diff --git a/node_modules/@stomp/stompjs/src/compatibility/heartbeat-info.ts b/node_modules/@stomp/stompjs/src/compatibility/heartbeat-info.ts
new file mode 100644
index 0000000..e819dbf
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/compatibility/heartbeat-info.ts
@@ -0,0 +1,26 @@
+import { CompatClient } from './compat-client';
+
+/**
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class HeartbeatInfo {
+ constructor(private client: CompatClient) {}
+
+ get outgoing(): number {
+ return this.client.heartbeatOutgoing;
+ }
+
+ set outgoing(value: number) {
+ this.client.heartbeatOutgoing = value;
+ }
+
+ get incoming(): number {
+ return this.client.heartbeatIncoming;
+ }
+
+ set incoming(value: number) {
+ this.client.heartbeatIncoming = value;
+ }
+}
diff --git a/node_modules/@stomp/stompjs/src/compatibility/stomp.ts b/node_modules/@stomp/stompjs/src/compatibility/stomp.ts
new file mode 100644
index 0000000..1be95bd
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/compatibility/stomp.ts
@@ -0,0 +1,118 @@
+import { Versions } from '../versions';
+import { CompatClient } from './compat-client';
+import { IStompSocket } from '../types';
+
+/**
+ * @internal
+ */
+declare const WebSocket: {
+ prototype: IStompSocket;
+ new (url: string, protocols?: string | string[]): IStompSocket;
+};
+
+/**
+ * STOMP Class, acts like a factory to create {@link Client}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}.
+ */
+export class Stomp {
+ /**
+ * In case you need to use a non standard class for WebSocket.
+ *
+ * For example when using within NodeJS environment:
+ *
+ * ```javascript
+ * StompJs = require('../../esm5/');
+ * Stomp = StompJs.Stomp;
+ * Stomp.WebSocketClass = require('websocket').w3cwebsocket;
+ * ```
+ *
+ * **Deprecated**
+ *
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+ // tslint:disable-next-line:variable-name
+ public static WebSocketClass: any = null;
+
+ /**
+ * This method creates a WebSocket client that is connected to
+ * the STOMP server located at the url.
+ *
+ * ```javascript
+ * var url = "ws://localhost:61614/stomp";
+ * var client = Stomp.client(url);
+ * ```
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#brokerURL]{@link Client#brokerURL}.
+ */
+ public static client(url: string, protocols?: string[]): CompatClient {
+ // This is a hack to allow another implementation than the standard
+ // HTML5 WebSocket class.
+ //
+ // It is possible to use another class by calling
+ //
+ // Stomp.WebSocketClass = MozWebSocket
+ //
+ // *prior* to call `Stomp.client()`.
+ //
+ // This hack is deprecated and `Stomp.over()` method should be used
+ // instead.
+
+ // See remarks on the function Stomp.over
+ if (protocols == null) {
+ protocols = Versions.default.protocolVersions();
+ }
+ const wsFn = () => {
+ const klass = Stomp.WebSocketClass || WebSocket;
+ return new klass(url, protocols);
+ };
+
+ return new CompatClient(wsFn);
+ }
+
+ /**
+ * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user
+ * specify the WebSocket to use (either a standard HTML5 WebSocket or
+ * a similar object).
+ *
+ * In order to support reconnection, the function Client._connect should be callable more than once.
+ * While reconnecting
+ * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function
+ * alternatively allows passing a function that should return a new instance of the underlying socket.
+ *
+ * ```javascript
+ * var client = Stomp.over(function(){
+ * return new WebSocket('ws://localhost:15674/ws')
+ * });
+ * ```
+ *
+ * **Deprecated**
+ *
+ * It will be removed in next major version. Please switch to {@link Client}
+ * using [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+ public static over(ws: any): CompatClient {
+ let wsFn: () => any;
+
+ if (typeof ws === 'function') {
+ wsFn = ws;
+ } else {
+ console.warn(
+ 'Stomp.over did not receive a factory, auto reconnect will not work. ' +
+ 'Please see https://stomp-js.github.io/api-docs/latest/classes/Stomp.html#over'
+ );
+ wsFn = () => ws;
+ }
+
+ return new CompatClient(wsFn);
+ }
+}
diff --git a/node_modules/@stomp/stompjs/src/frame-impl.ts b/node_modules/@stomp/stompjs/src/frame-impl.ts
new file mode 100644
index 0000000..6825d04
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/frame-impl.ts
@@ -0,0 +1,250 @@
+import { BYTE } from './byte';
+import { IFrame } from './i-frame';
+import { StompHeaders } from './stomp-headers';
+import { IRawFrameType } from './types';
+
+/**
+ * Frame class represents a STOMP frame.
+ *
+ * @internal
+ */
+export class FrameImpl implements IFrame {
+ /**
+ * STOMP Command
+ */
+ public command: string;
+
+ /**
+ * Headers, key value pairs.
+ */
+ public headers: StompHeaders;
+
+ /**
+ * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
+ */
+ public isBinaryBody: boolean;
+
+ /**
+ * body of the frame
+ */
+ get body(): string {
+ if (!this._body && this.isBinaryBody) {
+ this._body = new TextDecoder().decode(this._binaryBody);
+ }
+ return this._body;
+ }
+ private _body: string;
+
+ /**
+ * body as Uint8Array
+ */
+ get binaryBody(): Uint8Array {
+ if (!this._binaryBody && !this.isBinaryBody) {
+ this._binaryBody = new TextEncoder().encode(this._body);
+ }
+ return this._binaryBody;
+ }
+ private _binaryBody: Uint8Array;
+
+ private escapeHeaderValues: boolean;
+ private skipContentLengthHeader: boolean;
+
+ /**
+ * Frame constructor. `command`, `headers` and `body` are available as properties.
+ *
+ * @internal
+ */
+ constructor(params: {
+ command: string;
+ headers?: StompHeaders;
+ body?: string;
+ binaryBody?: Uint8Array;
+ escapeHeaderValues?: boolean;
+ skipContentLengthHeader?: boolean;
+ }) {
+ const {
+ command,
+ headers,
+ body,
+ binaryBody,
+ escapeHeaderValues,
+ skipContentLengthHeader,
+ } = params;
+ this.command = command;
+ this.headers = (Object as any).assign({}, headers || {});
+
+ if (binaryBody) {
+ this._binaryBody = binaryBody;
+ this.isBinaryBody = true;
+ } else {
+ this._body = body || '';
+ this.isBinaryBody = false;
+ }
+ this.escapeHeaderValues = escapeHeaderValues || false;
+ this.skipContentLengthHeader = skipContentLengthHeader || false;
+ }
+
+ /**
+ * deserialize a STOMP Frame from raw data.
+ *
+ * @internal
+ */
+ public static fromRawFrame(
+ rawFrame: IRawFrameType,
+ escapeHeaderValues: boolean
+ ): FrameImpl {
+ const headers: StompHeaders = {};
+ const trim = (str: string): string => str.replace(/^\s+|\s+$/g, '');
+
+ // In case of repeated headers, as per standards, first value need to be used
+ for (const header of rawFrame.headers.reverse()) {
+ const idx = header.indexOf(':');
+
+ const key = trim(header[0]);
+ let value = trim(header[1]);
+
+ if (
+ escapeHeaderValues &&
+ rawFrame.command !== 'CONNECT' &&
+ rawFrame.command !== 'CONNECTED'
+ ) {
+ value = FrameImpl.hdrValueUnEscape(value);
+ }
+
+ headers[key] = value;
+ }
+
+ return new FrameImpl({
+ command: rawFrame.command,
+ headers,
+ binaryBody: rawFrame.binaryBody,
+ escapeHeaderValues,
+ });
+ }
+
+ /**
+ * @internal
+ */
+ public toString(): string {
+ return this.serializeCmdAndHeaders();
+ }
+
+ /**
+ * serialize this Frame in a format suitable to be passed to WebSocket.
+ * If the body is string the output will be string.
+ * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.
+ *
+ * @internal
+ */
+ public serialize(): string | ArrayBuffer {
+ const cmdAndHeaders = this.serializeCmdAndHeaders();
+
+ if (this.isBinaryBody) {
+ return FrameImpl.toUnit8Array(cmdAndHeaders, this._binaryBody).buffer;
+ } else {
+ return cmdAndHeaders + this._body + BYTE.NULL;
+ }
+ }
+
+ private serializeCmdAndHeaders(): string {
+ const lines = [this.command];
+ if (this.skipContentLengthHeader) {
+ delete this.headers['content-length'];
+ }
+
+ for (const name of Object.keys(this.headers || {})) {
+ const value = this.headers[name];
+ if (
+ this.escapeHeaderValues &&
+ this.command !== 'CONNECT' &&
+ this.command !== 'CONNECTED'
+ ) {
+ lines.push(`${name}:${FrameImpl.hdrValueEscape(`${value}`)}`);
+ } else {
+ lines.push(`${name}:${value}`);
+ }
+ }
+ if (
+ this.isBinaryBody ||
+ (!this.isBodyEmpty() && !this.skipContentLengthHeader)
+ ) {
+ lines.push(`content-length:${this.bodyLength()}`);
+ }
+ return lines.join(BYTE.LF) + BYTE.LF + BYTE.LF;
+ }
+
+ private isBodyEmpty(): boolean {
+ return this.bodyLength() === 0;
+ }
+
+ private bodyLength(): number {
+ const binaryBody = this.binaryBody;
+ return binaryBody ? binaryBody.length : 0;
+ }
+
+ /**
+ * Compute the size of a UTF-8 string by counting its number of bytes
+ * (and not the number of characters composing the string)
+ */
+ private static sizeOfUTF8(s: string): number {
+ return s ? new TextEncoder().encode(s).length : 0;
+ }
+
+ private static toUnit8Array(
+ cmdAndHeaders: string,
+ binaryBody: Uint8Array
+ ): Uint8Array {
+ const uint8CmdAndHeaders = new TextEncoder().encode(cmdAndHeaders);
+ const nullTerminator = new Uint8Array([0]);
+ const uint8Frame = new Uint8Array(
+ uint8CmdAndHeaders.length + binaryBody.length + nullTerminator.length
+ );
+
+ uint8Frame.set(uint8CmdAndHeaders);
+ uint8Frame.set(binaryBody, uint8CmdAndHeaders.length);
+ uint8Frame.set(
+ nullTerminator,
+ uint8CmdAndHeaders.length + binaryBody.length
+ );
+
+ return uint8Frame;
+ }
+ /**
+ * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.
+ *
+ * @internal
+ */
+ public static marshall(params: {
+ command: string;
+ headers?: StompHeaders;
+ body?: string;
+ binaryBody?: Uint8Array;
+ escapeHeaderValues?: boolean;
+ skipContentLengthHeader?: boolean;
+ }) {
+ const frame = new FrameImpl(params);
+ return frame.serialize();
+ }
+
+ /**
+ * Escape header values
+ */
+ private static hdrValueEscape(str: string): string {
+ return str
+ .replace(/\\/g, '\\\\')
+ .replace(/\r/g, '\\r')
+ .replace(/\n/g, '\\n')
+ .replace(/:/g, '\\c');
+ }
+
+ /**
+ * UnEscape header values
+ */
+ private static hdrValueUnEscape(str: string): string {
+ return str
+ .replace(/\\r/g, '\r')
+ .replace(/\\n/g, '\n')
+ .replace(/\\c/g, ':')
+ .replace(/\\\\/g, '\\');
+ }
+}
diff --git a/node_modules/@stomp/stompjs/src/i-frame.ts b/node_modules/@stomp/stompjs/src/i-frame.ts
new file mode 100644
index 0000000..e00c5fd
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/i-frame.ts
@@ -0,0 +1,41 @@
+import { StompHeaders } from './stomp-headers';
+
+/**
+ * It represents a STOMP frame. Many of the callbacks pass an IFrame received from
+ * the STOMP broker. For advanced usage you might need to access [headers]{@link IFrame#headers}.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * {@link IMessage} is an extended IFrame.
+ */
+export interface IFrame {
+ /**
+ * STOMP Command
+ */
+ command: string;
+
+ /**
+ * Headers, key value pairs.
+ */
+ headers: StompHeaders;
+
+ /**
+ * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
+ */
+ isBinaryBody: boolean;
+
+ /**
+ * body of the frame as string
+ */
+ readonly body: string;
+
+ /**
+ * body as Uint8Array
+ */
+ readonly binaryBody: Uint8Array;
+}
+
+/**
+ * Alias for {@link IFrame}
+ */
+export type Frame = IFrame;
diff --git a/node_modules/@stomp/stompjs/src/i-message.ts b/node_modules/@stomp/stompjs/src/i-message.ts
new file mode 100644
index 0000000..92409ca
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/i-message.ts
@@ -0,0 +1,35 @@
+import { IFrame } from './i-frame';
+import { StompHeaders } from './stomp-headers';
+
+/**
+ * Instance of Message will be passed to [subscription callback]{@link Client#subscribe}
+ * and [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ * Since it is an extended {@link FrameImpl}, you can access [headers]{@link FrameImpl#headers}
+ * and [body]{@link FrameImpl#body} as properties.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * See [Client#subscribe]{@link Client#subscribe} for example.
+ */
+export interface IMessage extends IFrame {
+ /**
+ * When subscribing with manual acknowledgement, call this method on the message to ACK the message.
+ *
+ * See [Client#ack]{@link Client#ack} for an example.
+ */
+ ack: (headers?: StompHeaders) => void;
+
+ /**
+ * When subscribing with manual acknowledgement, call this method on the message to NACK the message.
+ *
+ * See [Client#nack]{@link Client#nack} for an example.
+ */
+ nack: (headers?: StompHeaders) => void;
+}
+
+/**
+ * Aliased to {@link IMessage}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type Message = IMessage;
diff --git a/node_modules/@stomp/stompjs/src/i-transaction.ts b/node_modules/@stomp/stompjs/src/i-transaction.ts
new file mode 100644
index 0000000..6bb3532
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/i-transaction.ts
@@ -0,0 +1,23 @@
+/**
+ * A Transaction is created by calling [Client#begin]{@link Client#begin}
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * TODO: Example and caveat
+ */
+export interface ITransaction {
+ /**
+ * You will need to access this to send, ack, or nack within this transaction.
+ */
+ id: string;
+
+ /**
+ * Commit this transaction. See [Client#commit]{@link Client#commit} for an example.
+ */
+ commit: () => void;
+
+ /**
+ * Abort this transaction. See [Client#abort]{@link Client#abort} for an example.
+ */
+ abort: () => void;
+}
diff --git a/node_modules/@stomp/stompjs/src/index.ts b/node_modules/@stomp/stompjs/src/index.ts
new file mode 100644
index 0000000..cc7abb1
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/index.ts
@@ -0,0 +1,15 @@
+export * from './client';
+export * from './frame-impl';
+export * from './i-frame';
+export * from './i-message';
+export * from './parser';
+export * from './stomp-config';
+export * from './stomp-headers';
+export * from './stomp-subscription';
+export * from './i-transaction';
+export * from './types';
+export * from './versions';
+
+// Compatibility code
+export * from './compatibility/compat-client';
+export * from './compatibility/stomp';
diff --git a/node_modules/@stomp/stompjs/src/parser.ts b/node_modules/@stomp/stompjs/src/parser.ts
new file mode 100644
index 0000000..05989ad
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/parser.ts
@@ -0,0 +1,255 @@
+import { IRawFrameType } from './types';
+
+/**
+ * @internal
+ */
+const NULL = 0;
+/**
+ * @internal
+ */
+const LF = 10;
+/**
+ * @internal
+ */
+const CR = 13;
+/**
+ * @internal
+ */
+const COLON = 58;
+
+/**
+ * This is an evented, rec descent parser.
+ * A stream of Octets can be passed and whenever it recognizes
+ * a complete Frame or an incoming ping it will invoke the registered callbacks.
+ *
+ * All incoming Octets are fed into _onByte function.
+ * Depending on current state the _onByte function keeps changing.
+ * Depending on the state it keeps accumulating into _token and _results.
+ * State is indicated by current value of _onByte, all states are named as _collect.
+ *
+ * STOMP standards https://stomp.github.io/stomp-specification-1.2.html
+ * imply that all lengths are considered in bytes (instead of string lengths).
+ * So, before actual parsing, if the incoming data is String it is converted to Octets.
+ * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.
+ *
+ * There is no peek function on the incoming data.
+ * When a state change occurs based on an Octet without consuming the Octet,
+ * the Octet, after state change, is fed again (_reinjectByte).
+ * This became possible as the state change can be determined by inspecting just one Octet.
+ *
+ * There are two modes to collect the body, if content-length header is there then it by counting Octets
+ * otherwise it is determined by NULL terminator.
+ *
+ * Following the standards, the command and headers are converted to Strings
+ * and the body is returned as Octets.
+ * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.
+ *
+ * This parser does not use Regular Expressions as that can only operate on Strings.
+ *
+ * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or
+ * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk
+ * is pushed.
+ *
+ * Typically the higher level function will convert headers to Hash, handle unescaping of header values
+ * (which is protocol version specific), and convert body to text.
+ *
+ * Check the parser.spec.js to understand cases that this parser is supposed to handle.
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class Parser {
+ private readonly _encoder = new TextEncoder();
+ private readonly _decoder = new TextDecoder();
+
+ private _results: IRawFrameType;
+
+ private _token: number[] = [];
+ private _headerKey: string;
+ private _bodyBytesRemaining: number;
+
+ private _onByte: (byte: number) => void;
+
+ public constructor(
+ public onFrame: (rawFrame: IRawFrameType) => void,
+ public onIncomingPing: () => void
+ ) {
+ this._initState();
+ }
+
+ public parseChunk(
+ segment: string | ArrayBuffer,
+ appendMissingNULLonIncoming: boolean = false
+ ) {
+ let chunk: Uint8Array;
+
+ if (segment instanceof ArrayBuffer) {
+ chunk = new Uint8Array(segment);
+ } else {
+ chunk = this._encoder.encode(segment);
+ }
+
+ // See https://github.com/stomp-js/stompjs/issues/89
+ // Remove when underlying issue is fixed.
+ //
+ // Send a NULL byte, if the last byte of a Text frame was not NULL.F
+ if (appendMissingNULLonIncoming && chunk[chunk.length - 1] !== 0) {
+ const chunkWithNull = new Uint8Array(chunk.length + 1);
+ chunkWithNull.set(chunk, 0);
+ chunkWithNull[chunk.length] = 0;
+ chunk = chunkWithNull;
+ }
+
+ // tslint:disable-next-line:prefer-for-of
+ for (let i = 0; i < chunk.length; i++) {
+ const byte = chunk[i];
+ this._onByte(byte);
+ }
+ }
+
+ // The following implements a simple Rec Descent Parser.
+ // The grammar is simple and just one byte tells what should be the next state
+
+ private _collectFrame(byte: number): void {
+ if (byte === NULL) {
+ // Ignore
+ return;
+ }
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ // Incoming Ping
+ this.onIncomingPing();
+ return;
+ }
+
+ this._onByte = this._collectCommand;
+ this._reinjectByte(byte);
+ }
+
+ private _collectCommand(byte: number): void {
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ this._results.command = this._consumeTokenAsUTF8();
+ this._onByte = this._collectHeaders;
+ return;
+ }
+
+ this._consumeByte(byte);
+ }
+
+ private _collectHeaders(byte: number): void {
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ this._setupCollectBody();
+ return;
+ }
+ this._onByte = this._collectHeaderKey;
+ this._reinjectByte(byte);
+ }
+
+ private _reinjectByte(byte: number) {
+ this._onByte(byte);
+ }
+
+ private _collectHeaderKey(byte: number): void {
+ if (byte === COLON) {
+ this._headerKey = this._consumeTokenAsUTF8();
+ this._onByte = this._collectHeaderValue;
+ return;
+ }
+ this._consumeByte(byte);
+ }
+
+ private _collectHeaderValue(byte: number): void {
+ if (byte === CR) {
+ // Ignore CR
+ return;
+ }
+ if (byte === LF) {
+ this._results.headers.push([this._headerKey, this._consumeTokenAsUTF8()]);
+ this._headerKey = undefined;
+ this._onByte = this._collectHeaders;
+ return;
+ }
+ this._consumeByte(byte);
+ }
+
+ private _setupCollectBody() {
+ const contentLengthHeader = this._results.headers.filter(
+ (header: [string, string]) => {
+ return header[0] === 'content-length';
+ }
+ )[0];
+
+ if (contentLengthHeader) {
+ this._bodyBytesRemaining = parseInt(contentLengthHeader[1], 10);
+ this._onByte = this._collectBodyFixedSize;
+ } else {
+ this._onByte = this._collectBodyNullTerminated;
+ }
+ }
+
+ private _collectBodyNullTerminated(byte: number): void {
+ if (byte === NULL) {
+ this._retrievedBody();
+ return;
+ }
+ this._consumeByte(byte);
+ }
+
+ private _collectBodyFixedSize(byte: number): void {
+ // It is post decrement, so that we discard the trailing NULL octet
+ if (this._bodyBytesRemaining-- === 0) {
+ this._retrievedBody();
+ return;
+ }
+ this._consumeByte(byte);
+ }
+
+ private _retrievedBody() {
+ this._results.binaryBody = this._consumeTokenAsRaw();
+
+ this.onFrame(this._results);
+
+ this._initState();
+ }
+
+ // Rec Descent Parser helpers
+
+ private _consumeByte(byte: number) {
+ this._token.push(byte);
+ }
+
+ private _consumeTokenAsUTF8() {
+ return this._decoder.decode(this._consumeTokenAsRaw());
+ }
+
+ private _consumeTokenAsRaw() {
+ const rawResult = new Uint8Array(this._token);
+ this._token = [];
+ return rawResult;
+ }
+
+ private _initState() {
+ this._results = {
+ command: undefined,
+ headers: [],
+ binaryBody: undefined,
+ };
+
+ this._token = [];
+ this._headerKey = undefined;
+
+ this._onByte = this._collectFrame;
+ }
+}
diff --git a/node_modules/@stomp/stompjs/src/stomp-config.ts b/node_modules/@stomp/stompjs/src/stomp-config.ts
new file mode 100644
index 0000000..1b7fabb
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/stomp-config.ts
@@ -0,0 +1,152 @@
+import { StompHeaders } from './stomp-headers';
+import {
+ ActivationState,
+ closeEventCallbackType,
+ debugFnType,
+ frameCallbackType,
+ messageCallbackType,
+ wsErrorCallbackType,
+} from './types';
+import { Versions } from './versions';
+
+/**
+ * Configuration options for STOMP Client, each key corresponds to
+ * field by the same name in {@link Client}. This can be passed to
+ * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.
+ *
+ * There used to be a class with the same name in `@stomp/ng2-stompjs`, which has been replaced by
+ * {@link RxStompConfig} and {@link InjectableRxStompConfig}.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class StompConfig {
+ /**
+ * See [Client#brokerURL]{@link Client#brokerURL}.
+ */
+ public brokerURL?: string;
+
+ /**
+ * See See [Client#stompVersions]{@link Client#stompVersions}.
+ */
+ public stompVersions?: Versions;
+
+ /**
+ * See [Client#webSocketFactory]{@link Client#webSocketFactory}.
+ */
+ public webSocketFactory?: () => any;
+
+ /**
+ * See [Client#connectionTimeout]{@link Client#connectionTimeout}.
+ */
+ public connectionTimeout?: number;
+
+ /**
+ * See [Client#reconnectDelay]{@link Client#reconnectDelay}.
+ */
+ public reconnectDelay?: number;
+
+ /**
+ * See [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}.
+ */
+ public heartbeatIncoming?: number;
+
+ /**
+ * See [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.
+ */
+ public heartbeatOutgoing?: number;
+
+ /**
+ * See [Client#splitLargeFrames]{@link Client#splitLargeFrames}.
+ */
+ public splitLargeFrames?: boolean;
+
+ /**
+ * See [Client#forceBinaryWSFrames]{@link Client#forceBinaryWSFrames}.
+ */
+ public forceBinaryWSFrames?: boolean;
+
+ /**
+ * See [Client#appendMissingNULLonIncoming]{@link Client#appendMissingNULLonIncoming}.
+ */
+ public appendMissingNULLonIncoming?: boolean;
+
+ /**
+ * See [Client#maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}.
+ */
+ public maxWebSocketChunkSize?: number;
+
+ /**
+ * See [Client#connectHeaders]{@link Client#connectHeaders}.
+ */
+ public connectHeaders?: StompHeaders;
+
+ /**
+ * See [Client#disconnectHeaders]{@link Client#disconnectHeaders}.
+ */
+ public disconnectHeaders?: StompHeaders;
+
+ /**
+ * See [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
+ */
+ public onUnhandledMessage?: messageCallbackType;
+
+ /**
+ * See [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.
+ */
+ public onUnhandledReceipt?: frameCallbackType;
+
+ /**
+ * See [Client#onUnhandledFrame]{@link Client#onUnhandledFrame}.
+ */
+ public onUnhandledFrame?: frameCallbackType;
+
+ /**
+ * See [Client#beforeConnect]{@link Client#beforeConnect}.
+ */
+ public beforeConnect?: () => void | Promise;
+
+ /**
+ * See [Client#onConnect]{@link Client#onConnect}.
+ */
+ public onConnect?: frameCallbackType;
+
+ /**
+ * See [Client#onDisconnect]{@link Client#onDisconnect}.
+ */
+ public onDisconnect?: frameCallbackType;
+
+ /**
+ * See [Client#onStompError]{@link Client#onStompError}.
+ */
+ public onStompError?: frameCallbackType;
+
+ /**
+ * See [Client#onWebSocketClose]{@link Client#onWebSocketClose}.
+ */
+ public onWebSocketClose?: closeEventCallbackType;
+
+ /**
+ * See [Client#onWebSocketError]{@link Client#onWebSocketError}.
+ */
+ public onWebSocketError?: wsErrorCallbackType;
+
+ /**
+ * See [Client#logRawCommunication]{@link Client#logRawCommunication}.
+ */
+ public logRawCommunication?: boolean;
+
+ /**
+ * See [Client#debug]{@link Client#debug}.
+ */
+ public debug?: debugFnType;
+
+ /**
+ * See [Client#discardWebsocketOnCommFailure]{@link Client#discardWebsocketOnCommFailure}.
+ */
+ public discardWebsocketOnCommFailure?: boolean;
+
+ /**
+ * See [Client#onChangeState]{@link Client#onChangeState}.
+ */
+ public onChangeState?: (state: ActivationState) => void;
+}
diff --git a/node_modules/@stomp/stompjs/src/stomp-handler.ts b/node_modules/@stomp/stompjs/src/stomp-handler.ts
new file mode 100644
index 0000000..2723801
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/stomp-handler.ts
@@ -0,0 +1,539 @@
+import { BYTE } from './byte';
+import { Client } from './client';
+import { FrameImpl } from './frame-impl';
+import { IMessage } from './i-message';
+import { ITransaction } from './i-transaction';
+import { Parser } from './parser';
+import { StompConfig } from './stomp-config';
+import { StompHeaders } from './stomp-headers';
+import { StompSubscription } from './stomp-subscription';
+import {
+ closeEventCallbackType,
+ debugFnType,
+ frameCallbackType,
+ IPublishParams,
+ IStompSocket,
+ IStompSocketMessageEvent,
+ messageCallbackType,
+ StompSocketState,
+ wsErrorCallbackType,
+} from './types';
+import { Versions } from './versions';
+import { augmentWebsocket } from './augment-websocket';
+
+/**
+ * The STOMP protocol handler
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export class StompHandler {
+ public debug: debugFnType;
+
+ public stompVersions: Versions;
+
+ public connectHeaders: StompHeaders;
+
+ public disconnectHeaders: StompHeaders;
+
+ public heartbeatIncoming: number;
+
+ public heartbeatOutgoing: number;
+
+ public onUnhandledMessage: messageCallbackType;
+
+ public onUnhandledReceipt: frameCallbackType;
+
+ public onUnhandledFrame: frameCallbackType;
+
+ public onConnect: frameCallbackType;
+
+ public onDisconnect: frameCallbackType;
+
+ public onStompError: frameCallbackType;
+
+ public onWebSocketClose: closeEventCallbackType;
+
+ public onWebSocketError: wsErrorCallbackType;
+
+ public logRawCommunication: boolean;
+
+ public splitLargeFrames: boolean;
+
+ public maxWebSocketChunkSize: number;
+
+ public forceBinaryWSFrames: boolean;
+
+ public appendMissingNULLonIncoming: boolean;
+
+ public discardWebsocketOnCommFailure: boolean;
+
+ get connectedVersion(): string {
+ return this._connectedVersion;
+ }
+ private _connectedVersion: string;
+
+ get connected(): boolean {
+ return this._connected;
+ }
+
+ private _connected: boolean;
+
+ private readonly _subscriptions: { [key: string]: messageCallbackType };
+ private readonly _receiptWatchers: { [key: string]: frameCallbackType };
+ private _partialData: string;
+ private _escapeHeaderValues: boolean;
+ private _counter: number;
+ private _pinger: any;
+ private _ponger: any;
+ private _lastServerActivityTS: number;
+
+ private _onclose: (closeEvent: any) => void;
+
+ constructor(
+ private _client: Client,
+ public _webSocket: IStompSocket,
+ config: StompConfig = {}
+ ) {
+ // used to index subscribers
+ this._counter = 0;
+
+ // subscription callbacks indexed by subscriber's ID
+ this._subscriptions = {};
+
+ // receipt-watchers indexed by receipts-ids
+ this._receiptWatchers = {};
+
+ this._partialData = '';
+
+ this._escapeHeaderValues = false;
+
+ this._lastServerActivityTS = Date.now();
+
+ this.configure(config);
+ }
+
+ public configure(conf: StompConfig): void {
+ // bulk assign all properties to this
+ (Object as any).assign(this, conf);
+ }
+
+ public start(): void {
+ const parser = new Parser(
+ // On Frame
+ rawFrame => {
+ const frame = FrameImpl.fromRawFrame(
+ rawFrame,
+ this._escapeHeaderValues
+ );
+
+ // if this.logRawCommunication is set, the rawChunk is logged at this._webSocket.onmessage
+ if (!this.logRawCommunication) {
+ this.debug(`<<< ${frame}`);
+ }
+
+ const serverFrameHandler =
+ this._serverFrameHandlers[frame.command] || this.onUnhandledFrame;
+ serverFrameHandler(frame);
+ },
+ // On Incoming Ping
+ () => {
+ this.debug('<<< PONG');
+ }
+ );
+
+ this._webSocket.onmessage = (evt: IStompSocketMessageEvent) => {
+ this.debug('Received data');
+ this._lastServerActivityTS = Date.now();
+
+ if (this.logRawCommunication) {
+ const rawChunkAsString =
+ evt.data instanceof ArrayBuffer
+ ? new TextDecoder().decode(evt.data)
+ : evt.data;
+ this.debug(`<<< ${rawChunkAsString}`);
+ }
+
+ parser.parseChunk(evt.data, this.appendMissingNULLonIncoming);
+ };
+
+ this._onclose = (closeEvent): void => {
+ this.debug(`Connection closed to ${this._client.brokerURL}`);
+ this._cleanUp();
+ this.onWebSocketClose(closeEvent);
+ };
+
+ this._webSocket.onclose = this._onclose;
+
+ this._webSocket.onerror = (errorEvent): void => {
+ this.onWebSocketError(errorEvent);
+ };
+
+ this._webSocket.onopen = () => {
+ // Clone before updating
+ const connectHeaders = (Object as any).assign({}, this.connectHeaders);
+
+ this.debug('Web Socket Opened...');
+ connectHeaders['accept-version'] = this.stompVersions.supportedVersions();
+ connectHeaders['heart-beat'] = [
+ this.heartbeatOutgoing,
+ this.heartbeatIncoming,
+ ].join(',');
+ this._transmit({ command: 'CONNECT', headers: connectHeaders });
+ };
+ }
+
+ private readonly _serverFrameHandlers: {
+ [key: string]: frameCallbackType;
+ } = {
+ // [CONNECTED Frame](http://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame)
+ CONNECTED: frame => {
+ this.debug(`connected to server ${frame.headers.server}`);
+ this._connected = true;
+ this._connectedVersion = frame.headers.version;
+ // STOMP version 1.2 needs header values to be escaped
+ if (this._connectedVersion === Versions.V1_2) {
+ this._escapeHeaderValues = true;
+ }
+
+ this._setupHeartbeat(frame.headers);
+ this.onConnect(frame);
+ },
+
+ // [MESSAGE Frame](http://stomp.github.com/stomp-specification-1.2.html#MESSAGE)
+ MESSAGE: frame => {
+ // the callback is registered when the client calls
+ // `subscribe()`.
+ // If there is no registered subscription for the received message,
+ // the default `onUnhandledMessage` callback is used that the client can set.
+ // This is useful for subscriptions that are automatically created
+ // on the browser side (e.g. [RabbitMQ's temporary
+ // queues](http://www.rabbitmq.com/stomp.html)).
+ const subscription = frame.headers.subscription;
+ const onReceive =
+ this._subscriptions[subscription] || this.onUnhandledMessage;
+
+ // bless the frame to be a Message
+ const message = frame as IMessage;
+
+ const client = this;
+ const messageId =
+ this._connectedVersion === Versions.V1_2
+ ? message.headers.ack
+ : message.headers['message-id'];
+
+ // add `ack()` and `nack()` methods directly to the returned frame
+ // so that a simple call to `message.ack()` can acknowledge the message.
+ message.ack = (headers: StompHeaders = {}): void => {
+ return client.ack(messageId, subscription, headers);
+ };
+ message.nack = (headers: StompHeaders = {}): void => {
+ return client.nack(messageId, subscription, headers);
+ };
+ onReceive(message);
+ },
+
+ // [RECEIPT Frame](http://stomp.github.com/stomp-specification-1.2.html#RECEIPT)
+ RECEIPT: frame => {
+ const callback = this._receiptWatchers[frame.headers['receipt-id']];
+ if (callback) {
+ callback(frame);
+ // Server will acknowledge only once, remove the callback
+ delete this._receiptWatchers[frame.headers['receipt-id']];
+ } else {
+ this.onUnhandledReceipt(frame);
+ }
+ },
+
+ // [ERROR Frame](http://stomp.github.com/stomp-specification-1.2.html#ERROR)
+ ERROR: frame => {
+ this.onStompError(frame);
+ },
+ };
+
+ private _setupHeartbeat(headers: StompHeaders): void {
+ if (
+ headers.version !== Versions.V1_1 &&
+ headers.version !== Versions.V1_2
+ ) {
+ return;
+ }
+
+ // It is valid for the server to not send this header
+ // https://stomp.github.io/stomp-specification-1.2.html#Heart-beating
+ if (!headers['heart-beat']) {
+ return;
+ }
+
+ // heart-beat header received from the server looks like:
+ //
+ // heart-beat: sx, sy
+ const [serverOutgoing, serverIncoming] = headers['heart-beat']
+ .split(',')
+ .map((v: string) => parseInt(v, 10));
+
+ if (this.heartbeatOutgoing !== 0 && serverIncoming !== 0) {
+ const ttl: number = Math.max(this.heartbeatOutgoing, serverIncoming);
+ this.debug(`send PING every ${ttl}ms`);
+ this._pinger = setInterval(() => {
+ if (this._webSocket.readyState === StompSocketState.OPEN) {
+ this._webSocket.send(BYTE.LF);
+ this.debug('>>> PING');
+ }
+ }, ttl);
+ }
+
+ if (this.heartbeatIncoming !== 0 && serverOutgoing !== 0) {
+ const ttl: number = Math.max(this.heartbeatIncoming, serverOutgoing);
+ this.debug(`check PONG every ${ttl}ms`);
+ this._ponger = setInterval(() => {
+ const delta = Date.now() - this._lastServerActivityTS;
+ // We wait twice the TTL to be flexible on window's setInterval calls
+ if (delta > ttl * 2) {
+ this.debug(`did not receive server activity for the last ${delta}ms`);
+ this._closeOrDiscardWebsocket();
+ }
+ }, ttl);
+ }
+ }
+
+ private _closeOrDiscardWebsocket() {
+ if (this.discardWebsocketOnCommFailure) {
+ this.debug(
+ 'Discarding websocket, the underlying socket may linger for a while'
+ );
+ this._discardWebsocket();
+ } else {
+ this.debug('Issuing close on the websocket');
+ this._closeWebsocket();
+ }
+ }
+
+ public forceDisconnect() {
+ if (this._webSocket) {
+ if (
+ this._webSocket.readyState === StompSocketState.CONNECTING ||
+ this._webSocket.readyState === StompSocketState.OPEN
+ ) {
+ this._closeOrDiscardWebsocket();
+ }
+ }
+ }
+
+ public _closeWebsocket() {
+ this._webSocket.onmessage = () => {}; // ignore messages
+ this._webSocket.close();
+ }
+
+ private _discardWebsocket() {
+ if (!this._webSocket.terminate) {
+ augmentWebsocket(this._webSocket, (msg: string) => this.debug(msg));
+ }
+
+ this._webSocket.terminate();
+ }
+
+ private _transmit(params: {
+ command: string;
+ headers?: StompHeaders;
+ body?: string;
+ binaryBody?: Uint8Array;
+ skipContentLengthHeader?: boolean;
+ }): void {
+ const { command, headers, body, binaryBody, skipContentLengthHeader } =
+ params;
+ const frame = new FrameImpl({
+ command,
+ headers,
+ body,
+ binaryBody,
+ escapeHeaderValues: this._escapeHeaderValues,
+ skipContentLengthHeader,
+ });
+
+ let rawChunk = frame.serialize();
+
+ if (this.logRawCommunication) {
+ this.debug(`>>> ${rawChunk}`);
+ } else {
+ this.debug(`>>> ${frame}`);
+ }
+
+ if (this.forceBinaryWSFrames && typeof rawChunk === 'string') {
+ rawChunk = new TextEncoder().encode(rawChunk);
+ }
+
+ if (typeof rawChunk !== 'string' || !this.splitLargeFrames) {
+ this._webSocket.send(rawChunk);
+ } else {
+ let out = rawChunk as string;
+ while (out.length > 0) {
+ const chunk = out.substring(0, this.maxWebSocketChunkSize);
+ out = out.substring(this.maxWebSocketChunkSize);
+ this._webSocket.send(chunk);
+ this.debug(`chunk sent = ${chunk.length}, remaining = ${out.length}`);
+ }
+ }
+ }
+
+ public dispose(): void {
+ if (this.connected) {
+ try {
+ // clone before updating
+ const disconnectHeaders = (Object as any).assign(
+ {},
+ this.disconnectHeaders
+ );
+
+ if (!disconnectHeaders.receipt) {
+ disconnectHeaders.receipt = `close-${this._counter++}`;
+ }
+ this.watchForReceipt(disconnectHeaders.receipt, frame => {
+ this._closeWebsocket();
+ this._cleanUp();
+ this.onDisconnect(frame);
+ });
+ this._transmit({ command: 'DISCONNECT', headers: disconnectHeaders });
+ } catch (error) {
+ this.debug(`Ignoring error during disconnect ${error}`);
+ }
+ } else {
+ if (
+ this._webSocket.readyState === StompSocketState.CONNECTING ||
+ this._webSocket.readyState === StompSocketState.OPEN
+ ) {
+ this._closeWebsocket();
+ }
+ }
+ }
+
+ private _cleanUp() {
+ this._connected = false;
+
+ if (this._pinger) {
+ clearInterval(this._pinger);
+ }
+ if (this._ponger) {
+ clearInterval(this._ponger);
+ }
+ }
+
+ public publish(params: IPublishParams): void {
+ const { destination, headers, body, binaryBody, skipContentLengthHeader } =
+ params;
+ const hdrs: StompHeaders = (Object as any).assign({ destination }, headers);
+ this._transmit({
+ command: 'SEND',
+ headers: hdrs,
+ body,
+ binaryBody,
+ skipContentLengthHeader,
+ });
+ }
+
+ public watchForReceipt(receiptId: string, callback: frameCallbackType): void {
+ this._receiptWatchers[receiptId] = callback;
+ }
+
+ public subscribe(
+ destination: string,
+ callback: messageCallbackType,
+ headers: StompHeaders = {}
+ ): StompSubscription {
+ headers = (Object as any).assign({}, headers);
+
+ if (!headers.id) {
+ headers.id = `sub-${this._counter++}`;
+ }
+ headers.destination = destination;
+ this._subscriptions[headers.id] = callback;
+ this._transmit({ command: 'SUBSCRIBE', headers });
+ const client = this;
+ return {
+ id: headers.id,
+
+ unsubscribe(hdrs) {
+ return client.unsubscribe(headers.id, hdrs);
+ },
+ };
+ }
+
+ public unsubscribe(id: string, headers: StompHeaders = {}): void {
+ headers = (Object as any).assign({}, headers);
+
+ delete this._subscriptions[id];
+ headers.id = id;
+ this._transmit({ command: 'UNSUBSCRIBE', headers });
+ }
+
+ public begin(transactionId: string): ITransaction {
+ const txId = transactionId || `tx-${this._counter++}`;
+ this._transmit({
+ command: 'BEGIN',
+ headers: {
+ transaction: txId,
+ },
+ });
+ const client = this;
+ return {
+ id: txId,
+ commit(): void {
+ client.commit(txId);
+ },
+ abort(): void {
+ client.abort(txId);
+ },
+ };
+ }
+
+ public commit(transactionId: string): void {
+ this._transmit({
+ command: 'COMMIT',
+ headers: {
+ transaction: transactionId,
+ },
+ });
+ }
+
+ public abort(transactionId: string): void {
+ this._transmit({
+ command: 'ABORT',
+ headers: {
+ transaction: transactionId,
+ },
+ });
+ }
+
+ public ack(
+ messageId: string,
+ subscriptionId: string,
+ headers: StompHeaders = {}
+ ): void {
+ headers = (Object as any).assign({}, headers);
+
+ if (this._connectedVersion === Versions.V1_2) {
+ headers.id = messageId;
+ } else {
+ headers['message-id'] = messageId;
+ }
+ headers.subscription = subscriptionId;
+ this._transmit({ command: 'ACK', headers });
+ }
+
+ public nack(
+ messageId: string,
+ subscriptionId: string,
+ headers: StompHeaders = {}
+ ): void {
+ headers = (Object as any).assign({}, headers);
+
+ if (this._connectedVersion === Versions.V1_2) {
+ headers.id = messageId;
+ } else {
+ headers['message-id'] = messageId;
+ }
+ headers.subscription = subscriptionId;
+ return this._transmit({ command: 'NACK', headers });
+ }
+}
diff --git a/node_modules/@stomp/stompjs/src/stomp-headers.ts b/node_modules/@stomp/stompjs/src/stomp-headers.ts
new file mode 100644
index 0000000..073a157
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/stomp-headers.ts
@@ -0,0 +1,12 @@
+/**
+ * STOMP headers. Many functions calls will accept headers as parameters.
+ * The headers sent by Broker will be available as [IFrame#headers]{@link IFrame#headers}.
+ *
+ * `key` and `value` must be valid strings.
+ * In addition, `key` must not contain `CR`, `LF`, or `:`.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class StompHeaders {
+ [key: string]: string;
+}
diff --git a/node_modules/@stomp/stompjs/src/stomp-subscription.ts b/node_modules/@stomp/stompjs/src/stomp-subscription.ts
new file mode 100644
index 0000000..e6a9dfe
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/stomp-subscription.ts
@@ -0,0 +1,18 @@
+import { StompHeaders } from './stomp-headers';
+
+/**
+ * Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class StompSubscription {
+ /**
+ * Id associated with this subscription.
+ */
+ public id: string;
+
+ /**
+ * Unsubscribe. See [Client#unsubscribe]{@link Client#unsubscribe} for an example.
+ */
+ public unsubscribe: (headers?: StompHeaders) => void;
+}
diff --git a/node_modules/@stomp/stompjs/src/types.ts b/node_modules/@stomp/stompjs/src/types.ts
new file mode 100644
index 0000000..ef20d3c
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/types.ts
@@ -0,0 +1,156 @@
+import { IFrame } from './i-frame';
+import { IMessage } from './i-message';
+import { StompHeaders } from './stomp-headers';
+
+/**
+ * This callback will receive a `string` as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type debugFnType = (msg: string) => void;
+
+/**
+ * This callback will receive a {@link IMessage} as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type messageCallbackType = (message: IMessage) => void;
+
+/**
+ * This callback will receive a {@link IFrame} as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type frameCallbackType = (receipt: IFrame) => void;
+
+/**
+ * This callback will receive a [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
+ * as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type closeEventCallbackType = (evt: T) => void;
+
+/**
+ * This callback will receive an [Event]{@link https://developer.mozilla.org/en-US/docs/Web/API/Event}
+ * as parameter.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export type wsErrorCallbackType = (evt: T) => void;
+
+/**
+ * Parameters for [Client#publish]{@link Client#publish}.
+ * Aliased as publishParams as well.
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export interface IPublishParams {
+ /**
+ * destination end point
+ */
+ destination: string;
+ /**
+ * headers (optional)
+ */
+ headers?: StompHeaders;
+ /**
+ * body (optional)
+ */
+ body?: string;
+ /**
+ * binary body (optional)
+ */
+ binaryBody?: Uint8Array;
+ /**
+ * By default a `content-length` header will be added in the Frame to the broker.
+ * Set it to `true` for the header to be skipped.
+ */
+ skipContentLengthHeader?: boolean;
+}
+
+/**
+ * Backward compatibility, switch to {@link IPublishParams}.
+ */
+export type publishParams = IPublishParams;
+
+/**
+ * Used in {@link IRawFrameType}
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export type RawHeaderType = [string, string];
+
+/**
+ * The parser yield frames in this structure
+ *
+ * Part of `@stomp/stompjs`.
+ *
+ * @internal
+ */
+export interface IRawFrameType {
+ command: string;
+ headers: RawHeaderType[];
+ binaryBody: Uint8Array;
+}
+
+/**
+ * @internal
+ */
+export interface IStompSocketMessageEvent {
+ data?: string | ArrayBuffer;
+}
+
+/**
+ * Copied from Websocket interface to avoid dom typelib dependency.
+ *
+ * @internal
+ */
+export interface IStompSocket {
+ onclose: ((this: IStompSocket, ev?: any) => any) | null;
+ onerror: ((this: IStompSocket, ev: any) => any) | null;
+ onmessage: ((this: IStompSocket, ev: IStompSocketMessageEvent) => any) | null;
+ onopen: ((this: IStompSocket, ev?: any) => any) | null;
+ terminate?: ((this: IStompSocket) => any) | null;
+
+ /**
+ * Returns a string that indicates how binary data from the socket is exposed to scripts:
+ * We support only 'arraybuffer'.
+ */
+ binaryType: 'arraybuffer';
+
+ /**
+ * Returns the state of the socket connection. It can have the values of StompSocketState.
+ */
+ readonly readyState: number;
+
+ /**
+ * Closes the connection.
+ */
+ close(): void;
+ /**
+ * Transmits data using the connection. data can be a string or an ArrayBuffer.
+ */
+ send(data: string | ArrayBuffer): void;
+}
+
+/**
+ * Possible states for the IStompSocket
+ */
+export enum StompSocketState {
+ CONNECTING,
+ OPEN,
+ CLOSING,
+ CLOSED,
+}
+
+/**
+ * Possible activation state
+ */
+export enum ActivationState {
+ ACTIVE,
+ DEACTIVATING,
+ INACTIVE,
+}
diff --git a/node_modules/@stomp/stompjs/src/versions.ts b/node_modules/@stomp/stompjs/src/versions.ts
new file mode 100644
index 0000000..042dbb1
--- /dev/null
+++ b/node_modules/@stomp/stompjs/src/versions.ts
@@ -0,0 +1,50 @@
+/**
+ * Supported STOMP versions
+ *
+ * Part of `@stomp/stompjs`.
+ */
+export class Versions {
+ /**
+ * Indicates protocol version 1.0
+ */
+ public static V1_0 = '1.0';
+ /**
+ * Indicates protocol version 1.1
+ */
+ public static V1_1 = '1.1';
+ /**
+ * Indicates protocol version 1.2
+ */
+ public static V1_2 = '1.2';
+
+ /**
+ * @internal
+ */
+ public static default = new Versions([
+ Versions.V1_0,
+ Versions.V1_1,
+ Versions.V1_2,
+ ]);
+
+ /**
+ * Takes an array of string of versions, typical elements '1.0', '1.1', or '1.2'
+ *
+ * You will an instance if this class if you want to override supported versions to be declared during
+ * STOMP handshake.
+ */
+ constructor(public versions: string[]) {}
+
+ /**
+ * Used as part of CONNECT STOMP Frame
+ */
+ public supportedVersions() {
+ return this.versions.join(',');
+ }
+
+ /**
+ * Used while creating a WebSocket
+ */
+ public protocolVersions() {
+ return this.versions.map(x => `v${x.replace('.', '')}.stomp`);
+ }
+}
diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/node/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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
diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md
new file mode 100644
index 0000000..a61ca58
--- /dev/null
+++ b/node_modules/@types/node/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/node`
+
+# Summary
+This package contains type definitions for node (https://nodejs.org/).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
+
+### Additional Details
+ * Last updated: Thu, 19 Feb 2026 00:56:10 GMT
+ * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
+
+# Credits
+These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig).
diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts
new file mode 100644
index 0000000..ef4d852
--- /dev/null
+++ b/node_modules/@types/node/assert.d.ts
@@ -0,0 +1,955 @@
+/**
+ * The `node:assert` module provides a set of assertion functions for verifying
+ * invariants.
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert.js)
+ */
+declare module "node:assert" {
+ import strict = require("node:assert/strict");
+ /**
+ * An alias of {@link assert.ok}.
+ * @since v0.5.9
+ * @param value The input that is checked for being truthy.
+ */
+ function assert(value: unknown, message?: string | Error): asserts value;
+ const kOptions: unique symbol;
+ namespace assert {
+ type AssertMethodNames =
+ | "deepEqual"
+ | "deepStrictEqual"
+ | "doesNotMatch"
+ | "doesNotReject"
+ | "doesNotThrow"
+ | "equal"
+ | "fail"
+ | "ifError"
+ | "match"
+ | "notDeepEqual"
+ | "notDeepStrictEqual"
+ | "notEqual"
+ | "notStrictEqual"
+ | "ok"
+ | "partialDeepStrictEqual"
+ | "rejects"
+ | "strictEqual"
+ | "throws";
+ interface AssertOptions {
+ /**
+ * If set to `'full'`, shows the full diff in assertion errors.
+ * @default 'simple'
+ */
+ diff?: "simple" | "full" | undefined;
+ /**
+ * If set to `true`, non-strict methods behave like their
+ * corresponding strict methods.
+ * @default true
+ */
+ strict?: boolean | undefined;
+ /**
+ * If set to `true`, skips prototype and constructor
+ * comparison in deep equality checks.
+ * @since v24.9.0
+ * @default false
+ */
+ skipPrototype?: boolean | undefined;
+ }
+ interface Assert extends Pick {
+ readonly [kOptions]: AssertOptions & { strict: false };
+ }
+ interface AssertStrict extends Pick {
+ readonly [kOptions]: AssertOptions & { strict: true };
+ }
+ /**
+ * The `Assert` class allows creating independent assertion instances with custom options.
+ * @since v24.6.0
+ */
+ var Assert: {
+ /**
+ * Creates a new assertion instance. The `diff` option controls the verbosity of diffs in assertion error messages.
+ *
+ * ```js
+ * const { Assert } = require('node:assert');
+ * const assertInstance = new Assert({ diff: 'full' });
+ * assertInstance.deepStrictEqual({ a: 1 }, { a: 2 });
+ * // Shows a full diff in the error message.
+ * ```
+ *
+ * **Important**: When destructuring assertion methods from an `Assert` instance,
+ * the methods lose their connection to the instance's configuration options (such
+ * as `diff`, `strict`, and `skipPrototype` settings).
+ * The destructured methods will fall back to default behavior instead.
+ *
+ * ```js
+ * const myAssert = new Assert({ diff: 'full' });
+ *
+ * // This works as expected - uses 'full' diff
+ * myAssert.strictEqual({ a: 1 }, { b: { c: 1 } });
+ *
+ * // This loses the 'full' diff setting - falls back to default 'simple' diff
+ * const { strictEqual } = myAssert;
+ * strictEqual({ a: 1 }, { b: { c: 1 } });
+ * ```
+ *
+ * The `skipPrototype` option affects all deep equality methods:
+ *
+ * ```js
+ * class Foo {
+ * constructor(a) {
+ * this.a = a;
+ * }
+ * }
+ *
+ * class Bar {
+ * constructor(a) {
+ * this.a = a;
+ * }
+ * }
+ *
+ * const foo = new Foo(1);
+ * const bar = new Bar(1);
+ *
+ * // Default behavior - fails due to different constructors
+ * const assert1 = new Assert();
+ * assert1.deepStrictEqual(foo, bar); // AssertionError
+ *
+ * // Skip prototype comparison - passes if properties are equal
+ * const assert2 = new Assert({ skipPrototype: true });
+ * assert2.deepStrictEqual(foo, bar); // OK
+ * ```
+ *
+ * When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior
+ * (diff: 'simple', non-strict mode).
+ * To maintain custom options when using destructured methods, avoid
+ * destructuring and call methods directly on the instance.
+ * @since v24.6.0
+ */
+ new(
+ options?: AssertOptions & { strict?: true | undefined },
+ ): AssertStrict;
+ new(
+ options: AssertOptions,
+ ): Assert;
+ };
+ interface AssertionErrorOptions {
+ /**
+ * If provided, the error message is set to this value.
+ */
+ message?: string | undefined;
+ /**
+ * The `actual` property on the error instance.
+ */
+ actual?: unknown;
+ /**
+ * The `expected` property on the error instance.
+ */
+ expected?: unknown;
+ /**
+ * The `operator` property on the error instance.
+ */
+ operator?: string | undefined;
+ /**
+ * If provided, the generated stack trace omits frames before this function.
+ */
+ stackStartFn?: Function | undefined;
+ /**
+ * If set to `'full'`, shows the full diff in assertion errors.
+ * @default 'simple'
+ */
+ diff?: "simple" | "full" | undefined;
+ }
+ /**
+ * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class.
+ */
+ class AssertionError extends Error {
+ constructor(options: AssertionErrorOptions);
+ /**
+ * Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
+ */
+ actual: unknown;
+ /**
+ * Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
+ */
+ expected: unknown;
+ /**
+ * Indicates if the message was auto-generated (`true`) or not.
+ */
+ generatedMessage: boolean;
+ /**
+ * Value is always `ERR_ASSERTION` to show that the error is an assertion error.
+ */
+ code: "ERR_ASSERTION";
+ /**
+ * Set to the passed in operator value.
+ */
+ operator: string;
+ }
+ type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error;
+ /**
+ * Throws an `AssertionError` with the provided error message or a default
+ * error message. If the `message` parameter is an instance of an `Error` then
+ * it will be thrown instead of the `AssertionError`.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.fail();
+ * // AssertionError [ERR_ASSERTION]: Failed
+ *
+ * assert.fail('boom');
+ * // AssertionError [ERR_ASSERTION]: boom
+ *
+ * assert.fail(new TypeError('need array'));
+ * // TypeError: need array
+ * ```
+ * @since v0.1.21
+ * @param [message='Failed']
+ */
+ function fail(message?: string | Error): never;
+ /**
+ * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.
+ *
+ * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default
+ * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
+ *
+ * Be aware that in the `repl` the error message will be different to the one
+ * thrown in a file! See below for further details.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.ok(true);
+ * // OK
+ * assert.ok(1);
+ * // OK
+ *
+ * assert.ok();
+ * // AssertionError: No value argument passed to `assert.ok()`
+ *
+ * assert.ok(false, 'it\'s false');
+ * // AssertionError: it's false
+ *
+ * // In the repl:
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: false == true
+ *
+ * // In a file (e.g. test.js):
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(typeof 123 === 'string')
+ *
+ * assert.ok(false);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(false)
+ *
+ * assert.ok(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(0)
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * // Using `assert()` works the same:
+ * assert(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert(0)
+ * ```
+ * @since v0.1.21
+ */
+ function ok(value: unknown, message?: string | Error): asserts value;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link strictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
+ *
+ * Tests shallow, coercive equality between the `actual` and `expected` parameters
+ * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
+ * and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * assert.equal(1, 1);
+ * // OK, 1 == 1
+ * assert.equal(1, '1');
+ * // OK, 1 == '1'
+ * assert.equal(NaN, NaN);
+ * // OK
+ *
+ * assert.equal(1, 2);
+ * // AssertionError: 1 == 2
+ * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
+ * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
+ * ```
+ *
+ * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
+ * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
+ *
+ * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
+ * specially handled and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * assert.notEqual(1, 2);
+ * // OK
+ *
+ * assert.notEqual(1, 1);
+ * // AssertionError: 1 != 1
+ *
+ * assert.notEqual(1, '1');
+ * // AssertionError: 1 != '1'
+ * ```
+ *
+ * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error
+ * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link deepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
+ *
+ * Tests for deep equality between the `actual` and `expected` parameters. Consider
+ * using {@link deepStrictEqual} instead. {@link deepEqual} can have
+ * surprising results.
+ *
+ * _Deep equality_ means that the enumerable "own" properties of child objects
+ * are also recursively evaluated by the following rules.
+ * @since v0.1.21
+ */
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notDeepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
+ *
+ * Tests for any deep inequality. Opposite of {@link deepEqual}.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const obj1 = {
+ * a: {
+ * b: 1,
+ * },
+ * };
+ * const obj2 = {
+ * a: {
+ * b: 2,
+ * },
+ * };
+ * const obj3 = {
+ * a: {
+ * b: 1,
+ * },
+ * };
+ * const obj4 = { __proto__: obj1 };
+ *
+ * assert.notDeepEqual(obj1, obj1);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj2);
+ * // OK
+ *
+ * assert.notDeepEqual(obj1, obj3);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj4);
+ * // OK
+ * ```
+ *
+ * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
+ * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests strict equality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.strictEqual(1, 2);
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * //
+ * // 1 !== 2
+ *
+ * assert.strictEqual(1, 1);
+ * // OK
+ *
+ * assert.strictEqual('Hello foobar', 'Hello World!');
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * // + actual - expected
+ * //
+ * // + 'Hello foobar'
+ * // - 'Hello World!'
+ * // ^
+ *
+ * const apples = 1;
+ * const oranges = 2;
+ * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
+ * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
+ *
+ * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
+ * // TypeError: Inputs are not identical
+ * ```
+ *
+ * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
+ * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests strict inequality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.notStrictEqual(1, 2);
+ * // OK
+ *
+ * assert.notStrictEqual(1, 1);
+ * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
+ * //
+ * // 1
+ *
+ * assert.notStrictEqual(1, '1');
+ * // OK
+ * ```
+ *
+ * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
+ * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests for deep equality between the `actual` and `expected` parameters.
+ * "Deep" equality means that the enumerable "own" properties of child objects
+ * are recursively evaluated also by the following rules.
+ * @since v1.2.0
+ */
+ function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
+ * // OK
+ * ```
+ *
+ * If the values are deeply and strictly equal, an `AssertionError` is thrown
+ * with a `message` property set equal to the value of the `message` parameter. If
+ * the `message` parameter is undefined, a default error message is assigned. If
+ * the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v1.2.0
+ */
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Expects the function `fn` to throw an error.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * a validation object where each property will be tested for strict deep equality,
+ * or an instance of error where each property will be tested for strict deep
+ * equality including the non-enumerable `message` and `name` properties. When
+ * using an object, it is also possible to use a regular expression, when
+ * validating against a string property. See below for examples.
+ *
+ * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation
+ * fails.
+ *
+ * Custom validation object/error instance:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * const err = new TypeError('Wrong value');
+ * err.code = 404;
+ * err.foo = 'bar';
+ * err.info = {
+ * nested: true,
+ * baz: 'text',
+ * };
+ * err.reg = /abc/i;
+ *
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * info: {
+ * nested: true,
+ * baz: 'text',
+ * },
+ * // Only properties on the validation object will be tested for.
+ * // Using nested objects requires all properties to be present. Otherwise
+ * // the validation is going to fail.
+ * },
+ * );
+ *
+ * // Using regular expressions to validate error properties:
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * // The `name` and `message` properties are strings and using regular
+ * // expressions on those will match against the string. If they fail, an
+ * // error is thrown.
+ * name: /^TypeError$/,
+ * message: /Wrong/,
+ * foo: 'bar',
+ * info: {
+ * nested: true,
+ * // It is not possible to use regular expressions for nested properties!
+ * baz: 'text',
+ * },
+ * // The `reg` property contains a regular expression and only if the
+ * // validation object contains an identical regular expression, it is going
+ * // to pass.
+ * reg: /abc/i,
+ * },
+ * );
+ *
+ * // Fails due to the different `message` and `name` properties:
+ * assert.throws(
+ * () => {
+ * const otherErr = new Error('Not found');
+ * // Copy all enumerable properties from `err` to `otherErr`.
+ * for (const [key, value] of Object.entries(err)) {
+ * otherErr[key] = value;
+ * }
+ * throw otherErr;
+ * },
+ * // The error's `message` and `name` properties will also be checked when using
+ * // an error as validation object.
+ * err,
+ * );
+ * ```
+ *
+ * Validate instanceof using constructor:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * Error,
+ * );
+ * ```
+ *
+ * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
+ *
+ * Using a regular expression runs `.toString` on the error object, and will
+ * therefore also include the error name.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * /^Error: Wrong value$/,
+ * );
+ * ```
+ *
+ * Custom error validation:
+ *
+ * The function must return `true` to indicate all internal validations passed.
+ * It will otherwise fail with an `AssertionError`.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * (err) => {
+ * assert(err instanceof Error);
+ * assert(/value/.test(err));
+ * // Avoid returning anything from validation functions besides `true`.
+ * // Otherwise, it's not clear what part of the validation failed. Instead,
+ * // throw an error about the specific validation that failed (as done in this
+ * // example) and add as much helpful debugging information to that error as
+ * // possible.
+ * return true;
+ * },
+ * 'unexpected error',
+ * );
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same
+ * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
+ * a string as the second argument gets considered:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * function throwingFirst() {
+ * throw new Error('First');
+ * }
+ *
+ * function throwingSecond() {
+ * throw new Error('Second');
+ * }
+ *
+ * function notThrowing() {}
+ *
+ * // The second argument is a string and the input function threw an Error.
+ * // The first case will not throw as it does not match for the error message
+ * // thrown by the input function!
+ * assert.throws(throwingFirst, 'Second');
+ * // In the next example the message has no benefit over the message from the
+ * // error and since it is not clear if the user intended to actually match
+ * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
+ * assert.throws(throwingSecond, 'Second');
+ * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
+ *
+ * // The string is only used (as message) in case the function does not throw:
+ * assert.throws(notThrowing, 'Second');
+ * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
+ *
+ * // If it was intended to match for the error message do this instead:
+ * // It does not throw because the error messages match.
+ * assert.throws(throwingSecond, /Second$/);
+ *
+ * // If the error message does not match, an AssertionError is thrown.
+ * assert.throws(throwingFirst, /Second$/);
+ * // AssertionError [ERR_ASSERTION]
+ * ```
+ *
+ * Due to the confusing error-prone notation, avoid a string as the second
+ * argument.
+ * @since v0.1.21
+ */
+ function throws(block: () => unknown, message?: string | Error): void;
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Asserts that the function `fn` does not throw an error.
+ *
+ * Using `assert.doesNotThrow()` is actually not useful because there
+ * is no benefit in catching an error and then rethrowing it. Instead, consider
+ * adding a comment next to the specific code path that should not throw and keep
+ * error messages as expressive as possible.
+ *
+ * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function.
+ *
+ * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a
+ * different type, or if the `error` parameter is undefined, the error is
+ * propagated back to the caller.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
+ * function. See {@link throws} for more details.
+ *
+ * The following, for instance, will throw the `TypeError` because there is no
+ * matching error type in the assertion:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError,
+ * );
+ * ```
+ *
+ * However, the following will result in an `AssertionError` with the message
+ * 'Got unwanted exception...':
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * TypeError,
+ * );
+ * ```
+ *
+ * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * /Wrong value/,
+ * 'Whoops',
+ * );
+ * // Throws: AssertionError: Got unwanted exception: Whoops
+ * ```
+ * @since v0.1.21
+ */
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Throws `value` if `value` is not `undefined` or `null`. This is useful when
+ * testing the `error` argument in callbacks. The stack trace contains all frames
+ * from the error passed to `ifError()` including the potential new frames for `ifError()` itself.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.ifError(null);
+ * // OK
+ * assert.ifError(0);
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
+ * assert.ifError('error');
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
+ * assert.ifError(new Error());
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
+ *
+ * // Create some random error frames.
+ * let err;
+ * (function errorFrame() {
+ * err = new Error('test error');
+ * })();
+ *
+ * (function ifErrorFrame() {
+ * assert.ifError(err);
+ * })();
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
+ * // at ifErrorFrame
+ * // at errorFrame
+ * ```
+ * @since v0.1.97
+ */
+ function ifError(value: unknown): asserts value is null | undefined;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
+ * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value)
+ * error. In both cases the error handler is skipped.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link throws}.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * an object where each property will be tested for, or an instance of error where
+ * each property will be tested for including the non-enumerable `message` and `name` properties.
+ *
+ * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * },
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * (err) => {
+ * assert.strictEqual(err.name, 'TypeError');
+ * assert.strictEqual(err.message, 'Wrong value');
+ * return true;
+ * },
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.rejects(
+ * Promise.reject(new Error('Wrong value')),
+ * Error,
+ * ).then(() => {
+ * // ...
+ * });
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to
+ * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the
+ * example in {@link throws} carefully if using a string as the second argument gets considered.
+ * @since v10.0.0
+ */
+ function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise;
+ function rejects(
+ block: (() => Promise) | Promise,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is not rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If
+ * the function does not return a promise, `assert.doesNotReject()` will return a
+ * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value) error. In both cases
+ * the error handler is skipped.
+ *
+ * Using `assert.doesNotReject()` is actually not useful because there is little
+ * benefit in catching a rejection and then rejecting it again. Instead, consider
+ * adding a comment next to the specific code path that should not reject and keep
+ * error messages as expressive as possible.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
+ * function. See {@link throws} for more details.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.doesNotReject(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError,
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
+ * .then(() => {
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ */
+ function doesNotReject(
+ block: (() => Promise) | Promise,
+ message?: string | Error,
+ ): Promise;
+ function doesNotReject(
+ block: (() => Promise) | Promise,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise;
+ /**
+ * Expects the `string` input to match the regular expression.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.match('I will fail', /pass/);
+ * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
+ *
+ * assert.match(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.match('I will pass', /pass/);
+ * // OK
+ * ```
+ *
+ * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
+ * @since v13.6.0, v12.16.0
+ */
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
+ /**
+ * Expects the `string` input not to match the regular expression.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotMatch('I will fail', /fail/);
+ * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
+ *
+ * assert.doesNotMatch(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.doesNotMatch('I will pass', /different/);
+ * // OK
+ * ```
+ *
+ * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
+ * @since v13.6.0, v12.16.0
+ */
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+ /**
+ * Tests for partial deep equality between the `actual` and `expected` parameters.
+ * "Deep" equality means that the enumerable "own" properties of child objects
+ * are recursively evaluated also by the following rules. "Partial" equality means
+ * that only properties that exist on the `expected` parameter are going to be
+ * compared.
+ *
+ * This method always passes the same test cases as `assert.deepStrictEqual()`,
+ * behaving as a super set of it.
+ * @since v22.13.0
+ */
+ function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ }
+ namespace assert {
+ export { strict };
+ }
+ export = assert;
+}
+declare module "assert" {
+ import assert = require("node:assert");
+ export = assert;
+}
diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts
new file mode 100644
index 0000000..51bb352
--- /dev/null
+++ b/node_modules/@types/node/assert/strict.d.ts
@@ -0,0 +1,105 @@
+/**
+ * In strict assertion mode, non-strict methods behave like their corresponding
+ * strict methods. For example, `assert.deepEqual()` will behave like
+ * `assert.deepStrictEqual()`.
+ *
+ * In strict assertion mode, error messages for objects display a diff. In legacy
+ * assertion mode, error messages for objects display the objects, often truncated.
+ *
+ * To use strict assertion mode:
+ *
+ * ```js
+ * import { strict as assert } from 'node:assert';
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ * ```
+ *
+ * Example error diff:
+ *
+ * ```js
+ * import { strict as assert } from 'node:assert';
+ *
+ * assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]);
+ * // AssertionError: Expected inputs to be strictly deep-equal:
+ * // + actual - expected ... Lines skipped
+ * //
+ * // [
+ * // [
+ * // ...
+ * // 2,
+ * // + 3
+ * // - '3'
+ * // ],
+ * // ...
+ * // 5
+ * // ]
+ * ```
+ *
+ * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS`
+ * environment variables. This will also deactivate the colors in the REPL. For
+ * more on color support in terminal environments, read the tty
+ * [`getColorDepth()`](https://nodejs.org/docs/latest-v25.x/api/tty.html#writestreamgetcolordepthenv) documentation.
+ * @since v15.0.0
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert/strict.js)
+ */
+declare module "node:assert/strict" {
+ import {
+ Assert,
+ AssertionError,
+ AssertionErrorOptions,
+ AssertOptions,
+ AssertPredicate,
+ AssertStrict,
+ deepStrictEqual,
+ doesNotMatch,
+ doesNotReject,
+ doesNotThrow,
+ fail,
+ ifError,
+ match,
+ notDeepStrictEqual,
+ notStrictEqual,
+ ok,
+ partialDeepStrictEqual,
+ rejects,
+ strictEqual,
+ throws,
+ } from "node:assert";
+ function strict(value: unknown, message?: string | Error): asserts value;
+ namespace strict {
+ export {
+ Assert,
+ AssertionError,
+ AssertionErrorOptions,
+ AssertOptions,
+ AssertPredicate,
+ AssertStrict,
+ deepStrictEqual,
+ deepStrictEqual as deepEqual,
+ doesNotMatch,
+ doesNotReject,
+ doesNotThrow,
+ fail,
+ ifError,
+ match,
+ notDeepStrictEqual,
+ notDeepStrictEqual as notDeepEqual,
+ notStrictEqual,
+ notStrictEqual as notEqual,
+ ok,
+ partialDeepStrictEqual,
+ rejects,
+ strict,
+ strictEqual,
+ strictEqual as equal,
+ throws,
+ };
+ }
+ export = strict;
+}
+declare module "assert/strict" {
+ import strict = require("node:assert/strict");
+ export = strict;
+}
diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts
new file mode 100644
index 0000000..aa692c1
--- /dev/null
+++ b/node_modules/@types/node/async_hooks.d.ts
@@ -0,0 +1,623 @@
+/**
+ * We strongly discourage the use of the `async_hooks` API.
+ * Other APIs that can cover most of its use cases include:
+ *
+ * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v25.x/api/async_context.html#class-asynclocalstorage) tracks async context
+ * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
+ *
+ * The `node:async_hooks` module provides an API to track asynchronous resources.
+ * It can be accessed using:
+ *
+ * ```js
+ * import async_hooks from 'node:async_hooks';
+ * ```
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/async_hooks.js)
+ */
+declare module "node:async_hooks" {
+ /**
+ * ```js
+ * import { executionAsyncId } from 'node:async_hooks';
+ * import fs from 'node:fs';
+ *
+ * console.log(executionAsyncId()); // 1 - bootstrap
+ * const path = '.';
+ * fs.open(path, 'r', (err, fd) => {
+ * console.log(executionAsyncId()); // 6 - open()
+ * });
+ * ```
+ *
+ * The ID returned from `executionAsyncId()` is related to execution timing, not
+ * causality (which is covered by `triggerAsyncId()`):
+ *
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // Returns the ID of the server, not of the new connection, because the
+ * // callback runs in the execution scope of the server's MakeCallback().
+ * async_hooks.executionAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Returns the ID of a TickObject (process.nextTick()) because all
+ * // callbacks passed to .listen() are wrapped in a nextTick().
+ * async_hooks.executionAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get precise `executionAsyncIds` by default.
+ * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
+ * @since v8.1.0
+ * @return The `asyncId` of the current execution context. Useful to track when something calls.
+ */
+ function executionAsyncId(): number;
+ /**
+ * Resource objects returned by `executionAsyncResource()` are most often internal
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
+ * on the object is likely to crash your application and should be avoided.
+ *
+ * Using `executionAsyncResource()` in the top-level execution context will
+ * return an empty object as there is no handle or request object to use,
+ * but having an object representing the top-level can be helpful.
+ *
+ * ```js
+ * import { open } from 'node:fs';
+ * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks';
+ *
+ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
+ * open(new URL(import.meta.url), 'r', (err, fd) => {
+ * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
+ * });
+ * ```
+ *
+ * This can be used to implement continuation local storage without the
+ * use of a tracking `Map` to store the metadata:
+ *
+ * ```js
+ * import { createServer } from 'node:http';
+ * import {
+ * executionAsyncId,
+ * executionAsyncResource,
+ * createHook,
+ * } from 'node:async_hooks';
+ * const sym = Symbol('state'); // Private symbol to avoid pollution
+ *
+ * createHook({
+ * init(asyncId, type, triggerAsyncId, resource) {
+ * const cr = executionAsyncResource();
+ * if (cr) {
+ * resource[sym] = cr[sym];
+ * }
+ * },
+ * }).enable();
+ *
+ * const server = createServer((req, res) => {
+ * executionAsyncResource()[sym] = { state: req.url };
+ * setTimeout(function() {
+ * res.end(JSON.stringify(executionAsyncResource()[sym]));
+ * }, 100);
+ * }).listen(3000);
+ * ```
+ * @since v13.9.0, v12.17.0
+ * @return The resource representing the current execution. Useful to store data within the resource.
+ */
+ function executionAsyncResource(): object;
+ /**
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // The resource that caused (or triggered) this callback to be called
+ * // was that of the new connection. Thus the return value of triggerAsyncId()
+ * // is the asyncId of "conn".
+ * async_hooks.triggerAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
+ * // the callback itself exists because the call to the server's .listen()
+ * // was made. So the return value would be the ID of the server.
+ * async_hooks.triggerAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get valid `triggerAsyncId`s by default. See
+ * the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
+ * @return The ID of the resource responsible for calling the callback that is currently being executed.
+ */
+ function triggerAsyncId(): number;
+ interface HookCallbacks {
+ /**
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
+ * @param asyncId A unique ID for the async resource
+ * @param type The type of the async resource
+ * @param triggerAsyncId The unique ID of the async resource in whose execution context this async resource was created
+ * @param resource Reference to the resource representing the async operation, needs to be released during destroy
+ */
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
+ /**
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
+ * The before callback is called just before said callback is executed.
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
+ */
+ before?(asyncId: number): void;
+ /**
+ * Called immediately after the callback specified in `before` is completed.
+ *
+ * If an uncaught exception occurs during execution of the callback, then `after` will run after the `'uncaughtException'` event is emitted or a `domain`'s handler runs.
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
+ */
+ after?(asyncId: number): void;
+ /**
+ * Called when a promise has resolve() called. This may not be in the same execution id
+ * as the promise itself.
+ * @param asyncId the unique id for the promise that was resolve()d.
+ */
+ promiseResolve?(asyncId: number): void;
+ /**
+ * Called after the resource corresponding to asyncId is destroyed
+ * @param asyncId a unique ID for the async resource
+ */
+ destroy?(asyncId: number): void;
+ }
+ interface AsyncHook {
+ /**
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+ */
+ enable(): this;
+ /**
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+ */
+ disable(): this;
+ }
+ /**
+ * Registers functions to be called for different lifetime events of each async
+ * operation.
+ *
+ * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
+ * respective asynchronous event during a resource's lifetime.
+ *
+ * All callbacks are optional. For example, if only resource cleanup needs to
+ * be tracked, then only the `destroy` callback needs to be passed. The
+ * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
+ *
+ * ```js
+ * import { createHook } from 'node:async_hooks';
+ *
+ * const asyncHook = createHook({
+ * init(asyncId, type, triggerAsyncId, resource) { },
+ * destroy(asyncId) { },
+ * });
+ * ```
+ *
+ * The callbacks will be inherited via the prototype chain:
+ *
+ * ```js
+ * class MyAsyncCallbacks {
+ * init(asyncId, type, triggerAsyncId, resource) { }
+ * destroy(asyncId) {}
+ * }
+ *
+ * class MyAddedCallbacks extends MyAsyncCallbacks {
+ * before(asyncId) { }
+ * after(asyncId) { }
+ * }
+ *
+ * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
+ * ```
+ *
+ * Because promises are asynchronous resources whose lifecycle is tracked
+ * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
+ * @since v8.1.0
+ * @param callbacks The `Hook Callbacks` to register
+ * @return Instance used for disabling and enabling hooks
+ */
+ function createHook(callbacks: HookCallbacks): AsyncHook;
+ interface AsyncResourceOptions {
+ /**
+ * The ID of the execution context that created this async event.
+ * @default executionAsyncId()
+ */
+ triggerAsyncId?: number | undefined;
+ /**
+ * Disables automatic `emitDestroy` when the object is garbage collected.
+ * This usually does not need to be set (even if `emitDestroy` is called
+ * manually), unless the resource's `asyncId` is retrieved and the
+ * sensitive API's `emitDestroy` is called with it.
+ * @default false
+ */
+ requireManualDestroy?: boolean | undefined;
+ }
+ /**
+ * The class `AsyncResource` is designed to be extended by the embedder's async
+ * resources. Using this, users can easily trigger the lifetime events of their
+ * own resources.
+ *
+ * The `init` hook will trigger when an `AsyncResource` is instantiated.
+ *
+ * The following is an overview of the `AsyncResource` API.
+ *
+ * ```js
+ * import { AsyncResource, executionAsyncId } from 'node:async_hooks';
+ *
+ * // AsyncResource() is meant to be extended. Instantiating a
+ * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * // async_hook.executionAsyncId() is used.
+ * const asyncResource = new AsyncResource(
+ * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
+ * );
+ *
+ * // Run a function in the execution context of the resource. This will
+ * // * establish the context of the resource
+ * // * trigger the AsyncHooks before callbacks
+ * // * call the provided function `fn` with the supplied arguments
+ * // * trigger the AsyncHooks after callbacks
+ * // * restore the original execution context
+ * asyncResource.runInAsyncScope(fn, thisArg, ...args);
+ *
+ * // Call AsyncHooks destroy callbacks.
+ * asyncResource.emitDestroy();
+ *
+ * // Return the unique ID assigned to the AsyncResource instance.
+ * asyncResource.asyncId();
+ *
+ * // Return the trigger ID for the AsyncResource instance.
+ * asyncResource.triggerAsyncId();
+ * ```
+ */
+ class AsyncResource {
+ /**
+ * AsyncResource() is meant to be extended. Instantiating a
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * async_hook.executionAsyncId() is used.
+ * @param type The type of async event.
+ * @param triggerAsyncId The ID of the execution context that created
+ * this async event (default: `executionAsyncId()`), or an
+ * AsyncResourceOptions object (since v9.3.0)
+ */
+ constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
+ /**
+ * Binds the given function to the current execution context.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current execution context.
+ * @param type An optional name to associate with the underlying `AsyncResource`.
+ */
+ static bind any, ThisArg>(
+ fn: Func,
+ type?: string,
+ thisArg?: ThisArg,
+ ): Func;
+ /**
+ * Binds the given function to execute to this `AsyncResource`'s scope.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current `AsyncResource`.
+ */
+ bind any>(fn: Func): Func;
+ /**
+ * Call the provided function with the provided arguments in the execution context
+ * of the async resource. This will establish the context, trigger the AsyncHooks
+ * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
+ * then restore the original execution context.
+ * @since v9.6.0
+ * @param fn The function to call in the execution context of this async resource.
+ * @param thisArg The receiver to be used for the function call.
+ * @param args Optional arguments to pass to the function.
+ */
+ runInAsyncScope(
+ fn: (this: This, ...args: any[]) => Result,
+ thisArg?: This,
+ ...args: any[]
+ ): Result;
+ /**
+ * Call all `destroy` hooks. This should only ever be called once. An error will
+ * be thrown if it is called more than once. This **must** be manually called. If
+ * the resource is left to be collected by the GC then the `destroy` hooks will
+ * never be called.
+ * @return A reference to `asyncResource`.
+ */
+ emitDestroy(): this;
+ /**
+ * @return The unique `asyncId` assigned to the resource.
+ */
+ asyncId(): number;
+ /**
+ * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
+ */
+ triggerAsyncId(): number;
+ }
+ interface AsyncLocalStorageOptions {
+ /**
+ * The default value to be used when no store is provided.
+ */
+ defaultValue?: any;
+ /**
+ * A name for the `AsyncLocalStorage` value.
+ */
+ name?: string | undefined;
+ }
+ /**
+ * This class creates stores that stay coherent through asynchronous operations.
+ *
+ * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory
+ * safe implementation that involves significant optimizations that are non-obvious
+ * to implement.
+ *
+ * The following example uses `AsyncLocalStorage` to build a simple logger
+ * that assigns IDs to incoming HTTP requests and includes them in messages
+ * logged within each request.
+ *
+ * ```js
+ * import http from 'node:http';
+ * import { AsyncLocalStorage } from 'node:async_hooks';
+ *
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ *
+ * function logWithId(msg) {
+ * const id = asyncLocalStorage.getStore();
+ * console.log(`${id !== undefined ? id : '-'}:`, msg);
+ * }
+ *
+ * let idSeq = 0;
+ * http.createServer((req, res) => {
+ * asyncLocalStorage.run(idSeq++, () => {
+ * logWithId('start');
+ * // Imagine any chain of async operations here
+ * setImmediate(() => {
+ * logWithId('finish');
+ * res.end();
+ * });
+ * });
+ * }).listen(8080);
+ *
+ * http.get('http://localhost:8080');
+ * http.get('http://localhost:8080');
+ * // Prints:
+ * // 0: start
+ * // 0: finish
+ * // 1: start
+ * // 1: finish
+ * ```
+ *
+ * Each instance of `AsyncLocalStorage` maintains an independent storage context.
+ * Multiple instances can safely exist simultaneously without risk of interfering
+ * with each other's data.
+ * @since v13.10.0, v12.17.0
+ */
+ class AsyncLocalStorage {
+ /**
+ * Creates a new instance of `AsyncLocalStorage`. Store is only provided within a
+ * `run()` call or after an `enterWith()` call.
+ */
+ constructor(options?: AsyncLocalStorageOptions);
+ /**
+ * Binds the given function to the current execution context.
+ * @since v19.8.0
+ * @param fn The function to bind to the current execution context.
+ * @return A new function that calls `fn` within the captured execution context.
+ */
+ static bind any>(fn: Func): Func;
+ /**
+ * Captures the current execution context and returns a function that accepts a
+ * function as an argument. Whenever the returned function is called, it
+ * calls the function passed to it within the captured context.
+ *
+ * ```js
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
+ * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
+ * console.log(result); // returns 123
+ * ```
+ *
+ * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple
+ * async context tracking purposes, for example:
+ *
+ * ```js
+ * class Foo {
+ * #runInAsyncScope = AsyncLocalStorage.snapshot();
+ *
+ * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); }
+ * }
+ *
+ * const foo = asyncLocalStorage.run(123, () => new Foo());
+ * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123
+ * ```
+ * @since v19.8.0
+ * @return A new function with the signature `(fn: (...args) : R, ...args) : R`.
+ */
+ static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R;
+ /**
+ * Disables the instance of `AsyncLocalStorage`. All subsequent calls
+ * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
+ *
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
+ * instance will be exited.
+ *
+ * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
+ * along with the corresponding async resources.
+ *
+ * Use this method when the `asyncLocalStorage` is not in use anymore
+ * in the current process.
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ disable(): void;
+ /**
+ * Returns the current store.
+ * If called outside of an asynchronous context initialized by
+ * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
+ * returns `undefined`.
+ * @since v13.10.0, v12.17.0
+ */
+ getStore(): T | undefined;
+ /**
+ * The name of the `AsyncLocalStorage` instance if provided.
+ * @since v24.0.0
+ */
+ readonly name: string;
+ /**
+ * Runs a function synchronously within a context and returns its
+ * return value. The store is not accessible outside of the callback function.
+ * The store is accessible to any asynchronous operations created within the
+ * callback.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `run()` too.
+ * The stacktrace is not impacted by this call and the context is exited.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 2 };
+ * try {
+ * asyncLocalStorage.run(store, () => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * setTimeout(() => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * }, 200);
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ */
+ run(store: T, callback: () => R): R;
+ run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Runs a function synchronously outside of a context and returns its
+ * return value. The store is not accessible within the callback function or
+ * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `exit()` too.
+ * The stacktrace is not impacted by this call and the context is re-entered.
+ *
+ * Example:
+ *
+ * ```js
+ * // Within a call to run
+ * try {
+ * asyncLocalStorage.getStore(); // Returns the store object or value
+ * asyncLocalStorage.exit(() => {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns the same object or value
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ exit(callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Transitions into the context for the remainder of the current
+ * synchronous execution and then persists the store through any following
+ * asynchronous calls.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 1 };
+ * // Replaces previous store with the given store object
+ * asyncLocalStorage.enterWith(store);
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * someAsyncOperation(() => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ * ```
+ *
+ * This transition will continue for the _entire_ synchronous execution.
+ * This means that if, for example, the context is entered within an event
+ * handler subsequent event handlers will also run within that context unless
+ * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons
+ * to use the latter method.
+ *
+ * ```js
+ * const store = { id: 1 };
+ *
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.enterWith(store);
+ * });
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ *
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * emitter.emit('my-event');
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * ```
+ * @since v13.11.0, v12.17.0
+ * @experimental
+ */
+ enterWith(store: T): void;
+ }
+ /**
+ * @since v17.2.0, v16.14.0
+ * @return A map of provider types to the corresponding numeric id.
+ * This map contains all the event types that might be emitted by the `async_hooks.init()` event.
+ */
+ namespace asyncWrapProviders {
+ const NONE: number;
+ const DIRHANDLE: number;
+ const DNSCHANNEL: number;
+ const ELDHISTOGRAM: number;
+ const FILEHANDLE: number;
+ const FILEHANDLECLOSEREQ: number;
+ const FIXEDSIZEBLOBCOPY: number;
+ const FSEVENTWRAP: number;
+ const FSREQCALLBACK: number;
+ const FSREQPROMISE: number;
+ const GETADDRINFOREQWRAP: number;
+ const GETNAMEINFOREQWRAP: number;
+ const HEAPSNAPSHOT: number;
+ const HTTP2SESSION: number;
+ const HTTP2STREAM: number;
+ const HTTP2PING: number;
+ const HTTP2SETTINGS: number;
+ const HTTPINCOMINGMESSAGE: number;
+ const HTTPCLIENTREQUEST: number;
+ const JSSTREAM: number;
+ const JSUDPWRAP: number;
+ const MESSAGEPORT: number;
+ const PIPECONNECTWRAP: number;
+ const PIPESERVERWRAP: number;
+ const PIPEWRAP: number;
+ const PROCESSWRAP: number;
+ const PROMISE: number;
+ const QUERYWRAP: number;
+ const SHUTDOWNWRAP: number;
+ const SIGNALWRAP: number;
+ const STATWATCHER: number;
+ const STREAMPIPE: number;
+ const TCPCONNECTWRAP: number;
+ const TCPSERVERWRAP: number;
+ const TCPWRAP: number;
+ const TTYWRAP: number;
+ const UDPSENDWRAP: number;
+ const UDPWRAP: number;
+ const SIGINTWATCHDOG: number;
+ const WORKER: number;
+ const WORKERHEAPSNAPSHOT: number;
+ const WRITEWRAP: number;
+ const ZLIB: number;
+ const CHECKPRIMEREQUEST: number;
+ const PBKDF2REQUEST: number;
+ const KEYPAIRGENREQUEST: number;
+ const KEYGENREQUEST: number;
+ const KEYEXPORTREQUEST: number;
+ const CIPHERREQUEST: number;
+ const DERIVEBITSREQUEST: number;
+ const HASHREQUEST: number;
+ const RANDOMBYTESREQUEST: number;
+ const RANDOMPRIMEREQUEST: number;
+ const SCRYPTREQUEST: number;
+ const SIGNREQUEST: number;
+ const TLSWRAP: number;
+ const VERIFYREQUEST: number;
+ }
+}
+declare module "async_hooks" {
+ export * from "node:async_hooks";
+}
diff --git a/node_modules/@types/node/buffer.buffer.d.ts b/node_modules/@types/node/buffer.buffer.d.ts
new file mode 100644
index 0000000..a3c2304
--- /dev/null
+++ b/node_modules/@types/node/buffer.buffer.d.ts
@@ -0,0 +1,466 @@
+declare module "node:buffer" {
+ type ImplicitArrayBuffer> = T extends
+ { valueOf(): infer V extends ArrayBufferLike } ? V : T;
+ global {
+ interface BufferConstructor {
+ // see buffer.d.ts for implementation shared with all TypeScript versions
+
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+ */
+ new(str: string, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+ */
+ new(size: number): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new(array: ArrayLike): Buffer;
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}/{SharedArrayBuffer}.
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+ */
+ new(arrayBuffer: TArrayBuffer): Buffer;
+ /**
+ * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
+ * Array entries outside that range will be truncated to fit into it.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
+ * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
+ * ```
+ *
+ * If `array` is an `Array`-like object (that is, one with a `length` property of
+ * type `number`), it is treated as if it is an array, unless it is a `Buffer` or
+ * a `Uint8Array`. This means all other `TypedArray` variants get treated as an
+ * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use
+ * `Buffer.copyBytesFrom()`.
+ *
+ * A `TypeError` will be thrown if `array` is not an `Array` or another type
+ * appropriate for `Buffer.from()` variants.
+ *
+ * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal
+ * `Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v5.10.0
+ */
+ from(array: WithImplicitCoercion>): Buffer;
+ /**
+ * This creates a view of the `ArrayBuffer` without copying the underlying
+ * memory. For example, when passed a reference to the `.buffer` property of a
+ * `TypedArray` instance, the newly created `Buffer` will share the same
+ * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const arr = new Uint16Array(2);
+ *
+ * arr[0] = 5000;
+ * arr[1] = 4000;
+ *
+ * // Shares memory with `arr`.
+ * const buf = Buffer.from(arr.buffer);
+ *
+ * console.log(buf);
+ * // Prints:
+ *
+ * // Changing the original Uint16Array changes the Buffer also.
+ * arr[1] = 6000;
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * The optional `byteOffset` and `length` arguments specify a memory range within
+ * the `arrayBuffer` that will be shared by the `Buffer`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const ab = new ArrayBuffer(10);
+ * const buf = Buffer.from(ab, 0, 2);
+ *
+ * console.log(buf.length);
+ * // Prints: 2
+ * ```
+ *
+ * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a
+ * `SharedArrayBuffer` or another type appropriate for `Buffer.from()`
+ * variants.
+ *
+ * It is important to remember that a backing `ArrayBuffer` can cover a range
+ * of memory that extends beyond the bounds of a `TypedArray` view. A new
+ * `Buffer` created using the `buffer` property of a `TypedArray` may extend
+ * beyond the range of the `TypedArray`:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements
+ * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements
+ * console.log(arrA.buffer === arrB.buffer); // true
+ *
+ * const buf = Buffer.from(arrB.buffer);
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v5.10.0
+ * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the
+ * `.buffer` property of a `TypedArray`.
+ * @param byteOffset Index of first byte to expose. **Default:** `0`.
+ * @param length Number of bytes to expose. **Default:**
+ * `arrayBuffer.byteLength - byteOffset`.
+ */
+ from>(
+ arrayBuffer: TArrayBuffer,
+ byteOffset?: number,
+ length?: number,
+ ): Buffer>;
+ /**
+ * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies
+ * the character encoding to be used when converting `string` into bytes.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('this is a tést');
+ * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
+ *
+ * console.log(buf1.toString());
+ * // Prints: this is a tést
+ * console.log(buf2.toString());
+ * // Prints: this is a tést
+ * console.log(buf1.toString('latin1'));
+ * // Prints: this is a tést
+ * ```
+ *
+ * A `TypeError` will be thrown if `string` is not a string or another type
+ * appropriate for `Buffer.from()` variants.
+ *
+ * `Buffer.from(string)` may also use the internal `Buffer` pool like
+ * `Buffer.allocUnsafe()` does.
+ * @since v5.10.0
+ * @param string A string to encode.
+ * @param encoding The encoding of `string`. **Default:** `'utf8'`.
+ */
+ from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer;
+ from(arrayOrString: WithImplicitCoercion | string>): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param values to create a new Buffer
+ */
+ of(...items: number[]): Buffer;
+ /**
+ * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together.
+ *
+ * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned.
+ *
+ * If `totalLength` is not provided, it is calculated from the `Buffer` instances
+ * in `list` by adding their lengths.
+ *
+ * If `totalLength` is provided, it is coerced to an unsigned integer. If the
+ * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
+ * truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is
+ * less than `totalLength`, the remaining space is filled with zeros.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create a single `Buffer` from a list of three `Buffer` instances.
+ *
+ * const buf1 = Buffer.alloc(10);
+ * const buf2 = Buffer.alloc(14);
+ * const buf3 = Buffer.alloc(18);
+ * const totalLength = buf1.length + buf2.length + buf3.length;
+ *
+ * console.log(totalLength);
+ * // Prints: 42
+ *
+ * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
+ *
+ * console.log(bufA);
+ * // Prints:
+ * console.log(bufA.length);
+ * // Prints: 42
+ * ```
+ *
+ * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v0.7.11
+ * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
+ * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
+ */
+ concat(list: readonly Uint8Array[], totalLength?: number): Buffer;
+ /**
+ * Copies the underlying memory of `view` into a new `Buffer`.
+ *
+ * ```js
+ * const u16 = new Uint16Array([0, 0xffff]);
+ * const buf = Buffer.copyBytesFrom(u16, 1, 1);
+ * u16[1] = 0;
+ * console.log(buf.length); // 2
+ * console.log(buf[0]); // 255
+ * console.log(buf[1]); // 255
+ * ```
+ * @since v19.8.0
+ * @param view The {TypedArray} to copy.
+ * @param [offset=0] The starting offset within `view`.
+ * @param [length=view.length - offset] The number of elements from `view` to copy.
+ */
+ copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(5);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
+ *
+ * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(5, 'a');
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+ * initialized by calling `buf.fill(fill, encoding)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
+ * contents will never contain sensitive data from previous allocations, including
+ * data that might not have been allocated for `Buffer`s.
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ * @param [fill=0] A value to pre-fill the new `Buffer` with.
+ * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
+ */
+ alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(10);
+ *
+ * console.log(buf);
+ * // Prints (contents may vary):
+ *
+ * buf.fill(0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ *
+ * The `Buffer` module pre-allocates an internal `Buffer` instance of
+ * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
+ * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two).
+ *
+ * Use of this pre-allocated internal memory pool is a key difference between
+ * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+ * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
+ * than or equal to half `Buffer.poolSize`. The
+ * difference is subtle but can be important when an application requires the
+ * additional performance that `Buffer.allocUnsafe()` provides.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if
+ * `size` is 0.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
+ * such `Buffer` instances with zeroes.
+ *
+ * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+ * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This
+ * allows applications to avoid the garbage collection overhead of creating many
+ * individually allocated `Buffer` instances. This approach improves both
+ * performance and memory usage by eliminating the need to track and clean up as
+ * many individual `ArrayBuffer` objects.
+ *
+ * However, in the case where a developer may need to retain a small chunk of
+ * memory from a pool for an indeterminate amount of time, it may be appropriate
+ * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
+ * then copying out the relevant bits.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Need to keep around a few small chunks of memory.
+ * const store = [];
+ *
+ * socket.on('readable', () => {
+ * let data;
+ * while (null !== (data = readable.read())) {
+ * // Allocate for retained data.
+ * const sb = Buffer.allocUnsafeSlow(10);
+ *
+ * // Copy the data into the new allocation.
+ * data.copy(sb, 0, 0, 10);
+ *
+ * store.push(sb);
+ * }
+ * });
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.12.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafeSlow(size: number): Buffer;
+ }
+ interface Buffer extends Uint8Array {
+ // see buffer.d.ts for implementation shared with all TypeScript versions
+
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * This method is not compatible with the `Uint8Array.prototype.slice()`,
+ * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * const copiedBuf = Uint8Array.prototype.slice.call(buf);
+ * copiedBuf[0]++;
+ * console.log(copiedBuf.toString());
+ * // Prints: cuffer
+ *
+ * console.log(buf.toString());
+ * // Prints: buffer
+ *
+ * // With buf.slice(), the original buffer is modified.
+ * const notReallyCopiedBuf = buf.slice();
+ * notReallyCopiedBuf[0]++;
+ * console.log(notReallyCopiedBuf.toString());
+ * // Prints: cuffer
+ * console.log(buf.toString());
+ * // Also prints: cuffer (!)
+ * ```
+ * @since v0.3.0
+ * @deprecated Use `subarray` instead.
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ slice(start?: number, end?: number): Buffer;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * Specifying `end` greater than `buf.length` will return the same result as
+ * that of `end` equal to `buf.length`.
+ *
+ * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
+ *
+ * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
+ * // from the original `Buffer`.
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * const buf2 = buf1.subarray(0, 3);
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: abc
+ *
+ * buf1[0] = 33;
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: !bc
+ * ```
+ *
+ * Specifying negative indexes causes the slice to be generated relative to the
+ * end of `buf` rather than the beginning.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * console.log(buf.subarray(-6, -1).toString());
+ * // Prints: buffe
+ * // (Equivalent to buf.subarray(0, 5).)
+ *
+ * console.log(buf.subarray(-6, -2).toString());
+ * // Prints: buff
+ * // (Equivalent to buf.subarray(0, 4).)
+ *
+ * console.log(buf.subarray(-5, -2).toString());
+ * // Prints: uff
+ * // (Equivalent to buf.subarray(1, 4).)
+ * ```
+ * @since v3.0.0
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ subarray(start?: number, end?: number): Buffer;
+ }
+ // TODO: remove globals in future version
+ /**
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+ * TypeScript versions earlier than 5.7.
+ */
+ type NonSharedBuffer = Buffer;
+ /**
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+ * TypeScript versions earlier than 5.7.
+ */
+ type AllowSharedBuffer = Buffer;
+ }
+}
diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts
new file mode 100644
index 0000000..bb0f004
--- /dev/null
+++ b/node_modules/@types/node/buffer.d.ts
@@ -0,0 +1,1810 @@
+/**
+ * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
+ * Node.js APIs support `Buffer`s.
+ *
+ * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
+ * extends it with methods that cover additional use cases. Node.js APIs accept
+ * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
+ *
+ * While the `Buffer` class is available within the global scope, it is still
+ * recommended to explicitly reference it via an import or require statement.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Creates a zero-filled Buffer of length 10.
+ * const buf1 = Buffer.alloc(10);
+ *
+ * // Creates a Buffer of length 10,
+ * // filled with bytes which all have the value `1`.
+ * const buf2 = Buffer.alloc(10, 1);
+ *
+ * // Creates an uninitialized buffer of length 10.
+ * // This is faster than calling Buffer.alloc() but the returned
+ * // Buffer instance might contain old data that needs to be
+ * // overwritten using fill(), write(), or other functions that fill the Buffer's
+ * // contents.
+ * const buf3 = Buffer.allocUnsafe(10);
+ *
+ * // Creates a Buffer containing the bytes [1, 2, 3].
+ * const buf4 = Buffer.from([1, 2, 3]);
+ *
+ * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries
+ * // are all truncated using `(value & 255)` to fit into the range 0–255.
+ * const buf5 = Buffer.from([257, 257.5, -255, '1']);
+ *
+ * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést':
+ * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation)
+ * // [116, 195, 169, 115, 116] (in decimal notation)
+ * const buf6 = Buffer.from('tést');
+ *
+ * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
+ * const buf7 = Buffer.from('tést', 'latin1');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/buffer.js)
+ */
+declare module "node:buffer" {
+ import { ReadableStream } from "node:stream/web";
+ /**
+ * This function returns `true` if `input` contains only valid UTF-8-encoded data,
+ * including the case in which `input` is empty.
+ *
+ * Throws if the `input` is a detached array buffer.
+ * @since v19.4.0, v18.14.0
+ * @param input The input to validate.
+ */
+ export function isUtf8(input: ArrayBuffer | NodeJS.TypedArray): boolean;
+ /**
+ * This function returns `true` if `input` contains only valid ASCII-encoded data,
+ * including the case in which `input` is empty.
+ *
+ * Throws if the `input` is a detached array buffer.
+ * @since v19.6.0, v18.15.0
+ * @param input The input to validate.
+ */
+ export function isAscii(input: ArrayBuffer | NodeJS.TypedArray): boolean;
+ export let INSPECT_MAX_BYTES: number;
+ export const kMaxLength: number;
+ export const kStringMaxLength: number;
+ export const constants: {
+ MAX_LENGTH: number;
+ MAX_STRING_LENGTH: number;
+ };
+ export type TranscodeEncoding =
+ | "ascii"
+ | "utf8"
+ | "utf-8"
+ | "utf16le"
+ | "utf-16le"
+ | "ucs2"
+ | "ucs-2"
+ | "latin1"
+ | "binary";
+ /**
+ * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
+ * encoding to another. Returns a new `Buffer` instance.
+ *
+ * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
+ * conversion from `fromEnc` to `toEnc` is not permitted.
+ *
+ * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
+ *
+ * The transcoding process will use substitution characters if a given byte
+ * sequence cannot be adequately represented in the target encoding. For instance:
+ *
+ * ```js
+ * import { Buffer, transcode } from 'node:buffer';
+ *
+ * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii');
+ * console.log(newBuf.toString('ascii'));
+ * // Prints: '?'
+ * ```
+ *
+ * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced
+ * with `?` in the transcoded `Buffer`.
+ * @since v7.1.0
+ * @param source A `Buffer` or `Uint8Array` instance.
+ * @param fromEnc The current encoding.
+ * @param toEnc To target encoding.
+ */
+ export function transcode(
+ source: Uint8Array,
+ fromEnc: TranscodeEncoding,
+ toEnc: TranscodeEncoding,
+ ): NonSharedBuffer;
+ /**
+ * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
+ * a prior call to `URL.createObjectURL()`.
+ * @since v16.7.0
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ export function resolveObjectURL(id: string): Blob | undefined;
+ export { type AllowSharedBuffer, Buffer, type NonSharedBuffer };
+ /** @deprecated This alias will be removed in a future version. Use the canonical `BlobPropertyBag` instead. */
+ // TODO: remove in future major
+ export interface BlobOptions extends BlobPropertyBag {}
+ /** @deprecated This alias will be removed in a future version. Use the canonical `FilePropertyBag` instead. */
+ export interface FileOptions extends FilePropertyBag {}
+ export type WithImplicitCoercion =
+ | T
+ | { valueOf(): T }
+ | (T extends string ? { [Symbol.toPrimitive](hint: "string"): T } : never);
+ global {
+ namespace NodeJS {
+ export { BufferEncoding };
+ }
+ // Buffer class
+ type BufferEncoding =
+ | "ascii"
+ | "utf8"
+ | "utf-8"
+ | "utf16le"
+ | "utf-16le"
+ | "ucs2"
+ | "ucs-2"
+ | "base64"
+ | "base64url"
+ | "latin1"
+ | "binary"
+ | "hex";
+ /**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
+ */
+ interface BufferConstructor {
+ // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later
+ // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier
+
+ /**
+ * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * Buffer.isBuffer(Buffer.alloc(10)); // true
+ * Buffer.isBuffer(Buffer.from('foo')); // true
+ * Buffer.isBuffer('a string'); // false
+ * Buffer.isBuffer([]); // false
+ * Buffer.isBuffer(new Uint8Array(1024)); // false
+ * ```
+ * @since v0.1.101
+ */
+ isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns `true` if `encoding` is the name of a supported character encoding,
+ * or `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * console.log(Buffer.isEncoding('utf8'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('hex'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('utf/8'));
+ * // Prints: false
+ *
+ * console.log(Buffer.isEncoding(''));
+ * // Prints: false
+ * ```
+ * @since v0.9.1
+ * @param encoding A character encoding name to check.
+ */
+ isEncoding(encoding: string): encoding is BufferEncoding;
+ /**
+ * Returns the byte length of a string when encoded using `encoding`.
+ * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
+ * for the encoding that is used to convert the string into bytes.
+ *
+ * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
+ * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
+ * return value might be greater than the length of a `Buffer` created from the
+ * string.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const str = '\u00bd + \u00bc = \u00be';
+ *
+ * console.log(`${str}: ${str.length} characters, ` +
+ * `${Buffer.byteLength(str, 'utf8')} bytes`);
+ * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
+ * ```
+ *
+ * When `string` is a
+ * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
+ * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
+ * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
+ * @since v0.1.90
+ * @param string A value to calculate the length of.
+ * @param [encoding='utf8'] If `string` is a string, this is its encoding.
+ * @return The number of bytes contained within `string`.
+ */
+ byteLength(
+ string: string | NodeJS.ArrayBufferView | ArrayBufferLike,
+ encoding?: BufferEncoding,
+ ): number;
+ /**
+ * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('1234');
+ * const buf2 = Buffer.from('0123');
+ * const arr = [buf1, buf2];
+ *
+ * console.log(arr.sort(Buffer.compare));
+ * // Prints: [ , ]
+ * // (This result is equal to: [buf2, buf1].)
+ * ```
+ * @since v0.11.13
+ * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
+ */
+ compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
+ /**
+ * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
+ * for pooling. This value may be modified.
+ * @since v0.11.3
+ */
+ poolSize: number;
+ }
+ interface Buffer {
+ // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later
+ // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier
+
+ /**
+ * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
+ * not contain enough space to fit the entire string, only part of `string` will be
+ * written. However, partially encoded characters will not be written.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(256);
+ *
+ * const len = buf.write('\u00bd + \u00bc = \u00be', 0);
+ *
+ * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
+ * // Prints: 12 bytes: ½ + ¼ = ¾
+ *
+ * const buffer = Buffer.alloc(10);
+ *
+ * const length = buffer.write('abcd', 8);
+ *
+ * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`);
+ * // Prints: 2 bytes : ab
+ * ```
+ * @since v0.1.90
+ * @param string String to write to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write `string`.
+ * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
+ * @param [encoding='utf8'] The character encoding of `string`.
+ * @return Number of bytes written.
+ */
+ write(string: string, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
+ /**
+ * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
+ *
+ * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8,
+ * then each invalid byte is replaced with the replacement character `U+FFFD`.
+ *
+ * The maximum length of a string instance (in UTF-16 code units) is available
+ * as {@link constants.MAX_STRING_LENGTH}.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * console.log(buf1.toString('utf8'));
+ * // Prints: abcdefghijklmnopqrstuvwxyz
+ * console.log(buf1.toString('utf8', 0, 5));
+ * // Prints: abcde
+ *
+ * const buf2 = Buffer.from('tést');
+ *
+ * console.log(buf2.toString('hex'));
+ * // Prints: 74c3a97374
+ * console.log(buf2.toString('utf8', 0, 3));
+ * // Prints: té
+ * console.log(buf2.toString(undefined, 0, 3));
+ * // Prints: té
+ * ```
+ * @since v0.1.90
+ * @param [encoding='utf8'] The character encoding to use.
+ * @param [start=0] The byte offset to start decoding at.
+ * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
+ */
+ toString(encoding?: BufferEncoding, start?: number, end?: number): string;
+ /**
+ * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls
+ * this function when stringifying a `Buffer` instance.
+ *
+ * `Buffer.from()` accepts objects in the format returned from this method.
+ * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]);
+ * const json = JSON.stringify(buf);
+ *
+ * console.log(json);
+ * // Prints: {"type":"Buffer","data":[1,2,3,4,5]}
+ *
+ * const copy = JSON.parse(json, (key, value) => {
+ * return value && value.type === 'Buffer' ?
+ * Buffer.from(value) :
+ * value;
+ * });
+ *
+ * console.log(copy);
+ * // Prints:
+ * ```
+ * @since v0.9.2
+ */
+ toJSON(): {
+ type: "Buffer";
+ data: number[];
+ };
+ /**
+ * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('414243', 'hex');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.equals(buf2));
+ * // Prints: true
+ * console.log(buf1.equals(buf3));
+ * // Prints: false
+ * ```
+ * @since v0.11.13
+ * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ */
+ equals(otherBuffer: Uint8Array): boolean;
+ /**
+ * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order.
+ * Comparison is based on the actual sequence of bytes in each `Buffer`.
+ *
+ * * `0` is returned if `target` is the same as `buf`
+ * * `1` is returned if `target` should come _before_`buf` when sorted.
+ * * `-1` is returned if `target` should come _after_`buf` when sorted.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('BCD');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.compare(buf1));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2));
+ * // Prints: -1
+ * console.log(buf1.compare(buf3));
+ * // Prints: -1
+ * console.log(buf2.compare(buf1));
+ * // Prints: 1
+ * console.log(buf2.compare(buf3));
+ * // Prints: 1
+ * console.log([buf1, buf2, buf3].sort(Buffer.compare));
+ * // Prints: [ , , ]
+ * // (This result is equal to: [buf1, buf3, buf2].)
+ * ```
+ *
+ * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]);
+ * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]);
+ *
+ * console.log(buf1.compare(buf2, 5, 9, 0, 4));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2, 0, 6, 4));
+ * // Prints: -1
+ * console.log(buf1.compare(buf2, 5, 6, 5));
+ * // Prints: 1
+ * ```
+ *
+ * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
+ * @since v0.11.13
+ * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ * @param [targetStart=0] The offset within `target` at which to begin comparison.
+ * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive).
+ * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
+ */
+ compare(
+ target: Uint8Array,
+ targetStart?: number,
+ targetEnd?: number,
+ sourceStart?: number,
+ sourceEnd?: number,
+ ): -1 | 0 | 1;
+ /**
+ * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
+ *
+ * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available
+ * for all TypedArrays, including Node.js `Buffer`s, although it takes
+ * different function arguments.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create two `Buffer` instances.
+ * const buf1 = Buffer.allocUnsafe(26);
+ * const buf2 = Buffer.allocUnsafe(26).fill('!');
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.
+ * buf1.copy(buf2, 8, 16, 20);
+ * // This is equivalent to:
+ * // buf2.set(buf1.subarray(16, 20), 8);
+ *
+ * console.log(buf2.toString('ascii', 0, 25));
+ * // Prints: !!!!!!!!qrst!!!!!!!!!!!!!
+ * ```
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create a `Buffer` and copy data from one region to an overlapping region
+ * // within the same `Buffer`.
+ *
+ * const buf = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf[i] = i + 97;
+ * }
+ *
+ * buf.copy(buf, 0, 4, 10);
+ *
+ * console.log(buf.toString());
+ * // Prints: efghijghijklmnopqrstuvwxyz
+ * ```
+ * @since v0.1.90
+ * @param target A `Buffer` or {@link Uint8Array} to copy into.
+ * @param [targetStart=0] The offset within `target` at which to begin writing.
+ * @param [sourceStart=0] The offset within `buf` from which to begin copying.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive).
+ * @return The number of bytes copied.
+ */
+ copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64BE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64LE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * This function is also available under the `writeBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64BE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64BE(value: bigint, offset?: number): number;
+ /**
+ * @alias Buffer.writeBigUInt64BE
+ * @since v14.10.0, v12.19.0
+ */
+ writeBigUint64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64LE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * This function is also available under the `writeBigUint64LE` alias.
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64LE(value: bigint, offset?: number): number;
+ /**
+ * @alias Buffer.writeBigUInt64LE
+ * @since v14.10.0, v12.19.0
+ */
+ writeBigUint64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.writeUIntLE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUintLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.writeUIntBE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUintBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than a signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a
+ * signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64BE(0));
+ * // Prints: 4294967295n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64BE(offset?: number): bigint;
+ /**
+ * @alias Buffer.readBigUInt64BE
+ * @since v14.10.0, v12.19.0
+ */
+ readBigUint64BE(offset?: number): bigint;
+ /**
+ * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64LE(0));
+ * // Prints: 18446744069414584320n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64LE(offset?: number): bigint;
+ /**
+ * @alias Buffer.readBigUInt64LE
+ * @since v14.10.0, v12.19.0
+ */
+ readBigUint64LE(offset?: number): bigint;
+ /**
+ * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64BE(offset?: number): bigint;
+ /**
+ * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64LE(offset?: number): bigint;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntLE(0, 6).toString(16));
+ * // Prints: ab9078563412
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntLE(offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.readUIntLE
+ * @since v14.9.0, v12.19.0
+ */
+ readUintLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readUIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntBE(offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.readUIntBE
+ * @since v14.9.0, v12.19.0
+ */
+ readUintBE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntLE(0, 6).toString(16));
+ * // Prints: -546f87a9cbee
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * console.log(buf.readIntBE(1, 0).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntBE(offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
+ *
+ * This function is also available under the `readUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, -2]);
+ *
+ * console.log(buf.readUInt8(0));
+ * // Prints: 1
+ * console.log(buf.readUInt8(1));
+ * // Prints: 254
+ * console.log(buf.readUInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readUInt8(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt8
+ * @since v14.9.0, v12.19.0
+ */
+ readUint8(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`.
+ *
+ * This function is also available under the `readUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16LE(0).toString(16));
+ * // Prints: 3412
+ * console.log(buf.readUInt16LE(1).toString(16));
+ * // Prints: 5634
+ * console.log(buf.readUInt16LE(2).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16LE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt16LE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint16LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16BE(0).toString(16));
+ * // Prints: 1234
+ * console.log(buf.readUInt16BE(1).toString(16));
+ * // Prints: 3456
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16BE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt16BE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint16BE(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32LE(0).toString(16));
+ * // Prints: 78563412
+ * console.log(buf.readUInt32LE(1).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32LE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt32LE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint32LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32BE(0).toString(16));
+ * // Prints: 12345678
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32BE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt32BE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint32BE(offset?: number): number;
+ /**
+ * Reads a signed 8-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([-1, 5]);
+ *
+ * console.log(buf.readInt8(0));
+ * // Prints: -1
+ * console.log(buf.readInt8(1));
+ * // Prints: 5
+ * console.log(buf.readInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readInt8(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16LE(0));
+ * // Prints: 1280
+ * console.log(buf.readInt16LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16BE(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32LE(0));
+ * // Prints: 83886080
+ * console.log(buf.readInt32LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32BE(offset?: number): number;
+ /**
+ * Reads a 32-bit, little-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatLE(0));
+ * // Prints: 1.539989614439558e-36
+ * console.log(buf.readFloatLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatLE(offset?: number): number;
+ /**
+ * Reads a 32-bit, big-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatBE(0));
+ * // Prints: 2.387939260590663e-38
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatBE(offset?: number): number;
+ /**
+ * Reads a 64-bit, little-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleLE(0));
+ * // Prints: 5.447603722011605e-270
+ * console.log(buf.readDoubleLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleLE(offset?: number): number;
+ /**
+ * Reads a 64-bit, big-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleBE(0));
+ * // Prints: 8.20788039913184e-304
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleBE(offset?: number): number;
+ reverse(): this;
+ /**
+ * Interprets `buf` as an array of unsigned 16-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * buf1.swap16();
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap16();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ *
+ * One convenient use of `buf.swap16()` is to perform a fast in-place conversion
+ * between UTF-16 little-endian and UTF-16 big-endian:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le');
+ * buf.swap16(); // Convert to big-endian UTF-16 text.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap16(): this;
+ /**
+ * Interprets `buf` as an array of unsigned 32-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * buf1.swap32();
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap32();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap32(): this;
+ /**
+ * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
+ * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * buf1.swap64();
+ *
+ * console.log(buf1);
+ * // Prints:
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap64();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v6.3.0
+ * @return A reference to `buf`.
+ */
+ swap64(): this;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a
+ * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
+ * other than an unsigned 8-bit integer.
+ *
+ * This function is also available under the `writeUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt8(0x3, 0);
+ * buf.writeUInt8(0x4, 1);
+ * buf.writeUInt8(0x23, 2);
+ * buf.writeUInt8(0x42, 3);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt8(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt8
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16LE(0xdead, 0);
+ * buf.writeUInt16LE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16LE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt16LE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16BE(0xdead, 0);
+ * buf.writeUInt16BE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16BE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt16BE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32LE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32LE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt32LE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32BE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32BE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt32BE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a valid
+ * signed 8-bit integer. Behavior is undefined when `value` is anything other than
+ * a signed 8-bit integer.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt8(2, 0);
+ * buf.writeInt8(-2, 1);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16LE(0x0304, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16BE(0x0102, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32LE(0x05060708, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32BE(0x01020304, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatLE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatBE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatBE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleLE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleBE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleBE(value: number, offset?: number): number;
+ /**
+ * Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
+ * the entire `buf` will be filled:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Fill a `Buffer` with the ASCII character 'h'.
+ *
+ * const b = Buffer.allocUnsafe(50).fill('h');
+ *
+ * console.log(b.toString());
+ * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+ *
+ * // Fill a buffer with empty string
+ * const c = Buffer.allocUnsafe(5).fill('');
+ *
+ * console.log(c.fill(''));
+ * // Prints:
+ * ```
+ *
+ * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
+ * integer. If the resulting integer is greater than `255` (decimal), `buf` will be
+ * filled with `value & 255`.
+ *
+ * If the final write of a `fill()` operation falls on a multi-byte character,
+ * then only the bytes of that character that fit into `buf` are written:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Fill a `Buffer` with character that takes up two bytes in UTF-8.
+ *
+ * console.log(Buffer.allocUnsafe(5).fill('\u0222'));
+ * // Prints:
+ * ```
+ *
+ * If `value` contains invalid characters, it is truncated; if no valid
+ * fill data remains, an exception is thrown:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(5);
+ *
+ * console.log(buf.fill('a'));
+ * // Prints:
+ * console.log(buf.fill('aazz', 'hex'));
+ * // Prints:
+ * console.log(buf.fill('zz', 'hex'));
+ * // Throws an exception.
+ * ```
+ * @since v0.5.0
+ * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`.
+ * @param [offset=0] Number of bytes to skip before starting to fill `buf`.
+ * @param [end=buf.length] Where to stop filling `buf` (not inclusive).
+ * @param [encoding='utf8'] The encoding for `value` if `value` is a string.
+ * @return A reference to `buf`.
+ */
+ fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
+ fill(value: string | Uint8Array | number, offset: number, encoding: BufferEncoding): this;
+ fill(value: string | Uint8Array | number, encoding: BufferEncoding): this;
+ /**
+ * If `value` is:
+ *
+ * * a string, `value` is interpreted according to the character encoding in `encoding`.
+ * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
+ * To compare a partial `Buffer`, use `buf.subarray`.
+ * * a number, `value` will be interpreted as an unsigned 8-bit integer
+ * value between `0` and `255`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.indexOf('this'));
+ * // Prints: 0
+ * console.log(buf.indexOf('is'));
+ * // Prints: 2
+ * console.log(buf.indexOf(Buffer.from('a buffer')));
+ * // Prints: 8
+ * console.log(buf.indexOf(97));
+ * // Prints: 8 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.indexOf(Buffer.from('a buffer example')));
+ * // Prints: -1
+ * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: 8
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le'));
+ * // Prints: 4
+ * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le'));
+ * // Prints: 6
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. If the result
+ * of coercion is `NaN` or `0`, then the entire buffer will be searched. This
+ * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf).
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.indexOf(99.9));
+ * console.log(b.indexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN or 0.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.indexOf('b', undefined));
+ * console.log(b.indexOf('b', {}));
+ * console.log(b.indexOf('b', null));
+ * console.log(b.indexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer` and `byteOffset` is less
+ * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned.
+ * @since v1.5.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number;
+ /**
+ * Identical to `buf.indexOf()`, except the last occurrence of `value` is found
+ * rather than the first occurrence.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('this buffer is a buffer');
+ *
+ * console.log(buf.lastIndexOf('this'));
+ * // Prints: 0
+ * console.log(buf.lastIndexOf('buffer'));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(Buffer.from('buffer')));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(97));
+ * // Prints: 15 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.lastIndexOf(Buffer.from('yolo')));
+ * // Prints: -1
+ * console.log(buf.lastIndexOf('buffer', 5));
+ * // Prints: 5
+ * console.log(buf.lastIndexOf('buffer', 4));
+ * // Prints: -1
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le'));
+ * // Prints: 6
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le'));
+ * // Prints: 4
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. Any arguments
+ * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer.
+ * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf).
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.lastIndexOf(99.9));
+ * console.log(b.lastIndexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.lastIndexOf('b', undefined));
+ * console.log(b.lastIndexOf('b', {}));
+ *
+ * // Passing a byteOffset that coerces to 0.
+ * // Prints: -1, equivalent to passing 0.
+ * console.log(b.lastIndexOf('b', null));
+ * console.log(b.lastIndexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned.
+ * @since v6.0.0
+ * @param value What to search for.
+ * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number;
+ /**
+ * Equivalent to `buf.indexOf() !== -1`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.includes('this'));
+ * // Prints: true
+ * console.log(buf.includes('is'));
+ * // Prints: true
+ * console.log(buf.includes(Buffer.from('a buffer')));
+ * // Prints: true
+ * console.log(buf.includes(97));
+ * // Prints: true (97 is the decimal ASCII value for 'a')
+ * console.log(buf.includes(Buffer.from('a buffer example')));
+ * // Prints: false
+ * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: true
+ * console.log(buf.includes('this', 4));
+ * // Prints: false
+ * ```
+ * @since v5.3.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is its encoding.
+ * @return `true` if `value` was found in `buf`, `false` otherwise.
+ */
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
+ includes(value: string | number | Buffer, encoding: BufferEncoding): boolean;
+ }
+ var Buffer: BufferConstructor;
+ }
+ // #region web types
+ export type BlobPart = NodeJS.BufferSource | Blob | string;
+ export interface BlobPropertyBag {
+ endings?: "native" | "transparent";
+ type?: string;
+ }
+ export interface FilePropertyBag extends BlobPropertyBag {
+ lastModified?: number;
+ }
+ export interface Blob {
+ readonly size: number;
+ readonly type: string;
+ arrayBuffer(): Promise;
+ bytes(): Promise;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+ stream(): ReadableStream;
+ text(): Promise;
+ }
+ export var Blob: {
+ prototype: Blob;
+ new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
+ };
+ export interface File extends Blob {
+ readonly lastModified: number;
+ readonly name: string;
+ readonly webkitRelativePath: string;
+ }
+ export var File: {
+ prototype: File;
+ new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
+ };
+ export import atob = globalThis.atob;
+ export import btoa = globalThis.btoa;
+ // #endregion
+}
+declare module "buffer" {
+ export * from "node:buffer";
+}
diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts
new file mode 100644
index 0000000..f081809
--- /dev/null
+++ b/node_modules/@types/node/child_process.d.ts
@@ -0,0 +1,1428 @@
+/**
+ * The `node:child_process` module provides the ability to spawn subprocesses in
+ * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability
+ * is primarily provided by the {@link spawn} function:
+ *
+ * ```js
+ * import { spawn } from 'node:child_process';
+ * import { once } from 'node:events';
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * const [code] = await once(ls, 'close');
+ * console.log(`child process exited with code ${code}`);
+ * ```
+ *
+ * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
+ * the parent Node.js process and the spawned subprocess. These pipes have
+ * limited (and platform-specific) capacity. If the subprocess writes to
+ * stdout in excess of that limit without the output being captured, the
+ * subprocess blocks, waiting for the pipe buffer to accept more data. This is
+ * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed.
+ *
+ * The command lookup is performed using the `options.env.PATH` environment
+ * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
+ * used. If `options.env` is set without `PATH`, lookup on Unix is performed
+ * on a default search path search of `/usr/bin:/bin` (see your operating system's
+ * manual for execvpe/execvp), on Windows the current processes environment
+ * variable `PATH` is used.
+ *
+ * On Windows, environment variables are case-insensitive. Node.js
+ * lexicographically sorts the `env` keys and uses the first one that
+ * case-insensitively matches. Only first (in lexicographic order) entry will be
+ * passed to the subprocess. This might lead to issues on Windows when passing
+ * objects to the `env` option that have multiple variants of the same key, such as `PATH` and `Path`.
+ *
+ * The {@link spawn} method spawns the child process asynchronously,
+ * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks
+ * the event loop until the spawned process either exits or is terminated.
+ *
+ * For convenience, the `node:child_process` module provides a handful of
+ * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on
+ * top of {@link spawn} or {@link spawnSync}.
+ *
+ * * {@link exec}: spawns a shell and runs a command within that
+ * shell, passing the `stdout` and `stderr` to a callback function when
+ * complete.
+ * * {@link execFile}: similar to {@link exec} except
+ * that it spawns the command directly without first spawning a shell by
+ * default.
+ * * {@link fork}: spawns a new Node.js process and invokes a
+ * specified module with an IPC communication channel established that allows
+ * sending messages between parent and child.
+ * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop.
+ * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop.
+ *
+ * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
+ * the synchronous methods can have significant impact on performance due to
+ * stalling the event loop while spawned processes complete.
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/child_process.js)
+ */
+declare module "node:child_process" {
+ import { NonSharedBuffer } from "node:buffer";
+ import * as dgram from "node:dgram";
+ import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
+ import * as net from "node:net";
+ import { Readable, Stream, Writable } from "node:stream";
+ import { URL } from "node:url";
+ type Serializable = string | object | number | boolean | bigint;
+ type SendHandle = net.Socket | net.Server | dgram.Socket | undefined;
+ interface ChildProcessEventMap {
+ "close": [code: number | null, signal: NodeJS.Signals | null];
+ "disconnect": [];
+ "error": [err: Error];
+ "exit": [code: number | null, signal: NodeJS.Signals | null];
+ "message": [message: Serializable, sendHandle: SendHandle];
+ "spawn": [];
+ }
+ /**
+ * Instances of the `ChildProcess` represent spawned child processes.
+ *
+ * Instances of `ChildProcess` are not intended to be created directly. Rather,
+ * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
+ * instances of `ChildProcess`.
+ * @since v2.2.0
+ */
+ class ChildProcess implements EventEmitter {
+ /**
+ * A `Writable Stream` that represents the child process's `stdin`.
+ *
+ * If a child process waits to read all of its input, the child will not continue
+ * until this stream has been closed via `end()`.
+ *
+ * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdin: Writable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stdout`.
+ *
+ * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
+ * refer to the same value.
+ *
+ * ```js
+ * import { spawn } from 'node:child_process';
+ *
+ * const subprocess = spawn('ls');
+ *
+ * subprocess.stdout.on('data', (data) => {
+ * console.log(`Received chunk ${data}`);
+ * });
+ * ```
+ *
+ * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdout: Readable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stderr`.
+ *
+ * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned.
+ * @since v0.1.90
+ */
+ stderr: Readable | null;
+ /**
+ * The `subprocess.channel` property is a reference to the child's IPC channel. If
+ * no IPC channel exists, this property is `undefined`.
+ * @since v7.1.0
+ */
+ readonly channel?: Control | null;
+ /**
+ * A sparse array of pipes to the child process, corresponding with positions in
+ * the `stdio` option passed to {@link spawn} that have been set
+ * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`,
+ * respectively.
+ *
+ * In the following example, only the child's fd `1` (stdout) is configured as a
+ * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values
+ * in the array are `null`.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ * import fs from 'node:fs';
+ * import child_process from 'node:child_process';
+ *
+ * const subprocess = child_process.spawn('ls', {
+ * stdio: [
+ * 0, // Use parent's stdin for child.
+ * 'pipe', // Pipe child's stdout to parent.
+ * fs.openSync('err.out', 'w'), // Direct child's stderr to a file.
+ * ],
+ * });
+ *
+ * assert.strictEqual(subprocess.stdio[0], null);
+ * assert.strictEqual(subprocess.stdio[0], subprocess.stdin);
+ *
+ * assert(subprocess.stdout);
+ * assert.strictEqual(subprocess.stdio[1], subprocess.stdout);
+ *
+ * assert.strictEqual(subprocess.stdio[2], null);
+ * assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
+ * ```
+ *
+ * The `subprocess.stdio` property can be `undefined` if the child process could
+ * not be successfully spawned.
+ * @since v0.7.10
+ */
+ readonly stdio: [
+ Writable | null,
+ // stdin
+ Readable | null,
+ // stdout
+ Readable | null,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra
+ Readable | Writable | null | undefined, // extra
+ ];
+ /**
+ * The `subprocess.killed` property indicates whether the child process
+ * successfully received a signal from `subprocess.kill()`. The `killed` property
+ * does not indicate that the child process has been terminated.
+ * @since v0.5.10
+ */
+ readonly killed: boolean;
+ /**
+ * Returns the process identifier (PID) of the child process. If the child process
+ * fails to spawn due to errors, then the value is `undefined` and `error` is
+ * emitted.
+ *
+ * ```js
+ * import { spawn } from 'node:child_process';
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * console.log(`Spawned child pid: ${grep.pid}`);
+ * grep.stdin.end();
+ * ```
+ * @since v0.1.90
+ */
+ readonly pid?: number | undefined;
+ /**
+ * The `subprocess.connected` property indicates whether it is still possible to
+ * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages.
+ * @since v0.7.2
+ */
+ readonly connected: boolean;
+ /**
+ * The `subprocess.exitCode` property indicates the exit code of the child process.
+ * If the child process is still running, the field will be `null`.
+ */
+ readonly exitCode: number | null;
+ /**
+ * The `subprocess.signalCode` property indicates the signal received by
+ * the child process if any, else `null`.
+ */
+ readonly signalCode: NodeJS.Signals | null;
+ /**
+ * The `subprocess.spawnargs` property represents the full list of command-line
+ * arguments the child process was launched with.
+ */
+ readonly spawnargs: string[];
+ /**
+ * The `subprocess.spawnfile` property indicates the executable file name of
+ * the child process that is launched.
+ *
+ * For {@link fork}, its value will be equal to `process.execPath`.
+ * For {@link spawn}, its value will be the name of
+ * the executable file.
+ * For {@link exec}, its value will be the name of the shell
+ * in which the child process is launched.
+ */
+ readonly spawnfile: string;
+ /**
+ * The `subprocess.kill()` method sends a signal to the child process. If no
+ * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
+ * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
+ *
+ * ```js
+ * import { spawn } from 'node:child_process';
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * grep.on('close', (code, signal) => {
+ * console.log(
+ * `child process terminated due to receipt of signal ${signal}`);
+ * });
+ *
+ * // Send SIGHUP to process.
+ * grep.kill('SIGHUP');
+ * ```
+ *
+ * The `ChildProcess` object may emit an `'error'` event if the signal
+ * cannot be delivered. Sending a signal to a child process that has already exited
+ * is not an error but may have unforeseen consequences. Specifically, if the
+ * process identifier (PID) has been reassigned to another process, the signal will
+ * be delivered to that process instead which can have unexpected results.
+ *
+ * While the function is called `kill`, the signal delivered to the child process
+ * may not actually terminate the process.
+ *
+ * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference.
+ *
+ * On Windows, where POSIX signals do not exist, the `signal` argument will be
+ * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`).
+ * See `Signal Events` for more details.
+ *
+ * On Linux, child processes of child processes will not be terminated
+ * when attempting to kill their parent. This is likely to happen when running a
+ * new process in a shell or with the use of the `shell` option of `ChildProcess`:
+ *
+ * ```js
+ * 'use strict';
+ * import { spawn } from 'node:child_process';
+ *
+ * const subprocess = spawn(
+ * 'sh',
+ * [
+ * '-c',
+ * `node -e "setInterval(() => {
+ * console.log(process.pid, 'is alive')
+ * }, 500);"`,
+ * ], {
+ * stdio: ['inherit', 'inherit', 'inherit'],
+ * },
+ * );
+ *
+ * setTimeout(() => {
+ * subprocess.kill(); // Does not terminate the Node.js process in the shell.
+ * }, 2000);
+ * ```
+ * @since v0.1.90
+ */
+ kill(signal?: NodeJS.Signals | number): boolean;
+ /**
+ * Calls {@link ChildProcess.kill} with `'SIGTERM'`.
+ * @since v20.5.0
+ */
+ [Symbol.dispose](): void;
+ /**
+ * When an IPC channel has been established between the parent and child (
+ * i.e. when using {@link fork}), the `subprocess.send()` method can
+ * be used to send messages to the child process. When the child process is a
+ * Node.js instance, these messages can be received via the `'message'` event.
+ *
+ * The message goes through serialization and parsing. The resulting
+ * message might not be the same as what is originally sent.
+ *
+ * For example, in the parent script:
+ *
+ * ```js
+ * import cp from 'node:child_process';
+ * const n = cp.fork(`${__dirname}/sub.js`);
+ *
+ * n.on('message', (m) => {
+ * console.log('PARENT got message:', m);
+ * });
+ *
+ * // Causes the child to print: CHILD got message: { hello: 'world' }
+ * n.send({ hello: 'world' });
+ * ```
+ *
+ * And then the child script, `'sub.js'` might look like this:
+ *
+ * ```js
+ * process.on('message', (m) => {
+ * console.log('CHILD got message:', m);
+ * });
+ *
+ * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null }
+ * process.send({ foo: 'bar', baz: NaN });
+ * ```
+ *
+ * Child Node.js processes will have a `process.send()` method of their own
+ * that allows the child to send messages back to the parent.
+ *
+ * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages
+ * containing a `NODE_` prefix in the `cmd` property are reserved for use within
+ * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js.
+ * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice.
+ *
+ * The optional `sendHandle` argument that may be passed to `subprocess.send()` is
+ * for passing a TCP server or socket object to the child process. The child will
+ * receive the object as the second argument passed to the callback function
+ * registered on the `'message'` event. Any data that is received and buffered in
+ * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows.
+ *
+ * The optional `callback` is a function that is invoked after the message is
+ * sent but before the child may have received it. The function is called with a
+ * single argument: `null` on success, or an `Error` object on failure.
+ *
+ * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can
+ * happen, for instance, when the child process has already exited.
+ *
+ * `subprocess.send()` will return `false` if the channel has closed or when the
+ * backlog of unsent messages exceeds a threshold that makes it unwise to send
+ * more. Otherwise, the method returns `true`. The `callback` function can be
+ * used to implement flow control.
+ *
+ * #### Example: sending a server object
+ *
+ * The `sendHandle` argument can be used, for instance, to pass the handle of
+ * a TCP server object to the child process as illustrated in the example below:
+ *
+ * ```js
+ * import { createServer } from 'node:net';
+ * import { fork } from 'node:child_process';
+ * const subprocess = fork('subprocess.js');
+ *
+ * // Open up the server object and send the handle.
+ * const server = createServer();
+ * server.on('connection', (socket) => {
+ * socket.end('handled by parent');
+ * });
+ * server.listen(1337, () => {
+ * subprocess.send('server', server);
+ * });
+ * ```
+ *
+ * The child would then receive the server object as:
+ *
+ * ```js
+ * process.on('message', (m, server) => {
+ * if (m === 'server') {
+ * server.on('connection', (socket) => {
+ * socket.end('handled by child');
+ * });
+ * }
+ * });
+ * ```
+ *
+ * Once the server is now shared between the parent and child, some connections
+ * can be handled by the parent and some by the child.
+ *
+ * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of
+ * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only
+ * supported on Unix platforms.
+ *
+ * #### Example: sending a socket object
+ *
+ * Similarly, the `sendHandler` argument can be used to pass the handle of a
+ * socket to the child process. The example below spawns two children that each
+ * handle connections with "normal" or "special" priority:
+ *
+ * ```js
+ * import { createServer } from 'node:net';
+ * import { fork } from 'node:child_process';
+ * const normal = fork('subprocess.js', ['normal']);
+ * const special = fork('subprocess.js', ['special']);
+ *
+ * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
+ * // the sockets from being read before they are sent to the child process.
+ * const server = createServer({ pauseOnConnect: true });
+ * server.on('connection', (socket) => {
+ *
+ * // If this is special priority...
+ * if (socket.remoteAddress === '74.125.127.100') {
+ * special.send('socket', socket);
+ * return;
+ * }
+ * // This is normal priority.
+ * normal.send('socket', socket);
+ * });
+ * server.listen(1337);
+ * ```
+ *
+ * The `subprocess.js` would receive the socket handle as the second argument
+ * passed to the event callback function:
+ *
+ * ```js
+ * process.on('message', (m, socket) => {
+ * if (m === 'socket') {
+ * if (socket) {
+ * // Check that the client socket exists.
+ * // It is possible for the socket to be closed between the time it is
+ * // sent and the time it is received in the child process.
+ * socket.end(`Request handled with ${process.argv[2]} priority`);
+ * }
+ * }
+ * });
+ * ```
+ *
+ * Do not use `.maxConnections` on a socket that has been passed to a subprocess.
+ * The parent cannot track when the socket is destroyed.
+ *
+ * Any `'message'` handlers in the subprocess should verify that `socket` exists,
+ * as the connection may have been closed during the time it takes to send the
+ * connection to the child.
+ * @since v0.5.9
+ * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v25.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v25.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v25.x/api/dgram.html#class-dgramsocket) object.
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(
+ message: Serializable,
+ sendHandle?: SendHandle,
+ options?: MessageOptions,
+ callback?: (error: Error | null) => void,
+ ): boolean;
+ /**
+ * Closes the IPC channel between parent and child, allowing the child to exit
+ * gracefully once there are no other connections keeping it alive. After calling
+ * this method the `subprocess.connected` and `process.connected` properties in
+ * both the parent and child (respectively) will be set to `false`, and it will be
+ * no longer possible to pass messages between the processes.
+ *
+ * The `'disconnect'` event will be emitted when there are no messages in the
+ * process of being received. This will most often be triggered immediately after
+ * calling `subprocess.disconnect()`.
+ *
+ * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked
+ * within the child process to close the IPC channel as well.
+ * @since v0.7.2
+ */
+ disconnect(): void;
+ /**
+ * By default, the parent will wait for the detached child to exit. To prevent the
+ * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not
+ * include the child in its reference count, allowing the parent to exit
+ * independently of the child, unless there is an established IPC channel between
+ * the child and the parent.
+ *
+ * ```js
+ * import { spawn } from 'node:child_process';
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore',
+ * });
+ *
+ * subprocess.unref();
+ * ```
+ * @since v0.7.10
+ */
+ unref(): void;
+ /**
+ * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will
+ * restore the removed reference count for the child process, forcing the parent
+ * to wait for the child to exit before exiting itself.
+ *
+ * ```js
+ * import { spawn } from 'node:child_process';
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore',
+ * });
+ *
+ * subprocess.unref();
+ * subprocess.ref();
+ * ```
+ * @since v0.7.10
+ */
+ ref(): void;
+ }
+ interface ChildProcess extends InternalEventEmitter {}
+ // return this object when stdio option is undefined or not specified
+ interface ChildProcessWithoutNullStreams extends ChildProcess {
+ stdin: Writable;
+ stdout: Readable;
+ stderr: Readable;
+ readonly stdio: [
+ Writable,
+ Readable,
+ Readable,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined, // extra, no modification
+ ];
+ }
+ // return this object when stdio option is a tuple of 3
+ interface ChildProcessByStdio
+ extends ChildProcess
+ {
+ stdin: I;
+ stdout: O;
+ stderr: E;
+ readonly stdio: [
+ I,
+ O,
+ E,
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined, // extra, no modification
+ ];
+ }
+ interface Control extends EventEmitter {
+ ref(): void;
+ unref(): void;
+ }
+ interface MessageOptions {
+ keepOpen?: boolean | undefined;
+ }
+ type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
+ type StdioOptions = IOType | Array;
+ type SerializationType = "json" | "advanced";
+ interface MessagingOptions extends Abortable {
+ /**
+ * Specify the kind of serialization used for sending messages between processes.
+ * @default 'json'
+ */
+ serialization?: SerializationType | undefined;
+ /**
+ * The signal value to be used when the spawned process will be killed by the abort signal.
+ * @default 'SIGTERM'
+ */
+ killSignal?: NodeJS.Signals | number | undefined;
+ /**
+ * In milliseconds the maximum amount of time the process is allowed to run.
+ */
+ timeout?: number | undefined;
+ }
+ interface ProcessEnvOptions {
+ uid?: number | undefined;
+ gid?: number | undefined;
+ cwd?: string | URL | undefined;
+ env?: NodeJS.ProcessEnv | undefined;
+ }
+ interface CommonOptions extends ProcessEnvOptions {
+ /**
+ * @default false
+ */
+ windowsHide?: boolean | undefined;
+ /**
+ * @default 0
+ */
+ timeout?: number | undefined;
+ }
+ interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
+ argv0?: string | undefined;
+ /**
+ * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
+ * If passed as an array, the first element is used for `stdin`, the second for
+ * `stdout`, and the third for `stderr`. A fourth element can be used to
+ * specify the `stdio` behavior beyond the standard streams. See
+ * {@link ChildProcess.stdio} for more information.
+ *
+ * @default 'pipe'
+ */
+ stdio?: StdioOptions | undefined;
+ shell?: boolean | string | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ interface SpawnOptions extends CommonSpawnOptions {
+ detached?: boolean | undefined;
+ }
+ interface SpawnOptionsWithoutStdio extends SpawnOptions {
+ stdio?: StdioPipeNamed | StdioPipe[] | undefined;
+ }
+ type StdioNull = "inherit" | "ignore" | Stream;
+ type StdioPipeNamed = "pipe" | "overlapped";
+ type StdioPipe = undefined | null | StdioPipeNamed;
+ interface SpawnOptionsWithStdioTuple<
+ Stdin extends StdioNull | StdioPipe,
+ Stdout extends StdioNull | StdioPipe,
+ Stderr extends StdioNull | StdioPipe,
+ > extends SpawnOptions {
+ stdio: [Stdin, Stdout, Stderr];
+ }
+ /**
+ * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults
+ * to an empty array.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * A third argument may be used to specify additional options, with these defaults:
+ *
+ * ```js
+ * const defaults = {
+ * cwd: undefined,
+ * env: process.env,
+ * };
+ * ```
+ *
+ * Use `cwd` to specify the working directory from which the process is spawned.
+ * If not given, the default is to inherit the current working directory. If given,
+ * but the path does not exist, the child process emits an `ENOENT` error
+ * and exits immediately. `ENOENT` is also emitted when the command
+ * does not exist.
+ *
+ * Use `env` to specify environment variables that will be visible to the new
+ * process, the default is `process.env`.
+ *
+ * `undefined` values in `env` will be ignored.
+ *
+ * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
+ * exit code:
+ *
+ * ```js
+ * import { spawn } from 'node:child_process';
+ * import { once } from 'node:events';
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * const [code] = await once(ls, 'close');
+ * console.log(`child process exited with code ${code}`);
+ * ```
+ *
+ * Example: A very elaborate way to run `ps ax | grep ssh`
+ *
+ * ```js
+ * import { spawn } from 'node:child_process';
+ * const ps = spawn('ps', ['ax']);
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * ps.stdout.on('data', (data) => {
+ * grep.stdin.write(data);
+ * });
+ *
+ * ps.stderr.on('data', (data) => {
+ * console.error(`ps stderr: ${data}`);
+ * });
+ *
+ * ps.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`ps process exited with code ${code}`);
+ * }
+ * grep.stdin.end();
+ * });
+ *
+ * grep.stdout.on('data', (data) => {
+ * console.log(data.toString());
+ * });
+ *
+ * grep.stderr.on('data', (data) => {
+ * console.error(`grep stderr: ${data}`);
+ * });
+ *
+ * grep.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`grep process exited with code ${code}`);
+ * }
+ * });
+ * ```
+ *
+ * Example of checking for failed `spawn`:
+ *
+ * ```js
+ * import { spawn } from 'node:child_process';
+ * const subprocess = spawn('bad_command');
+ *
+ * subprocess.on('error', (err) => {
+ * console.error('Failed to start subprocess.');
+ * });
+ * ```
+ *
+ * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
+ * title while others (Windows, SunOS) will use `command`.
+ *
+ * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve
+ * it with the `process.argv0` property instead.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * import { spawn } from 'node:child_process';
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const grep = spawn('grep', ['ssh'], { signal });
+ * grep.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * ```
+ * @since v0.1.90
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(command: string, options: SpawnOptions): ChildProcess;
+ // overloads of spawn with 'args'
+ function spawn(
+ command: string,
+ args?: readonly string[],
+ options?: SpawnOptionsWithoutStdio,
+ ): ChildProcessWithoutNullStreams;
+ function spawn(
+ command: string,
+ args: readonly string[],
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ args: readonly string[],
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ args: readonly string[],
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ args: readonly string[],
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ args: readonly string[],
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ args: readonly string[],
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ args: readonly string[],
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(
+ command: string,
+ args: readonly string[],
+ options: SpawnOptionsWithStdioTuple,
+ ): ChildProcessByStdio;
+ function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess;
+ interface ExecOptions extends CommonOptions {
+ shell?: string | undefined;
+ signal?: AbortSignal | undefined;
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ encoding?: string | null | undefined;
+ }
+ interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding?: BufferEncoding | undefined;
+ }
+ interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: "buffer" | null; // specify `null`.
+ }
+ // TODO: Just Plain Wrong™ (see also nodejs/node#57392)
+ interface ExecException extends Error {
+ cmd?: string;
+ killed?: boolean;
+ code?: number;
+ signal?: NodeJS.Signals;
+ stdout?: string;
+ stderr?: string;
+ }
+ /**
+ * Spawns a shell then executes the `command` within that shell, buffering any
+ * generated output. The `command` string passed to the exec function is processed
+ * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
+ * need to be dealt with accordingly:
+ *
+ * ```js
+ * import { exec } from 'node:child_process';
+ *
+ * exec('"/path/to/test file/test.sh" arg1 arg2');
+ * // Double quotes are used so that the space in the path is not interpreted as
+ * // a delimiter of multiple arguments.
+ *
+ * exec('echo "The \\$HOME variable is $HOME"');
+ * // The $HOME variable is escaped in the first instance, but not in the second.
+ * ```
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ *
+ * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The
+ * `error.code` property will be
+ * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the
+ * process.
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * ```js
+ * import { exec } from 'node:child_process';
+ * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
+ * if (error) {
+ * console.error(`exec error: ${error}`);
+ * return;
+ * }
+ * console.log(`stdout: ${stdout}`);
+ * console.error(`stderr: ${stderr}`);
+ * });
+ * ```
+ *
+ * If `timeout` is greater than `0`, the parent will send the signal
+ * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
+ * child runs longer than `timeout` milliseconds.
+ *
+ * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
+ * the existing process and uses a shell to execute the command.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * import util from 'node:util';
+ * import child_process from 'node:child_process';
+ * const exec = util.promisify(child_process.exec);
+ *
+ * async function lsExample() {
+ * const { stdout, stderr } = await exec('ls');
+ * console.log('stdout:', stdout);
+ * console.error('stderr:', stderr);
+ * }
+ * lsExample();
+ * ```
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * import { exec } from 'node:child_process';
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = exec('grep ssh', { signal }, (error) => {
+ * console.error(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.90
+ * @param command The command to run, with space-separated arguments.
+ * @param callback called with the output when process terminates.
+ */
+ function exec(
+ command: string,
+ callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
+ ): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function exec(
+ command: string,
+ options: ExecOptionsWithBufferEncoding,
+ callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
+ ): ChildProcess;
+ // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
+ function exec(
+ command: string,
+ options: ExecOptionsWithStringEncoding,
+ callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
+ ): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function exec(
+ command: string,
+ options: ExecOptions | undefined | null,
+ callback?: (
+ error: ExecException | null,
+ stdout: string | NonSharedBuffer,
+ stderr: string | NonSharedBuffer,
+ ) => void,
+ ): ChildProcess;
+ interface PromiseWithChild extends Promise {
+ child: ChildProcess;
+ }
+ namespace exec {
+ function __promisify__(command: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: ExecOptionsWithBufferEncoding,
+ ): PromiseWithChild<{
+ stdout: NonSharedBuffer;
+ stderr: NonSharedBuffer;
+ }>;
+ function __promisify__(
+ command: string,
+ options: ExecOptionsWithStringEncoding,
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: ExecOptions | undefined | null,
+ ): PromiseWithChild<{
+ stdout: string | NonSharedBuffer;
+ stderr: string | NonSharedBuffer;
+ }>;
+ }
+ interface ExecFileOptions extends CommonOptions, Abortable {
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ shell?: boolean | string | undefined;
+ signal?: AbortSignal | undefined;
+ encoding?: string | null | undefined;
+ }
+ interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding?: BufferEncoding | undefined;
+ }
+ interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: "buffer" | null;
+ }
+ /** @deprecated Use `ExecFileOptions` instead. */
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {}
+ // TODO: execFile exceptions can take many forms... this accurately describes none of them
+ type ExecFileException =
+ & Omit
+ & Omit
+ & { code?: string | number | null };
+ /**
+ * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
+ * executable `file` is spawned directly as a new process making it slightly more
+ * efficient than {@link exec}.
+ *
+ * The same options as {@link exec} are supported. Since a shell is
+ * not spawned, behaviors such as I/O redirection and file globbing are not
+ * supported.
+ *
+ * ```js
+ * import { execFile } from 'node:child_process';
+ * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
+ * if (error) {
+ * throw error;
+ * }
+ * console.log(stdout);
+ * });
+ * ```
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * import util from 'node:util';
+ * import child_process from 'node:child_process';
+ * const execFile = util.promisify(child_process.execFile);
+ * async function getVersion() {
+ * const { stdout } = await execFile('node', ['--version']);
+ * console.log(stdout);
+ * }
+ * getVersion();
+ * ```
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * import { execFile } from 'node:child_process';
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = execFile('node', ['--version'], { signal }, (error) => {
+ * console.error(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.91
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @param callback Called with the output when process terminates.
+ */
+ // no `options` definitely means stdout/stderr are `string`.
+ function execFile(
+ file: string,
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: readonly string[] | undefined | null,
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
+ ): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function execFile(
+ file: string,
+ options: ExecFileOptionsWithBufferEncoding,
+ callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: readonly string[] | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding,
+ callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
+ ): ChildProcess;
+ // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
+ function execFile(
+ file: string,
+ options: ExecFileOptionsWithStringEncoding,
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: readonly string[] | undefined | null,
+ options: ExecFileOptionsWithStringEncoding,
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
+ ): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function execFile(
+ file: string,
+ options: ExecFileOptions | undefined | null,
+ callback:
+ | ((
+ error: ExecFileException | null,
+ stdout: string | NonSharedBuffer,
+ stderr: string | NonSharedBuffer,
+ ) => void)
+ | undefined
+ | null,
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: readonly string[] | undefined | null,
+ options: ExecFileOptions | undefined | null,
+ callback:
+ | ((
+ error: ExecFileException | null,
+ stdout: string | NonSharedBuffer,
+ stderr: string | NonSharedBuffer,
+ ) => void)
+ | undefined
+ | null,
+ ): ChildProcess;
+ namespace execFile {
+ function __promisify__(file: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: readonly string[] | undefined | null,
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithBufferEncoding,
+ ): PromiseWithChild<{
+ stdout: NonSharedBuffer;
+ stderr: NonSharedBuffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: readonly string[] | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding,
+ ): PromiseWithChild<{
+ stdout: NonSharedBuffer;
+ stderr: NonSharedBuffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithStringEncoding,
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: readonly string[] | undefined | null,
+ options: ExecFileOptionsWithStringEncoding,
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptions | undefined | null,
+ ): PromiseWithChild<{
+ stdout: string | NonSharedBuffer;
+ stderr: string | NonSharedBuffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: readonly string[] | undefined | null,
+ options: ExecFileOptions | undefined | null,
+ ): PromiseWithChild<{
+ stdout: string | NonSharedBuffer;
+ stderr: string | NonSharedBuffer;
+ }>;
+ }
+ interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
+ execPath?: string | undefined;
+ execArgv?: string[] | undefined;
+ silent?: boolean | undefined;
+ /**
+ * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
+ * If passed as an array, the first element is used for `stdin`, the second for
+ * `stdout`, and the third for `stderr`. A fourth element can be used to
+ * specify the `stdio` behavior beyond the standard streams. See
+ * {@link ChildProcess.stdio} for more information.
+ *
+ * @default 'pipe'
+ */
+ stdio?: StdioOptions | undefined;
+ detached?: boolean | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ /**
+ * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes.
+ * Like {@link spawn}, a `ChildProcess` object is returned. The
+ * returned `ChildProcess` will have an additional communication channel
+ * built-in that allows messages to be passed back and forth between the parent and
+ * child. See `subprocess.send()` for details.
+ *
+ * Keep in mind that spawned Node.js child processes are
+ * independent of the parent with exception of the IPC communication channel
+ * that is established between the two. Each process has its own memory, with
+ * their own V8 instances. Because of the additional resource allocations
+ * required, spawning a large number of child Node.js processes is not
+ * recommended.
+ *
+ * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative
+ * execution path to be used.
+ *
+ * Node.js processes launched with a custom `execPath` will communicate with the
+ * parent process using the file descriptor (fd) identified using the
+ * environment variable `NODE_CHANNEL_FD` on the child process.
+ *
+ * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the
+ * current process.
+ *
+ * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * if (process.argv[2] === 'child') {
+ * setTimeout(() => {
+ * console.log(`Hello from ${process.argv[2]}!`);
+ * }, 1_000);
+ * } else {
+ * import { fork } from 'node:child_process';
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = fork(__filename, ['child'], { signal });
+ * child.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * }
+ * ```
+ * @since v0.5.0
+ * @param modulePath The module to run in the child.
+ * @param args List of string arguments.
+ */
+ function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess;
+ function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess;
+ interface SpawnSyncOptions extends CommonSpawnOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | "buffer" | null | undefined;
+ }
+ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding?: "buffer" | null | undefined;
+ }
+ interface SpawnSyncReturns {
+ pid: number;
+ output: Array;
+ stdout: T;
+ stderr: T;
+ status: number | null;
+ signal: NodeJS.Signals | null;
+ error?: Error;
+ }
+ /**
+ * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the process intercepts and handles the `SIGTERM` signal
+ * and doesn't exit, the parent process will wait until the child process has
+ * exited.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawnSync(command: string): SpawnSyncReturns;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns;
+ function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns;
+ function spawnSync(
+ command: string,
+ args: readonly string[],
+ options: SpawnSyncOptionsWithStringEncoding,
+ ): SpawnSyncReturns;
+ function spawnSync(
+ command: string,
+ args: readonly string[],
+ options: SpawnSyncOptionsWithBufferEncoding,
+ ): SpawnSyncReturns;
+ function spawnSync(
+ command: string,
+ args?: readonly string[],
+ options?: SpawnSyncOptions,
+ ): SpawnSyncReturns;
+ interface CommonExecOptions extends CommonOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ /**
+ * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings.
+ * If passed as an array, the first element is used for `stdin`, the second for
+ * `stdout`, and the third for `stderr`. A fourth element can be used to
+ * specify the `stdio` behavior beyond the standard streams. See
+ * {@link ChildProcess.stdio} for more information.
+ *
+ * @default 'pipe'
+ */
+ stdio?: StdioOptions | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | "buffer" | null | undefined;
+ }
+ interface ExecSyncOptions extends CommonExecOptions {
+ shell?: string | undefined;
+ }
+ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding?: "buffer" | null | undefined;
+ }
+ /**
+ * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process
+ * has exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw.
+ * The `Error` object will contain the entire result from {@link spawnSync}.
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @return The stdout from the command.
+ */
+ function execSync(command: string): NonSharedBuffer;
+ function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer;
+ function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer;
+ interface ExecFileSyncOptions extends CommonExecOptions {
+ shell?: boolean | string | undefined;
+ }
+ interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding?: "buffer" | null | undefined; // specify `null`.
+ }
+ /**
+ * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
+ * return until the child process has fully closed. When a timeout has been
+ * encountered and `killSignal` is sent, the method won't return until the process
+ * has completely exited.
+ *
+ * If the child process intercepts and handles the `SIGTERM` signal and
+ * does not exit, the parent process will still wait until the child process has
+ * exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @return The stdout from the command.
+ */
+ function execFileSync(file: string): NonSharedBuffer;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer;
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer;
+ function execFileSync(file: string, args: readonly string[]): NonSharedBuffer;
+ function execFileSync(
+ file: string,
+ args: readonly string[],
+ options: ExecFileSyncOptionsWithStringEncoding,
+ ): string;
+ function execFileSync(
+ file: string,
+ args: readonly string[],
+ options: ExecFileSyncOptionsWithBufferEncoding,
+ ): NonSharedBuffer;
+ function execFileSync(
+ file: string,
+ args?: readonly string[],
+ options?: ExecFileSyncOptions,
+ ): string | NonSharedBuffer;
+}
+declare module "child_process" {
+ export * from "node:child_process";
+}
diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts
new file mode 100644
index 0000000..4e5efbf
--- /dev/null
+++ b/node_modules/@types/node/cluster.d.ts
@@ -0,0 +1,486 @@
+/**
+ * Clusters of Node.js processes can be used to run multiple instances of Node.js
+ * that can distribute workloads among their application threads. When process isolation
+ * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html)
+ * module instead, which allows running multiple application threads within a single Node.js instance.
+ *
+ * The cluster module allows easy creation of child processes that all share
+ * server ports.
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ * import http from 'node:http';
+ * import { availableParallelism } from 'node:os';
+ * import process from 'node:process';
+ *
+ * const numCPUs = availableParallelism();
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log(`worker ${worker.process.pid} died`);
+ * });
+ * } else {
+ * // Workers can share any TCP connection
+ * // In this case it is an HTTP server
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ *
+ * console.log(`Worker ${process.pid} started`);
+ * }
+ * ```
+ *
+ * Running Node.js will now share port 8000 between the workers:
+ *
+ * ```console
+ * $ node server.js
+ * Primary 3596 is running
+ * Worker 4324 started
+ * Worker 4520 started
+ * Worker 6056 started
+ * Worker 5644 started
+ * ```
+ *
+ * On Windows, it is not yet possible to set up a named pipe server in a worker.
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/cluster.js)
+ */
+declare module "node:cluster" {
+ import * as child_process from "node:child_process";
+ import { EventEmitter, InternalEventEmitter } from "node:events";
+ class Worker implements EventEmitter {
+ constructor(options?: cluster.WorkerOptions);
+ /**
+ * Each new worker is given its own unique id, this id is stored in the `id`.
+ *
+ * While a worker is alive, this is the key that indexes it in `cluster.workers`.
+ * @since v0.8.0
+ */
+ id: number;
+ /**
+ * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
+ * from this function is stored as `.process`. In a worker, the global `process` is stored.
+ *
+ * See: [Child Process module](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options).
+ *
+ * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
+ * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
+ * accidental disconnection.
+ * @since v0.7.0
+ */
+ process: child_process.ChildProcess;
+ /**
+ * Send a message to a worker or primary, optionally with a handle.
+ *
+ * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
+ *
+ * In a worker, this sends a message to the primary. It is identical to `process.send()`.
+ *
+ * This example will echo back all messages from the primary:
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * worker.send('hi there');
+ *
+ * } else if (cluster.isWorker) {
+ * process.on('message', (msg) => {
+ * process.send(msg);
+ * });
+ * }
+ * ```
+ * @since v0.7.0
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles.
+ */
+ send(message: child_process.Serializable, callback?: (error: Error | null) => void): boolean;
+ send(
+ message: child_process.Serializable,
+ sendHandle: child_process.SendHandle,
+ callback?: (error: Error | null) => void,
+ ): boolean;
+ send(
+ message: child_process.Serializable,
+ sendHandle: child_process.SendHandle,
+ options?: child_process.MessageOptions,
+ callback?: (error: Error | null) => void,
+ ): boolean;
+ /**
+ * This function will kill the worker. In the primary worker, it does this by
+ * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`.
+ *
+ * The `kill()` function kills the worker process without waiting for a graceful
+ * disconnect, it has the same behavior as `worker.process.kill()`.
+ *
+ * This method is aliased as `worker.destroy()` for backwards compatibility.
+ *
+ * In a worker, `process.kill()` exists, but it is not this function;
+ * it is [`kill()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processkillpid-signal).
+ * @since v0.9.12
+ * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
+ */
+ kill(signal?: string): void;
+ destroy(signal?: string): void;
+ /**
+ * In a worker, this function will close all servers, wait for the `'close'` event
+ * on those servers, and then disconnect the IPC channel.
+ *
+ * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself.
+ *
+ * Causes `.exitedAfterDisconnect` to be set.
+ *
+ * After a server is closed, it will no longer accept new connections,
+ * but connections may be accepted by any other listening worker. Existing
+ * connections will be allowed to close as usual. When no more connections exist,
+ * see `server.close()`, the IPC channel to the worker will close allowing it
+ * to die gracefully.
+ *
+ * The above applies _only_ to server connections, client connections are not
+ * automatically closed by workers, and disconnect does not wait for them to close
+ * before exiting.
+ *
+ * In a worker, `process.disconnect` exists, but it is not this function;
+ * it is `disconnect()`.
+ *
+ * Because long living server connections may block workers from disconnecting, it
+ * may be useful to send a message, so application specific actions may be taken to
+ * close them. It also may be useful to implement a timeout, killing a worker if
+ * the `'disconnect'` event has not been emitted after some time.
+ *
+ * ```js
+ * import net from 'node:net';
+ *
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * let timeout;
+ *
+ * worker.on('listening', (address) => {
+ * worker.send('shutdown');
+ * worker.disconnect();
+ * timeout = setTimeout(() => {
+ * worker.kill();
+ * }, 2000);
+ * });
+ *
+ * worker.on('disconnect', () => {
+ * clearTimeout(timeout);
+ * });
+ *
+ * } else if (cluster.isWorker) {
+ * const server = net.createServer((socket) => {
+ * // Connections never end
+ * });
+ *
+ * server.listen(8000);
+ *
+ * process.on('message', (msg) => {
+ * if (msg === 'shutdown') {
+ * // Initiate graceful close of any connections to server
+ * }
+ * });
+ * }
+ * ```
+ * @since v0.7.7
+ * @return A reference to `worker`.
+ */
+ disconnect(): this;
+ /**
+ * This function returns `true` if the worker is connected to its primary via its
+ * IPC channel, `false` otherwise. A worker is connected to its primary after it
+ * has been created. It is disconnected after the `'disconnect'` event is emitted.
+ * @since v0.11.14
+ */
+ isConnected(): boolean;
+ /**
+ * This function returns `true` if the worker's process has terminated (either
+ * because of exiting or being signaled). Otherwise, it returns `false`.
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ * import http from 'node:http';
+ * import { availableParallelism } from 'node:os';
+ * import process from 'node:process';
+ *
+ * const numCPUs = availableParallelism();
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('fork', (worker) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ * } else {
+ * // Workers can share any TCP connection. In this case, it is an HTTP server.
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end(`Current process\n ${process.pid}`);
+ * process.kill(process.pid);
+ * }).listen(8000);
+ * }
+ * ```
+ * @since v0.11.14
+ */
+ isDead(): boolean;
+ /**
+ * This property is `true` if the worker exited due to `.disconnect()`.
+ * If the worker exited any other way, it is `false`. If the
+ * worker has not exited, it is `undefined`.
+ *
+ * The boolean `worker.exitedAfterDisconnect` allows distinguishing between
+ * voluntary and accidental exit, the primary may choose not to respawn a worker
+ * based on this value.
+ *
+ * ```js
+ * cluster.on('exit', (worker, code, signal) => {
+ * if (worker.exitedAfterDisconnect === true) {
+ * console.log('Oh, it was just voluntary – no need to worry');
+ * }
+ * });
+ *
+ * // kill worker
+ * worker.kill();
+ * ```
+ * @since v6.0.0
+ */
+ exitedAfterDisconnect: boolean;
+ }
+ interface Worker extends InternalEventEmitter {}
+ type _Worker = Worker;
+ namespace cluster {
+ interface Worker extends _Worker {}
+ interface WorkerOptions {
+ id?: number | undefined;
+ process?: child_process.ChildProcess | undefined;
+ state?: string | undefined;
+ }
+ interface WorkerEventMap {
+ "disconnect": [];
+ "error": [error: Error];
+ "exit": [code: number, signal: string];
+ "listening": [address: Address];
+ "message": [message: any, handle: child_process.SendHandle];
+ "online": [];
+ }
+ interface ClusterSettings {
+ /**
+ * List of string arguments passed to the Node.js executable.
+ * @default process.execArgv
+ */
+ execArgv?: string[] | undefined;
+ /**
+ * File path to worker file.
+ * @default process.argv[1]
+ */
+ exec?: string | undefined;
+ /**
+ * String arguments passed to worker.
+ * @default process.argv.slice(2)
+ */
+ args?: readonly string[] | undefined;
+ /**
+ * Whether or not to send output to parent's stdio.
+ * @default false
+ */
+ silent?: boolean | undefined;
+ /**
+ * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
+ * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processspawncommand-args-options)'s
+ * [`stdio`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#optionsstdio).
+ */
+ stdio?: any[] | undefined;
+ /**
+ * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).)
+ */
+ uid?: number | undefined;
+ /**
+ * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).)
+ */
+ gid?: number | undefined;
+ /**
+ * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number.
+ * By default each worker gets its own port, incremented from the primary's `process.debugPort`.
+ */
+ inspectPort?: number | (() => number) | undefined;
+ /**
+ * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
+ * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#advanced-serialization) for more details.
+ * @default false
+ */
+ serialization?: "json" | "advanced" | undefined;
+ /**
+ * Current working directory of the worker process.
+ * @default undefined (inherits from parent process)
+ */
+ cwd?: string | undefined;
+ /**
+ * Hide the forked processes console window that would normally be created on Windows systems.
+ * @default false
+ */
+ windowsHide?: boolean | undefined;
+ }
+ interface Address {
+ address: string;
+ port: number;
+ /**
+ * The `addressType` is one of:
+ *
+ * * `4` (TCPv4)
+ * * `6` (TCPv6)
+ * * `-1` (Unix domain socket)
+ * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6)
+ */
+ addressType: 4 | 6 | -1 | "udp4" | "udp6";
+ }
+ interface ClusterEventMap {
+ "disconnect": [worker: Worker];
+ "exit": [worker: Worker, code: number, signal: string];
+ "fork": [worker: Worker];
+ "listening": [worker: Worker, address: Address];
+ "message": [worker: Worker, message: any, handle: child_process.SendHandle];
+ "online": [worker: Worker];
+ "setup": [settings: ClusterSettings];
+ }
+ interface Cluster extends InternalEventEmitter {
+ /**
+ * A `Worker` object contains all public information and method about a worker.
+ * In the primary it can be obtained using `cluster.workers`. In a worker
+ * it can be obtained using `cluster.worker`.
+ * @since v0.7.0
+ */
+ Worker: typeof Worker;
+ disconnect(callback?: () => void): void;
+ /**
+ * Spawn a new worker process.
+ *
+ * This can only be called from the primary process.
+ * @param env Key/value pairs to add to worker process environment.
+ * @since v0.6.0
+ */
+ fork(env?: any): Worker;
+ /** @deprecated since v16.0.0 - use isPrimary. */
+ readonly isMaster: boolean;
+ /**
+ * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID`
+ * is undefined, then `isPrimary` is `true`.
+ * @since v16.0.0
+ */
+ readonly isPrimary: boolean;
+ /**
+ * True if the process is not a primary (it is the negation of `cluster.isPrimary`).
+ * @since v0.6.0
+ */
+ readonly isWorker: boolean;
+ /**
+ * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a
+ * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings)
+ * is called, whichever comes first.
+ *
+ * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute
+ * IOCP handles without incurring a large performance hit.
+ *
+ * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`.
+ * @since v0.11.2
+ */
+ schedulingPolicy: number;
+ /**
+ * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings)
+ * (or [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv)) this settings object will contain
+ * the settings, including the default values.
+ *
+ * This object is not intended to be changed or set manually.
+ * @since v0.7.1
+ */
+ readonly settings: ClusterSettings;
+ /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings) instead. */
+ setupMaster(settings?: ClusterSettings): void;
+ /**
+ * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`.
+ *
+ * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv)
+ * and have no effect on workers that are already running.
+ *
+ * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to
+ * [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv).
+ *
+ * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of
+ * `cluster.setupPrimary()` is called.
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ *
+ * cluster.setupPrimary({
+ * exec: 'worker.js',
+ * args: ['--use', 'https'],
+ * silent: true,
+ * });
+ * cluster.fork(); // https worker
+ * cluster.setupPrimary({
+ * exec: 'worker.js',
+ * args: ['--use', 'http'],
+ * });
+ * cluster.fork(); // http worker
+ * ```
+ *
+ * This can only be called from the primary process.
+ * @since v16.0.0
+ */
+ setupPrimary(settings?: ClusterSettings): void;
+ /**
+ * A reference to the current worker object. Not available in the primary process.
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ *
+ * if (cluster.isPrimary) {
+ * console.log('I am primary');
+ * cluster.fork();
+ * cluster.fork();
+ * } else if (cluster.isWorker) {
+ * console.log(`I am worker #${cluster.worker.id}`);
+ * }
+ * ```
+ * @since v0.7.0
+ */
+ readonly worker?: Worker;
+ /**
+ * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process.
+ *
+ * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it
+ * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted.
+ *
+ * ```js
+ * import cluster from 'node:cluster';
+ *
+ * for (const worker of Object.values(cluster.workers)) {
+ * worker.send('big announcement to all workers');
+ * }
+ * ```
+ * @since v0.7.0
+ */
+ readonly workers?: NodeJS.Dict;
+ readonly SCHED_NONE: number;
+ readonly SCHED_RR: number;
+ }
+ }
+ var cluster: cluster.Cluster;
+ export = cluster;
+}
+declare module "cluster" {
+ import cluster = require("node:cluster");
+ export = cluster;
+}
diff --git a/node_modules/@types/node/compatibility/iterators.d.ts b/node_modules/@types/node/compatibility/iterators.d.ts
new file mode 100644
index 0000000..156e785
--- /dev/null
+++ b/node_modules/@types/node/compatibility/iterators.d.ts
@@ -0,0 +1,21 @@
+// Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6.
+// The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects
+// are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
+// Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods
+// if lib.esnext.iterator is loaded.
+// TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
+
+// Placeholders for TS <5.6
+interface IteratorObject {}
+interface AsyncIteratorObject {}
+
+declare namespace NodeJS {
+ // Populate iterator methods for TS <5.6
+ interface Iterator extends globalThis.Iterator {}
+ interface AsyncIterator extends globalThis.AsyncIterator {}
+
+ // Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators
+ type BuiltinIteratorReturn = ReturnType extends
+ globalThis.Iterator ? TReturn
+ : any;
+}
diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts
new file mode 100644
index 0000000..3943442
--- /dev/null
+++ b/node_modules/@types/node/console.d.ts
@@ -0,0 +1,151 @@
+/**
+ * The `node:console` module provides a simple debugging console that is similar to
+ * the JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdout) and
+ * [`process.stderr`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v25.x/api/process.html#a-note-on-process-io) for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/console.js)
+ */
+declare module "node:console" {
+ import { InspectOptions } from "node:util";
+ namespace console {
+ interface ConsoleOptions {
+ stdout: NodeJS.WritableStream;
+ stderr?: NodeJS.WritableStream | undefined;
+ /**
+ * Ignore errors when writing to the underlying streams.
+ * @default true
+ */
+ ignoreErrors?: boolean | undefined;
+ /**
+ * Set color support for this `Console` instance. Setting to true enables coloring while inspecting
+ * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
+ * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
+ * respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
+ * @default 'auto'
+ */
+ colorMode?: boolean | "auto" | undefined;
+ /**
+ * Specifies options that are passed along to
+ * [`util.inspect()`](https://nodejs.org/docs/latest-v25.x/api/util.html#utilinspectobject-options).
+ */
+ inspectOptions?: InspectOptions | ReadonlyMap | undefined;
+ /**
+ * Set group indentation.
+ * @default 2
+ */
+ groupIndentation?: number | undefined;
+ }
+ interface Console {
+ readonly Console: {
+ prototype: Console;
+ new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
+ new(options: ConsoleOptions): Console;
+ };
+ assert(condition?: unknown, ...data: any[]): void;
+ clear(): void;
+ count(label?: string): void;
+ countReset(label?: string): void;
+ debug(...data: any[]): void;
+ dir(item?: any, options?: InspectOptions): void;
+ dirxml(...data: any[]): void;
+ error(...data: any[]): void;
+ group(...data: any[]): void;
+ groupCollapsed(...data: any[]): void;
+ groupEnd(): void;
+ info(...data: any[]): void;
+ log(...data: any[]): void;
+ table(tabularData?: any, properties?: string[]): void;
+ time(label?: string): void;
+ timeEnd(label?: string): void;
+ timeLog(label?: string, ...data: any[]): void;
+ trace(...data: any[]): void;
+ warn(...data: any[]): void;
+ /**
+ * This method does not display anything unless used in the inspector. The `console.profile()`
+ * method starts a JavaScript CPU profile with an optional label until {@link profileEnd}
+ * is called. The profile is then added to the Profile panel of the inspector.
+ *
+ * ```js
+ * console.profile('MyLabel');
+ * // Some code
+ * console.profileEnd('MyLabel');
+ * // Adds the profile 'MyLabel' to the Profiles panel of the inspector.
+ * ```
+ * @since v8.0.0
+ */
+ profile(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector. Stops the current
+ * JavaScript CPU profiling session if one has been started and prints the report to the
+ * Profiles panel of the inspector. See {@link profile} for an example.
+ *
+ * If this method is called without a label, the most recently started profile is stopped.
+ * @since v8.0.0
+ */
+ profileEnd(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector. The `console.timeStamp()`
+ * method adds an event with the label `'label'` to the Timeline panel of the inspector.
+ * @since v8.0.0
+ */
+ timeStamp(label?: string): void;
+ }
+ }
+ var console: console.Console;
+ export = console;
+}
+declare module "console" {
+ import console = require("node:console");
+ export = console;
+}
diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts
new file mode 100644
index 0000000..c24ad98
--- /dev/null
+++ b/node_modules/@types/node/constants.d.ts
@@ -0,0 +1,20 @@
+/**
+ * @deprecated The `node:constants` module is deprecated. When requiring access to constants
+ * relevant to specific Node.js builtin modules, developers should instead refer
+ * to the `constants` property exposed by the relevant module. For instance,
+ * `require('node:fs').constants` and `require('node:os').constants`.
+ */
+declare module "node:constants" {
+ const constants:
+ & typeof import("node:os").constants.dlopen
+ & typeof import("node:os").constants.errno
+ & typeof import("node:os").constants.priority
+ & typeof import("node:os").constants.signals
+ & typeof import("node:fs").constants
+ & typeof import("node:crypto").constants;
+ export = constants;
+}
+declare module "constants" {
+ import constants = require("node:constants");
+ export = constants;
+}
diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts
new file mode 100644
index 0000000..15b46ce
--- /dev/null
+++ b/node_modules/@types/node/crypto.d.ts
@@ -0,0 +1,4065 @@
+/**
+ * The `node:crypto` module provides cryptographic functionality that includes a
+ * set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify
+ * functions.
+ *
+ * ```js
+ * const { createHmac } = await import('node:crypto');
+ *
+ * const secret = 'abcdefg';
+ * const hash = createHmac('sha256', secret)
+ * .update('I love cupcakes')
+ * .digest('hex');
+ * console.log(hash);
+ * // Prints:
+ * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/crypto.js)
+ */
+declare module "node:crypto" {
+ import { NonSharedBuffer } from "node:buffer";
+ import * as stream from "node:stream";
+ import { PeerCertificate } from "node:tls";
+ /**
+ * SPKAC is a Certificate Signing Request mechanism originally implemented by
+ * Netscape and was specified formally as part of HTML5's `keygen` element.
+ *
+ * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects
+ * should not use this element anymore.
+ *
+ * The `node:crypto` module provides the `Certificate` class for working with SPKAC
+ * data. The most common usage is handling output generated by the HTML5 `` element. Node.js uses [OpenSSL's SPKAC
+ * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally.
+ * @since v0.11.8
+ */
+ class Certificate {
+ /**
+ * ```js
+ * const { Certificate } = await import('node:crypto');
+ * const spkac = getSpkacSomehow();
+ * const challenge = Certificate.exportChallenge(spkac);
+ * console.log(challenge.toString('utf8'));
+ * // Prints: the challenge as a UTF8 string
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportChallenge(spkac: BinaryLike): NonSharedBuffer;
+ /**
+ * ```js
+ * const { Certificate } = await import('node:crypto');
+ * const spkac = getSpkacSomehow();
+ * const publicKey = Certificate.exportPublicKey(spkac);
+ * console.log(publicKey);
+ * // Prints: the public key as
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer;
+ /**
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { Certificate } = await import('node:crypto');
+ *
+ * const spkac = getSpkacSomehow();
+ * console.log(Certificate.verifySpkac(Buffer.from(spkac)));
+ * // Prints: true or false
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return `true` if the given `spkac` data structure is valid, `false` otherwise.
+ */
+ static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns The challenge component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportChallenge(spkac: BinaryLike): NonSharedBuffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @param encoding The encoding of the spkac string.
+ * @returns The public key component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns `true` if the given `spkac` data structure is valid,
+ * `false` otherwise.
+ */
+ verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ }
+ namespace constants {
+ // https://nodejs.org/dist/latest-v25.x/docs/api/crypto.html#crypto-constants
+ const OPENSSL_VERSION_NUMBER: number;
+ /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
+ const SSL_OP_ALL: number;
+ /** Instructs OpenSSL to allow a non-[EC]DHE-based key exchange mode for TLS v1.3 */
+ const SSL_OP_ALLOW_NO_DHE_KEX: number;
+ /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
+ /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
+ /** Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER. */
+ const SSL_OP_CISCO_ANYCONNECT: number;
+ /** Instructs OpenSSL to turn on cookie exchange. */
+ const SSL_OP_COOKIE_EXCHANGE: number;
+ /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
+ const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
+ /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
+ const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
+ /** Allows initial connection to servers that do not support RI. */
+ const SSL_OP_LEGACY_SERVER_CONNECT: number;
+ /** Instructs OpenSSL to disable support for SSL/TLS compression. */
+ const SSL_OP_NO_COMPRESSION: number;
+ /** Instructs OpenSSL to disable encrypt-then-MAC. */
+ const SSL_OP_NO_ENCRYPT_THEN_MAC: number;
+ const SSL_OP_NO_QUERY_MTU: number;
+ /** Instructs OpenSSL to disable renegotiation. */
+ const SSL_OP_NO_RENEGOTIATION: number;
+ /** Instructs OpenSSL to always start a new session when performing renegotiation. */
+ const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
+ /** Instructs OpenSSL to turn off SSL v2 */
+ const SSL_OP_NO_SSLv2: number;
+ /** Instructs OpenSSL to turn off SSL v3 */
+ const SSL_OP_NO_SSLv3: number;
+ /** Instructs OpenSSL to disable use of RFC4507bis tickets. */
+ const SSL_OP_NO_TICKET: number;
+ /** Instructs OpenSSL to turn off TLS v1 */
+ const SSL_OP_NO_TLSv1: number;
+ /** Instructs OpenSSL to turn off TLS v1.1 */
+ const SSL_OP_NO_TLSv1_1: number;
+ /** Instructs OpenSSL to turn off TLS v1.2 */
+ const SSL_OP_NO_TLSv1_2: number;
+ /** Instructs OpenSSL to turn off TLS v1.3 */
+ const SSL_OP_NO_TLSv1_3: number;
+ /** Instructs OpenSSL server to prioritize ChaCha20-Poly1305 when the client does. This option has no effect if `SSL_OP_CIPHER_SERVER_PREFERENCE` is not enabled. */
+ const SSL_OP_PRIORITIZE_CHACHA: number;
+ /** Instructs OpenSSL to disable version rollback attack detection. */
+ const SSL_OP_TLS_ROLLBACK_BUG: number;
+ const ENGINE_METHOD_RSA: number;
+ const ENGINE_METHOD_DSA: number;
+ const ENGINE_METHOD_DH: number;
+ const ENGINE_METHOD_RAND: number;
+ const ENGINE_METHOD_EC: number;
+ const ENGINE_METHOD_CIPHERS: number;
+ const ENGINE_METHOD_DIGESTS: number;
+ const ENGINE_METHOD_PKEY_METHS: number;
+ const ENGINE_METHOD_PKEY_ASN1_METHS: number;
+ const ENGINE_METHOD_ALL: number;
+ const ENGINE_METHOD_NONE: number;
+ const DH_CHECK_P_NOT_SAFE_PRIME: number;
+ const DH_CHECK_P_NOT_PRIME: number;
+ const DH_UNABLE_TO_CHECK_GENERATOR: number;
+ const DH_NOT_SUITABLE_GENERATOR: number;
+ const RSA_PKCS1_PADDING: number;
+ const RSA_SSLV23_PADDING: number;
+ const RSA_NO_PADDING: number;
+ const RSA_PKCS1_OAEP_PADDING: number;
+ const RSA_X931_PADDING: number;
+ const RSA_PKCS1_PSS_PADDING: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
+ const RSA_PSS_SALTLEN_DIGEST: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
+ const RSA_PSS_SALTLEN_MAX_SIGN: number;
+ /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
+ const RSA_PSS_SALTLEN_AUTO: number;
+ const POINT_CONVERSION_COMPRESSED: number;
+ const POINT_CONVERSION_UNCOMPRESSED: number;
+ const POINT_CONVERSION_HYBRID: number;
+ /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
+ const defaultCoreCipherList: string;
+ /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
+ const defaultCipherList: string;
+ }
+ interface HashOptions extends stream.TransformOptions {
+ /**
+ * For XOF hash functions such as `shake256`, the
+ * outputLength option can be used to specify the desired output length in bytes.
+ */
+ outputLength?: number | undefined;
+ }
+ /** @deprecated since v10.0.0 */
+ const fips: boolean;
+ /**
+ * Creates and returns a `Hash` object that can be used to generate hash digests
+ * using the given `algorithm`. Optional `options` argument controls stream
+ * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option
+ * can be used to specify the desired output length in bytes.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+ * display the available digest algorithms.
+ *
+ * Example: generating the sha256 sum of a file
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * } from 'node:fs';
+ * import { argv } from 'node:process';
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hash.update(data);
+ * else {
+ * console.log(`${hash.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.92
+ * @param options `stream.transform` options
+ */
+ function createHash(algorithm: string, options?: HashOptions): Hash;
+ /**
+ * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
+ * Optional `options` argument controls stream behavior.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+ * display the available digest algorithms.
+ *
+ * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
+ * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was
+ * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not
+ * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256).
+ *
+ * Example: generating the sha256 HMAC of a file
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * } from 'node:fs';
+ * import { argv } from 'node:process';
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hmac.update(data);
+ * else {
+ * console.log(`${hmac.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
+ // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
+ type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary";
+ type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1";
+ type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2";
+ type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
+ type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
+ /**
+ * The `Hash` class is a utility for creating hash digests of data. It can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed hash digest on the readable side, or
+ * * Using the `hash.update()` and `hash.digest()` methods to produce the
+ * computed hash.
+ *
+ * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hash` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hash.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * }
+ * });
+ *
+ * hash.write('some data to hash');
+ * hash.end();
+ * ```
+ *
+ * Example: Using `Hash` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'node:fs';
+ * import { stdout } from 'node:process';
+ * const { createHash } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hash).setEncoding('hex').pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hash.update()` and `hash.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('some data to hash');
+ * console.log(hash.digest('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * ```
+ * @since v0.1.92
+ */
+ class Hash extends stream.Transform {
+ private constructor();
+ /**
+ * Creates a new `Hash` object that contains a deep copy of the internal state
+ * of the current `Hash` object.
+ *
+ * The optional `options` argument controls stream behavior. For XOF hash
+ * functions such as `'shake256'`, the `outputLength` option can be used to
+ * specify the desired output length in bytes.
+ *
+ * An error is thrown when an attempt is made to copy the `Hash` object after
+ * its `hash.digest()` method has been called.
+ *
+ * ```js
+ * // Calculate a rolling hash.
+ * const {
+ * createHash,
+ * } = await import('node:crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('one');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('two');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('three');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * // Etc.
+ * ```
+ * @since v13.1.0
+ * @param options `stream.transform` options
+ */
+ copy(options?: HashOptions): Hash;
+ /**
+ * Updates the hash content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hash;
+ update(data: string, inputEncoding: Encoding): Hash;
+ /**
+ * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
+ * If `encoding` is provided a string will be returned; otherwise
+ * a `Buffer` is returned.
+ *
+ * The `Hash` object can not be used again after `hash.digest()` method has been
+ * called. Multiple calls will cause an error to be thrown.
+ * @since v0.1.92
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): NonSharedBuffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ /**
+ * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
+ * be used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed HMAC digest on the readable side, or
+ * * Using the `hmac.update()` and `hmac.digest()` methods to produce the
+ * computed HMAC digest.
+ *
+ * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hmac` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hmac.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * }
+ * });
+ *
+ * hmac.write('some data to hash');
+ * hmac.end();
+ * ```
+ *
+ * Example: Using `Hmac` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'node:fs';
+ * import { stdout } from 'node:process';
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hmac).pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hmac.update()` and `hmac.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHmac,
+ * } = await import('node:crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.update('some data to hash');
+ * console.log(hmac.digest('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * ```
+ * @since v0.1.94
+ */
+ class Hmac extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the `Hmac` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hmac;
+ update(data: string, inputEncoding: Encoding): Hmac;
+ /**
+ * Calculates the HMAC digest of all of the data passed using `hmac.update()`.
+ * If `encoding` is
+ * provided a string is returned; otherwise a `Buffer` is returned;
+ *
+ * The `Hmac` object can not be used again after `hmac.digest()` has been
+ * called. Multiple calls to `hmac.digest()` will result in an error being thrown.
+ * @since v0.1.94
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): NonSharedBuffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ type KeyFormat = "pem" | "der" | "jwk";
+ type KeyObjectType = "secret" | "public" | "private";
+ type PublicKeyExportType = "pkcs1" | "spki";
+ type PrivateKeyExportType = "pkcs1" | "pkcs8" | "sec1";
+ type KeyExportOptions =
+ | SymmetricKeyExportOptions
+ | PublicKeyExportOptions
+ | PrivateKeyExportOptions
+ | JwkKeyExportOptions;
+ interface SymmetricKeyExportOptions {
+ format?: "buffer" | undefined;
+ }
+ interface PublicKeyExportOptions {
+ type: T;
+ format: Exclude;
+ }
+ interface PrivateKeyExportOptions {
+ type: T;
+ format: Exclude;
+ cipher?: string | undefined;
+ passphrase?: string | Buffer | undefined;
+ }
+ interface JwkKeyExportOptions {
+ format: "jwk";
+ }
+ interface KeyPairExportOptions<
+ TPublic extends PublicKeyExportType = PublicKeyExportType,
+ TPrivate extends PrivateKeyExportType = PrivateKeyExportType,
+ > {
+ publicKeyEncoding?: PublicKeyExportOptions | JwkKeyExportOptions | undefined;
+ privateKeyEncoding?: PrivateKeyExportOptions | JwkKeyExportOptions | undefined;
+ }
+ type KeyExportResult = T extends { format: infer F extends KeyFormat }
+ ? { der: NonSharedBuffer; jwk: webcrypto.JsonWebKey; pem: string }[F]
+ : Default;
+ interface KeyPairExportResult {
+ publicKey: KeyExportResult;
+ privateKey: KeyExportResult;
+ }
+ type KeyPairExportCallback = (
+ err: Error | null,
+ publicKey: KeyExportResult,
+ privateKey: KeyExportResult,
+ ) => void;
+ type MLDSAKeyType = `ml-dsa-${44 | 65 | 87}`;
+ type MLKEMKeyType = `ml-kem-${1024 | 512 | 768}`;
+ type SLHDSAKeyType = `slh-dsa-${"sha2" | "shake"}-${128 | 192 | 256}${"f" | "s"}`;
+ type AsymmetricKeyType =
+ | "dh"
+ | "dsa"
+ | "ec"
+ | "ed25519"
+ | "ed448"
+ | MLDSAKeyType
+ | MLKEMKeyType
+ | "rsa-pss"
+ | "rsa"
+ | SLHDSAKeyType
+ | "x25519"
+ | "x448";
+ interface AsymmetricKeyDetails {
+ /**
+ * Key size in bits (RSA, DSA).
+ */
+ modulusLength?: number;
+ /**
+ * Public exponent (RSA).
+ */
+ publicExponent?: bigint;
+ /**
+ * Name of the message digest (RSA-PSS).
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1 (RSA-PSS).
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes (RSA-PSS).
+ */
+ saltLength?: number;
+ /**
+ * Size of q in bits (DSA).
+ */
+ divisorLength?: number;
+ /**
+ * Name of the curve (EC).
+ */
+ namedCurve?: string;
+ }
+ /**
+ * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
+ * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject`
+ * objects are not to be created directly using the `new`keyword.
+ *
+ * Most applications should consider using the new `KeyObject` API instead of
+ * passing keys as strings or `Buffer`s due to improved security features.
+ *
+ * `KeyObject` instances can be passed to other threads via `postMessage()`.
+ * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to
+ * be listed in the `transferList` argument.
+ * @since v11.6.0
+ */
+ class KeyObject {
+ private constructor();
+ /**
+ * Example: Converting a `CryptoKey` instance to a `KeyObject`:
+ *
+ * ```js
+ * const { KeyObject } = await import('node:crypto');
+ * const { subtle } = globalThis.crypto;
+ *
+ * const key = await subtle.generateKey({
+ * name: 'HMAC',
+ * hash: 'SHA-256',
+ * length: 256,
+ * }, true, ['sign', 'verify']);
+ *
+ * const keyObject = KeyObject.from(key);
+ * console.log(keyObject.symmetricKeySize);
+ * // Prints: 32 (symmetric key size in bytes)
+ * ```
+ * @since v15.0.0
+ */
+ static from(key: webcrypto.CryptoKey): KeyObject;
+ /**
+ * For asymmetric keys, this property represents the type of the key. See the
+ * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
+ *
+ * This property is `undefined` for unrecognized `KeyObject` types and symmetric
+ * keys.
+ * @since v11.6.0
+ */
+ asymmetricKeyType?: AsymmetricKeyType;
+ /**
+ * This property exists only on asymmetric keys. Depending on the type of the key,
+ * this object contains information about the key. None of the information obtained
+ * through this property can be used to uniquely identify a key or to compromise
+ * the security of the key.
+ *
+ * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence,
+ * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be
+ * set.
+ *
+ * Other key details might be exposed via this API using additional attributes.
+ * @since v15.7.0
+ */
+ asymmetricKeyDetails?: AsymmetricKeyDetails;
+ /**
+ * For symmetric keys, the following encoding options can be used:
+ *
+ * For public keys, the following encoding options can be used:
+ *
+ * For private keys, the following encoding options can be used:
+ *
+ * The result type depends on the selected encoding format, when PEM the
+ * result is a string, when DER it will be a buffer containing the data
+ * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object.
+ *
+ * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are
+ * ignored.
+ *
+ * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of
+ * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be
+ * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for
+ * encrypted private keys. Since PKCS#8 defines its own
+ * encryption mechanism, PEM-level encryption is not supported when encrypting
+ * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for
+ * PKCS#1 and SEC1 encryption.
+ * @since v11.6.0
+ */
+ export(options?: T): KeyExportResult;
+ /**
+ * Returns `true` or `false` depending on whether the keys have exactly the same
+ * type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack).
+ * @since v17.7.0, v16.15.0
+ * @param otherKeyObject A `KeyObject` with which to compare `keyObject`.
+ */
+ equals(otherKeyObject: KeyObject): boolean;
+ /**
+ * For secret keys, this property represents the size of the key in bytes. This
+ * property is `undefined` for asymmetric keys.
+ * @since v11.6.0
+ */
+ symmetricKeySize?: number;
+ /**
+ * Converts a `KeyObject` instance to a `CryptoKey`.
+ * @since 22.10.0
+ */
+ toCryptoKey(
+ algorithm:
+ | webcrypto.AlgorithmIdentifier
+ | webcrypto.RsaHashedImportParams
+ | webcrypto.EcKeyImportParams
+ | webcrypto.HmacImportParams,
+ extractable: boolean,
+ keyUsages: readonly webcrypto.KeyUsage[],
+ ): webcrypto.CryptoKey;
+ /**
+ * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
+ * or `'private'` for private (asymmetric) keys.
+ * @since v11.6.0
+ */
+ type: KeyObjectType;
+ }
+ type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm";
+ type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
+ type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb";
+ type CipherChaCha20Poly1305Types = "chacha20-poly1305";
+ type BinaryLike = string | NodeJS.ArrayBufferView;
+ type CipherKey = BinaryLike | KeyObject;
+ interface CipherCCMOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ interface CipherGCMOptions extends stream.TransformOptions {
+ authTagLength?: number | undefined;
+ }
+ interface CipherOCBOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ interface CipherChaCha20Poly1305Options extends stream.TransformOptions {
+ /** @default 16 */
+ authTagLength?: number | undefined;
+ }
+ /**
+ * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
+ * initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a
+ * given IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createCipheriv(
+ algorithm: CipherCCMTypes,
+ key: CipherKey,
+ iv: BinaryLike,
+ options: CipherCCMOptions,
+ ): CipherCCM;
+ function createCipheriv(
+ algorithm: CipherOCBTypes,
+ key: CipherKey,
+ iv: BinaryLike,
+ options: CipherOCBOptions,
+ ): CipherOCB;
+ function createCipheriv(
+ algorithm: CipherGCMTypes,
+ key: CipherKey,
+ iv: BinaryLike,
+ options?: CipherGCMOptions,
+ ): CipherGCM;
+ function createCipheriv(
+ algorithm: CipherChaCha20Poly1305Types,
+ key: CipherKey,
+ iv: BinaryLike,
+ options?: CipherChaCha20Poly1305Options,
+ ): CipherChaCha20Poly1305;
+ function createCipheriv(
+ algorithm: string,
+ key: CipherKey,
+ iv: BinaryLike | null,
+ options?: stream.TransformOptions,
+ ): Cipheriv;
+ /**
+ * Instances of the `Cipheriv` class are used to encrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain unencrypted
+ * data is written to produce encrypted data on the readable side, or
+ * * Using the `cipher.update()` and `cipher.final()` methods to produce
+ * the encrypted data.
+ *
+ * The {@link createCipheriv} method is
+ * used to create `Cipheriv` instances. `Cipheriv` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Cipheriv` objects as streams:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * // Once we have the key and iv, we can create and use the cipher...
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = '';
+ * cipher.setEncoding('hex');
+ *
+ * cipher.on('data', (chunk) => encrypted += chunk);
+ * cipher.on('end', () => console.log(encrypted));
+ *
+ * cipher.write('some clear text data');
+ * cipher.end();
+ * });
+ * });
+ * ```
+ *
+ * Example: Using `Cipheriv` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'node:fs';
+ *
+ * import {
+ * pipeline,
+ * } from 'node:stream';
+ *
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.js');
+ * const output = createWriteStream('test.enc');
+ *
+ * pipeline(input, cipher, output, (err) => {
+ * if (err) throw err;
+ * });
+ * });
+ * });
+ * ```
+ *
+ * Example: Using the `cipher.update()` and `cipher.final()` methods:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = cipher.update('some clear text data', 'utf8', 'hex');
+ * encrypted += cipher.final('hex');
+ * console.log(encrypted);
+ * });
+ * });
+ * ```
+ * @since v0.1.94
+ */
+ class Cipheriv extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the cipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`,
+ * `TypedArray`, or `DataView`, then `inputEncoding` is ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being
+ * thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the data.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: BinaryLike): NonSharedBuffer;
+ update(data: string, inputEncoding: Encoding): NonSharedBuffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `cipher.final()` method has been called, the `Cipheriv` object can no
+ * longer be used to encrypt data. Attempts to call `cipher.final()` more than
+ * once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): NonSharedBuffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When using block encryption algorithms, the `Cipheriv` class will automatically
+ * add padding to the input data to the appropriate block size. To disable the
+ * default padding call `cipher.setAutoPadding(false)`.
+ *
+ * When `autoPadding` is `false`, the length of the entire input data must be a
+ * multiple of the cipher's block size or `cipher.final()` will throw an error.
+ * Disabling automatic padding is useful for non-standard padding, for instance
+ * using `0x0` instead of PKCS padding.
+ *
+ * The `cipher.setAutoPadding()` method must be called before `cipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(autoPadding?: boolean): this;
+ }
+ interface CipherCCM extends Cipheriv {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ },
+ ): this;
+ getAuthTag(): NonSharedBuffer;
+ }
+ interface CipherGCM extends Cipheriv {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ },
+ ): this;
+ getAuthTag(): NonSharedBuffer;
+ }
+ interface CipherOCB extends Cipheriv {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ },
+ ): this;
+ getAuthTag(): NonSharedBuffer;
+ }
+ interface CipherChaCha20Poly1305 extends Cipheriv {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ },
+ ): this;
+ getAuthTag(): NonSharedBuffer;
+ }
+ /**
+ * Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength` option is not required but can be used to restrict accepted authentication tags
+ * to those with the specified length.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a given
+ * IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createDecipheriv(
+ algorithm: CipherCCMTypes,
+ key: CipherKey,
+ iv: BinaryLike,
+ options: CipherCCMOptions,
+ ): DecipherCCM;
+ function createDecipheriv(
+ algorithm: CipherOCBTypes,
+ key: CipherKey,
+ iv: BinaryLike,
+ options: CipherOCBOptions,
+ ): DecipherOCB;
+ function createDecipheriv(
+ algorithm: CipherGCMTypes,
+ key: CipherKey,
+ iv: BinaryLike,
+ options?: CipherGCMOptions,
+ ): DecipherGCM;
+ function createDecipheriv(
+ algorithm: CipherChaCha20Poly1305Types,
+ key: CipherKey,
+ iv: BinaryLike,
+ options?: CipherChaCha20Poly1305Options,
+ ): DecipherChaCha20Poly1305;
+ function createDecipheriv(
+ algorithm: string,
+ key: CipherKey,
+ iv: BinaryLike | null,
+ options?: stream.TransformOptions,
+ ): Decipheriv;
+ /**
+ * Instances of the `Decipheriv` class are used to decrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain encrypted
+ * data is written to produce unencrypted data on the readable side, or
+ * * Using the `decipher.update()` and `decipher.final()` methods to
+ * produce the unencrypted data.
+ *
+ * The {@link createDecipheriv} method is
+ * used to create `Decipheriv` instances. `Decipheriv` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Decipheriv` objects as streams:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Key length is dependent on the algorithm. In this case for aes192, it is
+ * // 24 bytes (192 bits).
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * let decrypted = '';
+ * decipher.on('readable', () => {
+ * let chunk;
+ * while (null !== (chunk = decipher.read())) {
+ * decrypted += chunk.toString('utf8');
+ * }
+ * });
+ * decipher.on('end', () => {
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * });
+ *
+ * // Encrypted with same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * decipher.write(encrypted, 'hex');
+ * decipher.end();
+ * ```
+ *
+ * Example: Using `Decipheriv` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'node:fs';
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.enc');
+ * const output = createWriteStream('test.js');
+ *
+ * input.pipe(decipher).pipe(output);
+ * ```
+ *
+ * Example: Using the `decipher.update()` and `decipher.final()` methods:
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv,
+ * } = await import('node:crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * // Encrypted using same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * let decrypted = decipher.update(encrypted, 'hex', 'utf8');
+ * decrypted += decipher.final('utf8');
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * ```
+ * @since v0.1.94
+ */
+ class Decipheriv extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the decipher with `data`. If the `inputEncoding` argument is given,
+ * the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
+ * ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
+ * being thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: NodeJS.ArrayBufferView): NonSharedBuffer;
+ update(data: string, inputEncoding: Encoding): NonSharedBuffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `decipher.final()` method has been called, the `Decipheriv` object can
+ * no longer be used to decrypt data. Attempts to call `decipher.final()` more
+ * than once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): NonSharedBuffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
+ * removing padding.
+ *
+ * Turning auto padding off will only work if the input data's length is a
+ * multiple of the ciphers block size.
+ *
+ * The `decipher.setAutoPadding()` method must be called before `decipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(auto_padding?: boolean): this;
+ }
+ interface DecipherCCM extends Decipheriv {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ },
+ ): this;
+ }
+ interface DecipherGCM extends Decipheriv {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ },
+ ): this;
+ }
+ interface DecipherOCB extends Decipheriv {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ },
+ ): this;
+ }
+ interface DecipherChaCha20Poly1305 extends Decipheriv {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ },
+ ): this;
+ }
+ interface PrivateKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: PrivateKeyExportType | undefined;
+ passphrase?: string | Buffer | undefined;
+ encoding?: string | undefined;
+ }
+ interface PublicKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: PublicKeyExportType | undefined;
+ encoding?: string | undefined;
+ }
+ /**
+ * Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKey,
+ * } = await import('node:crypto');
+ *
+ * generateKey('hmac', { length: 512 }, (err, key) => {
+ * if (err) throw err;
+ * console.log(key.export().toString('hex')); // 46e..........620
+ * });
+ * ```
+ *
+ * The size of a generated HMAC key should not exceed the block size of the
+ * underlying hash function. See {@link createHmac} for more information.
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKey(
+ type: "hmac" | "aes",
+ options: {
+ length: number;
+ },
+ callback: (err: Error | null, key: KeyObject) => void,
+ ): void;
+ /**
+ * Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKeySync,
+ * } = await import('node:crypto');
+ *
+ * const key = generateKeySync('hmac', { length: 512 });
+ * console.log(key.export().toString('hex')); // e89..........41e
+ * ```
+ *
+ * The size of a generated HMAC key should not exceed the block size of the
+ * underlying hash function. See {@link createHmac} for more information.
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKeySync(
+ type: "hmac" | "aes",
+ options: {
+ length: number;
+ },
+ ): KeyObject;
+ interface JsonWebKeyInput {
+ key: webcrypto.JsonWebKey;
+ format: "jwk";
+ }
+ /**
+ * Creates and returns a new key object containing a private key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above.
+ *
+ * If the private key is encrypted, a `passphrase` must be specified. The length
+ * of the passphrase is limited to 1024 bytes.
+ * @since v11.6.0
+ */
+ function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a public key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key;
+ * otherwise, `key` must be an object with the properties described above.
+ *
+ * If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
+ *
+ * Because public keys can be derived from private keys, a private key may be
+ * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
+ * returned `KeyObject` will be `'public'` and that the private key cannot be
+ * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned
+ * and it will be impossible to extract the private key from the returned object.
+ * @since v11.6.0
+ */
+ function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a secret key for symmetric
+ * encryption or `Hmac`.
+ * @since v11.6.0
+ * @param encoding The string encoding when `key` is a string.
+ */
+ function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
+ function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
+ /**
+ * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
+ * Optional `options` argument controls the `stream.Writable` behavior.
+ *
+ * In some cases, a `Sign` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ // TODO: signing algorithm type
+ function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
+ type DSAEncoding = "der" | "ieee-p1363";
+ interface SigningOptions {
+ /**
+ * @see crypto.constants.RSA_PKCS1_PADDING
+ */
+ padding?: number | undefined;
+ saltLength?: number | undefined;
+ dsaEncoding?: DSAEncoding | undefined;
+ context?: ArrayBuffer | NodeJS.ArrayBufferView | undefined;
+ }
+ interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
+ interface SignKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
+ interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
+ interface VerifyKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
+ type KeyLike = string | Buffer | KeyObject;
+ /**
+ * The `Sign` class is a utility for generating signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or
+ * * Using the `sign.update()` and `sign.sign()` methods to produce the
+ * signature.
+ *
+ * The {@link createSign} method is used to create `Sign` instances. The
+ * argument is the string name of the hash function to use. `Sign` objects are not
+ * to be created directly using the `new` keyword.
+ *
+ * Example: Using `Sign` and `Verify` objects as streams:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify,
+ * } = await import('node:crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('ec', {
+ * namedCurve: 'sect239k1',
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.write('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey, 'hex');
+ *
+ * const verify = createVerify('SHA256');
+ * verify.write('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature, 'hex'));
+ * // Prints: true
+ * ```
+ *
+ * Example: Using the `sign.update()` and `verify.update()` methods:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify,
+ * } = await import('node:crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('rsa', {
+ * modulusLength: 2048,
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.update('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey);
+ *
+ * const verify = createVerify('SHA256');
+ * verify.update('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature));
+ * // Prints: true
+ * ```
+ * @since v0.1.92
+ */
+ class Sign extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Sign` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): this;
+ update(data: string, inputEncoding: Encoding): this;
+ /**
+ * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ *
+ * The `Sign` object can not be again used after `sign.sign()` method has been
+ * called. Multiple calls to `sign.sign()` will result in an error being thrown.
+ * @since v0.1.92
+ */
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): NonSharedBuffer;
+ sign(
+ privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
+ outputFormat: BinaryToTextEncoding,
+ ): string;
+ }
+ /**
+ * Creates and returns a `Verify` object that uses the given algorithm.
+ * Use {@link getHashes} to obtain an array of names of the available
+ * signing algorithms. Optional `options` argument controls the `stream.Writable` behavior.
+ *
+ * In some cases, a `Verify` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
+ /**
+ * The `Verify` class is a utility for verifying signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream` where written data is used to validate against the
+ * supplied signature, or
+ * * Using the `verify.update()` and `verify.verify()` methods to verify
+ * the signature.
+ *
+ * The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword.
+ *
+ * See `Sign` for examples.
+ * @since v0.1.92
+ */
+ class Verify extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Verify` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `inputEncoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Verify;
+ update(data: string, inputEncoding: Encoding): Verify;
+ /**
+ * Verifies the provided data using the given `object` and `signature`.
+ *
+ * If `object` is not a `KeyObject`, this function behaves as if `object` had been passed to {@link createPublicKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * The `signature` argument is the previously calculated signature for the data, in
+ * the `signatureEncoding`.
+ * If a `signatureEncoding` is specified, the `signature` is expected to be a
+ * string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
+ *
+ * The `verify` object can not be used again after `verify.verify()` has been
+ * called. Multiple calls to `verify.verify()` will result in an error being
+ * thrown.
+ *
+ * Because public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.1.92
+ */
+ verify(
+ object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+ signature: NodeJS.ArrayBufferView,
+ ): boolean;
+ verify(
+ object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+ signature: string,
+ signature_format?: BinaryToTextEncoding,
+ ): boolean;
+ }
+ /**
+ * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
+ * optional specific `generator`.
+ *
+ * The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used.
+ *
+ * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
+ * a `Buffer`, `TypedArray`, or `DataView` is expected.
+ *
+ * If `generatorEncoding` is specified, `generator` is expected to be a string;
+ * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected.
+ * @since v0.11.12
+ * @param primeEncoding The `encoding` of the `prime` string.
+ * @param [generator=2]
+ * @param generatorEncoding The `encoding` of the `generator` string.
+ */
+ function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
+ function createDiffieHellman(
+ prime: ArrayBuffer | NodeJS.ArrayBufferView,
+ generator?: number | ArrayBuffer | NodeJS.ArrayBufferView,
+ ): DiffieHellman;
+ function createDiffieHellman(
+ prime: ArrayBuffer | NodeJS.ArrayBufferView,
+ generator: string,
+ generatorEncoding: BinaryToTextEncoding,
+ ): DiffieHellman;
+ function createDiffieHellman(
+ prime: string,
+ primeEncoding: BinaryToTextEncoding,
+ generator?: number | ArrayBuffer | NodeJS.ArrayBufferView,
+ ): DiffieHellman;
+ function createDiffieHellman(
+ prime: string,
+ primeEncoding: BinaryToTextEncoding,
+ generator: string,
+ generatorEncoding: BinaryToTextEncoding,
+ ): DiffieHellman;
+ /**
+ * The `DiffieHellman` class is a utility for creating Diffie-Hellman key
+ * exchanges.
+ *
+ * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const {
+ * createDiffieHellman,
+ * } = await import('node:crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createDiffieHellman(2048);
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator());
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * // OK
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * ```
+ * @since v0.5.0
+ */
+ class DiffieHellman {
+ private constructor();
+ /**
+ * Generates private and public Diffie-Hellman key values unless they have been
+ * generated or computed already, and returns
+ * the public key in the specified `encoding`. This key should be
+ * transferred to the other party.
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ *
+ * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular,
+ * once a private key has been generated or set, calling this function only updates
+ * the public key but does not generate a new private key.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ generateKeys(): NonSharedBuffer;
+ generateKeys(encoding: BinaryToTextEncoding): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using the specified `inputEncoding`, and secret is
+ * encoded using specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
+ *
+ * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
+ * @since v0.5.0
+ * @param inputEncoding The `encoding` of an `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(
+ otherPublicKey: NodeJS.ArrayBufferView,
+ inputEncoding?: null,
+ outputEncoding?: null,
+ ): NonSharedBuffer;
+ computeSecret(
+ otherPublicKey: string,
+ inputEncoding: BinaryToTextEncoding,
+ outputEncoding?: null,
+ ): NonSharedBuffer;
+ computeSecret(
+ otherPublicKey: NodeJS.ArrayBufferView,
+ inputEncoding: null,
+ outputEncoding: BinaryToTextEncoding,
+ ): string;
+ computeSecret(
+ otherPublicKey: string,
+ inputEncoding: BinaryToTextEncoding,
+ outputEncoding: BinaryToTextEncoding,
+ ): string;
+ /**
+ * Returns the Diffie-Hellman prime in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrime(): NonSharedBuffer;
+ getPrime(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman generator in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getGenerator(): NonSharedBuffer;
+ getGenerator(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman public key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPublicKey(): NonSharedBuffer;
+ getPublicKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman private key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrivateKey(): NonSharedBuffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected
+ * to be a string. If no `encoding` is provided, `publicKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `publicKey` string.
+ */
+ setPublicKey(publicKey: NodeJS.ArrayBufferView): void;
+ setPublicKey(publicKey: string, encoding: BufferEncoding): void;
+ /**
+ * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
+ * to be a string. If no `encoding` is provided, `privateKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ *
+ * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be
+ * used to manually provide the public key or to automatically derive it.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
+ /**
+ * A bit field containing any warnings and/or errors resulting from a check
+ * performed during initialization of the `DiffieHellman` object.
+ *
+ * The following values are valid for this property (as defined in `node:constants` module):
+ *
+ * * `DH_CHECK_P_NOT_SAFE_PRIME`
+ * * `DH_CHECK_P_NOT_PRIME`
+ * * `DH_UNABLE_TO_CHECK_GENERATOR`
+ * * `DH_NOT_SUITABLE_GENERATOR`
+ * @since v0.11.12
+ */
+ verifyError: number;
+ }
+ /**
+ * The `DiffieHellmanGroup` class takes a well-known modp group as its argument.
+ * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation.
+ * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods.
+ *
+ * ```js
+ * const { createDiffieHellmanGroup } = await import('node:crypto');
+ * const dh = createDiffieHellmanGroup('modp1');
+ * ```
+ * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt):
+ * ```bash
+ * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h
+ * modp1 # 768 bits
+ * modp2 # 1024 bits
+ * modp5 # 1536 bits
+ * modp14 # 2048 bits
+ * modp15 # etc.
+ * modp16
+ * modp17
+ * modp18
+ * ```
+ * @since v0.7.5
+ */
+ const DiffieHellmanGroup: DiffieHellmanGroupConstructor;
+ interface DiffieHellmanGroupConstructor {
+ new(name: string): DiffieHellmanGroup;
+ (name: string): DiffieHellmanGroup;
+ readonly prototype: DiffieHellmanGroup;
+ }
+ type DiffieHellmanGroup = Omit;
+ /**
+ * Creates a predefined `DiffieHellmanGroup` key exchange object. The
+ * supported groups are listed in the documentation for `DiffieHellmanGroup`.
+ *
+ * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
+ * the keys (with `diffieHellman.setPublicKey()`, for example). The
+ * advantage of using this method is that the parties do not have to
+ * generate nor exchange a group modulus beforehand, saving both processor
+ * and communication time.
+ *
+ * Example (obtaining a shared secret):
+ *
+ * ```js
+ * const {
+ * getDiffieHellman,
+ * } = await import('node:crypto');
+ * const alice = getDiffieHellman('modp14');
+ * const bob = getDiffieHellman('modp14');
+ *
+ * alice.generateKeys();
+ * bob.generateKeys();
+ *
+ * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
+ * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex');
+ *
+ * // aliceSecret and bobSecret should be the same
+ * console.log(aliceSecret === bobSecret);
+ * ```
+ * @since v0.7.5
+ */
+ function getDiffieHellman(groupName: string): DiffieHellmanGroup;
+ /**
+ * An alias for {@link getDiffieHellman}
+ * @since v0.9.3
+ */
+ function createDiffieHellmanGroup(name: string): DiffieHellmanGroup;
+ /**
+ * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`.
+ *
+ * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set;
+ * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be
+ * thrown if any of the input arguments specify invalid values or types.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2,
+ * } = await import('node:crypto');
+ *
+ * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ * @since v0.5.5
+ */
+ function pbkdf2(
+ password: BinaryLike,
+ salt: BinaryLike,
+ iterations: number,
+ keylen: number,
+ digest: string,
+ callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
+ ): void;
+ /**
+ * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`.
+ *
+ * If an error occurs an `Error` will be thrown, otherwise the derived key will be
+ * returned as a `Buffer`.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2Sync,
+ * } = await import('node:crypto');
+ *
+ * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
+ * console.log(key.toString('hex')); // '3745e48...08d59ae'
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ * @since v0.9.3
+ */
+ function pbkdf2Sync(
+ password: BinaryLike,
+ salt: BinaryLike,
+ iterations: number,
+ keylen: number,
+ digest: string,
+ ): NonSharedBuffer;
+ /**
+ * Generates cryptographically strong pseudorandom data. The `size` argument
+ * is a number indicating the number of bytes to generate.
+ *
+ * If a `callback` function is provided, the bytes are generated asynchronously
+ * and the `callback` function is invoked with two arguments: `err` and `buf`.
+ * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomBytes,
+ * } = await import('node:crypto');
+ *
+ * randomBytes(256, (err, buf) => {
+ * if (err) throw err;
+ * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * });
+ * ```
+ *
+ * If the `callback` function is not provided, the random bytes are generated
+ * synchronously and returned as a `Buffer`. An error will be thrown if
+ * there is a problem generating the bytes.
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomBytes,
+ * } = await import('node:crypto');
+ *
+ * const buf = randomBytes(256);
+ * console.log(
+ * `${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * ```
+ *
+ * The `crypto.randomBytes()` method will not complete until there is
+ * sufficient entropy available.
+ * This should normally never take longer than a few milliseconds. The only time
+ * when generating the random bytes may conceivably block for a longer period of
+ * time is right after boot, when the whole system is still low on entropy.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomBytes()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomBytes` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v0.5.8
+ * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
+ * @return if the `callback` function is not provided.
+ */
+ function randomBytes(size: number): NonSharedBuffer;
+ function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void;
+ function pseudoRandomBytes(size: number): NonSharedBuffer;
+ function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void;
+ /**
+ * Return a random integer `n` such that `min <= n < max`. This
+ * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
+ *
+ * The range (`max - min`) must be less than 2**48. `min` and `max` must
+ * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
+ *
+ * If the `callback` function is not provided, the random integer is
+ * generated synchronously.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomInt,
+ * } = await import('node:crypto');
+ *
+ * randomInt(3, (err, n) => {
+ * if (err) throw err;
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * });
+ * ```
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomInt,
+ * } = await import('node:crypto');
+ *
+ * const n = randomInt(3);
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * ```
+ *
+ * ```js
+ * // With `min` argument
+ * const {
+ * randomInt,
+ * } = await import('node:crypto');
+ *
+ * const n = randomInt(1, 7);
+ * console.log(`The dice rolled: ${n}`);
+ * ```
+ * @since v14.10.0, v12.19.0
+ * @param [min=0] Start of random range (inclusive).
+ * @param max End of random range (exclusive).
+ * @param callback `function(err, n) {}`.
+ */
+ function randomInt(max: number): number;
+ function randomInt(min: number, max: number): number;
+ function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
+ function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
+ /**
+ * Synchronous version of {@link randomFill}.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFillSync } = await import('node:crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * console.log(randomFillSync(buf).toString('hex'));
+ *
+ * randomFillSync(buf, 5);
+ * console.log(buf.toString('hex'));
+ *
+ * // The above is equivalent to the following:
+ * randomFillSync(buf, 5, 5);
+ * console.log(buf.toString('hex'));
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFillSync } = await import('node:crypto');
+ *
+ * const a = new Uint32Array(10);
+ * console.log(Buffer.from(randomFillSync(a).buffer,
+ * a.byteOffset, a.byteLength).toString('hex'));
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * console.log(Buffer.from(randomFillSync(b).buffer,
+ * b.byteOffset, b.byteLength).toString('hex'));
+ *
+ * const c = new ArrayBuffer(10);
+ * console.log(Buffer.from(randomFillSync(c)).toString('hex'));
+ * ```
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @return The object passed as `buffer` argument.
+ */
+ function randomFillSync(buffer: T, offset?: number, size?: number): T;
+ /**
+ * This function is similar to {@link randomBytes} but requires the first
+ * argument to be a `Buffer` that will be filled. It also
+ * requires that a callback is passed in.
+ *
+ * If the `callback` function is not provided, an error will be thrown.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFill } = await import('node:crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * randomFill(buf, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * randomFill(buf, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * // The above is equivalent to the following:
+ * randomFill(buf, 5, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`.
+ *
+ * While this includes instances of `Float32Array` and `Float64Array`, this
+ * function should not be used to generate random floating-point numbers. The
+ * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array
+ * contains finite numbers only, they are not drawn from a uniform random
+ * distribution and have no meaningful lower or upper bounds.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ * const { randomFill } = await import('node:crypto');
+ *
+ * const a = new Uint32Array(10);
+ * randomFill(a, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * randomFill(b, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const c = new ArrayBuffer(10);
+ * randomFill(c, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf).toString('hex'));
+ * });
+ * ```
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomFill()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomFill` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @param callback `function(err, buf) {}`.
+ */
+ function randomFill(
+ buffer: T,
+ callback: (err: Error | null, buf: T) => void,
+ ): void;
+ function randomFill(
+ buffer: T,
+ offset: number,
+ callback: (err: Error | null, buf: T) => void,
+ ): void;
+ function randomFill(
+ buffer: T,
+ offset: number,
+ size: number,
+ callback: (err: Error | null, buf: T) => void,
+ ): void;
+ interface ScryptOptions {
+ cost?: number | undefined;
+ blockSize?: number | undefined;
+ parallelization?: number | undefined;
+ N?: number | undefined;
+ r?: number | undefined;
+ p?: number | undefined;
+ maxmem?: number | undefined;
+ }
+ /**
+ * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the
+ * callback as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * } = await import('node:crypto');
+ *
+ * // Using the factory defaults.
+ * scrypt('password', 'salt', 64, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * // Using a custom N parameter. Must be a power of two.
+ * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
+ * });
+ * ```
+ * @since v10.5.0
+ */
+ function scrypt(
+ password: BinaryLike,
+ salt: BinaryLike,
+ keylen: number,
+ callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
+ ): void;
+ function scrypt(
+ password: BinaryLike,
+ salt: BinaryLike,
+ keylen: number,
+ options: ScryptOptions,
+ callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
+ ): void;
+ /**
+ * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * An exception is thrown when key derivation fails, otherwise the derived key is
+ * returned as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scryptSync,
+ * } = await import('node:crypto');
+ * // Using the factory defaults.
+ *
+ * const key1 = scryptSync('password', 'salt', 64);
+ * console.log(key1.toString('hex')); // '3745e48...08d59ae'
+ * // Using a custom N parameter. Must be a power of two.
+ * const key2 = scryptSync('password', 'salt', 64, { N: 1024 });
+ * console.log(key2.toString('hex')); // '3745e48...aa39b34'
+ * ```
+ * @since v10.5.0
+ */
+ function scryptSync(
+ password: BinaryLike,
+ salt: BinaryLike,
+ keylen: number,
+ options?: ScryptOptions,
+ ): NonSharedBuffer;
+ interface RsaPublicKey {
+ key: KeyLike;
+ padding?: number | undefined;
+ }
+ interface RsaPrivateKey {
+ key: KeyLike;
+ passphrase?: string | undefined;
+ /**
+ * @default 'sha1'
+ */
+ oaepHash?: string | undefined;
+ oaepLabel?: NodeJS.TypedArray | undefined;
+ padding?: number | undefined;
+ }
+ /**
+ * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
+ * the corresponding private key, for example using {@link privateDecrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.11.14
+ */
+ function publicEncrypt(
+ key: RsaPublicKey | RsaPrivateKey | KeyLike,
+ buffer: NodeJS.ArrayBufferView | string,
+ ): NonSharedBuffer;
+ /**
+ * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
+ * the corresponding private key, for example using {@link privateEncrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v1.1.0
+ */
+ function publicDecrypt(
+ key: RsaPublicKey | RsaPrivateKey | KeyLike,
+ buffer: NodeJS.ArrayBufferView | string,
+ ): NonSharedBuffer;
+ /**
+ * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
+ * the corresponding public key, for example using {@link publicEncrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
+ * @since v0.11.14
+ */
+ function privateDecrypt(
+ privateKey: RsaPrivateKey | KeyLike,
+ buffer: NodeJS.ArrayBufferView | string,
+ ): NonSharedBuffer;
+ /**
+ * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
+ * the corresponding public key, for example using {@link publicDecrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
+ * @since v1.1.0
+ */
+ function privateEncrypt(
+ privateKey: RsaPrivateKey | KeyLike,
+ buffer: NodeJS.ArrayBufferView | string,
+ ): NonSharedBuffer;
+ /**
+ * ```js
+ * const {
+ * getCiphers,
+ * } = await import('node:crypto');
+ *
+ * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array with the names of the supported cipher algorithms.
+ */
+ function getCiphers(): string[];
+ /**
+ * ```js
+ * const {
+ * getCurves,
+ * } = await import('node:crypto');
+ *
+ * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...]
+ * ```
+ * @since v2.3.0
+ * @return An array with the names of the supported elliptic curves.
+ */
+ function getCurves(): string[];
+ /**
+ * @since v10.0.0
+ * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}.
+ */
+ function getFips(): 1 | 0;
+ /**
+ * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build.
+ * Throws an error if FIPS mode is not available.
+ * @since v10.0.0
+ * @param bool `true` to enable FIPS mode.
+ */
+ function setFips(bool: boolean): void;
+ /**
+ * ```js
+ * const {
+ * getHashes,
+ * } = await import('node:crypto');
+ *
+ * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms.
+ */
+ function getHashes(): string[];
+ /**
+ * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH)
+ * key exchanges.
+ *
+ * Instances of the `ECDH` class can be created using the {@link createECDH} function.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const {
+ * createECDH,
+ * } = await import('node:crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createECDH('secp521r1');
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createECDH('secp521r1');
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * // OK
+ * ```
+ * @since v0.11.14
+ */
+ class ECDH {
+ private constructor();
+ /**
+ * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the
+ * format specified by `format`. The `format` argument specifies point encoding
+ * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is
+ * interpreted using the specified `inputEncoding`, and the returned key is encoded
+ * using the specified `outputEncoding`.
+ *
+ * Use {@link getCurves} to obtain a list of available curve names.
+ * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
+ * the name and description of each available elliptic curve.
+ *
+ * If `format` is not specified the point will be returned in `'uncompressed'` format.
+ *
+ * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
+ *
+ * Example (uncompressing a key):
+ *
+ * ```js
+ * const {
+ * createECDH,
+ * ECDH,
+ * } = await import('node:crypto');
+ *
+ * const ecdh = createECDH('secp256k1');
+ * ecdh.generateKeys();
+ *
+ * const compressedKey = ecdh.getPublicKey('hex', 'compressed');
+ *
+ * const uncompressedKey = ECDH.convertKey(compressedKey,
+ * 'secp256k1',
+ * 'hex',
+ * 'hex',
+ * 'uncompressed');
+ *
+ * // The converted key and the uncompressed public key should be the same
+ * console.log(uncompressedKey === ecdh.getPublicKey('hex'));
+ * ```
+ * @since v10.0.0
+ * @param inputEncoding The `encoding` of the `key` string.
+ * @param outputEncoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ static convertKey(
+ key: BinaryLike,
+ curve: string,
+ inputEncoding?: BinaryToTextEncoding,
+ outputEncoding?: "latin1" | "hex" | "base64" | "base64url",
+ format?: "uncompressed" | "compressed" | "hybrid",
+ ): NonSharedBuffer | string;
+ /**
+ * Generates private and public EC Diffie-Hellman key values, and returns
+ * the public key in the specified `format` and `encoding`. This key should be
+ * transferred to the other party.
+ *
+ * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ generateKeys(): NonSharedBuffer;
+ generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using specified `inputEncoding`, and the returned secret
+ * is encoded using the specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
+ *
+ * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
+ *
+ * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is
+ * usually supplied from a remote user over an insecure network,
+ * be sure to handle this exception accordingly.
+ * @since v0.11.14
+ * @param inputEncoding The `encoding` of the `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView): NonSharedBuffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): NonSharedBuffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(
+ otherPublicKey: string,
+ inputEncoding: BinaryToTextEncoding,
+ outputEncoding: BinaryToTextEncoding,
+ ): string;
+ /**
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @return The EC Diffie-Hellman in the specified `encoding`.
+ */
+ getPrivateKey(): NonSharedBuffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
+ */
+ getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer;
+ getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Sets the EC Diffie-Hellman private key.
+ * If `encoding` is provided, `privateKey` is expected
+ * to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
+ *
+ * If `privateKey` is not valid for the curve specified when the `ECDH` object was
+ * created, an error is thrown. Upon setting the private key, the associated
+ * public point (key) is also generated and set in the `ECDH` object.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
+ }
+ /**
+ * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
+ * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent
+ * OpenSSL releases, `openssl ecparam -list_curves` will also display the name
+ * and description of each available elliptic curve.
+ * @since v0.11.14
+ */
+ function createECDH(curveName: string): ECDH;
+ /**
+ * This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time
+ * algorithm.
+ *
+ * This function does not leak timing information that
+ * would allow an attacker to guess one of the values. This is suitable for
+ * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
+ *
+ * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
+ * must have the same byte length. An error is thrown if `a` and `b` have
+ * different byte lengths.
+ *
+ * If at least one of `a` and `b` is a `TypedArray` with more than one byte per
+ * entry, such as `Uint16Array`, the result will be computed using the platform
+ * byte order.
+ *
+ * **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754**
+ * **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point**
+ * **numbers `x` and `y` are equal.**
+ *
+ * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
+ * is timing-safe. Care should be taken to ensure that the surrounding code does
+ * not introduce timing vulnerabilities.
+ * @since v6.6.0
+ */
+ function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
+ interface DHKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
+ /**
+ * The prime parameter
+ */
+ prime?: Buffer | undefined;
+ /**
+ * Prime length in bits
+ */
+ primeLength?: number | undefined;
+ /**
+ * Custom generator
+ * @default 2
+ */
+ generator?: number | undefined;
+ /**
+ * Diffie-Hellman group name
+ * @see {@link getDiffieHellman}
+ */
+ groupName?: string | undefined;
+ }
+ interface DSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ }
+ interface ECKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8" | "sec1"> {
+ /**
+ * Name of the curve to use
+ */
+ namedCurve: string;
+ /**
+ * Must be `'named'` or `'explicit'`
+ * @default 'named'
+ */
+ paramEncoding?: "explicit" | "named" | undefined;
+ }
+ interface ED25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+ interface ED448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+ interface MLDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+ interface MLKEMKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+ interface RSAPSSKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string | undefined;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string | undefined;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string | undefined;
+ }
+ interface RSAKeyPairOptions extends KeyPairExportOptions<"pkcs1" | "spki", "pkcs1" | "pkcs8"> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ }
+ interface SLHDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+ interface X25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+ interface X448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+ /**
+ * Generates a new asymmetric key pair of the given `type`. See the
+ * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * When encoding public keys, it is recommended to use `'spki'`. When encoding
+ * private keys, it is recommended to use `'pkcs8'` with a strong passphrase,
+ * and to keep the passphrase confidential.
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * } = await import('node:crypto');
+ *
+ * const {
+ * publicKey,
+ * privateKey,
+ * } = generateKeyPairSync('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem',
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret',
+ * },
+ * });
+ * ```
+ *
+ * The return value `{ publicKey, privateKey }` represents the generated key pair.
+ * When PEM encoding was selected, the respective key will be a string, otherwise
+ * it will be a buffer containing the data encoded as DER.
+ * @since v10.12.0
+ * @param type The asymmetric key type to generate. See the
+ * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
+ */
+ function generateKeyPairSync(
+ type: "dh",
+ options: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: "dsa",
+ options: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: "ec",
+ options: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: "ed25519",
+ options?: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: "ed448",
+ options?: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: MLDSAKeyType,
+ options?: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: MLKEMKeyType,
+ options?: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: "rsa-pss",
+ options: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: "rsa",
+ options: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: SLHDSAKeyType,
+ options?: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: "x25519",
+ options?: T,
+ ): KeyPairExportResult;
+ function generateKeyPairSync(
+ type: "x448",
+ options?: T,
+ ): KeyPairExportResult;
+ /**
+ * Generates a new asymmetric key pair of the given `type`. See the
+ * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage:
+ *
+ * ```js
+ * const {
+ * generateKeyPair,
+ * } = await import('node:crypto');
+ *
+ * generateKeyPair('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem',
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret',
+ * },
+ * }, (err, publicKey, privateKey) => {
+ * // Handle errors and use the generated key pair.
+ * });
+ * ```
+ *
+ * On completion, `callback` will be called with `err` set to `undefined` and `publicKey` / `privateKey` representing the generated key pair.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
+ * @since v10.12.0
+ * @param type The asymmetric key type to generate. See the
+ * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
+ */
+ function generateKeyPair(
+ type: "dh",
+ options: T,
+ callback: KeyPairExportCallback,
+ ): void;
+ function generateKeyPair