Skip to content
Permalink
Browse files

Update from synopse/mORMot (#3)

* inherit TSQLMonitorUsage from TSQLRecordNoCaseExtended
to optimize stored content

* new TSynMonitorUsageRest.ProcessIDShift and optional Batch support

* several fixes to TSynMonitorUsage/TSynMonitorUsageRest

* WIP: slow any base64 buffer decoder

* fast version of fail tolerant base64toBin

* remove unused parameter in anyBase64toBin

* optimized VariantToBoolean(null)

* fixed THttpRequest.Create when aIgnoreSSLCertificateErrors is true

* fix unmapping memory mapped files for Unix

* small optimization of TPdfEncryptionRC4MD5.EncodeBuffer

* tuning of TServiceCustomAnswer content SOA logging

* fixed regression after last commit

* several fixes for Delphi 10.3 Rio compatibility

* SyNode: Embadding JavaScript files into executable as a resources

* TCurlHTTP: remove 1 second delay on non-GET requests by disabling sending of 'Expect: 100-continue' HTTP header

* avoid potential AV in curl.slist_append

* fixed potential GPF in latest pull request

* new SynDaemonIntercept function and SynDaemonTerminated flag

* New functions GetProcessInfo to collect more detailed info about Windows processes

* published TDynArrayHashed.ElemPtr/ElemCopyAt methods for Unicode Delphi

* documentation update

* enhanced items per second display during performance tests

* new TSynDaemon.ConsoleMode property

* mast TSynLog constructor as virtual

* TextColor - prevent unnecessary syscalls and made 'thread safe'

* Fixed a bug in TPropInfo.GetVariant handling of tkDynArray. Result from GetOrdProp was being erroneously dereferenced before being passed to TDocVariantData.InitArrayFromObjArray.

* StrLenSSE42 & StcCompSSE42 available only if HASAESIN is defined

* fix access to memory we do not write to in UnCamelCase(D,P)

* add tip about disabling HASAESNI in case testing with valgrind

* add +x permission to SQLite3/build-fpc-linux64.sh and remove #13 in Shebang

* return back call to ioresult to reset a global InOutRes to 0

* add idents (git diff -w can be used to see only valuable changes)

* updated SQLite3 engine to latest version 3.26.0

* fixed TJSONSerializer.RegisterCustomSerializerFieldNames
- thanks mohsenti for the patch!

* fixed potential GPF in TSQLRestStorage classes when no server is supplied
(fallback to an owned model instance instead of an hypothetical/ephemeral external server)

* avoid wrongly deleted content with FillZero(RawUTF8/RawByteString)

* fixed TSynAnsiConvert.AnsiBufferToUnicode for FPC/POSIX

* new functions to handle unquoting CSV strings

* Bug fix for broken quoted string (return empty string for such case) and tests.

* Fix Delphi compilation

* WIP: get a low level connection ID from reverse proxy server header

* Use GetNextItemUInt64 instead of SynCommons.GetInt64 + compare RemoteConnectionID <> 0 instead of >0

* WIP: initial support for Unix Domain Socket

* fix Windows build (AF_UNIX is not defined under Win)

* Lazarus project for 36-RestBenchmark

* enhance Sample36 by UnixDomainSocket

* UnixDomainSocket support for TCurlHTTP

* prevent redefining of prototype props in descendants

* SyNode: new function TSMEngine.CallObjectFunctionVal + use this function for call timerLoop. A small optimization as a result

* fix Windows build

* some minor (mostly documentation) enhancements

* after latest merges, fixes for compilation on all targets
(especially old Delphi compilers)

* fixed TTestExternalDatabase.AutoAdaptSQL regression tests
(low-level hooks were not working any more due to some code sanitation)

* propagate RemoteIPHeader & RemoteConnIDHeader to HttpApi server clones

* propagate RemoteIPHeader & RemoteConnIDHeader to HttpApi server clones
- from #165

* enhanced TIntelCpuFeatures with latest CPUID flags

* new GetDiskPartitions/GetDiskPartitionsText functions

* added aThreadName parameter to TSynLogFamily.OnBeforeException callback

* published PDynArrayRec to allow TDynArray.GetCount inlining

* new TSynLogFamily.WithInstancePointer property
to optionally reduce log verbosity

* exceptions will log the current thread name

* optionally include the free disk space to GetDiskPartitionsText()
- used for remote REST status of the serve too

* json serializer adds a T00:00Z to dates without in UTC0 timezone to allow FireFox propertyly decode a Date object

* introducing low-level GetMemoryInfo() API function

* GetMemoryInfo/TSynMonitorMemory won't return FastMM4 values
but OS returned values by default

* introducing TMatch.PrepareRaw method and published some TMatch properties

* new IsCaseSensitive() function

* initialize a DayOfWeek by 0 in GetNowUTCSystem

* minor refactoring of SynCrtSock (no functional change)
- mainly about performance and Kylix compatibility

* fixed Delphi 10.3 MainDemo compilation

* TSynTempBuffer.Init and TSQLTableJSON will always allocate 16 more bytes than required
- for a trailing #0 and to ensure our (e.g. TDocVariant) fast JSON parsing won't trigger any GPF (since it may read up to 4 bytes ahead via its PInteger() trick) or any SSE4.2 function applied on the buffer
- fix for #168
- also fixed other potential buffer overflows (especially in TTextWriter)

* please some paranoid valgrid expectations
for #168

* include method and uri to ECurlHTTP message

* new %L format specifier for ScanUTF8()

* fixed Delphi compilation
- sounds like if we really spend all our time in FPC/Lazarus now :)

