filecoin-verifier-common
Advanced tools
Comparing version 1.0.4 to 1.0.14
{ | ||
"name": "filecoin-verifier-common", | ||
"version": "1.0.4", | ||
"version": "1.0.14", | ||
"description": "", | ||
"main": ".dist/index.js", | ||
"types": ".dist/index.d.ts", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "tsc", | ||
"publish": "yarn build && npm publish" | ||
"build": "tsc" | ||
}, | ||
@@ -12,0 +11,0 @@ "keywords": [], |
143
src/index.ts
@@ -1,32 +0,125 @@ | ||
const ISSUE_LABELS = { | ||
MIGRATION_TASK: "Migration Task", | ||
MIGRATION_COMPLETED: "Migration Completed", | ||
BOT_REVIEW_NEEDED: "Bot: Review Needed", | ||
BOT_READY_TO_SIGN: "Bot: Ready To Sign", | ||
BOT_RECONNECTED_ISSUE: "Bot: Reconnected Issue", | ||
BOT_LOOKING_GOOD: "Bot: Looking Good", | ||
STATUS_VERIFYING: "State: Verifying", | ||
STATUS_ADDED_ON_CHAIN: "State: Added On Chain", | ||
STATUS_APPROVED: "State: Approved", | ||
STATUS_START_SIGN_DATACAP: "State: Start Sign Datacap", | ||
STATUS_ERROR: "State: Error", | ||
STATUS_VALIDATED: "State: Validated", | ||
STATUS_GRANTED: "State: Granted", | ||
STATUS_DATA_CAP_ALLOCATED: "State: Datacap Allocated", | ||
STATUS_PREVIOUSLY_APPROVED: "State: Previously Approved", | ||
STATUS_NEED_DILIGENCE: "State: Need Diligence", | ||
STATUS_FURTHER_INFO_NEEDED: "State: Further info needed", | ||
WARN_CHECK_TRANSACTION: "Warn: Check Transaction", | ||
APPLICATION_ADDRESS_NOT_VALID: "State: Address Not Valid", | ||
EFIL_PLUS: "Efil+", | ||
WAITING_FOR_ClIENT: "Waiting For Client Reply", | ||
ONE_NOTARY_APPROVED: "One Notary Approved", | ||
ONE_NOTARY_DECLINED: "One Notary Declined", | ||
import { buildPastTwoWeeks } from "./time"; | ||
export const ISSUE_LABELS = { | ||
VALIDATED: "validated", | ||
READY_TO_SIGN: "ready to sign", | ||
GRANTED: "granted", | ||
VERIFIED_CLIENT: "verified client", | ||
ONE_NOTARY_DECLINED: "one notary declined", | ||
WAITING_FOR_CLIENT_REPLY: "waiting for client reply", | ||
START_SIGN_DATACAP: "start sign datacap", | ||
EFIL_PLUS: "efil+", | ||
ERROR: "error", | ||
TOTAL_DC_REACHED: "total datacap reached", | ||
REVIEW_NEEDED: "governance review needed", | ||
VERY_LARGE_APPLICATION: "very large application", | ||
KYC_LABEL: "KYC-Validated", | ||
DATA_TYPE_OPEN_PUBLIC: "data type: open public", | ||
DATA_TYPE_COMMERCIAL_PUBLIC: "data type: commercial public", | ||
DATA_TYPE_PRIVATE: "data type: private" | ||
}; | ||
// Sentry Events | ||
enum BlockchainSentryEvents { | ||
RequestProposed = "Request Proposed", | ||
ProposalFailed = "Proposal Failed", | ||
RequestApproved = "Request Approved", | ||
ApprovalFailed = "Approval Failed", | ||
} | ||
// Sentry Events | ||
enum UserSentryEvents { | ||
GithubLoginSuccess = "Github Login Success", | ||
LoadedGithubTokenSuccessfully = "Loaded Github Token Successfully", | ||
LedgerLoginSuccessful = "Ledger Login Successful", | ||
LedgerLoginFailed = "Ledger Login Failed", | ||
} | ||
const common = { | ||
ISSUE_LABELS, | ||
} | ||
UserSentryEvents, | ||
BlockchainSentryEvents, | ||
buildPastTwoWeeks | ||
}; | ||
export default common; | ||
// Happy Scenario | ||
// 1. Start Application -- client | ||
// -- Application [Validated] | ||
// 2. Governance Team Start Allocation -- filecoin gt | ||
// -- Application [Ready To Sign] | ||
// 3. Notary Signs (proposal + comment) | ||
// -- Application [Start Sign Datacap] | ||
// 4. Notary Signs (approval + comment) (approval) | ||
// -- Application [Application Granted, Verified Client] | ||
// Request More Info Scenario | ||
// 1. Start Application | ||
// -- Application [Validated] | ||
// 2. Governance Team Start Allocation -- filecoin gt | ||
// -- Application [Ready To Sign] | ||
// 4. Notary Request More Info | ||
// -- Application [Ready To Sign, Waiting For Client Reply] | ||
// 5. Client Replies(no template) | ||
// -- we dont change labels, but increase counter in fe dashboard(fetch only last 7 days) | ||
// 6. Notary Accepts | ||
// -- Application [Ready To Sign, Start Sign Datacap] | ||
// 7. Notary Request More Info | ||
// -- Application [Waiting For Client Reply, Start Sign Datacap, Ready | ||
// To Sign] | ||
// 8. Client Replies | ||
// 9. Notary Accepts | ||
// -- Application [Application Granted, Verified Client] | ||
// Decline V0.1 Scenario | ||
// 1. Start Application | ||
// -- Application [Validated] | ||
// 2. Governance Team Start Allocation -- filecoin gt | ||
// -- Application [Ready To Sign] | ||
// 4. Notary Request More Info | ||
// -- Application [Ready To Sign, Waiting For Client Reply] | ||
// 5. Client Replies(no template) | ||
// -- we dont change labels, but increase counter in fe dashboard(fetch only last 7 days) | ||
// 6. Notary Decline | ||
// -- Application [One Notary Declined, Ready To Sign] | ||
// 7. Notary Request More Info | ||
// -- Application [Waiting For Client Reply, Ready To Sign, One Notary | ||
// Declined] | ||
// 8. Client Replies | ||
// 9. Notary Accepts | ||
// -- Application [Application Granted, Verified Client, One Notary | ||
// Declined] | ||
// Error Scenario | ||
// 1. Invalid address - add label "Error" and comment "Invalid address" | ||
// 2. if issue main comment is modified - validate issue again | ||
// | ||
// | ||
// Esraa | ||
// Happy Scenario | ||
// 1. Start Application | ||
// -- Application [Validated] | ||
// 2. Governance Team Start Allocation -- filecoin gt | ||
// -- Application [Validated, Notary Review Needed] | ||
// 2. Notary Signs | ||
// -- Application [Validated, Notary Review Needed, Notary Proposed] | ||
// 3. Notary Signs | ||
// -- Application [Validated, Application Granted] | ||
// -- Application [Validated, Notary Proposed(Start Signdatacap)] | ||
// NOTES FOR ESRAA (TODO) : | ||
// if Otherreason is selected - input should be required | ||
// Client Verified should be whitelisted label | ||
// Refer to comment template in message | ||
// Remove comment template for client and change counter in fe to count only comments posted by person who open the issue && notary is waiting for more evidence(Notary Review Needed) | ||
// Action points | ||
// - publish package with correct labels to npm (esraa) (blocker) | ||
// - integrate with LDN and FE (esraa) | ||
// - integrate with SSA (fabri) | ||
// - Script for issue state (fabri) | ||
// Goal = Finish 19th Of April |
{ | ||
// Change this to match your project | ||
"include": ["src/**/*"], | ||
// We don't need to transpile these directories | ||
"exclude": ["node_modules", "dist"], | ||
"compilerOptions": { | ||
// Tells TypeScript to read JS files, as | ||
// normally they are ignored as source files | ||
"allowJs": true, | ||
// Generate d.ts files | ||
"declaration": true, | ||
// This compiler run should | ||
// only output d.ts files | ||
"emitDeclarationOnly": false, | ||
// Types should go into this directory. | ||
// Removing this would place the .d.ts files | ||
// next to the .js files | ||
"outDir": "dist", | ||
// go to js file when using IDE functions like | ||
// "Go to Definition" in VSCode | ||
"declarationMap": true, | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"moduleResolution": "node", | ||
"module": "commonjs", | ||
"target": "ES6" | ||
} | ||
"compilerOptions": { | ||
/* Basic Options */ | ||
"allowJs": true, | ||
"incremental": true /* Enable incremental compilation */, | ||
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, | ||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, | ||
"lib": [ | ||
"ES5", | ||
"es2015", | ||
"es2017", | ||
"es2019", | ||
"ESNext" | ||
] /* Specify library files to be included in the compilation. */, | ||
"checkJs": false /* Report errors in .js files. */, | ||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ | ||
"declaration": true /* Generates corresponding '.d.ts' file. */, | ||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ | ||
"sourceMap": true /* Generates corresponding '.map' file. */, | ||
// "outFile": "./", /* Concatenate and emit output to single file. */ | ||
"outDir": "./lib" /* Redirect output structure to the directory. */, | ||
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ | ||
// "composite": true, /* Enable project compilation */ | ||
// "tsBuildInfoFile": "./" /* Specify file to store incremental compilation information */, | ||
// "removeComments": true, /* Do not emit comments to output. */ | ||
// "noEmit": true, /* Do not emit outputs. */ | ||
// "importHelpers": true, /* Import emit helpers from 'tslib'. */ | ||
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ | ||
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ | ||
/* Strict Type-Checking Options */ | ||
"strict": false /* Enable all strict type-checking options. */, | ||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ | ||
// "strictNullChecks": true, /* Enable strict null checks. */ | ||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */ | ||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ | ||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ | ||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ | ||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ | ||
/* Additional Checks */ | ||
"noUnusedLocals": false /* Report errors on unused locals. */, | ||
"noUnusedParameters": false /* Report errors on unused parameters. */, | ||
"noImplicitReturns": false /* Report error when not all code paths in function return a value. */, | ||
"noFallthroughCasesInSwitch": false /* Report errors for fallthrough cases in switch statement. */, | ||
/* Module Resolution Options */ | ||
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, | ||
"baseUrl": "./", | ||
"paths": { | ||
"src/*": ["./src/*"] | ||
}, | ||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ | ||
// "typeRoots": [], /* List of folders to include type definitions from. */ | ||
// "types": ["node", "jest"], | ||
// "types": [], /* Type declaration files to be included in compilation. */ | ||
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ | ||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, | ||
"preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ | ||
"allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ | ||
/* Source Map Options */ | ||
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ | ||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ | ||
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ | ||
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ | ||
/* Experimental Options */ | ||
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ | ||
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ | ||
/* Advanced Options */ | ||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, | ||
"resolveJsonModule": true, | ||
"pretty": false, | ||
"skipLibCheck": true | ||
}, | ||
"exclude": ["node_modules"], | ||
"include": ["src/"], | ||
"compileOnSave": false | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31132
11
395
1