Skip to content

Commit

Permalink
Merge pull request #535 from MatrixAI/feature-agent_migration_stage2
Browse files Browse the repository at this point in the history
Agent migration stage 2
  • Loading branch information
tegefaulkes authored Aug 18, 2023
2 parents 4c02f7a + c0fad60 commit e2df9c5
Show file tree
Hide file tree
Showing 56 changed files with 2,164 additions and 1,918 deletions.
28 changes: 0 additions & 28 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,5 @@ NODE_ENV=development
# Debug node native modules - https://nodejs.org/api/cli.html#node_debug_nativemodule
# NODE_DEBUG_NATIVE=

# Path to PK executable to override tests/bin target
# PK_TEST_COMMAND=

# If set, indicates that `PK_TEST_COMMAND` is targetting docker
# PK_TEST_COMMAND_DOCKER=
# Accessing AWS for testnet.polykey.io and mainnet.polykey.io deployment
AWS_DEFAULT_REGION='ap-southeast-2'
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=

# Path to container registry authentication file used by `skopeo`
# The file has the same contents as `DOCKER_AUTH_CONFIG`
# Use this command to acquire the auth file at `./tmp/auth.json`:
# ```
# printf 'PASSWORD' | skopeo login \
# --username 'USERNAME' \
# --password-stdin \
# $CI_REGISTRY_IMAGE \
# --authfile=./tmp/auth.json
# ```
# REGISTRY_AUTH_FILE=

# Authenticate to GitHub with `gh`
# GITHUB_TOKEN=

# To allow testing different executables in the bin tests
# Both PK_TEST_COMMAND and PK_TEST_PLATFORM must be set at the same time
# PK_TEST_COMMAND= #Specify the shell command we want to test against
# PK_TEST_PLATFORM=docker #Overrides the auto set `testPlatform` variable used for enabling platform specific tests
# PK_TEST_TMPDIR= #Sets the `global.tmpDir` variable to allow overriding the temp directory used for tests
5 changes: 0 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const moduleNameMapper = pathsToModuleNameMapper(compilerOptions.paths, {

// Global variables that are shared across the jest worker pool
// These variables must be static and serializable
if ((process.env.PK_TEST_PLATFORM != null) !== (process.env.PK_TEST_COMMAND != null)) throw Error('Both PK_TEST_PLATFORM and PK_TEST_COMMAND must be set together.')
const globals = {
// Absolute directory to the project root
projectDir: __dirname,
Expand All @@ -23,13 +22,9 @@ const globals = {
),
// Default asynchronous test timeout
defaultTimeout: 20000,
polykeyStartupTimeout: 30000,
failedConnectionTimeout: 50000,
// Timeouts rely on setTimeout which takes 32 bit numbers
maxTimeout: Math.pow(2, 31) - 1,
testCmd: process.env.PK_TEST_COMMAND,
testPlatform: process.env.PK_TEST_PLATFORM,
tmpDir: path.resolve(process.env.PK_TEST_TMPDIR ?? os.tmpdir()),
};

// The `globalSetup` and `globalTeardown` cannot access the `globals`
Expand Down
70 changes: 22 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polykey",
"version": "1.1.3-alpha.0",
"version": "1.1.5-feature-agent-migration-stage2.0",
"homepage": "https://polykey.io",
"author": "Matrix AI",
"contributors": [
Expand Down Expand Up @@ -30,6 +30,9 @@
},
{
"name": "Emma Casolin"
},
{
"name": "Amy Yan"
}
],
"description": "Polykey Core Library",
Expand Down Expand Up @@ -67,10 +70,10 @@
"@matrixai/errors": "^1.1.7",
"@matrixai/id": "^3.3.6",
"@matrixai/logger": "^3.1.0",
"@matrixai/quic": "^0.0.13",
"@matrixai/resources": "^1.1.5",
"@matrixai/timer": "^1.1.1",
"@matrixai/workers": "^1.3.7",
"@matrixai/quic": "^0.0.16",
"@peculiar/asn1-pkcs8": "^2.3.0",
"@peculiar/asn1-schema": "^2.3.0",
"@peculiar/asn1-x509": "^2.3.0",
Expand All @@ -82,7 +85,6 @@
"ajv": "^7.0.4",
"canonicalize": "^1.0.5",
"cheerio": "^1.0.0-rc.5",
"commander": "^8.3.0",
"cross-fetch": "^3.0.6",
"cross-spawn": "^7.0.3",
"encryptedfs": "^3.5.6",
Expand All @@ -99,9 +101,6 @@
"resource-counter": "^1.2.4",
"sodium-native": "^3.4.1",
"threads": "^1.6.5",
"tslib": "^2.4.0",
"tsyringe": "^4.7.0",
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.19.0",
"ws": "^8.12.0"
},
"devDependencies": {
Expand All @@ -110,8 +109,7 @@
"@swc/jest": "^0.2.26",
"@types/cross-spawn": "^6.0.2",
"@types/jest": "^28.1.3",
"@types/nexpect": "^0.4.31",
"@types/node": "^18.11.11",
"@types/node": "^18.15.0",
"@types/pako": "^1.0.2",
"@types/prompts": "^2.0.13",
"@types/readable-stream": "^2.3.11",
Expand Down
Loading

0 comments on commit e2df9c5

Please sign in to comment.