* for FPC result of TPrecisionTimer.ProfileCurrentMethod should be assigned to local var

* happy new year 2019 ! :)

* fix typo in doc

* prevent raising of Overflow exception in case project is compiled with -Co flag

* some missing files for 2019

* too low coffee level - messed up last commit ;)

* new TSynSystemTime.ToDateTime method

* slight optimizations in the HTTP socket server
- no functional change

* ensure SynFPCLinux uses the regular Synopse.inc conditionals

* fixed SortDynArrayString on Delphi 2009+ (circumvent RTL's SysUtils.StrComp bug)

* proper detection of Windows Server 2019 edition

* exclude UID from stackoverflow.com links comments

* minor refactoring and fixes to mORMotReport.pas - no functional change

* new TExprParserMatch class for efficient search expression parsing

* fixed TQueryValue.AsVariant problem under FPC on empty string

* disable double quotes for TExprParserMatch
(it was not working anway)

* fixed IsCaseSensitive() to work as expected
- it was working like a IsUpperCase() function

* new TMatch.PrepareContains method and several optimizations to TMatch search

* enhanced TExprParserAbstract and TExprParserMatch implementation

* some TMatch fix for Delphi Win64

* udpated documentation about JWT auth

* fixed Delphi 6 compilation

* PasZip FPC/Linux compatibility and x86-64 performance fix

* fixed reference-counting in TJSONCustomParserRTTI.FinalizeNestedArray
- thanks maciej for the feedback!

* huge performance boost with TMatch.PrepareContains
by using Holub and Durian (2005) SBNDM2 algorithm for 2..31 long patterns

* optimized case-insensitive TMatch '*pattern*' search

* introducing TParserAbstract to allow any kind of expression parsers
(e.g. SQL evaluator)

* overloaded ToUTF8(TExprParserResult) function

* marked TSQLRestServerURIContext.AuthenticationCheck as virtual

* introducing TExprNodeWordAbstract.ParseWord virtual method

* optimized GetExtended() for FPC/x86-64

* x3 speedup of TMatch.PrepareContains(aCaseInsensitive=true) process

* ensure proper x86_64 registers use on some functions

* TExprParserMatch refactoring

* introducing BufferLineLength() fast function

* introducing PosExChar() fast function

* fixed typo in latest commit

* several fixes to BufferLineLength()
- with associated regression tests

* circumvent some Delphi compilation bugs

* some comments changes - no function modification

* minor changes to DateTimeToUnixMSTime() and GetExtended()

* specificaly implement pattern='' for TMatch

* new OS_INITIAL[] constants

* added explicit regression test for RecordSave() with a void dynamic array field

* new RecordSaveBytes() function

* some RecordSaveBase64/RecordLoadBase64 and similar optimizations

* comments fixes - no functional change

* ensure TCurlHTTP handles connection timeout parameter
- was left to the default libcurl value i.e. 300 seconds = 5 minutes!

* fixed TSynMonitorMemory.PhysicalMemoryTotal

* refactored TSynMonitorSize / TSynMonitorMemory / GetDiskPartitionsText
to allow shorter text without spaces

* new overloaded IsValidUTF8() functions

* add aIgnoreAnyException param to TSQLRestClientURI.ServiceRegister/ServiceDefine
so that TSQLRestClientURI.ServiceDefineSharedAPI works as expected

* introducing NOHTTPCLIENTWEBSOCKETS conditional

* use libcurl API to retrieve the error message

* renamed THttpSocket.HeaderValue to THttpSocket.HeaderGetValue
due to the parameter now required to be uppercased
- also several fixes and optimizations to the HTTP layer (e.g. about RemoteIPHeader)

* another fix about aIgnoreAnyException support

* new LogEscapeFull() overloaded functions

* several fixes to SynCrtSock, especially for Windows
- after instrumenting the code to add low-level logs, and spent the whole day examining the results on real-world production code
- there is still an unexpected problem sometimes with the TWinHttp client in some very obscure condition

* TRawByteStringGroup will now have on demand compaction
- also refactored to fix some potential GPF issues

* fixes for GetDiskPartitions/GetDiskPartitionsText

* fixed TSQLRest.OneFieldValues(TInt64DynArray) about "where" clause parsing

* new DDDNOSYNDB and DDDNOMONGODB to reduce the units linked by dddInfraSettings

* fixed DDDNOSYNDB process

* new ToText(TOperatingSystemVersion) and TrimLeftLowercaseToShort() functions

* enhanced TTextWriter + new ToTextOS() function

* TDynArray documentation precision - no functional change

* alllow days time unit in MicroSecToString()

* fixed MicroSecToString() with days unit
- includes associated regression tests

* fixed Darwin (OSX) compilation

* properly fix auxiliary columns in TSQLRecordRTree/TSQLRecordRTreeInteger
- latest pull request was breaking existing non RTree fields standard with '_'

* new TSynDictionary.FindKeyFromValue method

* includes regression tests for new TSynDictionary.FindKeyFromValue method

* allow some missing fields in the TSQLTableJSON input expanded objects

* added fmShareDenyWrite to TTextWriter.CreateOwnedFileStream flags

* new MatchAny() function

* prevern send Content-Type: STATICFILE header

* add optional BufferSize parameter to TSQLTable.GetJSONValues and TSQLRestBatch.Create
- default TSQLRestBatch value of 4KB is clearly underestimated

* new TFileVersion.UserAgent method

* enhanced THttpRequest and TSQLHttpClientGeneric

* avoid some unexpected Delphi compiler hints

* new TSQLTable.FieldAsString() overloaded methods

* more aggressive auto-resize of TTextWriter internal buffer
to use 1MB when 40MB is reached (instead of 64KB)

* Update SynWinSock.pas

* overloaded AddInteger/AddInt64 functions to append two dynamic arrays

* new TAlgoCompress.UncompressedSize class method

* new overloaded TDynArray.Sort with TEventDynArraySortCompare comparer

* new IsDirectoryWritable() function

* TSynDaemonSettings will ensure that /var/log folder is writable

* ensure GetSystemPath(spUserData) will return ~/.cache/appname for POSIX
- also used for spLog as fallback if neither /var/log nor the executable folder is writable

* use recursion only for smaller range on all QuickSort functions
- thanks Maciej for the tip!
see https://github.com/maciej-izak/generics.collections/blob/master/src/generics.collections.pas#L999-L1044

* ensure the TDynArray.Sorted flag is set by Sort() not by SortRange()

* made TSynPersistentLock and TSynPersistentLocked aliases
since allocated PSynLocker on heap is no overhead in comparison to maintaining a lock

* new TSynLogFamily.OnThreadEnded method

* new TSynQueue.WaitPop/WaitPopFinalize methods

* enhanced TSynQueue.WaitPopFinalize

* try to return a correct folder for logs under Windows

* do not override FPC $hints value (which is commonly disabled)

* introducing TSynQueue.WaitPeekLocked method

* refactoring to fix "Times" embedded font naming

* new overloaded IPToCardinal() function, and CompareFloat/CompareInt64 comparators

* optimized PosEx() pure pascal version - especially for FPC x86_64

* updated SQLite3 engine to latest version 3.27.1

* fixed FTS RANK execution for Delphi Win32

* updated documentation - mainly about TSynDictionary

* made TSynLog.FamilyCreate thread-safe in all cases

* made TSQLRecordProperties and T*AutoCreateFields initialization thread-safe in all cases

* ensure PatchCode() will work even if OS memory page size is not 4KB

* fixed SHA256/x64-SSE4.1 process using new GetMemAligned() function

* introducing SynFPCCMemAligned unit

* small refactoring after latest changes - no functional modification

* small refactoring of TSHA384/TSHA512 - no functional modification

* SynFPCCMemAligned will make no overhead any more - but will be for Linux only

* optimized TDynArray.InternalSetLength

* introducing SynTBB unit and FPC_SYNTBB conditional for FPC + Intel TBB malloc use
(tested on Linux x86_64 for server-side multi-threaded performance)

* small optimization of SynFPCCMemAligned via direct glibc malloc/free calls

* allows SynFPCCMemAligned to use either glibc, Intel TBB or jemalloc libraires

* tuned heap manager identifier in SYNOPSE_FRAMEWORK_FULLVERSION

* new TSynSystemTime.ToNCSAText method

* new TPrecisionTimer.SizePerSec method

* new OnMainThreadIdle optional parameter to TSynParallelProcess.ParallelRunAndWait
- to allow e.g. direct call from the UI thread

* fixed TWrapperContext.CreateFromModel
- thanks EMartin for the patch!

* preliminary (beta state) Swagger support

* Socket HTTP Server refactoring for better performance and stability
- mainly reducing and tuning system calls, locks and CLOCK_MONOTONIC_COARSE

* new CMDLINESWITCH cross-platform constant

* tuned documentation about crc32c() to avoid confusion with plain zlib's crc()

* fixed Windows compilation

* new TAlgoCompress.Algo overloaded method

* TPrecisionTimer optimizations (mainly for FPC on Linux/BSD/Darwin)

* ensure our faster GetTickCount64 using CLOCK_MONOTONIC_COARSE is called

* refactored TPrecisionTimer for consistency

* ensure TSynLog will call QueryPerformanceCounterMicroSeconds on Linux/POSIX

* renamed QueryPerformanceCounterMicroSeconds() as QueryPerformanceMicroSeconds()

* new "auth" optional parameter to HttpPost()

* updated sqlite3-64.dll binary stored in repo

* updated documentation, mainly about installation process

* updated SourceCodeRep internal tool with latest fossil build

* optimized sorting of pointer-sized array

* try to fix unexpected problems in TAESPRNG.RandomExt with FPC/Win64

* documentation updates

* added "description" field to Swagger SOA template

* minor refactoring - no functional change

* optional BufferOffset parameter to TAlgoCompress.Compress/Decompress

* new TFastReader.ReadCompressed method

* optional BufferOffset parameter to TSynPersistentStore.SaveTo and TFileBufferWriter.FlushAndCompress

* fixed TAESAbstractSyn.Clone, and included some refactoring

* updated SQLite3 engine to latest version 3.27.2

* added BufferOffset optional parameter to overloaded TAlgoCompress.Decompress method

* introduced TDDDLogSettings.CustomFileName property

* added '/' in TFileVersion.UserAgent

* new TSQLRestServer.Sessions public property

* fixed several bugs in TAlgoCompress.Compress
- if BufferOffset<>0 or Plain=nil or PlainLen=0

* refactored TSQLRestServer.SessionDelete - no functional change
  • Loading branch information
f-vicente committed Mar 1, 2019
1 parent 555bd37 commit 872355c223c28d2f74d3526569bb23cc179467d7
Showing with 26,364 additions and 15,548 deletions.
  1. +8 −2 CrossPlatform/SynCrossPlatform.inc
  2. +2 −2 CrossPlatform/SynCrossPlatformCrypto.pas
  3. +9 −7 CrossPlatform/SynCrossPlatformJSON.pas
  4. +3 −3 CrossPlatform/SynCrossPlatformREST.pas
  5. +2 −2 CrossPlatform/SynCrossPlatformSpecific.pas
  6. +2 −2 CrossPlatform/SynCrossPlatformSynLZ.pas
  7. +2 −2 CrossPlatform/SynCrossPlatformTests.pas
  8. +118 −0 CrossPlatform/templates/Swagger.json.mustache
  9. +65 −64 PasZip.pas
  10. +9 −2 ReadMe.txt
  11. +2 −2 SQLite3/DDD/dom/dddDomAuthInterfaces.pas
  12. +2 −2 SQLite3/DDD/dom/dddDomUserCQRS.pas
  13. +2 −2 SQLite3/DDD/dom/dddDomUserInterfaces.pas
  14. +2 −2 SQLite3/DDD/dom/dddDomUserTypes.pas
  15. +35 −19 SQLite3/DDD/infra/dddInfraApps.pas
  16. +2 −2 SQLite3/DDD/infra/dddInfraAuthRest.pas
  17. +2 −2 SQLite3/DDD/infra/dddInfraEmail.pas
  18. +3 −2 SQLite3/DDD/infra/dddInfraEmailer.pas
  19. +2 −2 SQLite3/DDD/infra/dddInfraRepoUser.pas
  20. +75 −35 SQLite3/DDD/infra/dddInfraSettings.pas
  21. +1 −1 SQLite3/DDD/tools/dddToolsAdminDB.pas
  22. +1 −1 SQLite3/DDD/tools/dddToolsAdminMain.pas
  23. +0 −4 SQLite3/Documentation/SourceCodeRep/SourceCodeRepMain.dfm
  24. +9 −5 SQLite3/Documentation/SourceCodeRep/SourceCodeRepMain.pas
  25. +196 −121 SQLite3/Documentation/Synopse SQLite3 Framework.pro
  26. +1 −0 SQLite3/Samples/01 - In Memory ORM/Unit1.pas
  27. +16 −17 SQLite3/Samples/11 - Exception logging/LogViewMain.dfm
  28. +27 −2 SQLite3/Samples/11 - Exception logging/LogViewMain.pas
  29. +2 −2 SQLite3/Samples/11 - Exception logging/LoggingTest.dpr
  30. +17 −2 SQLite3/Samples/11 - Exception logging/Map2Mab.dpr
  31. +1 −1 SQLite3/Samples/12 - SynDB Explorer/SynDBExplorerExportTables.pas
  32. +1 −1 SQLite3/Samples/12 - SynDB Explorer/SynDBExplorerQueryBuilder.pas
  33. +1 −1 SQLite3/Samples/30 - MVC Server/MVCViewModel.pas
  34. +65 −0 SQLite3/Samples/33 - ECC/ECC.lpi
  35. +64 −0 SQLite3/Samples/36 - Simple REST Benchmark/README.md
  36. +167 −0 SQLite3/Samples/36 - Simple REST Benchmark/RESTBenchmark.dpr
  37. +54 −0 SQLite3/Samples/36 - Simple REST Benchmark/RESTBenchmark.lpi
  38. +28 −0 SQLite3/Samples/36 - Simple REST Benchmark/RESTModel.pas
  39. +59 −0 SQLite3/Samples/36 - Simple REST Benchmark/mormot-rest-nginx.conf
  40. +31 −0 SQLite3/Samples/37 - FishShop Service/FishShopDaemon.dpr
  41. +291 −0 SQLite3/Samples/37 - FishShop Service/FishShopDaemon.lpi
  42. +98 −0 SQLite3/Samples/37 - FishShop Service/ServFishShopMain.pas
  43. +22 −0 SQLite3/Samples/37 - FishShop Service/ServFishShopTests.pas
  44. +97 −0 SQLite3/Samples/37 - FishShop Service/ServFishShopTypes.pas
  45. +26 −0 SQLite3/Samples/37 - FishShop Service/TestFishShop.dpr
  46. +291 −0 SQLite3/Samples/37 - FishShop Service/TestFishShop.lpi
  47. +1 −1 SQLite3/Samples/MainDemo/FileClient.pas
  48. +2 −2 SQLite3/Samples/MainDemo/FileMain.pas
  49. +1 −0 SQLite3/Samples/MainDemo/FileServer.pas
  50. +2 −2 SQLite3/Samples/ThirdPartyDemos/EMartin/SynJSONTreeview/SynJSONTreeView.pas
  51. +2 −2 SQLite3/Samples/ThirdPartyDemos/EMartin/TSynRestDataset/SynRestMidasVCL.pas
  52. +41 −39 SQLite3/Samples/ThirdPartyDemos/EMartin/TSynRestDataset/SynRestVCL.pas
  53. +1 −1 SQLite3/Samples/ThirdPartyDemos/George/REST-tester/mORMotRESTFPCInterfaces.pas
  54. +2 −2 SQLite3/Samples/ThirdPartyDemos/Ondrej/SynTaskDialog4Lazarus/SynTaskDialog.pas
  55. +8 −25 SQLite3/TestSQL3.dpr
  56. +1 −1 SQLite3/TestSQL3FPCInterfaces.pas
  57. +7 −7 SQLite3/build-fpc-linux64.sh
  58. +1 −1 SQLite3/codecext.c
  59. +2,063 −1,456 SQLite3/mORMot.pas
  60. +2 −2 SQLite3/mORMotBigTable.pas
  61. +20 −27 SQLite3/mORMotDB.pas
  62. +3 −3 SQLite3/mORMotDDD.pas
  63. +2 −2 SQLite3/mORMotFastCgiServer.pas
  64. +56 −16 SQLite3/mORMotHttpClient.pas
  65. +70 −48 SQLite3/mORMotHttpServer.pas
  66. +12 −9 SQLite3/mORMotMVC.pas
  67. +2 −2 SQLite3/mORMotMidasVCL.pas
  68. +2 −2 SQLite3/mORMotMongoDB.pas
  69. +41 −43 SQLite3/mORMotReport.pas
  70. +54 −35 SQLite3/mORMotSQLite3.pas
  71. +3 −3 SQLite3/mORMotSelfTests.pas
  72. +863 −179 SQLite3/mORMotService.pas
  73. +6 −5 SQLite3/mORMotToolBar.pas
  74. +100 −10 SQLite3/mORMotUI.pas
  75. +6 −4 SQLite3/mORMotUIEdit.pas
  76. +2 −2 SQLite3/mORMotUILogin.pas
  77. +2 −2 SQLite3/mORMotUIOptions.pas
  78. +2 −2 SQLite3/mORMotUIQuery.pas
  79. +2 −2 SQLite3/mORMotVCL.pas
  80. +23 −7 SQLite3/mORMotWrappers.pas
  81. +4 −3 SQLite3/mORMoti18n.pas
  82. BIN SQLite3/sqlite3.obj
  83. +2 −0 SyNode/.gitignore
  84. +26 −0 SyNode/README.md
  85. +9 −9 SyNode/Samples/02 - Bindings/ufrmSM45Demo.dfm
  86. +12 −8 SyNode/Samples/02 - Bindings/ufrmSM45Demo.pas
  87. +71 −24 SyNode/SpiderMonkey.pas
  88. +5 −3 SyNode/SyNode.inc
  89. +220 −12 SyNode/SyNode.pas
  90. +248 −66 SyNode/SyNodeBinding_buffer.pas
  91. +194 −136 SyNode/SyNodeBinding_const.pas
  92. +3 −2 SyNode/SyNodeBinding_worker.pas
  93. +3 −3 SyNode/SyNodeNewProto.pas
  94. +2 −2 SyNode/SyNodePluginIntf.pas
  95. +7 −4 SyNode/SyNodeProto.pas
  96. +5 −9 SyNode/SyNodeReadWrite.pas
  97. +40 −49 SyNode/SyNodeRemoteDebugger.pas
  98. +3 −3 SyNode/SyNodeSimpleProto.pas
  99. +5 −0 SyNode/build_res.sh
  100. BIN SyNode/core_modules.res
  101. +14 −1 SyNode/core_modules/DevTools/Debugger.js
  102. +11 −6 SyNode/core_modules/ModuleLoader.js
  103. +1 −0 SyNode/core_modules/core_modules
  104. +4 −2 SyNode/core_modules/node_modules/assert.js
  105. +11 −1 SyNode/core_modules/node_modules/buffer.js
  106. +182 −180 SyNode/core_modules/node_modules/console.js
  107. +16 −16 SyNode/core_modules/node_modules/crypto.js
  108. +561 −560 SyNode/core_modules/node_modules/events.js
  109. +1 −0 SyNode/core_modules/node_modules/fs.js
  110. +1 −0 SyNode/core_modules/node_modules/http.js
  111. +1 −0 SyNode/core_modules/node_modules/https.js
  112. +53 −46 SyNode/core_modules/node_modules/os.js
  113. +1 −0 SyNode/core_modules/node_modules/path.js
  114. +510 −510 SyNode/core_modules/node_modules/punycode.js
  115. +254 −253 SyNode/core_modules/node_modules/querystring.js
  116. +1 −0 SyNode/core_modules/node_modules/stream.js
  117. +4 −1 SyNode/core_modules/node_modules/string_decoder.js
  118. +1 −0 SyNode/core_modules/node_modules/tty.js
  119. +1 −0 SyNode/core_modules/node_modules/url.js
  120. +1 −0 SyNode/core_modules/node_modules/util.js
  121. +1 −0 SyNode/core_modules/node_modules/vm.js
  122. +14 −9 SyNode/core_modules/synode.js
  123. +36 −0 SyNode/modules_cjs.txt
  124. +7 −0 SyNode/modules_es6.txt
  125. +54 −0 SyNode/synodebinding_os.pas
  126. +59 −0 SyNode/tools/core_res.lpi
  127. +121 −0 SyNode/tools/core_res.lpr
  128. +129 −112 SynBidirSock.pas
  129. +4 −4 SynBigTable.pas
  130. +97 −97 SynBz.pas
  131. +183 −138 SynBzPas.pas
  132. +8,617 −7,835 SynCommons.pas
  133. +1,302 −618 SynCrtSock.pas
  134. +250 −232 SynCrypto.pas
  135. +12 −9 SynDB.pas
  136. +30 −29 SynDBDataset.pas
  137. +2 −2 SynDBDataset/SynDBBDE.pas
  138. +23 −17 SynDBDataset/SynDBFireDAC.pas
  139. +11 −10 SynDBDataset/SynDBNexusDB.pas
  140. +2 −2 SynDBDataset/SynDBUniDAC.pas
  141. +2 −2 SynDBFirebird.pas
  142. +2 −2 SynDBMidasVCL.pas
  143. +5 −3 SynDBODBC.pas
  144. +329 −317 SynDBOracle.pas
  145. +3 −2 SynDBRemote.pas
  146. +3 −2 SynDBSQLite3.pas
  147. +11 −10 SynDBVCL.pas
  148. +130 −123 SynDBZeos.pas
  149. +46 −33 SynDprUses.inc
  150. +34 −19 SynEcc.pas
  151. +1 −1 SynEcc32asm.inc
  152. +263 −0 SynFPCCMemAligned.pas
  153. +116 −100 SynFPCLinux.pas
  154. +47 −6 SynFPCSock.pas
  155. +13 −27 SynFPCTypInfo.pas
  156. +2 −2 SynFastWideString.pas
  157. +564 −0 SynGSSAPI.pas
  158. +344 −0 SynGSSAPIAuth.pas
  159. +16 −6 SynGdiPlus.pas
  160. +15 −7 SynKylix.pas
  161. +12 −9 SynLZ.pas
  162. +8 −8 SynLZO.pas
  163. +40 −40 SynLizard.pas
  164. +427 −243 SynLog.pas
  165. +2 −2 SynMemoEx.pas
  166. +60 −35 SynMongoDB.pas
  167. +2 −2 SynMustache.pas
  168. +5 −4 SynOleDB.pas
  169. +8 −8 SynOpenSSL.pas
  170. +213 −244 SynPdf.pas
  171. +5 −5 SynProtoRTSPHTTP.pas
  172. +8 −6 SynSM.pas
  173. +3 −3 SynSMAPI.pas
  174. +106 −54 SynSQLite3.pas
  175. +39 −10 SynSQLite3RegEx.pas
  176. +76 −33 SynSQLite3Static.pas
  177. +61 −40 SynSSPI.pas
  178. +32 −35 SynSSPIAuth.pas
  179. +2 −2 SynScaleMM.pas
  180. +809 −239 SynSelfTests.pas
  181. +183 −0 SynTBB.pas
  182. +2,767 −190 SynTable.pas
  183. +2 −2 SynTaskDialog.pas
  184. +146 −92 SynTests.pas
  185. +13 −12 SynVirtualDataSet.pas
  186. +9 −8 SynWinSock.pas
  187. +4 −4 SynZLibSSE.pas
  188. +227 −43 SynZip.pas
  189. +58 −57 SynZipFiles.pas
  190. +207 −174 Synopse.inc
  191. +1 −1 SynopseCommit.inc
  192. +123 −0 lizard.lpi
  193. BIN static/arm-linux/sqlite3.o
  194. BIN static/i386-darwin/libsqlite3.a
  195. BIN static/i386-darwin/sqlite3.o
  196. BIN static/i386-linux/lizard_frame.o
  197. BIN static/i386-linux/sqlite3.o
  198. BIN static/i386-linux/xxhash.o
  199. BIN static/i386-win32/lizard_frame.o
  200. BIN static/i386-win32/sqlite3.o
  201. BIN static/i386-win32/xxhash.o
  202. BIN static/x86_64-darwin/libsqlite3.a
  203. BIN static/x86_64-darwin/sqlite3.o
  204. BIN static/x86_64-linux/lizard_frame.o
  205. BIN static/x86_64-linux/sqlite3.o
  206. BIN static/x86_64-linux/xxhash.o
  207. BIN static/x86_64-win64/libsqlite3-64.a
  208. BIN static/x86_64-win64/lizard_frame.o
  209. BIN static/x86_64-win64/sqlite3-64.dll
  210. BIN static/x86_64-win64/sqlite3.o
  211. BIN static/x86_64-win64/xxhash.o
@@ -2,7 +2,7 @@
{
This file is part of Synopse mORMot framework.

Synopse mORMot framework. Copyright (C) 2018 Arnaud Bouchez
Synopse mORMot framework. Copyright (C) 2019 Arnaud Bouchez
Synopse Informatique - https://synopse.info

*** BEGIN LICENSE BLOCK *****
@@ -21,7 +21,7 @@

The Initial Developer of the Original Code is Arnaud Bouchez.

Portions created by the Initial Developer are Copyright (C) 2018
Portions created by the Initial Developer are Copyright (C) 2019
the Initial Developer. All Rights Reserved.

Contributor(s):
@@ -68,6 +68,12 @@
{$ifdef VER3_1}
{$define ISFPC27}
{$endif}
{$ifdef VER3_2}
{$define ISFPC27}
{$endif}
{$ifdef VER3_3}
{$define ISFPC27}
{$endif}


{$ifdef ISFPC27}
@@ -6,7 +6,7 @@
{
This file is part of Synopse mORMot framework.
Synopse mORMot framework. Copyright (C) 2018 Arnaud Bouchez
Synopse mORMot framework. Copyright (C) 2019 Arnaud Bouchez
Synopse Informatique - https://synopse.info
*** BEGIN LICENSE BLOCK *****
@@ -25,7 +25,7 @@
The Initial Developer of the Original Code is Arnaud Bouchez.
Portions created by the Initial Developer are Copyright (C) 2018
Portions created by the Initial Developer are Copyright (C) 2019
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -6,7 +6,7 @@
{
This file is part of Synopse mORMot framework.
Synopse mORMot framework. Copyright (C) 2018 Arnaud Bouchez
Synopse mORMot framework. Copyright (C) 2019 Arnaud Bouchez
Synopse Informatique - https://synopse.info
*** BEGIN LICENSE BLOCK *****
@@ -25,7 +25,7 @@
The Initial Developer of the Original Code is Arnaud Bouchez.
Portions created by the Initial Developer are Copyright (C) 2018
Portions created by the Initial Developer are Copyright (C) 2019
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -80,16 +80,18 @@ interface
TByteDynArray = array of byte;
PByteDynArray = ^TByteDynArray;

{$ifndef UNICODE}
{$ifdef FPC}
NativeInt = PtrInt;
NativeUInt = PtrUInt;
{$else}
{$ifndef ISDELPHI2010} // Delphi 2009 NativeUInt is buggy
NativeInt = integer;
NativeUInt = cardinal;
{$endif}
{$ifndef UNICODE}
RawByteString = AnsiString;
{$endif}
{$endif}

// this type will store UTF-8 encoded buffer (also on NextGen platform)
{$ifdef NEXTGEN}
@@ -423,7 +425,7 @@ procedure GetPropsInfo(TypeInfo: TRTTITypeInfo; var PropNames: TStringDynArray;
var PropRTTI: TRTTIPropInfoDynArray);

/// retrieve the value of a published property as variant
function GetInstanceProp(Instance: TObject; PropInfo: TRTTIPropInfo): variant;
function GetInstanceProp(Instance: TObject; PropInfo: TRTTIPropInfo; StoreClassName: boolean = False): variant;

/// set the value of a published property from a variant
procedure SetInstanceProp(Instance: TObject; PropInfo: TRTTIPropInfo;
@@ -1341,7 +1343,7 @@ function GetTByteDynArrayProp(Instance: TObject; PropInfo: TRTTIPropInfo): PByte
(NativeUInt(PropInfo^.GetProc){$ifndef FPC} and $00FFFFFF{$endif}));
end;

function GetInstanceProp(Instance: TObject; PropInfo: TRTTIPropInfo): variant;
function GetInstanceProp(Instance: TObject; PropInfo: TRTTIPropInfo; StoreClassName: boolean): variant;
var obj: TObject;
begin
VarClear(result);
@@ -1375,7 +1377,7 @@ function GetInstanceProp(Instance: TObject; PropInfo: TRTTIPropInfo): variant;
obj := TObject(NativeInt(GetOrdProp(Instance,PropInfo)));
if obj=nil then
result := null else
TJSONVariantData(result).Init(ObjectToJSON(obj));
TJSONVariantData(result).Init(ObjectToJSON(obj, StoreClassName));
end;
tkDynArray:
if IsBlob(PropInfo) then
@@ -1576,7 +1578,7 @@ function ObjectToJSON(Instance: TObject; StoreClassName: boolean): string;
for i := 0 to PropCount-1 do begin
PropInfo := PropList^[i];
result := result+StringToJSON(ShortStringToString(@PropInfo^.Name))+':'+
ValueToJSON(GetInstanceProp(Instance,PropInfo))+',';
ValueToJSON(GetInstanceProp(Instance,PropInfo,StoreClassName))+',';
end;
result[length(result)] := '}';
finally
@@ -6,7 +6,7 @@
{
This file is part of Synopse mORMot framework.
Synopse mORMot framework. Copyright (C) 2018 Arnaud Bouchez
Synopse mORMot framework. Copyright (C) 2019 Arnaud Bouchez
Synopse Informatique - https://synopse.info
*** BEGIN LICENSE BLOCK *****
@@ -25,7 +25,7 @@
The Initial Developer of the Original Code is Arnaud Bouchez.
Portions created by the Initial Developer are Copyright (C) 2018
Portions created by the Initial Developer are Copyright (C) 2019
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -566,7 +566,7 @@ TSQLRestClientURI = class;
// so e.g. for a sicShared instance, you can safely write:
// ! aIntegerResult := TServiceCalculator.Create(aClient).Add(10,20);
// - as you already noted, server-side interface-based services are in fact
// consummed without any interface in this cross-platform unit!
// consumed without any interface in this cross-platform unit!
TServiceClientAbstract = class{$ifndef ISDWS}(TInterfacedObject){$endif}
protected
fClient: TSQLRestClientURI;
@@ -6,7 +6,7 @@
{
This file is part of Synopse mORMot framework.
Synopse mORMot framework. Copyright (C) 2018 Arnaud Bouchez
Synopse mORMot framework. Copyright (C) 2019 Arnaud Bouchez
Synopse Informatique - https://synopse.info
*** BEGIN LICENSE BLOCK *****
@@ -25,7 +25,7 @@
The Initial Developer of the Original Code is Arnaud Bouchez.
Portions created by the Initial Developer are Copyright (C) 2018
Portions created by the Initial Developer are Copyright (C) 2019
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -8,7 +8,7 @@ interface
{
This file is part of Synopse mORMot framework.
Synopse mORMot framework. Copyright (C) 2018 Arnaud Bouchez
Synopse mORMot framework. Copyright (C) 2019 Arnaud Bouchez
Synopse Informatique - https://synopse.info
*** BEGIN LICENSE BLOCK *****
@@ -27,7 +27,7 @@ interface
The Initial Developer of the Original Code is Arnaud Bouchez.
Portions created by the Initial Developer are Copyright (C) 2018
Portions created by the Initial Developer are Copyright (C) 2019
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -6,7 +6,7 @@
{
This file is part of Synopse mORMot framework.
Synopse mORMot framework. Copyright (C) 2018 Arnaud Bouchez
Synopse mORMot framework. Copyright (C) 2019 Arnaud Bouchez
Synopse Informatique - https://synopse.info
*** BEGIN LICENSE BLOCK *****
@@ -25,7 +25,7 @@
The Initial Developer of the Original Code is Arnaud Bouchez.
Portions created by the Initial Developer are Copyright (C) 2018
Portions created by the Initial Developer are Copyright (C) 2019
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -0,0 +1,118 @@
{{<schema-fuer-typ}}
{{#typeSwagger}}
{{!HACK: Enums, Records und Arrays, die separat definiert werden und referenziert werden müssen
haben den gleichen Swagger- wie Source-Typ. Alle integrierten Typen habe einen eigenen
Swagger-Typ}}
{{#Equals typeSwagger,typeSource}}
{ "$ref": "#/definitions/{{typeSwagger}}" }
{{/Equals}}
{{^Equals typeSwagger,typeSource}}
{{typeSwagger}}
{{/Equals}}
{{/typeSwagger}}
{{^typeSwagger}}
{{#nestedSimpleArray}}
{
"type": "array",
"items": {{>schema-fuer-typ}}
}
{{/nestedSimpleArray}}
{{/typeSwagger}}
{{/schema-fuer-typ}}
{
"swagger": "2.0",
"info": {
"description": "Generated by mORMot {{mORMotVersion}} at {{time}}",
"title": "mORMot -> Swagger"
},
"host": "{{host}}",
"basePath": "/{{root}}",
"tags": [
{{#soa}} {{#services}}
{
"name": "{{uri}}",
"description": "Everything about {{uri}}"
} {{^-last}},{{/-last}}

{{/services}} {{/soa}}
],
"definitions": {
{{! Records }}
{{#records}}
"{{name}}": {
"type": "object",
"properties": {
{{#fields}}
"{{propName}}": {{>schema-fuer-typ}} {{^-last}},{{/-last}}
{{/fields}}
}
},
{{/records}}

{{! Arrays }}
{{#arrays}}
"{{name}}": {
"type": "array",
"items": {{>schema-fuer-typ}}
},
{{/arrays}}


{{#enumerates}}
"{{name}}": {
"type": "string",
"enum": [
{{#values}}
"{{.}}" {{^-last}},{{/-last}}
{{/values}}
],
"required": true
},
{{/enumerates}}
{{!HACK: Sonst haben wir ein einzelnes Komma am Schluss }}
"__dummy__": {"type":"string"}
},
"paths": {
{{#soa}} {{#services}}
{{#methods}}
"/{{uri}}/{{methodName}}": {
"post": {
"description": {{jsonQuote methodDescription}},
"tags": ["{{uri}}"],
"parameters": [{
"in": "body",
"name": "body",
"schema": {
"type": "object",
"properties": {
{{#args}}{{#dirInput}}
"{{argName}}": {{>schema-fuer-typ}}{{commaInSingle}}
{{/dirInput}}{{/args}}
}
}
}],
"responses": {
"200": {
"schema": {
"type": "object",
"properties": {
"result": {
"type": "array",
"items": [
{{#args}} {{#dirOutput}}
{{>schema-fuer-typ}}{{#commaOutResult}},{{/commaOutResult}}
{{/dirOutput}}{{/args}}
]
}
}
}
}
}
}
} {{^-last}},{{/-last}}
{{/methods}} {{^-last}},{{/-last}}


{{/services}} {{/soa}}
}
}

0 comments on commit 872355c

Please sign in to comment.
You can’t perform that action at this time.