diff --git a/templates/angular/angular.json b/templates/angular/angular.json index 17d552c..11263ac 100644 --- a/templates/angular/angular.json +++ b/templates/angular/angular.json @@ -16,17 +16,10 @@ "outputPath": "dist/angular", "index": "src/index.html", "main": "src/main.ts", - "polyfills": [ - "zone.js" - ], + "polyfills": ["zone.js"], "tsConfig": "tsconfig.app.json", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.css" - ], + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.css"], "scripts": [] }, "configurations": { @@ -77,18 +70,10 @@ "test": { "builder": "@angular-devkit/build-angular:karma", "options": { - "polyfills": [ - "zone.js", - "zone.js/testing" - ], + "polyfills": ["zone.js", "zone.js/testing"], "tsConfig": "tsconfig.spec.json", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.css" - ], + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.css"], "scripts": [] } } diff --git a/templates/angular/package.json b/templates/angular/package.json index 087c512..9787914 100644 --- a/templates/angular/package.json +++ b/templates/angular/package.json @@ -1,7 +1,7 @@ { "name": "angular", - "private": true, "version": "0.0.0", + "private": true, "description": "Angular starter project with @kadena/client integration", "repository": { "type": "git", @@ -11,7 +11,7 @@ "license": "ISC", "scripts": { "build": "ng build", - "format": "prettier --write src/", + "format": "prettier --write .", "ng": "ng", "pactjs:generate:contracts": "pactjs contract-generate --file ./pact/message-store.pact; pactjs contract-generate --file ./pact/root/coin-v5.pact", "start": "ng serve", @@ -55,3 +55,4 @@ "typescript": "~5.2.2" } } + diff --git a/templates/angular/tsconfig.app.json b/templates/angular/tsconfig.app.json index 9161a71..c6fc29f 100644 --- a/templates/angular/tsconfig.app.json +++ b/templates/angular/tsconfig.app.json @@ -5,10 +5,6 @@ "outDir": "./out-tsc/app", "types": ["node"] }, - "files": [ - "src/main.ts" - ], - "include": [ - "src/**/*.d.ts" - ] + "files": ["src/main.ts"], + "include": ["src/**/*.d.ts"] } diff --git a/templates/angular/tsconfig.json b/templates/angular/tsconfig.json index 0521dc9..f71ae1a 100644 --- a/templates/angular/tsconfig.json +++ b/templates/angular/tsconfig.json @@ -21,10 +21,7 @@ "target": "ES2022", "module": "ES2022", "useDefineForClassFields": false, - "lib": [ - "ES2022", - "dom" - ], + "lib": ["ES2022", "dom"], "types": [".kadena/pactjs-generated"] }, "angularCompilerOptions": { @@ -33,7 +30,5 @@ "strictInputAccessModifiers": true, "strictTemplates": true }, - "include": [ - "src/**/*.ts" - ], + "include": ["src/**/*.ts"] } diff --git a/templates/angular/tsconfig.spec.json b/templates/angular/tsconfig.spec.json index d198d77..1fa073a 100644 --- a/templates/angular/tsconfig.spec.json +++ b/templates/angular/tsconfig.spec.json @@ -5,8 +5,5 @@ "outDir": "./out-tsc/spec", "types": ["jasmine", "node", ".kadena/pactjs-generated"] }, - "include": [ - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] } diff --git a/templates/common/utils/readMessage.ts b/templates/common/utils/readMessage.ts index 2d949a6..b67ec7c 100644 --- a/templates/common/utils/readMessage.ts +++ b/templates/common/utils/readMessage.ts @@ -5,9 +5,7 @@ interface ReadMessageParams { account: string; } -export default async function readMessage({ - account, -}: ReadMessageParams): Promise { +export default async function readMessage({ account }: ReadMessageParams): Promise { try { const transactionBuilder = Pact.builder .execution( diff --git a/templates/common/utils/writeMessage.ts b/templates/common/utils/writeMessage.ts index 88763d3..e0a77af 100644 --- a/templates/common/utils/writeMessage.ts +++ b/templates/common/utils/writeMessage.ts @@ -1,10 +1,5 @@ -import { - Pact, - createClient, - isSignedTransaction, - signWithChainweaver, -} from '@kadena/client'; import type { ICommandResult } from '@kadena/client'; +import { Pact, createClient, isSignedTransaction, signWithChainweaver } from '@kadena/client'; import { API_HOST, CHAIN_ID, NETWORK_ID } from './consts'; import getAccountKey from './getAccountKey'; @@ -14,18 +9,12 @@ interface IWriteMessage { messageToWrite: string; } -export default async function writeMessage({ - account, - messageToWrite, -}: IWriteMessage): Promise { +export default async function writeMessage({ account, messageToWrite }: IWriteMessage): Promise { try { const transactionBuilder = Pact.builder .execution( // @ts-ignore - Pact.modules['free.cka-message-store']['write-message']( - account, - messageToWrite, - ), + Pact.modules['free.cka-message-store']['write-message'](account, messageToWrite), ) .addSigner(getAccountKey(account), (withCapability) => [ withCapability('coin.GAS'), diff --git a/templates/vuejs/.prettierrc.json b/templates/vuejs/.prettierrc.json index 3632218..1b7eaae 100644 --- a/templates/vuejs/.prettierrc.json +++ b/templates/vuejs/.prettierrc.json @@ -7,5 +7,6 @@ "singleQuote": true, "trailingComma": "all", "arrowParens": "always", - "proseWrap": "always" + "proseWrap": "always", + "plugins": ["prettier-plugin-packagejson"] } diff --git a/templates/vuejs/index.html b/templates/vuejs/index.html index 113177c..a8bb66d 100644 --- a/templates/vuejs/index.html +++ b/templates/vuejs/index.html @@ -1,4 +1,4 @@ - + diff --git a/templates/vuejs/package.json b/templates/vuejs/package.json index 8f68b73..1d790c8 100644 --- a/templates/vuejs/package.json +++ b/templates/vuejs/package.json @@ -3,45 +3,47 @@ "version": "0.0.0", "private": true, "scripts": { - "dev": "vite", "build": "run-p type-check \"build-only {@}\" --", - "preview": "vite preview", - "test:unit": "vitest", - "test:ci": "vitest run", "build-only": "vite build", - "pactjs:generate:contracts": "pactjs contract-generate --file ./pact/message-store.pact; pactjs contract-generate --file ./pact/root/coin-v5.pact", - "type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false", + "dev": "vite", + "format": "prettier --write .", "lint": "eslint .", - "format": "prettier --write src/" + "pactjs:generate:contracts": "pactjs contract-generate --file ./pact/message-store.pact; pactjs contract-generate --file ./pact/root/coin-v5.pact", + "preview": "vite preview", + "test:ci": "vitest run", + "test:unit": "vitest", + "type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false" }, "dependencies": { - "@kadena/client": "^1.5.0", + "@kadena/client": "^1.6.2", "@testing-library/jest-dom": "^6.1.4", "epic-spinners": "^2.0.0", - "vue": "^3.3.4", + "vue": "^3.3.8", "vue-router": "^4.2.5" }, "devDependencies": { - "@kadena/pactjs-cli": "^1.5.0", - "@rushstack/eslint-patch": "^1.3.3", + "@kadena/pactjs-cli": "^1.6.1", + "@rushstack/eslint-patch": "^1.5.1", "@testing-library/vue": "^8.0.0", "@tsconfig/node18": "^18.2.2", - "@types/jsdom": "^21.1.3", - "@types/node": "^18.18.5", - "@vitejs/plugin-vue": "^4.4.0", + "@types/jsdom": "^21.1.5", + "@types/node": "^20.9.0", + "@vitejs/plugin-vue": "^4.4.1", "@vitejs/plugin-vue-jsx": "^3.0.2", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^12.0.0", "@vue/test-utils": "^2.4.1", "@vue/tsconfig": "^0.4.0", - "eslint": "^8.49.0", - "eslint-plugin-vue": "^9.17.0", + "eslint": "^8.53.0", + "eslint-plugin-vue": "^9.18.1", "jsdom": "^22.1.0", "npm-run-all2": "^6.1.1", "prettier": "^3.0.3", - "typescript": "~5.2.0", - "vite": "^4.4.11", + "prettier-plugin-packagejson": "^2.4.6", + "typescript": "~5.2.2", + "vite": "^4.5.0", "vitest": "^0.34.6", - "vue-tsc": "^1.8.19" + "vue-tsc": "^1.8.22" } } + diff --git a/templates/vuejs/tsconfig.app.json b/templates/vuejs/tsconfig.app.json index 132dd5c..f5c2fe4 100644 --- a/templates/vuejs/tsconfig.app.json +++ b/templates/vuejs/tsconfig.app.json @@ -1,6 +1,6 @@ { "extends": "@vue/tsconfig/tsconfig.dom.json", - "include": ["env.d.ts", "custom.d.ts", "src/**/*", "src/**/*.vue", "vitest.setup.ts",], + "include": ["env.d.ts", "custom.d.ts", "src/**/*", "src/**/*.vue", "vitest.setup.ts"], "exclude": ["src/**/__tests__/*"], "compilerOptions": { "composite": true,