Skip to content

Revive Polykey Desktop #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 59 additions & 59 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
variables:
GIT_SUBMODULE_STRATEGY: recursive
# variables:
# GIT_SUBMODULE_STRATEGY: recursive

stages:
- check
- build
- release
# stages:
# - check
# - build
# - release

image: registry.gitlab.com/matrixai/engineering/maintenance/gitlab-runner
# image: registry.gitlab.com/matrixai/engineering/maintenance/gitlab-runner

lint:
stage: check
interruptible: true
script:
- >
nix-shell -I nixpkgs=./pkgs.nix --packages nodejs --run '
npm install;
npm run lint;
'
# lint:
# stage: check
# interruptible: true
# script:
# - >
# nix-shell -I nixpkgs=./pkgs.nix --packages nodejs --run '
# npm install;
# npm run lint;
# '

test:
stage: check
interruptible: true
script:
- >
nix-shell -I nixpkgs=./pkgs.nix --packages nodejs --run '
npm install;
npm run test;
'
# test:
# stage: check
# interruptible: true
# script:
# - >
# nix-shell -I nixpkgs=./pkgs.nix --packages nodejs --run '
# npm install;
# npm run test;
# '

nix-dry:
stage: check
interruptible: true
script:
- nix-build -v -v --dry-run ./release.nix --attr application
- nix-build -v -v --dry-run ./release.nix --attr docker
- nix-build -v -v --dry-run ./release.nix --attr package.linux.x64.deb
- nix-build -v -v --dry-run ./release.nix --attr package.linux.ia32.deb
- nix-build -v -v --dry-run ./release.nix --attr package.windows.x64.exe
- nix-build -v -v --dry-run ./release.nix --attr package.windows.ia32.exe
- nix-build -v -v --dry-run ./release.nix --attr package.darwin.x64.zip
# nix-dry:
# stage: check
# interruptible: true
# script:
# - nix-build -v -v --dry-run ./release.nix --attr application
# - nix-build -v -v --dry-run ./release.nix --attr docker
# - nix-build -v -v --dry-run ./release.nix --attr package.linux.x64.deb
# - nix-build -v -v --dry-run ./release.nix --attr package.linux.ia32.deb
# - nix-build -v -v --dry-run ./release.nix --attr package.windows.x64.exe
# - nix-build -v -v --dry-run ./release.nix --attr package.windows.ia32.exe
# - nix-build -v -v --dry-run ./release.nix --attr package.darwin.x64.zip

nix:
interruptible: true
stage: build
script:
- >
nix-build ./release.nix
--attr application
--attr docker
only:
- master
# nix:
# interruptible: true
# stage: build
# script:
# - >
# nix-build ./release.nix
# --attr application
# --attr docker
# only:
# - master

packages:
interruptible: true
stage: release
script:
- >
nix-build ./release.nix
--attr package.linux.x64.deb
--attr package.linux.ia32.deb
--attr package.windows.x64.exe
--attr package.windows.ia32.exe
--attr package.darwin.x64.zip
only:
- master
# packages:
# interruptible: true
# stage: release
# script:
# - >
# nix-build ./release.nix
# --attr package.linux.x64.deb
# --attr package.linux.ia32.deb
# --attr package.windows.x64.exe
# --attr package.windows.ia32.exe
# --attr package.darwin.x64.zip
# only:
# - master
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enables npm link
prefix=~/.npm
11 changes: 11 additions & 0 deletions ADDITIONAL_TERMS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ADDITIONAL TERMS

This file contains additional terms and conditions that apply to the use of this project.

1. Trademark Use. The trademarks and branding assets associated with this project are the exclusive property of MATRIX AI PTY. LTD. ("Owner") and may not be used or displayed in any manner without Owner's express written permission.

2. Derivative Works. Users may not distribute derivative works based on this project that incorporate any of the Owner's trademarks or branding assets, except in the case of a complete, unmodified copy of the original work.

3. Enforcement. Owner reserves the right to enforce these additional terms and conditions, including through legal action if necessary.

4. Disclaimer. This file does not grant any additional rights or permissions beyond those granted by the GPL-3.0 license. Any conflict between the terms of this file and the GPL-3.0 license shall be resolved in favor of the GPL-3.0 license.
15 changes: 0 additions & 15 deletions CHANGELOG.md

This file was deleted.

19 changes: 3 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Polykey
# Polykey-Desktop

