sdk hotfix

This commit is contained in:
Aiden McClelland
2025-02-12 17:11:54 -07:00
parent b88b24e231
commit 44aa3cc9b5
5 changed files with 15 additions and 18 deletions

View File

@@ -422,6 +422,9 @@ impl ImageSource {
// docker buildx build ${path} -o type=image,name=start9/${id}
let tag = format!("start9/{id}/{image_id}:{}", new_guid());
let mut command = Command::new(CONTAINER_TOOL);
if CONTAINER_TOOL == "docker" {
command.arg("buildx");
}
command
.arg("build")
.arg(workdir)
@@ -553,6 +556,7 @@ impl ImageSource {
Command::new(CONTAINER_TOOL)
.arg("create")
.arg(&docker_platform)
.arg("--entrypoint=/bin/sh")
.arg(&tag)
.invoke(ErrorKind::Docker)
.await?,

View File

@@ -13,7 +13,7 @@ export type Run<
| InputSpec<Record<string, never>, never>,
> = (options: {
effects: T.Effects
input: ExtractInputSpecType<A> & Record<string, any>
input: ExtractInputSpecType<A>
}) => Promise<(T.ActionResult & { version: "1" }) | null | void | undefined>
export type GetInput<
A extends
@@ -22,12 +22,7 @@ export type GetInput<
| InputSpec<Record<string, any>, never>,
> = (options: {
effects: T.Effects
}) => Promise<
| null
| void
| undefined
| (ExtractPartialInputSpecType<A> & Record<string, any>)
>
}) => Promise<null | void | undefined | ExtractPartialInputSpecType<A>>
export type MaybeFn<T> = T | ((options: { effects: T.Effects }) => Promise<T>)
function callMaybeFn<T>(
@@ -63,8 +58,8 @@ export class Action<
readonly id: Id,
private readonly metadataFn: MaybeFn<T.ActionMetadata>,
private readonly inputSpec: InputSpecType,
private readonly getInputFn: GetInput<ExtractInputSpecType<InputSpecType>>,
private readonly runFn: Run<ExtractInputSpecType<InputSpecType>>,
private readonly getInputFn: GetInput<InputSpecType>,
private readonly runFn: Run<InputSpecType>,
) {}
static withInput<
Id extends T.ActionId,
@@ -77,8 +72,8 @@ export class Action<
id: Id,
metadata: MaybeFn<Omit<T.ActionMetadata, "hasInput">>,
inputSpec: InputSpecType,
getInput: GetInput<ExtractInputSpecType<InputSpecType>>,
run: Run<ExtractInputSpecType<InputSpecType>>,
getInput: GetInput<InputSpecType>,
run: Run<InputSpecType>,
): Action<Id, Store, InputSpecType> {
return new Action(
id,

View File

@@ -301,14 +301,12 @@ export class StartSdk<Manifest extends T.SDKManifest, Store> {
| Record<string, any>
| InputSpec<any, any>
| InputSpec<any, never>,
Type extends
ExtractInputSpecType<InputSpecType> = ExtractInputSpecType<InputSpecType>,
>(
id: Id,
metadata: MaybeFn<Omit<T.ActionMetadata, "hasInput">>,
inputSpec: InputSpecType,
getInput: GetInput<Type>,
run: Run<Type>,
getInput: GetInput<InputSpecType>,
run: Run<InputSpecType>,
) => Action.withInput(id, metadata, inputSpec, getInput, run),
/**
* @description Use this function to create an action that does not accept form input

View File

@@ -1,12 +1,12 @@
{
"name": "@start9labs/start-sdk",
"version": "0.3.6-beta.5",
"version": "0.3.6-beta.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@start9labs/start-sdk",
"version": "0.3.6-beta.5",
"version": "0.3.6-beta.6",
"license": "MIT",
"dependencies": {
"@iarna/toml": "^2.2.5",

View File

@@ -1,6 +1,6 @@
{
"name": "@start9labs/start-sdk",
"version": "0.3.6-beta.5",
"version": "0.3.6-beta.6",
"description": "Software development kit to facilitate packaging services for StartOS",
"main": "./package/lib/index.js",
"types": "./package/lib/index.d.ts",