automate.ax 0.4.0 → 0.5.0
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 +2 -2
- package/dist/automation/actions.d.ts +2 -1
- package/dist/automation/actions.d.ts.map +1 -1
- package/dist/cli/commands/deploy.d.ts +1 -1
- package/dist/cli/commands/deploy.d.ts.map +1 -1
- package/dist/cli/commands/deploy.js +7 -9
- package/dist/components/core/actions.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -37,8 +37,8 @@ export default defineConfig({
|
|
|
37
37
|
the nearest parent config, or a bounded downward config search.
|
|
38
38
|
It writes local build artifacts to `.automate/build` and uploads bundled
|
|
39
39
|
JavaScript artifacts to Automate.ax. Deployment fails when no `*.automation.ts`
|
|
40
|
-
files are found. The CLI then polls the Graphile-backed
|
|
41
|
-
|
|
40
|
+
files are found. The CLI then polls the Graphile-backed planning, configuration,
|
|
41
|
+
and cleanup stages every two seconds. If account bindings are
|
|
42
42
|
missing, interactive deployments prompt for eligible connected accounts; JSON
|
|
43
43
|
output returns the authorization state. Ctrl-C detaches without cancelling the
|
|
44
44
|
deployment.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Encodable, type ObjectProducingSchema, type ProducingSchema } from "@automate.ax/codec";
|
|
2
2
|
import type { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
|
+
import type { Simplify } from "type-fest";
|
|
3
4
|
import { type AccountAuthorizationAction, type IntegrationAccountReference, type IntegrationScopeRequirement, type ResolvedIntegrationAccount } from "./integrations.js";
|
|
4
5
|
import { signalValueType } from "./signal.js";
|
|
5
6
|
import type { Signal } from "./signal.js";
|
|
@@ -184,7 +185,7 @@ export type DefinedAction<TInputSchema extends ObjectProducingSchema<unknown> =
|
|
|
184
185
|
*
|
|
185
186
|
* @param input - Literal and signal-backed fields supplied to the action.
|
|
186
187
|
*/
|
|
187
|
-
(input: ActionInvocationInput<TInputSchema, TAccountServiceId
|
|
188
|
+
(input: Simplify<ActionInvocationInput<TInputSchema, TAccountServiceId>>): Signal<StandardSchemaV1.InferOutput<TOutputSchema>>;
|
|
188
189
|
/** Display metadata configured while defining the action. */
|
|
189
190
|
readonly meta: ActionMetadata;
|
|
190
191
|
} & ([TAccountServiceId] extends [never] ? object : AccountAuthorizationAction<TAccountServiceId>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/automation/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/automation/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAKL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAChC,0BAAsB;AAEvB,OAAO,EAKL,eAAe,EAGhB,oBAAgB;AACjB,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAgB;AAItC,QAAA,MAAM,2BAA2B,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CACxC,CAAA;AACjC,QAAA,MAAM,4BAA4B,EAAE,gBAAgB,CAAC,IAAI,CAAY,CAAA;AAErE,KAAK,iBAAiB,CAAC,CAAC,IAAI,MAAM,GAAG;IACnC,QAAQ,CAAC,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,CAA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GAAG,KAAK,IACtC;IACF;;;;OAIG;IACH,CACE,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC,GACtE,MAAM,CAAC,gBAAgB,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAA;IAEtD,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;CAC9B,GAAG,CAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC,KAAK,CAAC,GACpC,MAAM,GACN,0BAA0B,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAElD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAMxD;AAiOD;;;;;GAKG;AACH,wBAAgB,CAAC,CACf,OAAO,EAAE,oBAAoB,EAC7B,GAAG,MAAM,EAAE,OAAO,EAAE,GACnB,MAAM,CAAC,MAAM,CAAC,CAchB"}
|
|
@@ -20,5 +20,5 @@ export declare function deploy(opts: z.infer<typeof configDirOptsSchema>): Promi
|
|
|
20
20
|
*
|
|
21
21
|
* @param deployment - Current deployment polling response.
|
|
22
22
|
*/
|
|
23
|
-
export declare function deploymentStatusMessage(deployment: Pick<Awaited<ReturnType<typeof apiClient.deployment.get>>, "status">): "Deploying" | "Planning automations" | "
|
|
23
|
+
export declare function deploymentStatusMessage(deployment: Pick<Awaited<ReturnType<typeof apiClient.deployment.get>>, "status">): "Deploying" | "Planning automations" | "Configuring event sources";
|
|
24
24
|
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/deploy.ts"],"names":[],"mappings":"AAMA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,OAAO,EAAE,SAAS,EAAE,6BAAyB;AAI7C,OAAO,EAEL,mBAAmB,EAOpB,oBAAgB;AAkBjB,eAAO,MAAM,aAAa;;;;;;EAaxB,CAAA;AAEF;;;;;GAKG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/deploy.ts"],"names":[],"mappings":"AAMA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,OAAO,EAAE,SAAS,EAAE,6BAAyB;AAI7C,OAAO,EAEL,mBAAmB,EAOpB,oBAAgB;AAkBjB,eAAO,MAAM,aAAa;;;;;;EAaxB,CAAA;AAEF;;;;;GAKG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,iBAsErE;AA+CD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,IAAI,CACd,OAAO,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EACpD,QAAQ,CACT,sEAOF"}
|
|
@@ -76,10 +76,10 @@ export async function deploy(opts) {
|
|
|
76
76
|
output.normal(() => log.info(renderDetailBlock({
|
|
77
77
|
[dimmed `Directory`]: formatDisplayPath(configDir.dir),
|
|
78
78
|
[dimmed `Project`]: `${accent(deployment.project.name)}\n${dimmed(deployment.project.id)}`,
|
|
79
|
-
[dimmed `Automations`]: formatAutomationDetails(
|
|
79
|
+
[dimmed `Automations`]: formatAutomationDetails(deployment.automations),
|
|
80
80
|
}, { keyAlignment: "right", lineSpacing: 1 })));
|
|
81
81
|
output
|
|
82
|
-
.normal(() => log.success(`Successfully deployed ${accent(String(
|
|
82
|
+
.normal(() => log.success(`Successfully deployed ${accent(String(deployment.automations.length))} ${pluralize(deployment.automations.length, "automation")}`))
|
|
83
83
|
.json({ ...configDir, automationFiles, build, deployment });
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
@@ -125,11 +125,9 @@ async function pollForDeployment(projectId, deploymentId) {
|
|
|
125
125
|
export function deploymentStatusMessage(deployment) {
|
|
126
126
|
return deployment.status === "planning"
|
|
127
127
|
? "Planning automations"
|
|
128
|
-
: deployment.status === "
|
|
129
|
-
? "
|
|
130
|
-
:
|
|
131
|
-
? "Configuring event sources"
|
|
132
|
-
: "Deploying";
|
|
128
|
+
: deployment.status === "configuring"
|
|
129
|
+
? "Configuring event sources"
|
|
130
|
+
: "Deploying";
|
|
133
131
|
}
|
|
134
132
|
/**
|
|
135
133
|
* Interactively assigns existing eligible accounts to unmet bindings.
|
|
@@ -271,13 +269,13 @@ function formatDisplayPath(target) {
|
|
|
271
269
|
/**
|
|
272
270
|
* Formats deployed automation identities for a CLI detail block.
|
|
273
271
|
*
|
|
274
|
-
* @param automations -
|
|
272
|
+
* @param automations - Planned automations to list.
|
|
275
273
|
*/
|
|
276
274
|
function formatAutomationDetails(automations) {
|
|
277
275
|
if (automations.length === 0)
|
|
278
276
|
return dimmed `None`;
|
|
279
277
|
return automations
|
|
280
|
-
.map((automation) => dimmed(automation.identityKey))
|
|
278
|
+
.map((automation) => `${automation.description}\n${dimmed(automation.identityKey)}`)
|
|
281
279
|
.join("\n");
|
|
282
280
|
}
|
|
283
281
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const log: import("../..").DefinedAction<z.ZodObject<{
|
|
3
|
-
value: z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable
|
|
3
|
+
value: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
4
4
|
}, z.core.$strip>, z.ZodVoid, never>;
|
|
5
5
|
export declare const add: import("../..").DefinedAction<z.ZodObject<{
|
|
6
6
|
a: z.ZodNumber;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "automate.ax",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "TypeScript SDK and CLI for Automate.ax automations.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"cjs": false
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@automate.ax/client": "0.
|
|
31
|
-
"@automate.ax/codec": "0.
|
|
30
|
+
"@automate.ax/client": "0.5.0",
|
|
31
|
+
"@automate.ax/codec": "0.5.0",
|
|
32
32
|
"@better-auth/api-key": "1.6.10",
|
|
33
33
|
"@better-auth/stripe": "1.6.10",
|
|
34
34
|
"@better-fetch/fetch": "*",
|