[![pipeline status](https://gitlab.com/MatrixAI/open-source/Polykey-Desktop/badges/master/pipeline.svg)](https://gitlab.com/MatrixAI/open-source/Polykey-Desktop/commits/master)
staging:[![pipeline status](https://gitlab.com/MatrixAI/open-source/Polykey-Desktop/badges/staging/pipeline.svg)](https://gitlab.com/MatrixAI/open-source/Polykey-Desktop/commits/staging)
master:[![pipeline status](https://gitlab.com/MatrixAI/open-source/Polykey-Desktop/badges/master/pipeline.svg)](https://gitlab.com/MatrixAI/open-source/Polykey-Desktop/commits/master)

Polykey is a distributed secret sharing system. It helps you manage your
secrets, passwords, API keys and more. It is designed for both managing
Expand Down Expand Up @@ -73,20 +74,6 @@ built on top of this secure platform.

---

Current status:

* js-resource-counter - https://github.com/MatrixAI/js-resource-counter
* js-permaproxy - https://github.com/MatrixAI/js-permaproxy
* js-virtualfs - https://github.com/MatrixAI/js-virtualfs
* js-reference-pointer - https://github.com/MatrixAI/js-reference-pointer
* js-object-tagger - https://github.com/MatrixAI/js-object-tagger
* js-array-fixed - https://github.com/MatrixAI/js-array-fixed
* js-tree-order-index - https://github.com/MatrixAI/js-tree-order-index
* js-virtualgit - https://github.com/MatrixAI/js-virtualgit

The last 2 are still being developed.


### Development
1. `npm install`
2. `npm run dev:build`
Expand Down
63 changes: 55 additions & 8 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,77 @@
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const path = require('path');
const { defaults } = require('jest-config');
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig');

const moduleNameMapper = pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/src/',
});

const transformIgnorePatterns = [
'/dist/',
// Ignore modules without es dir.
// Update: @babel/runtime should also be transformed
// 'node_modules/(?!.*(@babel|lodash-es))',
'node_modules/(?!@ant-design/icons-vue|@ant-design/icons-svg|lodash-es)/',
];

// Global variables that are shared across the jest worker pool
// These variables must be static and serializable
const globals = {
// Absolute directory to the project root
projectDir: __dirname,
// Absolute directory to the test root
testDir: path.join(__dirname, 'tests'),
// Default asynchronous test timeout
defaultTimeout: 20000,
// Timeouts rely on setTimeout which takes 32 bit numbers
maxTimeout: Math.pow(2, 31) - 1,
};

// The `globalSetup` and `globalTeardown` cannot access the `globals`
// They run in their own process context
// They can however receive the process environment
// Use `process.env` to set variables

module.exports = {
testEnvironment: 'jsdom',
verbose: true,
collectCoverage: false,
cacheDirectory: '<rootDir>/tmp/jest',
coverageDirectory: '<rootDir>/tmp/coverage',
roots: ['<rootDir>/tests'],
testMatch: ['**/?(*.)+(spec|test|unit.test).+(ts|tsx|js)'],
testMatch: ['**/?(*.)+(spec|test|unit.test).+(ts|tsx|js|jsx)'],
transform: {
'^.+\\.vue$': 'vue-jest',
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.jsx?$': 'babel-jest',
"^.+\\.svg$": "jest-transform-stub"
},
moduleFileExtensions: ['vue', 'js', 'json', 'ts'],
setupFiles: ['<rootDir>/tests/setup.ts'],
moduleFileExtensions: [...defaults.moduleFileExtensions, 'vue'],
reporters: [
'default',
['jest-junit', {
outputDirectory: '<rootDir>/tmp/junit',
classNameTemplate: '{classname}',
ancestorSeparator: ' > ',
titleTemplate: '{title}',
addFileAttribute: 'true',
reportTestSuiteErrors: 'true',
}],
],
collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}', '!src/**/*.d.ts'],
coverageReporters: ['text', 'cobertura'],
globals,
// Global setup script executed once before all test files
globalSetup: '<rootDir>/tests/globalSetup.ts',
// Global teardown script executed once after all test files
globalTeardown: '<rootDir>/tests/globalTeardown.ts',
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/src/',
}),
// Setup files are executed before each test file
// Can access globals
setupFiles: ['<rootDir>/tests/setup.ts'],
// Setup files after env are executed before each test file
// after the jest test environment is installed
// Can access globals
setupFilesAfterEnv: ['<rootDir>/tests/setupAfterEnv.ts'],
moduleNameMapper: moduleNameMapper,
transformIgnorePatterns,
};
Loading