@taqueria/protocol 0.0.8 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # README
1
+ # Taqueria Protocol
2
2
 
3
- Provides a shared collection of TypeScript types used in Taqueria.
3
+ Provides a shared collection of TypeScript types used in Taqueria
4
4
 
5
- This package is consumed by `taqueria` itself, as well as `taqueria-sdk`.
5
+ This package is consumed by `taqueria` itself, as well as `taqueria-sdk`
6
6
 
7
- This package can be consumed as an NPM package, and too included as a Deno module.
7
+ This package can be consumed as an NPM package or included as a Deno module
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taqueria/protocol",
3
- "version": "0.0.8",
3
+ "version": "0.1.2",
4
4
  "description": "A TypeScript package which contains types that are to be shared between @taqueria/node-sdk and @taqueria/taqueria.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,6 +29,6 @@
29
29
  },
30
30
  "homepage": "https://github.com/ecadlabs/taqueria#readme",
31
31
  "devDependencies": {
32
- "typescript": "^4.5.4"
32
+ "typescript": "4.5.4"
33
33
  }
34
34
  }
@@ -454,7 +454,7 @@ export class Option {
454
454
  export interface AccountKeys {
455
455
  alias: string
456
456
  encryptedKey: string
457
- publicKey: string
457
+ publicKeyHash: string
458
458
  secretKey: string
459
459
  }
460
460
 
@@ -586,4 +586,38 @@ export interface Environment {
586
586
  readonly storage: Record<string, unknown>
587
587
  }
588
588
 
589
- export type Action = "checkRuntimeDependencies" | "installRuntimeDependencies" | "proxy" | "pluginInfo" | string
589
+ export type PluginAction = "checkRuntimeDependencies" | "installRuntimeDependencies" | "proxy" | "pluginInfo" | string
590
+
591
+ export interface RuntimeDependencyReport extends RuntimeDependency {
592
+ readonly met: boolean
593
+ }
594
+
595
+ export interface CheckRuntimeDependenciesAction {
596
+ readonly status: PluginResponseCode,
597
+ readonly report: RuntimeDependencyReport[]
598
+ }
599
+
600
+ export interface InstallRuntimeDependenciesAction {
601
+ readonly status: PluginResponseCode,
602
+ readonly report: RuntimeDependencyReport[]
603
+ }
604
+
605
+ export type PluginResponseCode = "success" | "failed" | "notSupported"
606
+
607
+ export type PluginActionNotSupported = {
608
+ readonly status: "notSupported",
609
+ readonly msg: string
610
+ }
611
+
612
+ export interface ProxyAction {
613
+ readonly status: PluginResponseCode,
614
+ readonly stdout: string | unknown,
615
+ readonly stderr: string,
616
+ readonly render?: 'none' | 'string' | 'table'
617
+ }
618
+
619
+ export interface ActionPluginInfo extends UnvalidatedPluginInfo {
620
+ readonly status: PluginResponseCode,
621
+ }
622
+
623
+ export type PluginResponse = ProxyAction | CheckRuntimeDependenciesAction | InstallRuntimeDependenciesAction | ActionPluginInfo | PluginActionNotSupported