dcp-client 4.4.13 → 4.4.14
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/dist/dcp-client-bundle.js +2 -6665
- package/dist/dcp-client-bundle.js.map +1 -1
- package/package.json +9 -2
- package/.tidelift +0 -2
- package/bin/publish-docs.sh +0 -74
- package/catalog-info.yaml +0 -21
- package/etc/deprecated-dcp-config.js +0 -48
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dcp-client",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.14",
|
|
4
4
|
"description": "Core libraries for accessing DCP network",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dcp"
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/Distributed-Compute-Labs/dcp-client/issues"
|
|
11
11
|
},
|
|
12
|
+
"dcp": {
|
|
13
|
+
"version": "379a3131205d78e903405b80ba03575479eece7b",
|
|
14
|
+
"repository": "git@gitlab.com:Distributed-Compute-Protocol/dcp.git"
|
|
15
|
+
},
|
|
12
16
|
"repository": {
|
|
13
17
|
"type": "git",
|
|
14
18
|
"url": "git+ssh://git@github.com/Distributed-Compute-Labs/dcp-client.git"
|
|
@@ -22,7 +26,10 @@
|
|
|
22
26
|
"scripts": {
|
|
23
27
|
"build": "./build/bundle",
|
|
24
28
|
"test": "npx peter tests",
|
|
25
|
-
"vtest": "npx peter -v tests"
|
|
29
|
+
"vtest": "npx peter -v tests",
|
|
30
|
+
"prepack": "npm-hooks/prepack",
|
|
31
|
+
"postpublish": "npm-hooks/postpublish",
|
|
32
|
+
"prepublishOnly": "npm-hooks/prepublish"
|
|
26
33
|
},
|
|
27
34
|
"dependencies": {
|
|
28
35
|
"@kingsds/socket.io-client": "^4.5.4",
|
package/.tidelift
DELETED
package/bin/publish-docs.sh
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
#! /usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# @file publish-docs.sh
|
|
4
|
-
# @athor Brandon Christie <brandon@distributive.network>
|
|
5
|
-
# @date Aug 2023
|
|
6
|
-
#
|
|
7
|
-
# @description Publishes the docs for each component
|
|
8
|
-
# to backstage.
|
|
9
|
-
|
|
10
|
-
set -euo pipefail
|
|
11
|
-
|
|
12
|
-
cd "$(dirname "$0")/.."
|
|
13
|
-
|
|
14
|
-
ROOT_DIR=$PWD
|
|
15
|
-
|
|
16
|
-
echo "TechDocs Bucket Name: $TECHDOCS_S3_BUCKET_NAME"
|
|
17
|
-
echo "Namespace: $ENTITY_NAMESPACE"
|
|
18
|
-
|
|
19
|
-
ENTITY_KIND=$(yq ".kind" < catalog-info.yaml)
|
|
20
|
-
echo "Kind: $ENTITY_KIND"
|
|
21
|
-
|
|
22
|
-
ENTITY_NAME=$(yq ".metadata.name" < catalog-info.yaml)
|
|
23
|
-
echo "Name: $ENTITY_NAME"
|
|
24
|
-
|
|
25
|
-
TECHDOCS_REF=$(yq ".metadata.annotations.\"backstage.io/techdocs-ref\"" < catalog-info.yaml)
|
|
26
|
-
echo "TechDocs Ref: $TECHDOCS_REF"
|
|
27
|
-
|
|
28
|
-
# An example of the the techdocs-ref in the YAML file:
|
|
29
|
-
# dir:./docs/dcp
|
|
30
|
-
#
|
|
31
|
-
# The Regex below will isolate the directory path giving the
|
|
32
|
-
# result 'docs/dcp' for the given example.
|
|
33
|
-
if [[ "$TECHDOCS_REF" =~ dir:\.(.*) ]]; then
|
|
34
|
-
RELATIVE_DOCS_DIR="${BASH_REMATCH[1]%%[[:space:]]*}"
|
|
35
|
-
DOCS_DIR="$ROOT_DIR/$RELATIVE_DOCS_DIR"
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
# The techdocs-cli commands must be called in the directory where the
|
|
39
|
-
# mkdocs.yml file is present.
|
|
40
|
-
cd "$DOCS_DIR"
|
|
41
|
-
|
|
42
|
-
# MkDocs requires an index.md or README.md file, if one does not exist it will
|
|
43
|
-
# be generated automatically.
|
|
44
|
-
if ! [ -f index.md ] && ! [ -f README.md ]; then
|
|
45
|
-
if [ -z "$CI" ]; then
|
|
46
|
-
AUTHOR="$(git config user.name) <$(git config user.email)>"
|
|
47
|
-
else
|
|
48
|
-
AUTHOR="$CI_COMMIT_AUTHOR"
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
echo "README.md or index.md was not found and will be automatically generated."
|
|
52
|
-
cat >> index.md <<EOF
|
|
53
|
-
<!--
|
|
54
|
-
@author $AUTHOR
|
|
55
|
-
@date $(date)
|
|
56
|
-
@machine $HOSTNAME
|
|
57
|
-
@rev $(git rev-parse HEAD)
|
|
58
|
-
-->
|
|
59
|
-
> **Warning**: MkDocs requires a top level index.md or README.md (case sensitive)
|
|
60
|
-
This index.md file has been generated automatically to ensure MkDocs works correctly
|
|
61
|
-
EOF
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
npx techdocs-cli generate --no-docker --verbose
|
|
65
|
-
|
|
66
|
-
npx techdocs-cli publish \
|
|
67
|
-
--publisher-type awsS3 \
|
|
68
|
-
--storage-name "$TECHDOCS_S3_BUCKET_NAME" \
|
|
69
|
-
--entity "$ENTITY_NAMESPACE"/"$ENTITY_KIND"/"$ENTITY_NAME" \
|
|
70
|
-
--directory "$DOCS_DIR"/site
|
|
71
|
-
|
|
72
|
-
rm -r "$DOCS_DIR"/site
|
|
73
|
-
|
|
74
|
-
echo "View generated component: https://backstage.overwatch.distributive.network/docs/default/component/$ENTITY_NAME"
|
package/catalog-info.yaml
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# @file catalog-info.yml
|
|
2
|
-
# @author Brandon Christie <brandon@distributive.network>
|
|
3
|
-
# @date Mar 2023
|
|
4
|
-
#
|
|
5
|
-
# @description Lists all of the components and the paths to all
|
|
6
|
-
# the documentation that will be published to backstage.
|
|
7
|
-
|
|
8
|
-
apiVersion: backstage.io/v1alpha1
|
|
9
|
-
kind: Component
|
|
10
|
-
metadata:
|
|
11
|
-
name: dcp-client
|
|
12
|
-
description: Documentation for the dcp-client.
|
|
13
|
-
tags:
|
|
14
|
-
- documentation
|
|
15
|
-
annotations:
|
|
16
|
-
gitlab.com/project-id: '9874684'
|
|
17
|
-
backstage.io/techdocs-ref: dir:./docs
|
|
18
|
-
spec:
|
|
19
|
-
type: library
|
|
20
|
-
lifecycle: production
|
|
21
|
-
owner: core
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file dcp-config.js
|
|
3
|
-
* Bare-bones config for worker loaded. For use with localexec,
|
|
4
|
-
* or so the tree exists for
|
|
5
|
-
*
|
|
6
|
-
* @author Ryan Saweczko <ryan@kingsds.network>
|
|
7
|
-
* @date Sep 2022
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
worker: {
|
|
12
|
-
/* Allow lists permitting supervisor network access beyond DCP messages to services */
|
|
13
|
-
allowOrigins: {
|
|
14
|
-
any: [],
|
|
15
|
-
fetchWorkFunctions: [],
|
|
16
|
-
fetchArguments: [],
|
|
17
|
-
fetchData: [],
|
|
18
|
-
sendResults: [],
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
minimumWage: {
|
|
22
|
-
CPU: 0,
|
|
23
|
-
GPU: 0,
|
|
24
|
-
'in': 0,
|
|
25
|
-
out: 0,
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
computeGroups: {}, // integer-one-indexed; format is 1:{ joinKey,joinHash } or 2:{ joinKey, joinSecret }
|
|
29
|
-
jobAddresses: [], // Specific job addresses the worker may work on. If not empty, worker will only work on those jobs.
|
|
30
|
-
maxWorkingSandboxes: 1,
|
|
31
|
-
paymentAddress: null, // user must to specify
|
|
32
|
-
evaluatorOptions: {}
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
standaloneWorker:
|
|
36
|
-
{
|
|
37
|
-
quiet: false,
|
|
38
|
-
debug: process.env.DCP_SAW_DEBUG,
|
|
39
|
-
evaluatorConnectBackoff:
|
|
40
|
-
{
|
|
41
|
-
maxInterval: 5 * 60 * 1000, // max: 5 minutes
|
|
42
|
-
baseInterval: 10 * 1000, // start: 10s
|
|
43
|
-
backoffFactor: 1.1 // each fail, back off by 10%
|
|
44
|
-
},
|
|
45
|
-
reloadBehaviour: 'process.exit(12)',
|
|
46
|
-
},
|
|
47
|
-
}
|
|
48
|
-
|