@walkeros/cli 4.2.0 → 4.3.0-next-1781171238534
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/CHANGELOG.md +32 -0
- package/dist/cli.js +193 -64
- package/dist/index.d.ts +86 -7
- package/dist/index.js +207 -69
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -197,6 +197,21 @@ interface BundleStats {
|
|
|
197
197
|
buildTime: number;
|
|
198
198
|
treeshakingEffective: boolean;
|
|
199
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* Build the wireConfig data payload for a flow as a plain object.
|
|
202
|
+
*
|
|
203
|
+
* This is the same object the bundler bakes into a skeleton as
|
|
204
|
+
* `__configData` (section, step id, data-layer props), produced by the
|
|
205
|
+
* same classification pass the bundler uses. Callers that inject data at
|
|
206
|
+
* simulate time (the `data` option of the simulate functions) must build
|
|
207
|
+
* the FULL payload from the FULL config with this helper; injection
|
|
208
|
+
* replaces the baked payload, it does not merge.
|
|
209
|
+
*
|
|
210
|
+
* Mirrors the bundler's own call path (`detectNamedImports` feeding
|
|
211
|
+
* `buildSplitConfigObject`) so the result stays identical to the baked
|
|
212
|
+
* payload by construction.
|
|
213
|
+
*/
|
|
214
|
+
declare function buildDataPayload(flowSettings: Flow): Record<string, unknown>;
|
|
200
215
|
|
|
201
216
|
/**
|
|
202
217
|
* Named bundle targets with frozen presets.
|
|
@@ -408,7 +423,28 @@ declare function push(configOrPath: string | unknown, event: unknown, options?:
|
|
|
408
423
|
mock?: string[];
|
|
409
424
|
snapshot?: string;
|
|
410
425
|
}): Promise<PushResult>;
|
|
411
|
-
|
|
426
|
+
/**
|
|
427
|
+
* Shared data-injection seam for all simulate functions.
|
|
428
|
+
*/
|
|
429
|
+
interface SimulateDataOptions {
|
|
430
|
+
/**
|
|
431
|
+
* Wire-config data payload to execute instead of the bundle's baked
|
|
432
|
+
* `__configData`. Shape: the split-config data payload the bundler
|
|
433
|
+
* emits (section, step id, data-layer props), as built by
|
|
434
|
+
* `buildDataPayload`.
|
|
435
|
+
*
|
|
436
|
+
* The payload REPLACES the baked data, there is no deep-merge: build
|
|
437
|
+
* the full payload from the full config. Injection granularity follows
|
|
438
|
+
* the skeleton's `__data` references, which are emitted per TOP-LEVEL
|
|
439
|
+
* step prop. Changed values for any nested key under an existing
|
|
440
|
+
* top-level data prop (e.g. a new entity-action rule inside an existing
|
|
441
|
+
* `mapping`) take effect without a rebundle. An entirely NEW top-level
|
|
442
|
+
* data prop on a step has no `__data` reference in the skeleton, so it
|
|
443
|
+
* is IGNORED by injection and requires a rebundle.
|
|
444
|
+
*/
|
|
445
|
+
data?: Record<string, unknown>;
|
|
446
|
+
}
|
|
447
|
+
interface SimulateSourceOptions extends SimulateDataOptions {
|
|
412
448
|
sourceId: string;
|
|
413
449
|
bundlePath?: string;
|
|
414
450
|
flow?: string;
|
|
@@ -427,7 +463,7 @@ interface SimulateSourceOptions {
|
|
|
427
463
|
* content shapes. The source's createTrigger defines what it expects.
|
|
428
464
|
*/
|
|
429
465
|
declare function simulateSource(configOrPath: string | Flow.Json, input: unknown, options: SimulateSourceOptions): Promise<Simulation.Result>;
|
|
430
|
-
interface SimulateTransformerOptions {
|
|
466
|
+
interface SimulateTransformerOptions extends SimulateDataOptions {
|
|
431
467
|
transformerId: string;
|
|
432
468
|
bundlePath?: string;
|
|
433
469
|
flow?: string;
|
|
@@ -453,7 +489,7 @@ interface SimulateTransformerOptions {
|
|
|
453
489
|
* If the transformer drops the event (returns false), output event is null.
|
|
454
490
|
*/
|
|
455
491
|
declare function simulateTransformer(configOrPath: string | Flow.Json, event: WalkerOS.DeepPartialEvent, options: SimulateTransformerOptions): Promise<Simulation.Result>;
|
|
456
|
-
interface SimulateCollectorOptions {
|
|
492
|
+
interface SimulateCollectorOptions extends SimulateDataOptions {
|
|
457
493
|
collectorName: string;
|
|
458
494
|
bundlePath?: string;
|
|
459
495
|
flow?: string;
|
|
@@ -476,7 +512,7 @@ interface SimulateCollectorOptions {
|
|
|
476
512
|
* the runtime's own enrichment (`enrichEvent`); it does not reimplement it.
|
|
477
513
|
*/
|
|
478
514
|
declare function simulateCollector(configOrPath: string | Flow.Json, event: WalkerOS.DeepPartialEvent, options: SimulateCollectorOptions): Promise<Simulation.Result>;
|
|
479
|
-
interface SimulateDestinationOptions {
|
|
515
|
+
interface SimulateDestinationOptions extends SimulateDataOptions {
|
|
480
516
|
destinationId: string;
|
|
481
517
|
bundlePath?: string;
|
|
482
518
|
flow?: string;
|
|
@@ -9864,7 +9900,23 @@ interface DeployOptions {
|
|
|
9864
9900
|
signal?: AbortSignal;
|
|
9865
9901
|
onStatus?: (status: string, substatus: string | null) => void;
|
|
9866
9902
|
}
|
|
9867
|
-
declare function deploy(options: DeployOptions): Promise<
|
|
9903
|
+
declare function deploy(options: DeployOptions): Promise<{
|
|
9904
|
+
deploymentId: string;
|
|
9905
|
+
settingsId: string;
|
|
9906
|
+
status: string;
|
|
9907
|
+
} | {
|
|
9908
|
+
deploymentId: string;
|
|
9909
|
+
type: "web" | "server";
|
|
9910
|
+
status: string;
|
|
9911
|
+
} | {
|
|
9912
|
+
status: string;
|
|
9913
|
+
substatus?: string | null;
|
|
9914
|
+
type: string;
|
|
9915
|
+
containerUrl?: string | null;
|
|
9916
|
+
publicUrl?: string | null;
|
|
9917
|
+
errorMessage?: string | null;
|
|
9918
|
+
deploymentId: string;
|
|
9919
|
+
}>;
|
|
9868
9920
|
declare function getDeployment(options: {
|
|
9869
9921
|
flowId: string;
|
|
9870
9922
|
projectId?: string;
|
|
@@ -9985,6 +10037,28 @@ declare function telemetryEnableCommand(): void;
|
|
|
9985
10037
|
*/
|
|
9986
10038
|
declare function telemetryDisableCommand(): void;
|
|
9987
10039
|
|
|
10040
|
+
/**
|
|
10041
|
+
* Check if a config value contains code markers that require esbuild compilation.
|
|
10042
|
+
* Returns true if the value (or any nested value) contains:
|
|
10043
|
+
* - $code: prefix (raw JS expression)
|
|
10044
|
+
* - $store. prefix (JS variable reference)
|
|
10045
|
+
* - __WALKEROS_ENV: prefix (process.env expression)
|
|
10046
|
+
* - __WALKEROS_SECRET: prefix (guarded process.env read for a deferred secret)
|
|
10047
|
+
*/
|
|
10048
|
+
declare function containsCodeMarkers(value: unknown): boolean;
|
|
10049
|
+
/**
|
|
10050
|
+
* Split a step's properties into code-layer (for esbuild) and data-layer (post-build).
|
|
10051
|
+
*
|
|
10052
|
+
* Code layer: 'code' key always, plus any property containing code markers
|
|
10053
|
+
* Data layer: plain JSON values (settings, mappings, chains, etc.)
|
|
10054
|
+
*
|
|
10055
|
+
* Not applicable to InlineCode steps — those go entirely to the code layer.
|
|
10056
|
+
*/
|
|
10057
|
+
declare function classifyStepProperties(step: Record<string, unknown>): {
|
|
10058
|
+
codeProps: Record<string, unknown>;
|
|
10059
|
+
dataProps: Record<string, unknown>;
|
|
10060
|
+
};
|
|
10061
|
+
|
|
9988
10062
|
/**
|
|
9989
10063
|
* Pure structural validation of a flow config — the exact checks the bundler
|
|
9990
10064
|
* runs at codegen time, BEFORE any esbuild compile or package/archive fetch.
|
|
@@ -10167,6 +10241,9 @@ interface ApiErrorDetail {
|
|
|
10167
10241
|
interface ApiErrorOptions {
|
|
10168
10242
|
code?: string;
|
|
10169
10243
|
details?: ApiErrorDetail[];
|
|
10244
|
+
status?: number;
|
|
10245
|
+
retryable?: boolean;
|
|
10246
|
+
retryAfterSeconds?: number;
|
|
10170
10247
|
minVersion?: string;
|
|
10171
10248
|
clientVersion?: string;
|
|
10172
10249
|
client?: string;
|
|
@@ -10176,6 +10253,9 @@ interface ApiErrorOptions {
|
|
|
10176
10253
|
declare class ApiError extends Error {
|
|
10177
10254
|
code?: string;
|
|
10178
10255
|
details?: ApiErrorDetail[];
|
|
10256
|
+
status?: number;
|
|
10257
|
+
retryable?: boolean;
|
|
10258
|
+
retryAfterSeconds?: number;
|
|
10179
10259
|
minVersion?: string;
|
|
10180
10260
|
clientVersion?: string;
|
|
10181
10261
|
client?: string;
|
|
@@ -10185,7 +10265,6 @@ declare class ApiError extends Error {
|
|
|
10185
10265
|
}
|
|
10186
10266
|
/**
|
|
10187
10267
|
* Extract structured error from an openapi-fetch error response and throw.
|
|
10188
|
-
* The error shape is: { error: { code, message, details: { errors: [] } } }
|
|
10189
10268
|
*
|
|
10190
10269
|
* For `code === 'CLIENT_OUTDATED'` (HTTP 426), also extracts the upgrade
|
|
10191
10270
|
* metadata: `minVersion`, `clientVersion`, `client`, `upgrade`, `docs`.
|
|
@@ -10590,4 +10669,4 @@ declare module '@walkeros/core' {
|
|
|
10590
10669
|
}
|
|
10591
10670
|
}
|
|
10592
10671
|
|
|
10593
|
-
export { ApiError, type ApiErrorDetail, type BuildOptions, type BundleStats, type CLIBuildOptions, type ClientContext, type ClientType, type CompareContractInput, type ContractComparison, type ContractVerdict, type CreatePreviewOptions, type CreateSecretOptions, type DeletePreviewOptions, type DeleteSecretOptions, type DeployOptions, DeploymentAmbiguityError, type DeploymentSummaryForFlow, type DeviceCodeOptions, type DeviceCodeResult, type ExampleLookupResult, type FeedbackOptions, type GetPreviewOptions, type GlobalOptions, type HealthResult, type ListDeploymentsOptions, type ListFlowsOptions, type ListPreviewsOptions, type ListProjectsOptions, type ListSecretsOptions, type MinifyOptions, type PollOptions, type PollResult, type PrepareInput, type PreparedFlow, type ProjectFlows, type PushResult, type RunCommandOptions, type RunOptions, type RunResult, type SSEEvent, type SSEParseResult, type SimulateCollectorOptions, type SimulateDestinationOptions, type SimulateSourceOptions, type SimulateTransformerOptions, type UpdateSecretOptions, VERSION, type ValidateResult, type ValidationError, type ValidationType, type ValidationWarning, type WalkerOSConfig, type WrapSkeletonOptions, annotateErrorWithDrift, apiFetch, bakedContractHash, bakedContractVersion, bundle, bundleCommand, canonicalContractHash, clientContextHeaders, compareContract, compareOutput, createApiClient, createDeployCommand, createDeployment, createDeploymentCommand, createFlow, createFlowCommand, createPreview, createProject, createProjectCommand, createSecret, deleteConfig, deleteDeployment, deleteDeploymentByFlowId, deleteDeploymentCommand, deleteFlow, deleteFlowCommand, deletePreview, deleteProject, deleteProjectCommand, deleteSecret, deploy, deployCommand, deployFetch, duplicateFlow, duplicateFlowCommand, feedback, feedbackCommand, fetchHealth, findExample, getAuthHeaders, getClientContext, getDefaultProject, getDeployment, getDeploymentBySlug, getDeploymentBySlugCommand, getDeploymentCommand, getFeedbackPreference, getFlow, getFlowCommand, getPreview, getProject, getProjectCommand, getToken, listAllFlows, listDeployments, listDeploymentsCommand, listFlows, listFlowsCommand, listPreviews, listProjects, listProjectsCommand, listSecrets, loadConfig, loadJsonConfig, loginCommand, logoutCommand, mergeAuthHeaders, parseSSEEvents, pollForToken, publicFetch, push, pushCommand, readConfig, requestDeviceCode, requireProjectId, resetClientContext, resolveAppUrl, resolveToken, run, runCommand, setClientContext, setDefaultProject, setFeedbackPreference, simulateCollector, simulateDestination, simulateSource, simulateTransformer, index as telemetry, telemetryDisableCommand, telemetryEnableCommand, telemetryStatusCommand, throwApiError, updateFlow, updateFlowCommand, updateProject, updateProjectCommand, updateSecret, validate, validateCommand, validateFlowStructure, whoami, whoamiCommand, wrapSkeleton, writeConfig };
|
|
10672
|
+
export { ApiError, type ApiErrorDetail, type BuildOptions, type BundleStats, type CLIBuildOptions, type ClientContext, type ClientType, type CompareContractInput, type ContractComparison, type ContractVerdict, type CreatePreviewOptions, type CreateSecretOptions, type DeletePreviewOptions, type DeleteSecretOptions, type DeployOptions, DeploymentAmbiguityError, type DeploymentSummaryForFlow, type DeviceCodeOptions, type DeviceCodeResult, type ExampleLookupResult, type FeedbackOptions, type GetPreviewOptions, type GlobalOptions, type HealthResult, type ListDeploymentsOptions, type ListFlowsOptions, type ListPreviewsOptions, type ListProjectsOptions, type ListSecretsOptions, type MinifyOptions, type PollOptions, type PollResult, type PrepareInput, type PreparedFlow, type ProjectFlows, type PushResult, type RunCommandOptions, type RunOptions, type RunResult, type SSEEvent, type SSEParseResult, type SimulateCollectorOptions, type SimulateDataOptions, type SimulateDestinationOptions, type SimulateSourceOptions, type SimulateTransformerOptions, type UpdateSecretOptions, VERSION, type ValidateResult, type ValidationError, type ValidationType, type ValidationWarning, type WalkerOSConfig, type WrapSkeletonOptions, annotateErrorWithDrift, apiFetch, bakedContractHash, bakedContractVersion, buildDataPayload, bundle, bundleCommand, canonicalContractHash, classifyStepProperties, clientContextHeaders, compareContract, compareOutput, containsCodeMarkers, createApiClient, createDeployCommand, createDeployment, createDeploymentCommand, createFlow, createFlowCommand, createPreview, createProject, createProjectCommand, createSecret, deleteConfig, deleteDeployment, deleteDeploymentByFlowId, deleteDeploymentCommand, deleteFlow, deleteFlowCommand, deletePreview, deleteProject, deleteProjectCommand, deleteSecret, deploy, deployCommand, deployFetch, duplicateFlow, duplicateFlowCommand, feedback, feedbackCommand, fetchHealth, findExample, getAuthHeaders, getClientContext, getDefaultProject, getDeployment, getDeploymentBySlug, getDeploymentBySlugCommand, getDeploymentCommand, getFeedbackPreference, getFlow, getFlowCommand, getPreview, getProject, getProjectCommand, getToken, listAllFlows, listDeployments, listDeploymentsCommand, listFlows, listFlowsCommand, listPreviews, listProjects, listProjectsCommand, listSecrets, loadConfig, loadJsonConfig, loginCommand, logoutCommand, mergeAuthHeaders, parseSSEEvents, pollForToken, publicFetch, push, pushCommand, readConfig, requestDeviceCode, requireProjectId, resetClientContext, resolveAppUrl, resolveToken, run, runCommand, setClientContext, setDefaultProject, setFeedbackPreference, simulateCollector, simulateDestination, simulateSource, simulateTransformer, index as telemetry, telemetryDisableCommand, telemetryEnableCommand, telemetryStatusCommand, throwApiError, updateFlow, updateFlowCommand, updateProject, updateProjectCommand, updateSecret, validate, validateCommand, validateFlowStructure, whoami, whoamiCommand, wrapSkeleton, writeConfig };
|