mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 10:21:55 +00:00
chore: update the name of metadata
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
import { Variants } from "./config/builder/variants"
|
||||
import { CreatedAction, createAction } from "./actions/createAction"
|
||||
import {
|
||||
ActionMetaData,
|
||||
ActionMetadata,
|
||||
Effects,
|
||||
ActionResult,
|
||||
Metadata,
|
||||
@@ -106,7 +106,7 @@ export class StartSdk<Manifest extends SDKManifest, Store, Vault> {
|
||||
| Config<any, never, never>,
|
||||
Type extends Record<string, any> = ExtractConfigType<ConfigType>,
|
||||
>(
|
||||
metaData: Omit<ActionMetaData, "input"> & {
|
||||
metaData: Omit<ActionMetadata, "input"> & {
|
||||
input: Config<Type, Store, Vault> | Config<Type, never, never>
|
||||
},
|
||||
fn: (options: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Config, ExtractConfigType } from "../config/builder/config"
|
||||
import { ActionMetaData, ActionResult, Effects, ExportedAction } from "../types"
|
||||
import { ActionMetadata, ActionResult, Effects, ExportedAction } from "../types"
|
||||
import { createUtils } from "../util"
|
||||
import { Utils, utils } from "../util/utils"
|
||||
|
||||
@@ -13,7 +13,7 @@ export class CreatedAction<
|
||||
Type extends Record<string, any> = ExtractConfigType<ConfigType>,
|
||||
> {
|
||||
private constructor(
|
||||
public readonly myMetaData: Omit<ActionMetaData, "input">,
|
||||
public readonly myMetaData: Omit<ActionMetadata, "input">,
|
||||
readonly fn: (options: {
|
||||
effects: Effects
|
||||
utils: Utils<Store, Vault>
|
||||
@@ -32,7 +32,7 @@ export class CreatedAction<
|
||||
| Config<any, never, never>,
|
||||
Type extends Record<string, any> = ExtractConfigType<ConfigType>,
|
||||
>(
|
||||
metaData: Omit<ActionMetaData, "input"> & {
|
||||
metaData: Omit<ActionMetadata, "input"> & {
|
||||
input: Config<Type, Store, Vault> | Config<Type, never, never>
|
||||
},
|
||||
fn: (options: {
|
||||
@@ -65,10 +65,10 @@ export class CreatedAction<
|
||||
})
|
||||
}
|
||||
|
||||
async actionMetaData(options: {
|
||||
async ActionMetadata(options: {
|
||||
effects: Effects
|
||||
utils: Utils<Store, Vault>
|
||||
}): Promise<ActionMetaData> {
|
||||
}): Promise<ActionMetadata> {
|
||||
return {
|
||||
...this.myMetaData,
|
||||
input: await this.input.build(options),
|
||||
|
||||
@@ -17,14 +17,14 @@ export function setupActions<Store, Vault>(
|
||||
get actions() {
|
||||
return myActions()
|
||||
},
|
||||
async actionsMetaData({ effects }: { effects: Effects }) {
|
||||
async actionsMetadata({ effects }: { effects: Effects }) {
|
||||
const utils = createUtils<Store, Vault>(effects)
|
||||
return Promise.all(
|
||||
createdActions.map((x) => x.actionMetaData({ effects, utils })),
|
||||
createdActions.map((x) => x.ActionMetadata({ effects, utils })),
|
||||
)
|
||||
},
|
||||
} satisfies {
|
||||
actions: ExpectedExports.actions
|
||||
actionsMetaData: ExpectedExports.actionsMetaData
|
||||
actionsMetadata: ExpectedExports.actionsMetadata
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ValidEmVer } from "../emverLite/mod"
|
||||
import { ActionMetaData } from "../types"
|
||||
import { ActionMetadata } from "../types"
|
||||
|
||||
export interface Container {
|
||||
/** This should be pointing to a docker container name */
|
||||
|
||||
@@ -45,9 +45,9 @@ export namespace ExpectedExports {
|
||||
}
|
||||
}
|
||||
|
||||
export type actionsMetaData = (options: {
|
||||
export type actionsMetadata = (options: {
|
||||
effects: Effects
|
||||
}) => Promise<Array<ActionMetaData>>
|
||||
}) => Promise<Array<ActionMetadata>>
|
||||
|
||||
/**
|
||||
* This is the entrypoint for the main container. Used to start up something like the service that the
|
||||
@@ -154,7 +154,7 @@ export type DaemonReturned = {
|
||||
term(): Promise<void>
|
||||
}
|
||||
|
||||
export type ActionMetaData = {
|
||||
export type ActionMetadata = {
|
||||
name: string
|
||||
description: string
|
||||
id: string
|
||||
@@ -320,7 +320,7 @@ export type Effects = {
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
exportAction(options: ActionMetaData): Promise<void>
|
||||
exportAction(options: ActionMetadata): Promise<void>
|
||||
/**
|
||||
* Remove an action that was exported. Used problably during main or during setConfig.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user