@harperfast/harper-pro 5.0.0-alpha.2 → 5.0.0-alpha.4
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/core/.github/workflows/create-release.yaml +181 -0
- package/core/.github/workflows/notify-release-published.yaml +50 -0
- package/core/.github/workflows/publish-docker.yaml +174 -0
- package/core/.github/workflows/publish-npm.yaml +173 -0
- package/core/CONTRIBUTING.md +2 -0
- package/core/bin/harper.js +6 -0
- package/core/components/PluginModule.ts +0 -1
- package/core/components/componentLoader.ts +16 -4
- package/core/dev/sync-commits.js +18 -7
- package/core/integrationTests/server/operation-user-rbac.test.ts +484 -0
- package/core/package.json +4 -3
- package/core/resources/DatabaseTransaction.ts +2 -1
- package/core/resources/LMDBTransaction.ts +9 -4
- package/core/resources/RecordEncoder.ts +5 -3
- package/core/resources/RequestTarget.ts +1 -1
- package/core/resources/Resource.ts +1 -1
- package/core/resources/RocksTransactionLogStore.ts +106 -12
- package/core/resources/Table.ts +108 -114
- package/core/resources/dataLoader.ts +0 -1
- package/core/resources/databases.ts +1 -1
- package/core/resources/jsResource.ts +0 -2
- package/core/resources/registrationDeprecated.ts +8 -0
- package/core/resources/transactionBroadcast.ts +29 -25
- package/core/security/auth.ts +14 -1
- package/core/security/jsLoader.ts +9 -2
- package/core/security/permissionsTranslator.js +4 -0
- package/core/security/user.ts +20 -2
- package/core/server/REST.ts +29 -16
- package/core/server/Server.ts +6 -2
- package/core/server/http.ts +5 -7
- package/core/server/serverHelpers/Request.ts +5 -0
- package/core/server/serverHelpers/serverUtilities.ts +6 -2
- package/core/server/static.ts +0 -2
- package/core/unitTests/apiTests/cache-test.mjs +37 -0
- package/core/unitTests/commonTestErrors.js +4 -0
- package/core/unitTests/dataLayer/SQLSearch.test.js +2 -2
- package/core/unitTests/dataLayer/sql-update.test.js +2 -2
- package/core/unitTests/resources/auditLog.test.js +167 -0
- package/core/unitTests/resources/caching.test.js +79 -0
- package/core/unitTests/resources/permissions.test.js +7 -2
- package/core/unitTests/resources/txn-tracking.test.js +10 -4
- package/core/unitTests/resources/vectorIndex.test.js +1 -0
- package/core/unitTests/testApp/resources.js +30 -0
- package/core/unitTests/testApp/schema.graphql +5 -0
- package/core/unitTests/utility/operationPermissions.test.js +107 -0
- package/core/unitTests/utility/operation_authorization.test.js +130 -0
- package/core/unitTests/validation/role_validation.test.js +79 -0
- package/core/utility/common_utils.js +8 -4
- package/core/utility/errors/commonErrors.js +4 -0
- package/core/utility/hdbTerms.ts +1 -0
- package/core/utility/operationPermissions.ts +96 -0
- package/core/utility/operation_authorization.js +150 -49
- package/core/validation/role_validation.js +23 -0
- package/dist/bin/harper.js +1 -1
- package/dist/bin/harper.js.map +1 -1
- package/dist/cloneNode/cloneNode.js +55 -38
- package/dist/cloneNode/cloneNode.js.map +1 -1
- package/dist/core/bin/harper.js +2 -0
- package/dist/core/bin/harper.js.map +1 -1
- package/dist/core/components/ComponentV1.js +1 -0
- package/dist/core/components/ComponentV1.js.map +1 -1
- package/dist/core/components/EntryHandler.js +35 -1
- package/dist/core/components/EntryHandler.js.map +1 -1
- package/dist/core/components/PluginModule.js +1 -0
- package/dist/core/components/PluginModule.js.map +1 -1
- package/dist/core/components/Scope.js +2 -0
- package/dist/core/components/Scope.js.map +1 -1
- package/dist/core/components/componentLoader.js +12 -3
- package/dist/core/components/componentLoader.js.map +1 -1
- package/dist/core/components/status/api.js +1 -0
- package/dist/core/components/status/api.js.map +1 -1
- package/dist/core/components/status/crossThread.js +1 -0
- package/dist/core/components/status/crossThread.js.map +1 -1
- package/dist/core/config/RootConfigWatcher.js +34 -4
- package/dist/core/config/RootConfigWatcher.js.map +1 -1
- package/dist/core/dataLayer/harperBridge/ResourceBridge.js +1 -0
- package/dist/core/dataLayer/harperBridge/ResourceBridge.js.map +1 -1
- package/dist/core/resources/DatabaseTransaction.js +3 -1
- package/dist/core/resources/DatabaseTransaction.js.map +1 -1
- package/dist/core/resources/ErrorResource.js +1 -0
- package/dist/core/resources/ErrorResource.js.map +1 -1
- package/dist/core/resources/LMDBTransaction.js +10 -5
- package/dist/core/resources/LMDBTransaction.js.map +1 -1
- package/dist/core/resources/RecordEncoder.js +5 -3
- package/dist/core/resources/RecordEncoder.js.map +1 -1
- package/dist/core/resources/RequestTarget.js +3 -0
- package/dist/core/resources/RequestTarget.js.map +1 -1
- package/dist/core/resources/Resource.js +2 -1
- package/dist/core/resources/Resource.js.map +1 -1
- package/dist/core/resources/ResourceInterface.js +3 -0
- package/dist/core/resources/ResourceInterface.js.map +1 -1
- package/dist/core/resources/ResourceInterfaceV2.js +2 -0
- package/dist/core/resources/ResourceInterfaceV2.js.map +1 -1
- package/dist/core/resources/ResourceV2.js +3 -0
- package/dist/core/resources/ResourceV2.js.map +1 -1
- package/dist/core/resources/Resources.js +1 -0
- package/dist/core/resources/Resources.js.map +1 -1
- package/dist/core/resources/RocksIndexStore.js +1 -0
- package/dist/core/resources/RocksIndexStore.js.map +1 -1
- package/dist/core/resources/RocksTransactionLogStore.js +102 -12
- package/dist/core/resources/RocksTransactionLogStore.js.map +1 -1
- package/dist/core/resources/Table.js +100 -111
- package/dist/core/resources/Table.js.map +1 -1
- package/dist/core/resources/blob.js +1 -0
- package/dist/core/resources/blob.js.map +1 -1
- package/dist/core/resources/dataLoader.js +3 -2
- package/dist/core/resources/dataLoader.js.map +1 -1
- package/dist/core/resources/databases.js +1 -1
- package/dist/core/resources/databases.js.map +1 -1
- package/dist/core/resources/jsResource.js +2 -2
- package/dist/core/resources/jsResource.js.map +1 -1
- package/dist/core/resources/openApi.js +1 -0
- package/dist/core/resources/openApi.js.map +1 -1
- package/dist/core/resources/registrationDeprecated.js +11 -0
- package/dist/core/resources/registrationDeprecated.js.map +1 -0
- package/dist/core/resources/replayLogs.js +2 -0
- package/dist/core/resources/replayLogs.js.map +1 -1
- package/dist/core/resources/search.js +1 -0
- package/dist/core/resources/search.js.map +1 -1
- package/dist/core/resources/transactionBroadcast.js +30 -27
- package/dist/core/resources/transactionBroadcast.js.map +1 -1
- package/dist/core/security/auth.js +15 -1
- package/dist/core/security/auth.js.map +1 -1
- package/dist/core/security/jsLoader.js +10 -2
- package/dist/core/security/jsLoader.js.map +1 -1
- package/dist/core/security/permissionsTranslator.js +4 -0
- package/dist/core/security/permissionsTranslator.js.map +1 -1
- package/dist/core/security/user.js +16 -1
- package/dist/core/security/user.js.map +1 -1
- package/dist/core/server/REST.js +35 -18
- package/dist/core/server/REST.js.map +1 -1
- package/dist/core/server/Server.js +2 -0
- package/dist/core/server/Server.js.map +1 -1
- package/dist/core/server/http.js +5 -3
- package/dist/core/server/http.js.map +1 -1
- package/dist/core/server/operationsServer.js +2 -1
- package/dist/core/server/operationsServer.js.map +1 -1
- package/dist/core/server/serverHelpers/Request.js +2 -0
- package/dist/core/server/serverHelpers/Request.js.map +1 -1
- package/dist/core/server/serverHelpers/serverUtilities.js +3 -2
- package/dist/core/server/serverHelpers/serverUtilities.js.map +1 -1
- package/dist/core/server/static.js +1 -2
- package/dist/core/server/static.js.map +1 -1
- package/dist/core/utility/common_utils.js +7 -5
- package/dist/core/utility/common_utils.js.map +1 -1
- package/dist/core/utility/errors/commonErrors.js +3 -0
- package/dist/core/utility/errors/commonErrors.js.map +1 -1
- package/dist/core/utility/hdbTerms.js +1 -0
- package/dist/core/utility/hdbTerms.js.map +1 -1
- package/dist/core/utility/operationPermissions.js +101 -0
- package/dist/core/utility/operationPermissions.js.map +1 -0
- package/dist/core/utility/operation_authorization.js +83 -49
- package/dist/core/utility/operation_authorization.js.map +1 -1
- package/dist/core/validation/role_validation.js +19 -1
- package/dist/core/validation/role_validation.js.map +1 -1
- package/dist/licensing/usageLicensing.js +243 -0
- package/dist/licensing/usageLicensing.js.map +1 -0
- package/dist/licensing/validation.js +149 -0
- package/dist/licensing/validation.js.map +1 -0
- package/dist/replication/replicationConnection.js +90 -24
- package/dist/replication/replicationConnection.js.map +1 -1
- package/dist/replication/replicator.js +6 -2
- package/dist/replication/replicator.js.map +1 -1
- package/dist/replication/setNode.js +0 -1
- package/dist/replication/setNode.js.map +1 -1
- package/dist/security/certificate.js +206 -6
- package/dist/security/certificate.js.map +1 -1
- package/dist/security/keyService.js +58 -0
- package/dist/security/keyService.js.map +1 -0
- package/dist/security/sshKeyOperations.js +344 -0
- package/dist/security/sshKeyOperations.js.map +1 -0
- package/licensing/usageLicensing.ts +260 -0
- package/licensing/validation.ts +191 -0
- package/npm-shrinkwrap.json +509 -463
- package/package.json +6 -3
- package/replication/replicationConnection.ts +99 -31
- package/replication/replicator.ts +8 -3
- package/replication/setNode.ts +0 -1
- package/security/certificate.ts +259 -7
- package/security/keyService.ts +74 -0
- package/security/sshKeyOperations.ts +405 -0
- package/static/defaultConfig.yaml +2 -0
- package/studio/web/HDBDogOnly.svg +78 -0
- package/studio/web/assets/PPRadioGrotesk-Bold-DDaUYG8E.woff +0 -0
- package/studio/web/assets/fa-brands-400-CEJbCg16.woff +0 -0
- package/studio/web/assets/fa-brands-400-CSYNqBb_.ttf +0 -0
- package/studio/web/assets/fa-brands-400-DnkPfk3o.eot +0 -0
- package/studio/web/assets/fa-brands-400-UxlILjvJ.woff2 +0 -0
- package/studio/web/assets/fa-brands-400-cH1MgKbP.svg +3717 -0
- package/studio/web/assets/fa-regular-400-BhTwtT8w.eot +0 -0
- package/studio/web/assets/fa-regular-400-D1vz6WBx.ttf +0 -0
- package/studio/web/assets/fa-regular-400-DFnMcJPd.woff +0 -0
- package/studio/web/assets/fa-regular-400-DGzu1beS.woff2 +0 -0
- package/studio/web/assets/fa-regular-400-gwj8Pxq-.svg +801 -0
- package/studio/web/assets/fa-solid-900-B4ZZ7kfP.svg +5034 -0
- package/studio/web/assets/fa-solid-900-B6Axprfb.eot +0 -0
- package/studio/web/assets/fa-solid-900-BUswJgRo.woff2 +0 -0
- package/studio/web/assets/fa-solid-900-DOXgCApm.woff +0 -0
- package/studio/web/assets/fa-solid-900-mxuxnBEa.ttf +0 -0
- package/studio/web/assets/index-CjpELGtS.js +37 -0
- package/studio/web/assets/index-CjpELGtS.js.map +1 -0
- package/studio/web/assets/index-VoSl--bG.js +235 -0
- package/studio/web/assets/index-VoSl--bG.js.map +1 -0
- package/studio/web/assets/index-Y2g_iFpU.css +1 -0
- package/studio/web/assets/index-jiPwkrsB.css +1 -0
- package/studio/web/assets/index-o10iYrkU.js +2 -0
- package/studio/web/assets/index-o10iYrkU.js.map +1 -0
- package/studio/web/assets/index.lazy-D5hjT1pS.js +266 -0
- package/studio/web/assets/index.lazy-D5hjT1pS.js.map +1 -0
- package/studio/web/assets/profiler-B9Edexdi.js +2 -0
- package/studio/web/assets/profiler-B9Edexdi.js.map +1 -0
- package/studio/web/assets/react-redux-DsVOxD2E.js +6 -0
- package/studio/web/assets/react-redux-DsVOxD2E.js.map +1 -0
- package/studio/web/assets/startRecording-Bwd6AYRS.js +3 -0
- package/studio/web/assets/startRecording-Bwd6AYRS.js.map +1 -0
- package/studio/web/fabric-signup-background.webp +0 -0
- package/studio/web/fabric-signup-text.png +0 -0
- package/studio/web/favicon_purple.png +0 -0
- package/studio/web/github-icon.svg +15 -0
- package/studio/web/harper-fabric_black.png +0 -0
- package/studio/web/harper-fabric_white.png +0 -0
- package/studio/web/harper-studio_white.png +0 -0
- package/studio/web/index.html +16 -0
- package/studio/web/running.css +148 -0
- package/studio/web/running.html +147 -0
- package/studio/web/running.js +111 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
name: Create Release on Version Tag
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*.*.*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
version:
|
|
10
|
+
description: 'Version; should look like v1.2.3(-[alpha|beta|rc].N])'
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref_name }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
create-release:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
outputs:
|
|
21
|
+
harper-version: ${{ steps.package-version.outputs.packageVersion }}
|
|
22
|
+
draft-release-url: ${{ steps.create-release.outputs.url }}
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v6
|
|
25
|
+
- uses: actions/setup-node@v6
|
|
26
|
+
with:
|
|
27
|
+
node-version: latest
|
|
28
|
+
package-manager-cache: false
|
|
29
|
+
- name: Get package.json version
|
|
30
|
+
id: package-version
|
|
31
|
+
run: echo "packageVersion=$(npm pkg get version | tr -d '\"')" >> "$GITHUB_OUTPUT"
|
|
32
|
+
- name: Get tag version
|
|
33
|
+
id: tag-version
|
|
34
|
+
run: |
|
|
35
|
+
if [[ "${{ github.event.inputs.version }}" != "" ]]; then
|
|
36
|
+
echo "tagVersion=${{ github.event.inputs.version }}"
|
|
37
|
+
else
|
|
38
|
+
echo "tagVersion=${{ github.ref_name }}"
|
|
39
|
+
fi >> "$GITHUB_OUTPUT"
|
|
40
|
+
- name: Confirm tag version matches package.json version
|
|
41
|
+
run: |
|
|
42
|
+
echo "Tag version: ${{ steps.tag-version.outputs.tagVersion }}"
|
|
43
|
+
echo "Package.json version: v${{ steps.package-version.outputs.packageVersion }}"
|
|
44
|
+
test "${{ steps.tag-version.outputs.tagVersion }}" == "v${{ steps.package-version.outputs.packageVersion }}"
|
|
45
|
+
- name: Notify release in progress in Slack
|
|
46
|
+
uses: slackapi/slack-github-action@v2
|
|
47
|
+
with:
|
|
48
|
+
method: chat.postMessage
|
|
49
|
+
token: ${{ secrets.SLACK_BOT_KEY }}
|
|
50
|
+
payload: |
|
|
51
|
+
{
|
|
52
|
+
"channel": "#development-ci",
|
|
53
|
+
"text": "Harper ${{ steps.tag-version.outputs.tagVersion }} release in progress",
|
|
54
|
+
"blocks": [
|
|
55
|
+
{
|
|
56
|
+
"type": "header",
|
|
57
|
+
"text": {
|
|
58
|
+
"type": "plain_text",
|
|
59
|
+
"text": "Harper ${{ steps.tag-version.outputs.tagVersion }} release"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "context",
|
|
64
|
+
"elements": [
|
|
65
|
+
{
|
|
66
|
+
"type": "mrkdwn",
|
|
67
|
+
"text": "*Status*"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "mrkdwn",
|
|
71
|
+
"text": ":hourglass_flowing_sand: In progress"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "mrkdwn",
|
|
75
|
+
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow run ${{ github.run_id }}>"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
- name: Package Harper
|
|
82
|
+
run: npm run package
|
|
83
|
+
- name: Get version components
|
|
84
|
+
id: version-components
|
|
85
|
+
uses: matt-usurp/validate-semver@v2
|
|
86
|
+
with:
|
|
87
|
+
version: ${{ steps.tag-version.outputs.tagVersion }}
|
|
88
|
+
- name: Create Release
|
|
89
|
+
id: create-release
|
|
90
|
+
uses: softprops/action-gh-release@v2
|
|
91
|
+
with:
|
|
92
|
+
name: ${{ steps.tag-version.outputs.tagVersion }}
|
|
93
|
+
tag_name: ${{ steps.tag-version.outputs.tagVersion }}
|
|
94
|
+
files: harperfast-harper-*.tgz
|
|
95
|
+
fail_on_unmatched_files: true
|
|
96
|
+
generate_release_notes: true
|
|
97
|
+
prerelease: ${{ steps.version-components.outputs.prerelease != '' }}
|
|
98
|
+
draft: true
|
|
99
|
+
make_latest: ${{ github.event.inputs.draft == 'false' && steps.version-components.outputs.prerelease == '' }}
|
|
100
|
+
|
|
101
|
+
send-slack-message-on-success:
|
|
102
|
+
if: success() && !cancelled()
|
|
103
|
+
needs: [create-release]
|
|
104
|
+
runs-on: ubuntu-latest
|
|
105
|
+
steps:
|
|
106
|
+
- uses: slackapi/slack-github-action@v2
|
|
107
|
+
with:
|
|
108
|
+
method: chat.postMessage
|
|
109
|
+
token: ${{ secrets.SLACK_BOT_KEY }}
|
|
110
|
+
payload: |
|
|
111
|
+
{
|
|
112
|
+
"channel": "#development-ci",
|
|
113
|
+
"text": "Harper v${{ needs.create-release.outputs.harper-version }} draft release created",
|
|
114
|
+
"blocks": [
|
|
115
|
+
{
|
|
116
|
+
"type": "header",
|
|
117
|
+
"text": {
|
|
118
|
+
"type": "plain_text",
|
|
119
|
+
"text": "Harper v${{ needs.create-release.outputs.harper-version }} release"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "context",
|
|
124
|
+
"elements": [
|
|
125
|
+
{
|
|
126
|
+
"type": "mrkdwn",
|
|
127
|
+
"text": "*Status*"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "mrkdwn",
|
|
131
|
+
"text": ":github: Draft release waiting for review"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"type": "mrkdwn",
|
|
135
|
+
"text": "<${{ needs.create-release.outputs.draft-release-url }}|Review draft release>"
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
send-slack-message-on-failure:
|
|
143
|
+
if: failure() && !cancelled()
|
|
144
|
+
needs: [create-release]
|
|
145
|
+
runs-on: ubuntu-latest
|
|
146
|
+
steps:
|
|
147
|
+
- uses: slackapi/slack-github-action@v2
|
|
148
|
+
with:
|
|
149
|
+
method: chat.postMessage
|
|
150
|
+
token: ${{ secrets.SLACK_BOT_KEY }}
|
|
151
|
+
payload: |
|
|
152
|
+
{
|
|
153
|
+
"channel": "#development-ci",
|
|
154
|
+
"text": "Harper v${{ needs.create-release.outputs.harper-version }} release failed",
|
|
155
|
+
"blocks": [
|
|
156
|
+
{
|
|
157
|
+
"type": "header",
|
|
158
|
+
"text": {
|
|
159
|
+
"type": "plain_text",
|
|
160
|
+
"text": "Harper v${{ needs.create-release.outputs.harper-version }} release"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"type": "context",
|
|
165
|
+
"elements": [
|
|
166
|
+
{
|
|
167
|
+
"type": "mrkdwn",
|
|
168
|
+
"text": "*Status*"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"type": "mrkdwn",
|
|
172
|
+
"text": ":x: Failed"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"type": "mrkdwn",
|
|
176
|
+
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow run ${{ github.run_id }}>"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Notify release published
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
notify-slack:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Send Slack release published notification
|
|
16
|
+
uses: slackapi/slack-github-action@v2
|
|
17
|
+
with:
|
|
18
|
+
method: chat.postMessage
|
|
19
|
+
token: ${{ secrets.SLACK_BOT_KEY }}
|
|
20
|
+
payload: |
|
|
21
|
+
{
|
|
22
|
+
"channel": "#development-ci",
|
|
23
|
+
"text": "Harper v${{ github.event.release.tag_name }} GitHub release published",
|
|
24
|
+
"blocks": [
|
|
25
|
+
{
|
|
26
|
+
"type": "header",
|
|
27
|
+
"text": {
|
|
28
|
+
"type": "plain_text",
|
|
29
|
+
"text": "Harper v${{ github.event.release.tag_name }} release"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "context",
|
|
34
|
+
"elements": [
|
|
35
|
+
{
|
|
36
|
+
"type": "mrkdwn",
|
|
37
|
+
"text": "*Status*"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "mrkdwn",
|
|
41
|
+
"text": ":white_check_mark: Release approved and published on :github:"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "mrkdwn",
|
|
45
|
+
"text": "<${{ github.event.release.html_url }}|GitHub release>"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
name: Publish Docker Image
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ${{ matrix.runner }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
include:
|
|
18
|
+
- platform: linux/amd64
|
|
19
|
+
runner: ubuntu-latest
|
|
20
|
+
- platform: linux/arm64
|
|
21
|
+
runner: ubuntu-24.04-arm
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v6
|
|
24
|
+
- name: Setup Docker metadata
|
|
25
|
+
id: meta
|
|
26
|
+
uses: docker/metadata-action@v5
|
|
27
|
+
with:
|
|
28
|
+
images: harperfast/harper
|
|
29
|
+
- name: Login to Docker Hub
|
|
30
|
+
uses: docker/login-action@v3
|
|
31
|
+
with:
|
|
32
|
+
username: ${{ vars.DOCKERHUB_USERNAME }}
|
|
33
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
34
|
+
- name: Setup Docker Buildx
|
|
35
|
+
uses: docker/setup-buildx-action@v3
|
|
36
|
+
- name: Build and push by digest
|
|
37
|
+
id: build
|
|
38
|
+
uses: docker/build-push-action@v6
|
|
39
|
+
with:
|
|
40
|
+
context: .
|
|
41
|
+
platforms: ${{ matrix.platform }}
|
|
42
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
43
|
+
outputs: type=image,name=harperfast/harper,push-by-digest=true,name-canonical=true,push=true
|
|
44
|
+
- name: Export digest
|
|
45
|
+
run: |
|
|
46
|
+
mkdir -p /tmp/digests
|
|
47
|
+
digest="${{ steps.build.outputs.digest }}"
|
|
48
|
+
touch "/tmp/digests/${digest#sha256:}"
|
|
49
|
+
- name: Upload digest
|
|
50
|
+
uses: actions/upload-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: digest-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}
|
|
53
|
+
path: /tmp/digests/*
|
|
54
|
+
if-no-files-found: error
|
|
55
|
+
retention-days: 1
|
|
56
|
+
|
|
57
|
+
merge:
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
needs: [build]
|
|
60
|
+
outputs:
|
|
61
|
+
docker-image-tag: ${{ steps.meta.outputs.version }}
|
|
62
|
+
steps:
|
|
63
|
+
- name: Download digests
|
|
64
|
+
uses: actions/download-artifact@v4
|
|
65
|
+
with:
|
|
66
|
+
path: /tmp/digests
|
|
67
|
+
pattern: digest-*
|
|
68
|
+
merge-multiple: true
|
|
69
|
+
- name: Setup Docker metadata
|
|
70
|
+
id: meta
|
|
71
|
+
uses: docker/metadata-action@v5
|
|
72
|
+
with:
|
|
73
|
+
images: harperfast/harper
|
|
74
|
+
tags: |
|
|
75
|
+
type=semver,pattern={{version}}
|
|
76
|
+
type=semver,pattern={{major}}.{{minor}}
|
|
77
|
+
type=semver,pattern={{major}}
|
|
78
|
+
type=sha
|
|
79
|
+
- name: Login to Docker Hub
|
|
80
|
+
uses: docker/login-action@v3
|
|
81
|
+
with:
|
|
82
|
+
username: ${{ vars.DOCKERHUB_USERNAME }}
|
|
83
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
84
|
+
- name: Create manifest list and push
|
|
85
|
+
working-directory: /tmp/digests
|
|
86
|
+
run: |
|
|
87
|
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
88
|
+
$(printf 'harperfast/harper@sha256:%s ' *)
|
|
89
|
+
- name: Inspect image
|
|
90
|
+
run: |
|
|
91
|
+
docker buildx imagetools inspect harperfast/harper:${{ steps.meta.outputs.version }}
|
|
92
|
+
|
|
93
|
+
send-slack-message-on-success:
|
|
94
|
+
if: success() && !cancelled()
|
|
95
|
+
needs: [merge]
|
|
96
|
+
runs-on: ubuntu-latest
|
|
97
|
+
steps:
|
|
98
|
+
- name: Send Slack published notification
|
|
99
|
+
uses: slackapi/slack-github-action@v2
|
|
100
|
+
with:
|
|
101
|
+
method: chat.postMessage
|
|
102
|
+
token: ${{ secrets.SLACK_BOT_KEY }}
|
|
103
|
+
payload: |
|
|
104
|
+
{
|
|
105
|
+
"channel": "#development-ci",
|
|
106
|
+
"text": "Harper v${{ needs.merge.outputs.docker-image-tag }} has been published to Docker Hub",
|
|
107
|
+
"blocks": [
|
|
108
|
+
{
|
|
109
|
+
"type": "header",
|
|
110
|
+
"text": {
|
|
111
|
+
"type": "plain_text",
|
|
112
|
+
"text": "Harper v${{ needs.merge.outputs.docker-image-tag }} release"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "context",
|
|
117
|
+
"elements": [
|
|
118
|
+
{
|
|
119
|
+
"type": "mrkdwn",
|
|
120
|
+
"text": "*Status*"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "mrkdwn",
|
|
124
|
+
"text": ":white_check_mark: Published to :docker_logo:"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "mrkdwn",
|
|
128
|
+
"text": "<https://hub.docker.com/layers/harperfast/harper/${{ needs.merge.outputs.docker-image-tag }}|harperfast/harper:${{ needs.merge.outputs.docker-image-tag }}>"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
send-slack-message-on-failure:
|
|
136
|
+
if: failure() && !cancelled()
|
|
137
|
+
needs: [merge]
|
|
138
|
+
runs-on: ubuntu-latest
|
|
139
|
+
steps:
|
|
140
|
+
- uses: slackapi/slack-github-action@v2
|
|
141
|
+
with:
|
|
142
|
+
method: chat.postMessage
|
|
143
|
+
token: ${{ secrets.SLACK_BOT_KEY }}
|
|
144
|
+
payload: |
|
|
145
|
+
{
|
|
146
|
+
"channel": "#development-ci",
|
|
147
|
+
"text": "Harper v${{ needs.merge.outputs.docker-image-tag }} Docker publish failed",
|
|
148
|
+
"blocks": [
|
|
149
|
+
{
|
|
150
|
+
"type": "header",
|
|
151
|
+
"text": {
|
|
152
|
+
"type": "plain_text",
|
|
153
|
+
"text": "Harper v${{ needs.merge.outputs.docker-image-tag }} release"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"type": "context",
|
|
158
|
+
"elements": [
|
|
159
|
+
{
|
|
160
|
+
"type": "mrkdwn",
|
|
161
|
+
"text": "*Status*"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"type": "mrkdwn",
|
|
165
|
+
"text": ":x: Failed to publish to :docker_logo:"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"type": "mrkdwn",
|
|
169
|
+
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow run ${{ github.run_id }}>"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
name: Publish NPM Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish-harper-npm-package:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
outputs:
|
|
15
|
+
harper-version: ${{ steps.version-components.outputs.version }}
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/setup-node@v6
|
|
18
|
+
with:
|
|
19
|
+
node-version: latest
|
|
20
|
+
registry-url: 'https://registry.npmjs.org'
|
|
21
|
+
- uses: actions/checkout@v6
|
|
22
|
+
- name: Get release build
|
|
23
|
+
env:
|
|
24
|
+
GH_TOKEN: ${{ github.token }}
|
|
25
|
+
run: gh release download ${{ github.event.release.tag_name }} --pattern "harper-*.tgz"
|
|
26
|
+
- name: Get version components
|
|
27
|
+
id: version-components
|
|
28
|
+
uses: matt-usurp/validate-semver@v2
|
|
29
|
+
with:
|
|
30
|
+
version: ${{ github.event.release.tag_name }}
|
|
31
|
+
- name: Set package tag
|
|
32
|
+
id: package-tag
|
|
33
|
+
run: |
|
|
34
|
+
if [[ "${{ steps.version-components.outputs.prerelease }}" == '' ]]; then
|
|
35
|
+
echo "packageTag=latest" >> "$GITHUB_OUTPUT"
|
|
36
|
+
else
|
|
37
|
+
echo "packageTag=next" >> "$GITHUB_OUTPUT"
|
|
38
|
+
fi
|
|
39
|
+
- name: Publish package to NPM registry
|
|
40
|
+
env:
|
|
41
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_KEY }}
|
|
42
|
+
run: npm publish --access=public --tag=${{ steps.package-tag.outputs.packageTag }} harper-*.tgz
|
|
43
|
+
|
|
44
|
+
publish-harperfast-npm-package:
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
outputs:
|
|
47
|
+
harper-version: ${{ steps.version-components.outputs.version }}
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/setup-node@v6
|
|
50
|
+
with:
|
|
51
|
+
node-version: latest
|
|
52
|
+
registry-url: 'https://registry.npmjs.org'
|
|
53
|
+
- uses: actions/checkout@v6
|
|
54
|
+
- name: Get release build
|
|
55
|
+
env:
|
|
56
|
+
GH_TOKEN: ${{ github.token }}
|
|
57
|
+
run: gh release download ${{ github.event.release.tag_name }} --pattern "harper-*.tgz"
|
|
58
|
+
- name: Get version components
|
|
59
|
+
id: version-components
|
|
60
|
+
uses: matt-usurp/validate-semver@v2
|
|
61
|
+
with:
|
|
62
|
+
version: ${{ github.event.release.tag_name }}
|
|
63
|
+
- name: Rename package to '@harperfast/harper'
|
|
64
|
+
run: |
|
|
65
|
+
mkdir package
|
|
66
|
+
tar -xvf harper-${{ steps.version-components.outputs.version }}.tgz -C package --strip-components=1
|
|
67
|
+
pushd package
|
|
68
|
+
npm pkg set name=@harperfast/harper
|
|
69
|
+
popd
|
|
70
|
+
tar -czvf harperfast-harper-${{ steps.version-components.outputs.version }}.tgz package
|
|
71
|
+
- name: Set package tag
|
|
72
|
+
id: package-tag
|
|
73
|
+
run: |
|
|
74
|
+
if [[ "${{ steps.version-components.outputs.prerelease }}" == '' ]]; then
|
|
75
|
+
echo "packageTag=latest" >> "$GITHUB_OUTPUT"
|
|
76
|
+
else
|
|
77
|
+
echo "packageTag=next" >> "$GITHUB_OUTPUT"
|
|
78
|
+
fi
|
|
79
|
+
- name: Publish package to NPM registry
|
|
80
|
+
env:
|
|
81
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_KEY }}
|
|
82
|
+
run: npm publish --access=public --tag=${{ steps.package-tag.outputs.packageTag }} harperfast-harper-*.tgz
|
|
83
|
+
|
|
84
|
+
send-slack-message-on-success:
|
|
85
|
+
if: success() && !cancelled()
|
|
86
|
+
needs:
|
|
87
|
+
- publish-harperfast-npm-package
|
|
88
|
+
- publish-harper-npm-package
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
steps:
|
|
91
|
+
- name: Send Slack published notification
|
|
92
|
+
uses: slackapi/slack-github-action@v2
|
|
93
|
+
with:
|
|
94
|
+
method: chat.postMessage
|
|
95
|
+
token: ${{ secrets.SLACK_BOT_KEY }}
|
|
96
|
+
payload: |
|
|
97
|
+
{
|
|
98
|
+
"channel": "#development-ci",
|
|
99
|
+
"text": "Harper v${{ needs.publish-harper-npm-package.outputs.harper-version }} has been published to NPM",
|
|
100
|
+
"blocks": [
|
|
101
|
+
{
|
|
102
|
+
"type": "header",
|
|
103
|
+
"text": {
|
|
104
|
+
"type": "plain_text",
|
|
105
|
+
"text": "Harper v${{ needs.publish-harper-npm-package.outputs.harper-version }} release"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "context",
|
|
110
|
+
"elements": [
|
|
111
|
+
{
|
|
112
|
+
"type": "mrkdwn",
|
|
113
|
+
"text": "*Status*"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "mrkdwn",
|
|
117
|
+
"text": ":white_check_mark: Published to :npm:"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "mrkdwn",
|
|
121
|
+
"text": "<https://www.npmjs.com/package/harper/v/${{ needs.publish-harper-npm-package.outputs.harper-version }}|harper@${{ needs.publish-harper-npm-package.outputs.harper-version }}>"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"type": "mrkdwn",
|
|
125
|
+
"text": "<https://www.npmjs.com/package/@harperfast/harperfast/v/${{ needs.publish-harperfast-npm-package.outputs.harper-version }}|@harperfast/harper@${{ needs.publish-harperfast-npm-package.outputs.harper-version }}>"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
send-slack-message-on-failure:
|
|
133
|
+
if: failure() && !cancelled()
|
|
134
|
+
needs:
|
|
135
|
+
- publish-harperfast-npm-package
|
|
136
|
+
- publish-harper-npm-package
|
|
137
|
+
runs-on: ubuntu-latest
|
|
138
|
+
steps:
|
|
139
|
+
- uses: slackapi/slack-github-action@v2
|
|
140
|
+
with:
|
|
141
|
+
method: chat.postMessage
|
|
142
|
+
token: ${{ secrets.SLACK_BOT_KEY }}
|
|
143
|
+
payload: |
|
|
144
|
+
{
|
|
145
|
+
"channel": "#development-ci",
|
|
146
|
+
"text": "Harper v${{ needs.publish-harper-npm-package.outputs.harper-version }} NPM publish failed",
|
|
147
|
+
"blocks": [
|
|
148
|
+
{
|
|
149
|
+
"type": "header",
|
|
150
|
+
"text": {
|
|
151
|
+
"type": "plain_text",
|
|
152
|
+
"text": "Harper v${{ needs.publish-harper-npm-package.outputs.harper-version }} release"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "context",
|
|
157
|
+
"elements": [
|
|
158
|
+
{
|
|
159
|
+
"type": "mrkdwn",
|
|
160
|
+
"text": "*Status*"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"type": "mrkdwn",
|
|
164
|
+
"text": ":x: Failed to publish to :npm:"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "mrkdwn",
|
|
168
|
+
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow run ${{ github.run_id }}>"
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
package/core/CONTRIBUTING.md
CHANGED
|
@@ -55,6 +55,8 @@ These are the steps @Ethan-Arrowood has been following to synchronize the reposi
|
|
|
55
55
|
>
|
|
56
56
|
> # Only fetch `main` branch
|
|
57
57
|
> git config remote.old.fetch '+refs/heads/main:refs/remotes/old/main'
|
|
58
|
+
> # Don't fetch tags
|
|
59
|
+
> git config remote.old.tagOpt '--no-tags'
|
|
58
60
|
> ```
|
|
59
61
|
|
|
60
62
|
1. Make sure local `main` branch is checked out and clean `git checkout main && git status`.
|
package/core/bin/harper.js
CHANGED
|
@@ -118,8 +118,14 @@ async function harper() {
|
|
|
118
118
|
process.env.RUN_HDB_APP = appFolder;
|
|
119
119
|
}
|
|
120
120
|
} else if (fs.existsSync(hdbTerms.HDB_COMPONENT_CONFIG_FILE) || fs.existsSync('schema.graphql')) {
|
|
121
|
+
console.warn(
|
|
122
|
+
`It appears you are running Harper Pro in an application directory, but did not specify the path. I'll go ahead and run the application for you since that's probably what you meant. But to avoid this warning in the future, run applications in the current directory like this: "harper ${service} ."`
|
|
123
|
+
);
|
|
121
124
|
process.env.RUN_HDB_APP = '.';
|
|
122
125
|
} else if (fs.existsSync(hdbTerms.HARPER_CONFIG_FILE) || fs.existsSync(hdbTerms.HDB_CONFIG_FILE)) {
|
|
126
|
+
console.warn(
|
|
127
|
+
`It appears you are running Harper Pro in a root data directory, but did not specify the path. I'll go ahead and run Harper Pro with its root path set to "." for you since that's probably what you meant. But to avoid this warning in the future, run it like this: "harper ${service} ."`
|
|
128
|
+
);
|
|
123
129
|
process.env.ROOTPATH = '.';
|
|
124
130
|
}
|
|
125
131
|
}
|
|
@@ -99,6 +99,8 @@ for (const { name, packageIdentifier } of getEnvBuiltInComponents()) {
|
|
|
99
99
|
TRUSTED_RESOURCE_PLUGINS[name] = packageIdentifier;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
const BUILT_INS = Object.keys(TRUSTED_RESOURCE_PLUGINS);
|
|
103
|
+
|
|
102
104
|
const portsStarted = [];
|
|
103
105
|
export const loadedPaths = new Map();
|
|
104
106
|
let errorReporter;
|
|
@@ -356,10 +358,6 @@ export async function loadComponent(
|
|
|
356
358
|
|
|
357
359
|
// New Plugin API (`handleApplication`)
|
|
358
360
|
if (resources.isWorker && extensionModule.handleApplication) {
|
|
359
|
-
if (extensionModule.suppressHandleApplicationWarning !== true) {
|
|
360
|
-
harperLogger.warn(`Plugin ${componentName} is using the experimental handleApplication API`);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
361
|
const scope = new Scope(componentName, componentDirectory, configPath, resources, server);
|
|
364
362
|
if (options.applicationContainment) scope.applicationContainment = options.applicationContainment;
|
|
365
363
|
|
|
@@ -372,6 +370,20 @@ export async function loadComponent(
|
|
|
372
370
|
}
|
|
373
371
|
|
|
374
372
|
// Old Extension API (`start` or `startOnMainThread`)
|
|
373
|
+
if (
|
|
374
|
+
!BUILT_INS.includes(componentName) &&
|
|
375
|
+
('startOnMainThread' in extensionModule ||
|
|
376
|
+
'start' in extensionModule ||
|
|
377
|
+
'handleFile' in extensionModule ||
|
|
378
|
+
'handleDirectory' in extensionModule ||
|
|
379
|
+
'setupFile' in extensionModule ||
|
|
380
|
+
'setupDirectory' in extensionModule)
|
|
381
|
+
) {
|
|
382
|
+
harperLogger.warn?.(
|
|
383
|
+
`Component ${componentName} is using deprecated extension API. Upgrade to the new Plugin API. For more information: https://docs.harperdb.io/docs/reference/components/plugins`
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
|
|
375
387
|
if (isMainThread) {
|
|
376
388
|
extensionModule =
|
|
377
389
|
(await extensionModule.startOnMainThread?.({
|