Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Create test-snap for cronjob #125

Merged
merged 8 commits into from Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/cronjob/.eslintrc.js
@@ -0,0 +1,7 @@
module.exports = {
root: true,

extends: ['../../.eslintrc.js'],

ignorePatterns: ['!.eslintrc.js', 'dist/', 'build/'],
};
188 changes: 188 additions & 0 deletions packages/cronjob/CHANGELOG.md
@@ -0,0 +1,188 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
bowensanders marked this conversation as resolved.
Show resolved Hide resolved

## [4.5.0]
### Changed
- No changes this release.

## [4.4.1]
### Changed
- No changes this release.

## [4.4.0]
### Changed
- No changes this release.

## [4.3.0]
### Changed
- No changes this release.

## [4.2.0]
### Added
- Add `endowment:rpc` permission ([#105](https://github.com/MetaMask/test-snaps/pull/105))

## [4.1.2]
### Changed
- No changes this release.

## [4.1.1]
### Changed
- No changes this release.

## [4.1.0]
### Changed
- Handle breaking changes with new version of Snaps Platform ([#95](https://github.com/MetaMask/test-snaps/pull/95))

## [4.0.2]
### Changed
- No changes this release.

## [4.0.1]
### Changed
- No changes this release.

## [4.0.0]
### Changed
- No changes this release.

## [3.2.0]
### Changed
- No changes this release.

## [3.1.0]
### Changed
- Update descriptions in test-snap manifests ([#76](https://github.com/MetaMask/test-snaps/pull/76))

## [3.0.2]
### Changed
- No changes this release.

## [3.0.1]
### Fixed
- Fix `clean` npm script ([#67](https://github.com/MetaMask/test-snaps/pull/67))
- Fix `publish:all` npm script ([#68](https://github.com/MetaMask/test-snaps/pull/68))

## [3.0.0]
### Changed
- **BREAKING**: Upgrade test-snaps to use Node v16 ([#53](https://github.com/MetaMask/test-snaps/pull/53))

## [2.0.0]
### Changed
- No changes this release.

## [1.0.0]
### Changed
- **BREAKING:** Update test snaps to export `onRpcRequest` via CommonJS syntax ([#44](https://github.com/MetaMask/test-snaps/pull/44))

## [0.4.0]
### Changed
- No changes this release.

## [0.3.0]
### Changed
- No changes this release.

## [0.2.0]
### Fixed
- Fix snap manifest version ([#30](https://github.com/MetaMask/test-snaps/pull/30))

## [0.1.3]
### Changed
- No changes this release.

## [0.1.2]
### Changed
- No changes this release.

## [0.1.1]
### Changed
- No changes this release.

## [0.1.0]
### Added
- BIP44 snap for testing ([#20](https://github.com/MetaMask/test-snaps/pull/20))
- website build script ([#22](https://github.com/MetaMask/test-snaps/pull/22))
- various monorepo-related issues ([#18](https://github.com/MetaMask/test-snaps/pull/18))

### Changed
- Bump Node to 14, bump snaps-cli ([#21](https://github.com/MetaMask/test-snaps/pull/21))

## [0.0.9]
### Fixed
- workflow for release again

## [0.0.8]
### Fixed
- workflow for release

## [0.0.7]
### Added
- OpenRPC doc for confirm test snap ([#14](https://github.com/MetaMask/test-snaps/pull/14))

## [0.0.6]
### Fixed
- Added images icon to package.json ([#12](https://github.com/MetaMask/test-snaps/pull/12))

## [0.0.5]
### Fixed
- Fix publish files ([#10](https://github.com/MetaMask/test-snaps/pull/10))
- Make npm package public

## [0.0.4]
### Uncategorized
- Fixed linting

## [0.0.1]
### Uncategorized
- Changed version back to 0.0.0
- 0.0.1
- Fixed CHANGELOGs
- Changed confirm snap to be configurable via params
- Added Error to index.html
- Added instructions to README
- Fixed build
- Fixed linting
- Fixed eslint ignorePattern
- Added build to tsconfig exclude
- Added icons
- Changed outDir of typescript to `build`
- The beginning of time

[Unreleased]: https://github.com/MetaMask/test-snaps/compare/v4.5.0...HEAD
[4.5.0]: https://github.com/MetaMask/test-snaps/compare/v4.4.1...v4.5.0
[4.4.1]: https://github.com/MetaMask/test-snaps/compare/v4.4.0...v4.4.1
[4.4.0]: https://github.com/MetaMask/test-snaps/compare/v4.3.0...v4.4.0
[4.3.0]: https://github.com/MetaMask/test-snaps/compare/v4.2.0...v4.3.0
[4.2.0]: https://github.com/MetaMask/test-snaps/compare/v4.1.2...v4.2.0
[4.1.2]: https://github.com/MetaMask/test-snaps/compare/v4.1.1...v4.1.2
[4.1.1]: https://github.com/MetaMask/test-snaps/compare/v4.1.0...v4.1.1
[4.1.0]: https://github.com/MetaMask/test-snaps/compare/v4.0.2...v4.1.0
[4.0.2]: https://github.com/MetaMask/test-snaps/compare/v4.0.1...v4.0.2
[4.0.1]: https://github.com/MetaMask/test-snaps/compare/v4.0.0...v4.0.1
[4.0.0]: https://github.com/MetaMask/test-snaps/compare/v3.2.0...v4.0.0
[3.2.0]: https://github.com/MetaMask/test-snaps/compare/v3.1.0...v3.2.0
[3.1.0]: https://github.com/MetaMask/test-snaps/compare/v3.0.2...v3.1.0
[3.0.2]: https://github.com/MetaMask/test-snaps/compare/v3.0.1...v3.0.2
[3.0.1]: https://github.com/MetaMask/test-snaps/compare/v3.0.0...v3.0.1
[3.0.0]: https://github.com/MetaMask/test-snaps/compare/v2.0.0...v3.0.0
[2.0.0]: https://github.com/MetaMask/test-snaps/compare/v1.0.0...v2.0.0
[1.0.0]: https://github.com/MetaMask/test-snaps/compare/v0.4.0...v1.0.0
[0.4.0]: https://github.com/MetaMask/test-snaps/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/MetaMask/test-snaps/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/MetaMask/test-snaps/compare/v0.1.3...v0.2.0
[0.1.3]: https://github.com/MetaMask/test-snaps/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/MetaMask/test-snaps/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/MetaMask/test-snaps/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/MetaMask/test-snaps/compare/v0.0.9...v0.1.0
[0.0.9]: https://github.com/MetaMask/test-snaps/compare/v0.0.8...v0.0.9
[0.0.8]: https://github.com/MetaMask/test-snaps/compare/v0.0.7...v0.0.8
[0.0.7]: https://github.com/MetaMask/test-snaps/compare/v0.0.6...v0.0.7
[0.0.6]: https://github.com/MetaMask/test-snaps/compare/v0.0.5...v0.0.6
[0.0.5]: https://github.com/MetaMask/test-snaps/compare/v0.0.4...v0.0.5
[0.0.4]: https://github.com/MetaMask/test-snaps/compare/v0.0.1...v0.0.4
[0.0.1]: https://github.com/MetaMask/test-snaps/releases/tag/v0.0.1
102 changes: 102 additions & 0 deletions packages/cronjob/images/icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions packages/cronjob/package.json
@@ -0,0 +1,64 @@
{
"name": "@metamask/test-snap-cronjob",
"version": "4.5.0",
"description": "MetaMask Cronjob Test Snap",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/MetaMask/test-snaps.git"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"files": [
"dist/",
"snap.manifest.json",
"images/icon.svg"
],
"scripts": {
"build": "mm-snap build --eval false",
"build:dev": "yarn build",
"build:clean": "yarn clean && yarn build",
"clean": "rimraf 'dist/*'",
"start": "mm-snap watch",
"test": "jest --passWithNoTests",
"test:watch": "jest --watch",
"lint:eslint": "eslint . --cache --ext js,ts",
"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' '**/*.yml' --single-quote --ignore-path ../../.prettierignore --no-error-on-unmatched-pattern",
"lint": "yarn lint:eslint && yarn lint:misc --check",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:changelog": "yarn auto-changelog validate"
},
"dependencies": {
"@metamask/snaps-types": "^0.26.2",
"@metamask/snaps-ui": "^0.27.1"
},
"devDependencies": {
"@metamask/auto-changelog": "^2.5.0",
"@metamask/eslint-config": "^6.0.0",
"@metamask/eslint-config-jest": "^6.0.0",
"@metamask/eslint-config-nodejs": "^6.0.0",
"@metamask/eslint-config-typescript": "^6.0.0",
"@metamask/snaps-cli": "^0.26.2",
"@types/jest": "^26.0.13",
"@typescript-eslint/eslint-plugin": "^5.19.0",
"@typescript-eslint/parser": "^5.19.0",
"eslint": "^7.30.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest": "^24.4.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.0",
"jest": "^26.4.2",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",
"ts-jest": "^26.3.0",
"ts-node": "^9.0.0",
"typescript": "^4.4.0"
},
"engines": {
"node": ">=16.0.0"
}
}
7 changes: 7 additions & 0 deletions packages/cronjob/snap.config.js
@@ -0,0 +1,7 @@
module.exports = {
cliOptions: {
port: 8010,
src: './src/index.ts',
transpilationMode: 'localOnly',
},
};