Skip to content

Commit

Permalink
Resolve "rename sensio to anagolay" and various other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KiChjang authored and woss committed May 25, 2021
1 parent c5ac5ca commit 3ef7408
Show file tree
Hide file tree
Showing 633 changed files with 25,970 additions and 25,303 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ root = true
[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
max_line_length = 100
insert_final_newline = true
37 changes: 0 additions & 37 deletions .eslintrc

This file was deleted.

30 changes: 30 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const base = require('./common/dev/config/eslint.cjs')

module.exports = {
...base,
ignorePatterns: [
'.eslintrc.js',
'.vscode/**',
'**/build/*',
'**/coverage/*',
'**/node_modules/*',
],
parserOptions: {
...base.parserOptions,
createDefaultProgram: true,
project: [
'./tsconfig.eslint.json',
// "./sdk/**/tsconfig.json",
// "./operations/**/tsconfig.json",
// "./rules/**/tsconfig.json",
// "./common/**/tsconfig.json"
],
},
rules: {
...base.rules,
// add override for any (a metric ton of them, initial conversion)
'@typescript-eslint/no-explicit-any': 'off',
// this seems very broken atm, false positives
'@typescript-eslint/unbound-method': 'off',
},
}
69 changes: 41 additions & 28 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: node:14
image: woss/pnpm

workflow:
rules:
Expand All @@ -13,10 +13,21 @@ include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml

cache:
cache: &global_cache
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
- .pnpm-store
policy: pull-push

.before_script_install_deps_template:
cache:
# inherit all global cache settings
<<: *global_cache
# override the policy
policy: pull
before_script:
- pnpm i

stages:
- dependencies
Expand All @@ -27,39 +38,41 @@ stages:

dependencies:
stage: dependencies
before_script:
- pnpm config set store-dir .pnpm-store
script:
- yarn

lint:
stage: lint
needs: [dependencies]
script:
- yarn lint
- pnpm i
# lint:
# extends: .before_script_install_deps_template
# stage: lint
# needs: [dependencies]
# script:
# - pnpm lint

test:
extends: .before_script_install_deps_template
stage: test
needs: [dependencies]
script:
- yarn test:coverage
- pnpm i && pnpm test:coverage -- --testPathIgnorePatterns operations
coverage: /All\sfiles.*?\s+(\d+.\d+)/
tags:
- docker
# pages:
# stage: docs
# needs: [dependencies]
# script:
# - pnpm docs
# artifacts:
# paths:
# - public
# only:
# - master

pages:
stage: docs
needs: [dependencies]
script:
- yarn docs
artifacts:
paths:
- public
only:
- master

build:
stage: build
needs: [dependencies, test]
script:
- yarn build
only:
- merge_requests
# build:
# stage: build
# needs: [dependencies, test]
# script:
# - pnpm build
# only:
# - merge_requests
39 changes: 39 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const ops = {
'@anagolay/op-create-qrcode': 'workspace:*',
'@anagolay/op-enc-hex': 'workspace:*',
'@anagolay/op-file': 'workspace:*',
'@anagolay/op-identity': 'workspace:*',
'@anagolay/op-json-dec': 'workspace:*',
'@anagolay/op-json-enc': 'workspace:*',
'@anagolay/op-match-all': 'workspace:*',
'@anagolay/op-match-none': 'workspace:*',
'@anagolay/op-multihash': 'workspace:*',
'@anagolay/op-split': 'workspace:*',
'@anagolay/op-cid': 'workspace:*',
'@anagolay/op-image-metadata': 'workspace:*',
'@anagolay/op-image-phash': 'workspace:*',
'@anagolay/op-image-metadata-hash': 'workspace:*',
'@anagolay/op-image-raw-pixels': 'workspace:*',
'@anagolay/op-take-photo-and-upload-qrcode': 'workspace:*',
'@anagolay/op-create-ownership-claims': 'workspace:*',
'@anagolay/op-image-raw-pixels-hash': 'workspace:*',
'@anagolay/op-user-sign-claims': 'workspace:*',
'@anagolay/op-save-statements': 'workspace:*',
}

function readPackage(pkg) {
// this is how we can add the all operations to the our other packages. be careful to add them to packages if needed, not they are only liked
// if (!pkg.name.startsWith('@anagolay/op-')) {
// pkg.devDependencies = {
// ...pkg.devDependencies,
// ...ops,
// }
// }
return pkg
}

module.exports = {
hooks: {
readPackage,
},
}
2 changes: 1 addition & 1 deletion .prettierrc → .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
module.exports = {
"semi": false,
"trailingComma": "all",
"singleQuote": true,
Expand Down
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"recommendations": [
"esbenp.prettier-vscode",
"wayou.vscode-todo-highlight",
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"wayou.vscode-todo-highlight",
"nonylene.dark-molokai-theme"
]
}
24 changes: 19 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"workbench.colorTheme": "Noctis Azureus",
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true,
"source.fixAll.eslint": true
},
"eslint.format.enable": true,
"editor.wordWrap": "bounded",
"editor.wordWrapColumn": 100,
"editor.rulers": [100],
Expand All @@ -14,20 +14,20 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[markdown]": {
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 100,
"editor.quickSuggestions": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"cSpell.words": ["flowcontrol", "poclo", "subsampling"],
"javascript.validate.enable": false,
"files.associations": { "*.json": "jsonc" },
// "files.associations": { "*.json": "jsonc" },
"files.associations": { "*.cjs": "javascript" },
"todohighlight.keywords": [
{
"text": "@FUCK",
Expand All @@ -41,5 +41,19 @@
"backgroundColor": "#1a30d8",
"overviewRulerColor": "grey"
}
],
"npm.packageManager": "pnpm",
"npm-intellisense.packageSubfoldersIntellisense": true,
"npm-intellisense.scanDevDependencies": true,
"npm-intellisense.showBuildInLibs": true,
"cSpell.words": [
"anagolay",
"bafy",
"destructure",
"grayscale",
"multihashes",
"pnpm",
"pnpx",
"subsampling"
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2020 Sensio Group
Copyright 2020 Anagolay Group

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 0 additions & 3 deletions OVERRIDES.md

This file was deleted.

42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[![pipeline status](https://gitlab.com/sensio_group/network-js-sdk/badges/master/pipeline.svg)](https://gitlab.com/sensio_group/network-js-sdk/-/commits/master) [![coverage report](https://gitlab.com/sensio_group/network-js-sdk/badges/master/coverage.svg)](https://gitlab.com/sensio_group/network-js-sdk/-/commits/master) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![pipeline status](https://gitlab.com/anagolay/network-js-sdk/badges/master/pipeline.svg)](https://gitlab.com/anagolay/network-js-sdk/-/commits/master) [![coverage report](https://gitlab.com/anagolay/network-js-sdk/badges/master/coverage.svg)](https://gitlab.com/anagolay/network-js-sdk/-/commits/master) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Dev friendly blockchain SDK for Sensio Network. 👩‍💻🚀👨‍💻
## Dev friendly blockchain SDK for Anagolay Network. 👩‍💻🚀👨‍💻

This is the monorepo for ALL Sensio packages. This includes following list:
This is the monorepo for ALL Anagolay packages. This includes following list:

1. Definitions of operations located under `<root>/operations`
2. Sensio Network API located under `<root>/sdk/api`
3. Sensio Network Core located under `<root>/sdk/core`
4. Sensio Network CLI located under `<root>/sdk/cli`
5. Sensio Network Types located under `<root>/sdk/types`
2. Anagolay Network API located under `<root>/sdk/api`
3. Anagolay Network Core located under `<root>/sdk/core`
4. Anagolay Network CLI located under `<root>/sdk/cli`
5. Anagolay Network Types located under `<root>/sdk/types`

## Development

Expand All @@ -25,15 +25,15 @@ The structure is following:
├── misc
│   └── benchmark
├── operations
│   ├── snCid
│   ├── snFile
│   ├── snIdentity
│   ├── snJsonDec
│   ├── snJsonEnc
│   ├── snMatchAll
│   ├── snMatchNone
│   ├── snMultihash
│   └── snSplit
│   ├── cid
│   ├── file
│   ├── identity
│   ├── jsonDec
│   ├── jsonEnc
│   ├── matchAll
│   ├── matchNone
│   ├── multihash
│   └── split
└── sdk
├── api
├── core
Expand All @@ -52,23 +52,23 @@ Pretty much everything that has no special place, like benchmarking.

**operations**

HEre you can find Javascript implementation of Sensio Operation. To find out more about Sensio Operation please visit the [Operation wiki page](https://sensio.dev)
HEre you can find Javascript implementation of Anagolay Operation. To find out more about Anagolay Operation please visit the [Operation wiki page](https://anagolay.dev)

**rect**

React specific hooks and components.

**sdk/api**

Main entry point for communicating with Sensio Network. For more info please read the [API README.md](./sdk/api/README.md)
Main entry point for communicating with Anagolay Network. For more info please read the [API README.md](./sdk/api/README.md)

**sdk/cli**

Generic CLI for Sensio Network. Current use is limited only to creation default operations.
Generic CLI for Anagolay Network. Current use is limited only to creation default operations.

**sdk/types**

Sensio Network has decent amount of custom types, both on the chain and mapped types for Typescript. All these types, interfaces and api augmentations can be found here. This is the repo which should be the first to install when making new implementation of the operation.
Anagolay Network has decent amount of custom types, both on the chain and mapped types for Typescript. All these types, interfaces and api augmentations can be found here. This is the repo which should be the first to install when making new implementation of the operation.

### Linting

Expand All @@ -81,7 +81,7 @@ yarn std

### Building && Publishing

This repo is a monorepo for all our packages that are related to the Sensio Network SDK. Each package is in charge of its own build process, which we are tying to standardize.
This repo is a monorepo for all our packages that are related to the Anagolay Network SDK. Each package is in charge of its own build process, which we are tying to standardize.

Sometimes is good to see will the packages build BEFORE the publishing, to do so, run the command below and if it passes then all builds are successful and you should be ready for publishing.

Expand Down
Loading

0 comments on commit 3ef7408

Please sign in to comment.