@sdlcworks/components 0.0.24 → 0.0.26

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +13 -2
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -236,9 +236,20 @@ export type ProviderUpsertArtifactsFn<S> = (ctx: ProviderUpsertArtifactsCtx<S>)
236
236
  declare const emptyStateSchema: z.ZodObject<{}, z.core.$strip>;
237
237
  export type EmptyStateShape = typeof emptyStateSchema.shape;
238
238
  export type InferredState<SShape extends z.ZodRawShape> = z.infer<z.ZodObject<SShape>>;
239
- export type ProviderFnsDef<I, D, O, SShape extends z.ZodRawShape = EmptyStateShape, ConnectionType extends string = string, S = InferredState<SShape>> = {
239
+ /**
240
+ * Runtime state type that allows each field to be either a plain value OR a Pulumi Output.
241
+ * This enables storing Pulumi Output references in state for automatic dependency tracking.
242
+ *
243
+ * @example
244
+ * stateSchema: z.object({ jobName: z.string(), location: z.string() })
245
+ * RuntimeState: { jobName: string | Output<string>, location: string | Output<string> }
246
+ */
247
+ export type RuntimeState<SShape extends z.ZodRawShape> = {
248
+ [K in keyof InferredState<SShape>]: InferredState<SShape>[K] | PulumiOutput<InferredState<SShape>[K]>;
249
+ };
250
+ export type ProviderFnsDef<I, D, O, SShape extends z.ZodRawShape = EmptyStateShape, ConnectionType extends string = string, S = RuntimeState<SShape>> = {
240
251
  stateSchema?: z.ZodObject<SShape>;
241
- initialState?: S;
252
+ initialState?: Partial<S>;
242
253
  pulumi: ProviderPulumiFn<I, S, O>;
243
254
  connect?: readonly ConnectionHandlerEntry<S, ConnectionType, any>[];
244
255
  deploy?: ProviderDeployFn<D, S>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdlcworks/components",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "module": "dist/index.js",
5
5
  "files": [
6
6
  "dist"