@progress/sitefinity-webservices-sdk 0.3.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +4 -0
- package/.eslintrc.js +19 -0
- package/ci/pipelines/ci.yml +219 -0
- package/config/helpers.js +0 -6
- package/config/webpack.common.js +1 -3
- package/config/webpack.dev.js +2 -9
- package/config/webpack.prod.js +5 -6
- package/dist/docs/.nojekyll +1 -0
- package/dist/docs/assets/highlight.css +57 -0
- package/dist/docs/assets/icons.css +1043 -0
- package/dist/docs/assets/icons.png +0 -0
- package/dist/docs/assets/icons@2x.png +0 -0
- package/dist/docs/assets/main.js +52 -0
- package/dist/docs/assets/search.js +1 -0
- package/dist/docs/assets/style.css +1413 -0
- package/dist/docs/assets/{images/widgets.png → widgets.png} +0 -0
- package/dist/docs/assets/{images/widgets@2x.png → widgets@2x.png} +0 -0
- package/dist/docs/classes/BlobBuilder.BlobBuilder-1.html +7 -0
- package/dist/docs/classes/Data.Data-1.html +65 -0
- package/dist/docs/classes/Expression.BinaryExpression.html +1 -0
- package/dist/docs/classes/Expression.ComplexExpression.html +1 -0
- package/dist/docs/classes/Expression.ExpressionBase.html +1 -0
- package/dist/docs/classes/OrderProperty.OrderProperty-1.html +1 -0
- package/dist/docs/classes/Query.Query-1.html +33 -0
- package/dist/docs/classes/QueryBase.QueryBase-1.html +7 -0
- package/dist/docs/classes/QueryBuilder.QueryBuilder-1.html +1 -0
- package/dist/docs/classes/Requests_BatchRequest.BatchRequest.html +17 -0
- package/dist/docs/classes/Requests_BatchRequest.Transaction.html +17 -0
- package/dist/docs/classes/Requests_ExecutableRequest.ExecutableRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.CreateRelatedRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.CreateRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.DeleteRelatedByIdRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.DeleteRelatedRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.DeleteRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.GetByIdRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.GetRelatedByIdRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.GetRelatedRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.GetRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.UpdateRequest.html +1 -0
- package/dist/docs/classes/Requests_Request.UploadRequest.html +1 -0
- package/dist/docs/classes/Requests_RequestBase.RequestBase.html +1 -0
- package/dist/docs/classes/Requests_RequestFactory.RequestFactory.html +1 -0
- package/dist/docs/classes/Sitefinity.Sitefinity-1.html +5 -0
- package/dist/docs/classes/WhereQuery.WhereQuery-1.html +31 -0
- package/dist/docs/classes/utils.utils-1.html +1 -0
- package/dist/docs/index.html +54 -242
- package/dist/docs/interfaces/Data.CreateRelatedRequestOptions.html +1 -0
- package/dist/docs/interfaces/Data.CreateRequestOptions.html +1 -0
- package/dist/docs/interfaces/Data.OperationsRequestOptions.html +1 -0
- package/dist/docs/interfaces/Data.PropertyRequestOptions.html +1 -0
- package/dist/docs/interfaces/Data.RequestOptionsBase.html +1 -0
- package/dist/docs/interfaces/Data.SingleRelatedItemRequestOptions.html +1 -0
- package/dist/docs/interfaces/Data.UpdateRequestOptions.html +1 -0
- package/dist/docs/interfaces/Data.UploadRequestOptions.html +1 -0
- package/dist/docs/interfaces/Requests_BatchRequest.BatchCreateRelatedRequestOptions.html +1 -0
- package/dist/docs/interfaces/Requests_BatchRequest.BatchCreateRequestOptions.html +1 -0
- package/dist/docs/interfaces/Requests_BatchRequest.BatchPropertyRequestOptions.html +1 -0
- package/dist/docs/interfaces/Requests_BatchRequest.BatchRequestOptionsBase.html +1 -0
- package/dist/docs/interfaces/Requests_BatchRequest.BatchRequestOptionsExtended.html +1 -0
- package/dist/docs/interfaces/Requests_BatchRequest.BatchSingleItemRequestOptions.html +1 -0
- package/dist/docs/interfaces/Requests_BatchRequest.BatchSingleRelatedItemRequestOptions.html +1 -0
- package/dist/docs/interfaces/Requests_BatchRequest.BatchUpdateRequestOptions.html +1 -0
- package/dist/docs/interfaces/Requests_ExecutableRequest.ResponseHandlers.html +5 -0
- package/dist/docs/interfaces/Requests_Request.PostRequestOptionsExtended.html +1 -0
- package/dist/docs/interfaces/Requests_Request.PutRequestOptionsExtended.html +1 -0
- package/dist/docs/interfaces/Requests_Request.RelatedByIdRequestOptionsExtended.html +1 -0
- package/dist/docs/interfaces/Requests_Request.RelatedRequestOptionsExtended.html +1 -0
- package/dist/docs/interfaces/Requests_Request.UploadRequestOptionsExtended.html +1 -0
- package/dist/docs/interfaces/Requests_RequestBase.RequestOptionsBaseExtended.html +1 -0
- package/dist/docs/interfaces/Sitefinity.SDKOptions.html +9 -0
- package/dist/docs/interfaces/Sitefinity.Token.html +1 -0
- package/dist/docs/interfaces/Sitefinity.TypeOptions.html +13 -0
- package/dist/docs/modules/BlobBuilder.html +1 -0
- package/dist/docs/modules/Data.html +1 -0
- package/dist/docs/modules/Expression.html +1 -0
- package/dist/docs/modules/OrderProperty.html +1 -0
- package/dist/docs/modules/Query.html +1 -0
- package/dist/docs/modules/QueryBase.html +1 -0
- package/dist/docs/modules/QueryBuilder.html +1 -0
- package/dist/docs/modules/Requests_BatchRequest.html +1 -0
- package/dist/docs/modules/Requests_ExecutableRequest.html +1 -0
- package/dist/docs/modules/Requests_Request.html +1 -0
- package/dist/docs/modules/Requests_RequestBase.html +1 -0
- package/dist/docs/modules/Requests_RequestFactory.html +1 -0
- package/dist/docs/modules/Sitefinity.html +1 -0
- package/dist/docs/modules/WhereQuery.html +1 -0
- package/dist/docs/modules/constants.html +1 -0
- package/dist/docs/modules/utils.html +1 -0
- package/dist/docs/modules.html +1 -0
- package/dist/samples.html +33 -81
- package/dist/sitefinity-webservices-sdk.d.ts +16 -0
- package/dist/sitefinity-webservices-sdk.js +1141 -1737
- package/dist/sitefinity-webservices-sdk.js.map +1 -1
- package/dist/sitefinity-webservices-sdk.min.js +2 -16
- package/dist/sitefinity-webservices-sdk.min.js.LICENSE.txt +14 -0
- package/dist/src/BlobBuilder.d.ts +14 -0
- package/dist/src/Data.d.ts +144 -0
- package/dist/src/Expression.d.ts +19 -0
- package/dist/src/OrderProperty.d.ts +8 -0
- package/dist/src/Query.d.ts +59 -0
- package/dist/src/QueryBase.d.ts +18 -0
- package/dist/src/QueryBuilder.d.ts +13 -0
- package/dist/src/Requests/BatchRequest.d.ts +146 -0
- package/dist/src/Requests/ExecutableRequest.d.ts +20 -0
- package/dist/src/Requests/Request.d.ts +88 -0
- package/dist/src/Requests/RequestBase.d.ts +28 -0
- package/dist/src/Requests/RequestFactory.d.ts +22 -0
- package/dist/src/Sitefinity.d.ts +66 -0
- package/dist/src/WhereQuery.d.ts +68 -0
- package/dist/src/constants.d.ts +55 -0
- package/dist/src/utils.d.ts +16 -0
- package/karma.conf.js +29 -0
- package/package-lock.json +16108 -6805
- package/package.json +28 -10
- package/sitefinity-webservices-sdk.ts +16 -0
- package/src/BlobBuilder.ts +7 -12
- package/src/Data.spec.ts +160 -0
- package/src/Data.ts +132 -207
- package/src/Expression.ts +0 -1
- package/src/OrderProperty.ts +4 -5
- package/src/Query.ts +52 -78
- package/src/QueryBase.ts +21 -47
- package/src/QueryBuilder.ts +64 -82
- package/src/Requests/BatchRequest.ts +312 -335
- package/src/Requests/ExecutableRequest.ts +46 -73
- package/src/Requests/Request.ts +134 -260
- package/src/Requests/RequestBase.ts +161 -0
- package/src/Requests/RequestFactory.ts +36 -54
- package/src/Requests/request.spec.ts +92 -0
- package/src/Sitefinity.spec.ts +418 -0
- package/src/Sitefinity.ts +77 -146
- package/src/WhereQuery.ts +52 -112
- package/src/constants.ts +58 -39
- package/src/utils.ts +17 -14
- package/template.html +33 -35
- package/tsconfig.json +8 -1
- package/type.txt +1 -1
- package/version.txt +1 -1
- package/config/html.conf.json +0 -5
- package/dist/docs/assets/css/main.css +0 -865
- package/dist/docs/assets/css/main.css.map +0 -7
- package/dist/docs/assets/images/icons.png +0 -0
- package/dist/docs/assets/images/icons@2x.png +0 -0
- package/dist/docs/assets/js/main.js +0 -5
- package/dist/docs/assets/js/search.js +0 -3
- package/dist/docs/classes/_authentication_.authentication.html +0 -527
- package/dist/docs/classes/_blobbuilder_.blobbuilder.html +0 -351
- package/dist/docs/classes/_data_.data.html +0 -974
- package/dist/docs/classes/_expression_.binaryexpression.html +0 -450
- package/dist/docs/classes/_expression_.complexexpression.html +0 -374
- package/dist/docs/classes/_expression_.expressionbase.html +0 -336
- package/dist/docs/classes/_orderproperty_.orderproperty.html +0 -381
- package/dist/docs/classes/_query_.query.html +0 -896
- package/dist/docs/classes/_querybase_.querybase.html +0 -518
- package/dist/docs/classes/_querybuilder_.querybuilder.html +0 -496
- package/dist/docs/classes/_requests_batchrequest_.batchrequest.html +0 -1511
- package/dist/docs/classes/_requests_batchrequest_.transaction.html +0 -804
- package/dist/docs/classes/_requests_executablerequest_.executablerequest.html +0 -549
- package/dist/docs/classes/_requests_request_.createrelatedrequest.html +0 -689
- package/dist/docs/classes/_requests_request_.createrequest.html +0 -680
- package/dist/docs/classes/_requests_request_.deleterelatedbyidrequest.html +0 -687
- package/dist/docs/classes/_requests_request_.deleterelatedrequest.html +0 -673
- package/dist/docs/classes/_requests_request_.deleterequest.html +0 -666
- package/dist/docs/classes/_requests_request_.getbyidrequest.html +0 -666
- package/dist/docs/classes/_requests_request_.getrelatedbyidrequest.html +0 -687
- package/dist/docs/classes/_requests_request_.getrelatedrequest.html +0 -673
- package/dist/docs/classes/_requests_request_.getrequest.html +0 -658
- package/dist/docs/classes/_requests_request_.requestbase.html +0 -687
- package/dist/docs/classes/_requests_request_.updaterequest.html +0 -686
- package/dist/docs/classes/_requests_request_.uploadrequest.html +0 -715
- package/dist/docs/classes/_requests_requestfactory_.requestfactory.html +0 -724
- package/dist/docs/classes/_sitefinity_.sitefinity.html +0 -521
- package/dist/docs/classes/_utils_.utils.html +0 -597
- package/dist/docs/classes/_wherequery_.wherequery.html +0 -992
- package/dist/docs/globals.html +0 -238
- package/dist/docs/modules/_authentication_.html +0 -225
- package/dist/docs/modules/_blobbuilder_.html +0 -225
- package/dist/docs/modules/_constants_.html +0 -528
- package/dist/docs/modules/_contenttypes_.html +0 -248
- package/dist/docs/modules/_data_.html +0 -225
- package/dist/docs/modules/_expression_.html +0 -233
- package/dist/docs/modules/_headers_.html +0 -328
- package/dist/docs/modules/_httpmethods_.html +0 -288
- package/dist/docs/modules/_main_.html +0 -209
- package/dist/docs/modules/_orderproperty_.html +0 -225
- package/dist/docs/modules/_query_.html +0 -225
- package/dist/docs/modules/_querybase_.html +0 -225
- package/dist/docs/modules/_querybuilder_.html +0 -247
- package/dist/docs/modules/_requests_batchrequest_.html +0 -265
- package/dist/docs/modules/_requests_executablerequest_.html +0 -296
- package/dist/docs/modules/_requests_request_.html +0 -333
- package/dist/docs/modules/_requests_requestfactory_.html +0 -247
- package/dist/docs/modules/_sitefinity_.html +0 -225
- package/dist/docs/modules/_utils_.html +0 -225
- package/dist/docs/modules/_wherequery_.html +0 -247
- package/dist/index.html +0 -474
- package/src/Authentication.ts +0 -96
- package/src/ContentTypes.ts +0 -5
- package/src/Headers.ts +0 -12
- package/src/HttpMethods.ts +0 -9
- package/src/main.ts +0 -2
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
parser: '@typescript-eslint/parser',
|
|
4
|
+
plugins: [
|
|
5
|
+
'@typescript-eslint',
|
|
6
|
+
],
|
|
7
|
+
extends: [
|
|
8
|
+
'eslint:recommended',
|
|
9
|
+
'plugin:@typescript-eslint/recommended',
|
|
10
|
+
],
|
|
11
|
+
rules: {
|
|
12
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
13
|
+
"@typescript-eslint/ban-types": "off",
|
|
14
|
+
"no-useless-escape": "off",
|
|
15
|
+
"no-prototype-builtins": "off",
|
|
16
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
17
|
+
"no-constant-condition": "off"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
trigger:
|
|
2
|
+
branches:
|
|
3
|
+
include:
|
|
4
|
+
- refs/heads/master
|
|
5
|
+
jobs:
|
|
6
|
+
- job: Job_1
|
|
7
|
+
displayName: Build and publish artifact
|
|
8
|
+
pool:
|
|
9
|
+
name: IrisVMware
|
|
10
|
+
steps:
|
|
11
|
+
- checkout: self
|
|
12
|
+
- task: UseNode@1
|
|
13
|
+
displayName: Use Node $(node.version)
|
|
14
|
+
inputs:
|
|
15
|
+
version: $(node.version)
|
|
16
|
+
- task: PowerShell@2
|
|
17
|
+
displayName: Verify Commit Type
|
|
18
|
+
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
|
|
19
|
+
inputs:
|
|
20
|
+
targetType: inline
|
|
21
|
+
script: |
|
|
22
|
+
$pullrequestId = $(System.PullRequest.PullRequestId)
|
|
23
|
+
$azureDevOpsProject = "https://prgs-sitefinity.visualstudio.com/sitefinity"
|
|
24
|
+
$headers = @{}
|
|
25
|
+
$headers.Add("Content-Type", "application/json");
|
|
26
|
+
$headers.Add("Authorization", "Basic $(VstsRestApiToken)");
|
|
27
|
+
$pullRequestUrl = "${azureDevOpsProject}/_apis/git/repositories/sitefinity-webservices-sdk/pullrequests/${pullrequestId}?api-version=4.1"
|
|
28
|
+
$response = Invoke-WebRequest -URI $pullRequestUrl -Headers $headers
|
|
29
|
+
$responseJsonObject = $response | ConvertFrom-Json
|
|
30
|
+
$pullRequestTitle = $responseJsonObject.title
|
|
31
|
+
$semicolonIndex = $pullRequestTitle.IndexOf(":")
|
|
32
|
+
|
|
33
|
+
if($semicolonIndex -eq -1)
|
|
34
|
+
{
|
|
35
|
+
throw (new-object "Exception" @("Please specify pull request type. Check readme file for more information"))
|
|
36
|
+
exit 1
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
$prType = $pullRequestTitle.Substring(0, $semicolonIndex)
|
|
40
|
+
$versionType = ""
|
|
41
|
+
|
|
42
|
+
switch ($prType)
|
|
43
|
+
{
|
|
44
|
+
"build" { $versionType = "patch"; break}
|
|
45
|
+
"test" { $versionType = "patch"; break}
|
|
46
|
+
"fix" { $versionType = "patch"; break}
|
|
47
|
+
"feat" { $versionType = "minor"; break}
|
|
48
|
+
"BREAKING CHANGE" { $versionType = "major"; break}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if($versionType -eq "")
|
|
52
|
+
{
|
|
53
|
+
throw (new-object "Exception" @("Unsupported pull request type '$prType'. Check readme file for more information"))
|
|
54
|
+
exit 1
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
$tb="$(System.PullRequest.TargetBranch)"
|
|
58
|
+
$bnRegex = $tb -match "refs/heads/(.*)"
|
|
59
|
+
$bn = $Matches[1]
|
|
60
|
+
Write-Output "Target branch name is $bn"
|
|
61
|
+
|
|
62
|
+
if(($versionType -eq "major") -and ($bn -ne "master"))
|
|
63
|
+
{
|
|
64
|
+
throw (new-object "Exception" @("Cannot release BREAKING CHANGE from branch different than master."))
|
|
65
|
+
exit 1
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
Write-Output "Version type is $versionType"
|
|
69
|
+
"$versionType" | Out-File "$(Build.SourcesDirectory)/type.txt"
|
|
70
|
+
Write-Output "##vso[task.setvariable variable=VersionType]$versionType"
|
|
71
|
+
- task: PowerShell@2
|
|
72
|
+
displayName: Save Commit Type
|
|
73
|
+
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|
|
74
|
+
inputs:
|
|
75
|
+
targetType: inline
|
|
76
|
+
script: |
|
|
77
|
+
$releaseBranches = ConvertFrom-Json -InputObject "$(SitefinitySdkReleaseBranches)"
|
|
78
|
+
|
|
79
|
+
if ($releaseBranches -contains "$(Build.SourceBranch)") {
|
|
80
|
+
"$(Build.SourceVersionMessage)" -match "Merged PR \d+: (.*)"
|
|
81
|
+
$pullRequestTitle = $Matches[1]
|
|
82
|
+
Write-Output "Pull request title is '$pullRequestTitle'"
|
|
83
|
+
$semicolonIndex = $pullRequestTitle.IndexOf(":")
|
|
84
|
+
if($semicolonIndex -eq -1)
|
|
85
|
+
{
|
|
86
|
+
Write-Error "Please specify pull request type. Check readme file for more information"
|
|
87
|
+
exit 1
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
$prType = $pullRequestTitle.Substring(0, $semicolonIndex)
|
|
91
|
+
$versionType = ""
|
|
92
|
+
switch ($prType)
|
|
93
|
+
{
|
|
94
|
+
"build" { $versionType = "patch"; break}
|
|
95
|
+
"test" { $versionType = "patch"; break}
|
|
96
|
+
"fix" { $versionType = "patch"; break}
|
|
97
|
+
"feat" { $versionType = "minor"; break}
|
|
98
|
+
"BREAKING CHANGE" { $versionType = "major"; break}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
Write-Output "##vso[task.setvariable variable=VersionType]$versionType"
|
|
102
|
+
|
|
103
|
+
if($versionType -eq "")
|
|
104
|
+
{
|
|
105
|
+
Write-Error "Unsupported pull request type '$prType'. Check readme file for more information"
|
|
106
|
+
exit 1
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
Write-Output "Version type is $versionType"
|
|
110
|
+
"$versionType" | Out-File "$(Build.SourcesDirectory)/type.txt"
|
|
111
|
+
Write-Output "##vso[task.setvariable variable=VersionType]$versionType"
|
|
112
|
+
|
|
113
|
+
} else {
|
|
114
|
+
Write-Output ""$(Build.SourceBranch)" branch is missing from the release branches $releaseBranches . Skipping this step"
|
|
115
|
+
}
|
|
116
|
+
- task: PublishPipelineArtifact@1
|
|
117
|
+
displayName: Create Commit Data Artifact
|
|
118
|
+
inputs:
|
|
119
|
+
path: type.txt
|
|
120
|
+
artifactName: commit-data-drop
|
|
121
|
+
- task: Npm@1
|
|
122
|
+
displayName: Npm install (CI)
|
|
123
|
+
inputs:
|
|
124
|
+
command: custom
|
|
125
|
+
customCommand: ci
|
|
126
|
+
- task: Npm@1
|
|
127
|
+
displayName: Run lint
|
|
128
|
+
inputs:
|
|
129
|
+
command: custom
|
|
130
|
+
verbose: true
|
|
131
|
+
customCommand: run lint
|
|
132
|
+
- task: Bash@3
|
|
133
|
+
displayName: Run Tests
|
|
134
|
+
inputs:
|
|
135
|
+
targetType: inline
|
|
136
|
+
script: >-
|
|
137
|
+
export DISPLAY=':99.0'
|
|
138
|
+
|
|
139
|
+
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
|
140
|
+
|
|
141
|
+
cd $(Build.SourcesDirectory)
|
|
142
|
+
|
|
143
|
+
npm run test
|
|
144
|
+
- task: Npm@1
|
|
145
|
+
displayName: Build
|
|
146
|
+
inputs:
|
|
147
|
+
command: custom
|
|
148
|
+
verbose: false
|
|
149
|
+
customCommand: run build:release
|
|
150
|
+
- task: PublishPipelineArtifact@1
|
|
151
|
+
displayName: Publish Pipeline Artifact
|
|
152
|
+
inputs:
|
|
153
|
+
path: $(Pipeline.Workspace)/s
|
|
154
|
+
artifactName: sitefinity-webservices-sdk-drop
|
|
155
|
+
- task: PowerShell@2
|
|
156
|
+
displayName: Calculate release version
|
|
157
|
+
inputs:
|
|
158
|
+
targetType: inline
|
|
159
|
+
script: |
|
|
160
|
+
$version=git describe --long --tags
|
|
161
|
+
$version=$version.Replace('-', '.')
|
|
162
|
+
|
|
163
|
+
$versionSegments="$version".Split('.')
|
|
164
|
+
$major = [int]$versionSegments[0]
|
|
165
|
+
$minor = [int]$versionSegments[1]
|
|
166
|
+
$patch = [int]$versionSegments[2]
|
|
167
|
+
$latestVersion = "$major.$minor.$patch"
|
|
168
|
+
Write-Output "Currently published version is $latestVersion"
|
|
169
|
+
|
|
170
|
+
switch ("$(VersionType)")
|
|
171
|
+
{
|
|
172
|
+
"major" { $major = $major + 1; $minor = 0; $patch = 0; break}
|
|
173
|
+
"minor" { $minor = $minor + 1; $patch = 0; break}
|
|
174
|
+
"patch" { $patch = $patch + 1; break}
|
|
175
|
+
default {Write-Error "Version type not supported. Check Readme"; exit 1}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
$newVersion = "$major.$minor.$patch"
|
|
179
|
+
Write-Output "Releasing version $newVersion"
|
|
180
|
+
|
|
181
|
+
$validVersion = $newVersion -match "(\d){1,2}\.(\d){1,2}\.(\d){1,2}"
|
|
182
|
+
if(-not $validVersion)
|
|
183
|
+
{
|
|
184
|
+
Write-Error "Invalid version $newVersion aborting publish"
|
|
185
|
+
exit 1
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
Write-Output "Version number is $newVersion "
|
|
189
|
+
"$newVersion " | Out-File "$(Build.SourcesDirectory)/version.txt"
|
|
190
|
+
|
|
191
|
+
Write-Output "##vso[task.setvariable variable=ReleaseVersion]$newVersion"
|
|
192
|
+
- task: PublishPipelineArtifact@1
|
|
193
|
+
displayName: Publish release version artifact
|
|
194
|
+
inputs:
|
|
195
|
+
path: version.txt
|
|
196
|
+
artifactName: commit-data-drop-version
|
|
197
|
+
# - task: PowerShell@2
|
|
198
|
+
# displayName: Tag sitefinity-webservices-sdk repo
|
|
199
|
+
# condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|
|
200
|
+
# inputs:
|
|
201
|
+
# targetType: inline
|
|
202
|
+
# script: |
|
|
203
|
+
# $releaseBranches = ConvertFrom-Json -InputObject "$(SitefinitySdkReleaseBranches)"
|
|
204
|
+
|
|
205
|
+
# if ($releaseBranches -contains "$(Build.SourceBranch)") {
|
|
206
|
+
# $token = "$(VstsRestApiToken)"
|
|
207
|
+
# Write-Host "##vso[task.logissue type=warning;] Releasing Sitefinity webservices sdk - "$(ReleaseVersion)""
|
|
208
|
+
|
|
209
|
+
# $postParams = @{name="$(ReleaseVersion)";taggedObject=@{objectId="$(Build.SourceVersion)"};message='Sitefinity webservices sdk release'}
|
|
210
|
+
# $json = $postParams | ConvertTo-Json
|
|
211
|
+
|
|
212
|
+
# $headers = @{'Content-Type'='application/json'; 'Authorization'="Basic $token"}
|
|
213
|
+
# $tagUrl = "https://prgs-sitefinity.visualstudio.com/sitefinity/_apis/git/repositories/sitefinity-webservices-sdk/annotatedtags?api-version=4.1-preview.1"
|
|
214
|
+
|
|
215
|
+
# Invoke-WebRequest -Uri $tagUrl -Method POST -Body $json -Headers $headers
|
|
216
|
+
# } else {
|
|
217
|
+
# Write-Error "Cannot tag the branch with the new release since it is missing from the list with release branches. Please review the whitelisted branches"
|
|
218
|
+
# exit 1
|
|
219
|
+
# }
|
package/config/helpers.js
CHANGED
package/config/webpack.common.js
CHANGED
|
@@ -7,7 +7,7 @@ module.exports = function(options) {
|
|
|
7
7
|
return {
|
|
8
8
|
mode: 'development',
|
|
9
9
|
entry: {
|
|
10
|
-
"app": helpers.
|
|
10
|
+
"app": helpers.root("sitefinity-webservices-sdk"),
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
output: {
|
|
@@ -18,8 +18,6 @@ module.exports = function(options) {
|
|
|
18
18
|
library: "Sitefinity"
|
|
19
19
|
},
|
|
20
20
|
plugins: [
|
|
21
|
-
// This plugin optimizes chunks and modules by how much they are used in your app
|
|
22
|
-
new webpack.optimize.OccurrenceOrderPlugin(),
|
|
23
21
|
//Skipping the error emitting phase (and recording phase) during compilation, so there are no assets emitted that include errors
|
|
24
22
|
new webpack.NoEmitOnErrorsPlugin()
|
|
25
23
|
],
|
package/config/webpack.dev.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
// For instructions about this file refer to
|
|
2
2
|
// webpack and webpack-hot-middleware documentation
|
|
3
|
-
const
|
|
4
|
-
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
5
|
-
|
|
3
|
+
const { merge } = require("webpack-merge"); // used to merge webpack configs
|
|
6
4
|
const commonConfig = require("./webpack.common"); // the settings that are common to prod and dev
|
|
7
|
-
const htmlConfig = require("./html.conf");
|
|
8
5
|
|
|
9
|
-
module.exports =
|
|
6
|
+
module.exports = merge(commonConfig({ env: "dev" }), {
|
|
10
7
|
devtool: "source-map",
|
|
11
8
|
|
|
12
9
|
output: {
|
|
@@ -19,8 +16,4 @@ module.exports = webpackMerge(commonConfig({ env: "dev" }), {
|
|
|
19
16
|
historyApiFallback: true,
|
|
20
17
|
stats: "normal"
|
|
21
18
|
},
|
|
22
|
-
|
|
23
|
-
plugins: [
|
|
24
|
-
new HtmlWebpackPlugin(htmlConfig)
|
|
25
|
-
]
|
|
26
19
|
});
|
package/config/webpack.prod.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// For instructions about this file refer to
|
|
2
2
|
// webpack and webpack-hot-middleware documentation
|
|
3
|
-
const
|
|
3
|
+
const { merge } = require("webpack-merge"); // used to merge webpack configs
|
|
4
4
|
const commonConfig = require("./webpack.common"); // the settings that are common to prod and dev
|
|
5
5
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
6
|
-
const TypedocWebpackPlugin = require('typedoc-webpack-plugin');
|
|
7
6
|
|
|
8
7
|
module.exports =
|
|
9
|
-
|
|
8
|
+
merge(commonConfig({ env: "prod" }), {
|
|
10
9
|
mode: 'production',
|
|
11
10
|
output: {
|
|
12
11
|
filename: "sitefinity-webservices-sdk.min.js"
|
|
@@ -16,9 +15,9 @@ module.exports =
|
|
|
16
15
|
new HtmlWebpackPlugin({
|
|
17
16
|
"filename": "../dist/samples.html",
|
|
18
17
|
"template": "template.html",
|
|
19
|
-
"inject": "head"
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
"inject": "head",
|
|
19
|
+
"scriptLoading": "blocking"
|
|
20
|
+
})
|
|
22
21
|
],
|
|
23
22
|
optimization: {
|
|
24
23
|
minimize: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--light-hl-0: #000000;
|
|
3
|
+
--dark-hl-0: #D4D4D4;
|
|
4
|
+
--light-hl-1: #0000FF;
|
|
5
|
+
--dark-hl-1: #569CD6;
|
|
6
|
+
--light-hl-2: #001080;
|
|
7
|
+
--dark-hl-2: #9CDCFE;
|
|
8
|
+
--light-hl-3: #A31515;
|
|
9
|
+
--dark-hl-3: #CE9178;
|
|
10
|
+
--light-hl-4: #795E26;
|
|
11
|
+
--dark-hl-4: #DCDCAA;
|
|
12
|
+
--light-code-background: #F5F5F5;
|
|
13
|
+
--dark-code-background: #1E1E1E;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (prefers-color-scheme: light) { :root {
|
|
17
|
+
--hl-0: var(--light-hl-0);
|
|
18
|
+
--hl-1: var(--light-hl-1);
|
|
19
|
+
--hl-2: var(--light-hl-2);
|
|
20
|
+
--hl-3: var(--light-hl-3);
|
|
21
|
+
--hl-4: var(--light-hl-4);
|
|
22
|
+
--code-background: var(--light-code-background);
|
|
23
|
+
} }
|
|
24
|
+
|
|
25
|
+
@media (prefers-color-scheme: dark) { :root {
|
|
26
|
+
--hl-0: var(--dark-hl-0);
|
|
27
|
+
--hl-1: var(--dark-hl-1);
|
|
28
|
+
--hl-2: var(--dark-hl-2);
|
|
29
|
+
--hl-3: var(--dark-hl-3);
|
|
30
|
+
--hl-4: var(--dark-hl-4);
|
|
31
|
+
--code-background: var(--dark-code-background);
|
|
32
|
+
} }
|
|
33
|
+
|
|
34
|
+
body.light {
|
|
35
|
+
--hl-0: var(--light-hl-0);
|
|
36
|
+
--hl-1: var(--light-hl-1);
|
|
37
|
+
--hl-2: var(--light-hl-2);
|
|
38
|
+
--hl-3: var(--light-hl-3);
|
|
39
|
+
--hl-4: var(--light-hl-4);
|
|
40
|
+
--code-background: var(--light-code-background);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body.dark {
|
|
44
|
+
--hl-0: var(--dark-hl-0);
|
|
45
|
+
--hl-1: var(--dark-hl-1);
|
|
46
|
+
--hl-2: var(--dark-hl-2);
|
|
47
|
+
--hl-3: var(--dark-hl-3);
|
|
48
|
+
--hl-4: var(--dark-hl-4);
|
|
49
|
+
--code-background: var(--dark-code-background);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.hl-0 { color: var(--hl-0); }
|
|
53
|
+
.hl-1 { color: var(--hl-1); }
|
|
54
|
+
.hl-2 { color: var(--hl-2); }
|
|
55
|
+
.hl-3 { color: var(--hl-3); }
|
|
56
|
+
.hl-4 { color: var(--hl-4); }
|
|
57
|
+
pre, code { background: var(--code-background); }
|