@lace-cloud/proto 0.8.0 → 0.9.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/dist/index.cjs CHANGED
@@ -190,6 +190,7 @@ function convertNodeConfig(proto) {
190
190
  })),
191
191
  sibling_ids: proto.sibling_ids,
192
192
  depends_on: proto.depends_on,
193
+ providers: proto.providers ?? {},
193
194
  available_variables: proto.available_variables.map((v) => ({ name: v.name, type: v.type }))
194
195
  };
195
196
  }
@@ -213,13 +214,15 @@ function convertSettingsConfig(proto) {
213
214
  required_providers: (proto.terraform?.required_providers ?? []).map((p) => ({
214
215
  name: p.name,
215
216
  source: p.source,
216
- version: p.version
217
+ version: p.version,
218
+ configuration_aliases: p.configuration_aliases && p.configuration_aliases.length > 0 ? p.configuration_aliases : void 0
217
219
  }))
218
220
  },
219
221
  providers: proto.providers.map((p) => ({
220
222
  name: p.name,
221
223
  alias: p.alias,
222
- config: p.config ?? {}
224
+ config: p.config ?? {},
225
+ blocks: p.blocks && p.blocks.length > 0 ? p.blocks : void 0
223
226
  })),
224
227
  locals: proto.locals.map((l) => ({
225
228
  name: l.name,
@@ -232,7 +235,11 @@ function convertSettingsConfig(proto) {
232
235
  type: v.type,
233
236
  required: v.required,
234
237
  description: v.description || void 0,
235
- default_value: v.default_value
238
+ default_value: v.default_value,
239
+ validation: v.validation && v.validation.length > 0 ? v.validation.map((b) => ({ condition: b.condition, error_message: b.error_message })) : void 0,
240
+ ephemeral: v.ephemeral,
241
+ sensitive: v.sensitive,
242
+ nullable: v.nullable
236
243
  })),
237
244
  exports: (proto.exports ?? []).map((e) => ({
238
245
  name: e.name,
@@ -243,7 +250,8 @@ function convertSettingsConfig(proto) {
243
250
  name: d.name,
244
251
  type: d.type,
245
252
  description: d.description || void 0,
246
- sensitive: d.sensitive
253
+ sensitive: d.sensitive,
254
+ depends_on: d.depends_on && d.depends_on.length > 0 ? d.depends_on : void 0
247
255
  }))
248
256
  };
249
257
  }
@@ -5851,7 +5859,15 @@ var RenderOutput = {
5851
5859
  }
5852
5860
  };
5853
5861
  function createBaseNodeConfig() {
5854
- return { instance_id: "", inputs: [], outputs: [], sibling_ids: [], depends_on: [], available_variables: [] };
5862
+ return {
5863
+ instance_id: "",
5864
+ inputs: [],
5865
+ outputs: [],
5866
+ sibling_ids: [],
5867
+ depends_on: [],
5868
+ available_variables: [],
5869
+ providers: {}
5870
+ };
5855
5871
  }
5856
5872
  var NodeConfig = {
5857
5873
  encode(message, writer = new import_wire3.BinaryWriter()) {
@@ -5873,6 +5889,9 @@ var NodeConfig = {
5873
5889
  for (const v of message.available_variables) {
5874
5890
  VariableRef.encode(v, writer.uint32(50).fork()).join();
5875
5891
  }
5892
+ globalThis.Object.entries(message.providers).forEach(([key, value]) => {
5893
+ NodeConfig_ProvidersEntry.encode({ key, value }, writer.uint32(58).fork()).join();
5894
+ });
5876
5895
  return writer;
5877
5896
  },
5878
5897
  decode(input, length) {
@@ -5924,6 +5943,16 @@ var NodeConfig = {
5924
5943
  message.available_variables.push(VariableRef.decode(reader, reader.uint32()));
5925
5944
  continue;
5926
5945
  }
5946
+ case 7: {
5947
+ if (tag !== 58) {
5948
+ break;
5949
+ }
5950
+ const entry7 = NodeConfig_ProvidersEntry.decode(reader, reader.uint32());
5951
+ if (entry7.value !== void 0) {
5952
+ message.providers[entry7.key] = entry7.value;
5953
+ }
5954
+ continue;
5955
+ }
5927
5956
  }
5928
5957
  if ((tag & 7) === 4 || tag === 0) {
5929
5958
  break;
@@ -5939,7 +5968,14 @@ var NodeConfig = {
5939
5968
  outputs: globalThis.Array.isArray(object?.outputs) ? object.outputs.map((e) => RenderOutput.fromJSON(e)) : [],
5940
5969
  sibling_ids: globalThis.Array.isArray(object?.siblingIds) ? object.siblingIds.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.sibling_ids) ? object.sibling_ids.map((e) => globalThis.String(e)) : [],
5941
5970
  depends_on: globalThis.Array.isArray(object?.dependsOn) ? object.dependsOn.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.depends_on) ? object.depends_on.map((e) => globalThis.String(e)) : [],
5942
- available_variables: globalThis.Array.isArray(object?.availableVariables) ? object.availableVariables.map((e) => VariableRef.fromJSON(e)) : globalThis.Array.isArray(object?.available_variables) ? object.available_variables.map((e) => VariableRef.fromJSON(e)) : []
5971
+ available_variables: globalThis.Array.isArray(object?.availableVariables) ? object.availableVariables.map((e) => VariableRef.fromJSON(e)) : globalThis.Array.isArray(object?.available_variables) ? object.available_variables.map((e) => VariableRef.fromJSON(e)) : [],
5972
+ providers: isObject3(object.providers) ? globalThis.Object.entries(object.providers).reduce(
5973
+ (acc, [key, value]) => {
5974
+ acc[key] = globalThis.String(value);
5975
+ return acc;
5976
+ },
5977
+ {}
5978
+ ) : {}
5943
5979
  };
5944
5980
  },
5945
5981
  toJSON(message) {
@@ -5962,6 +5998,15 @@ var NodeConfig = {
5962
5998
  if (message.available_variables?.length) {
5963
5999
  obj.availableVariables = message.available_variables.map((e) => VariableRef.toJSON(e));
5964
6000
  }
6001
+ if (message.providers) {
6002
+ const entries = globalThis.Object.entries(message.providers);
6003
+ if (entries.length > 0) {
6004
+ obj.providers = {};
6005
+ entries.forEach(([k, v]) => {
6006
+ obj.providers[k] = v;
6007
+ });
6008
+ }
6009
+ }
5965
6010
  return obj;
5966
6011
  },
5967
6012
  create(base) {
@@ -5975,6 +6020,83 @@ var NodeConfig = {
5975
6020
  message.sibling_ids = object.sibling_ids?.map((e) => e) || [];
5976
6021
  message.depends_on = object.depends_on?.map((e) => e) || [];
5977
6022
  message.available_variables = object.available_variables?.map((e) => VariableRef.fromPartial(e)) || [];
6023
+ message.providers = globalThis.Object.entries(object.providers ?? {}).reduce(
6024
+ (acc, [key, value]) => {
6025
+ if (value !== void 0) {
6026
+ acc[key] = globalThis.String(value);
6027
+ }
6028
+ return acc;
6029
+ },
6030
+ {}
6031
+ );
6032
+ return message;
6033
+ }
6034
+ };
6035
+ function createBaseNodeConfig_ProvidersEntry() {
6036
+ return { key: "", value: "" };
6037
+ }
6038
+ var NodeConfig_ProvidersEntry = {
6039
+ encode(message, writer = new import_wire3.BinaryWriter()) {
6040
+ if (message.key !== "") {
6041
+ writer.uint32(10).string(message.key);
6042
+ }
6043
+ if (message.value !== "") {
6044
+ writer.uint32(18).string(message.value);
6045
+ }
6046
+ return writer;
6047
+ },
6048
+ decode(input, length) {
6049
+ const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
6050
+ const end = length === void 0 ? reader.len : reader.pos + length;
6051
+ const message = createBaseNodeConfig_ProvidersEntry();
6052
+ while (reader.pos < end) {
6053
+ const tag = reader.uint32();
6054
+ switch (tag >>> 3) {
6055
+ case 1: {
6056
+ if (tag !== 10) {
6057
+ break;
6058
+ }
6059
+ message.key = reader.string();
6060
+ continue;
6061
+ }
6062
+ case 2: {
6063
+ if (tag !== 18) {
6064
+ break;
6065
+ }
6066
+ message.value = reader.string();
6067
+ continue;
6068
+ }
6069
+ }
6070
+ if ((tag & 7) === 4 || tag === 0) {
6071
+ break;
6072
+ }
6073
+ reader.skip(tag & 7);
6074
+ }
6075
+ return message;
6076
+ },
6077
+ fromJSON(object) {
6078
+ return {
6079
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
6080
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
6081
+ };
6082
+ },
6083
+ toJSON(message) {
6084
+ const obj = {};
6085
+ if (message.key !== "") {
6086
+ obj.key = message.key;
6087
+ }
6088
+ if (message.value !== "") {
6089
+ obj.value = message.value;
6090
+ }
6091
+ return obj;
6092
+ },
6093
+ create(base) {
6094
+ return NodeConfig_ProvidersEntry.fromPartial(base ?? {});
6095
+ },
6096
+ fromPartial(object) {
6097
+ const message = createBaseNodeConfig_ProvidersEntry();
6098
+ message.key = object.key ?? "";
6099
+ message.value = object.value ?? "";
5978
6100
  return message;
5979
6101
  }
5980
6102
  };
@@ -6587,7 +6709,7 @@ var TerraformView = {
6587
6709
  }
6588
6710
  };
6589
6711
  function createBaseProviderReqView() {
6590
- return { name: "", source: "", version: "" };
6712
+ return { name: "", source: "", version: "", configuration_aliases: [] };
6591
6713
  }
6592
6714
  var ProviderReqView = {
6593
6715
  encode(message, writer = new import_wire3.BinaryWriter()) {
@@ -6600,6 +6722,9 @@ var ProviderReqView = {
6600
6722
  if (message.version !== "") {
6601
6723
  writer.uint32(26).string(message.version);
6602
6724
  }
6725
+ for (const v of message.configuration_aliases) {
6726
+ writer.uint32(34).string(v);
6727
+ }
6603
6728
  return writer;
6604
6729
  },
6605
6730
  decode(input, length) {
@@ -6630,6 +6755,13 @@ var ProviderReqView = {
6630
6755
  message.version = reader.string();
6631
6756
  continue;
6632
6757
  }
6758
+ case 4: {
6759
+ if (tag !== 34) {
6760
+ break;
6761
+ }
6762
+ message.configuration_aliases.push(reader.string());
6763
+ continue;
6764
+ }
6633
6765
  }
6634
6766
  if ((tag & 7) === 4 || tag === 0) {
6635
6767
  break;
@@ -6642,7 +6774,8 @@ var ProviderReqView = {
6642
6774
  return {
6643
6775
  name: isSet3(object.name) ? globalThis.String(object.name) : "",
6644
6776
  source: isSet3(object.source) ? globalThis.String(object.source) : "",
6645
- version: isSet3(object.version) ? globalThis.String(object.version) : ""
6777
+ version: isSet3(object.version) ? globalThis.String(object.version) : "",
6778
+ configuration_aliases: globalThis.Array.isArray(object?.configurationAliases) ? object.configurationAliases.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.configuration_aliases) ? object.configuration_aliases.map((e) => globalThis.String(e)) : []
6646
6779
  };
6647
6780
  },
6648
6781
  toJSON(message) {
@@ -6656,6 +6789,9 @@ var ProviderReqView = {
6656
6789
  if (message.version !== "") {
6657
6790
  obj.version = message.version;
6658
6791
  }
6792
+ if (message.configuration_aliases?.length) {
6793
+ obj.configurationAliases = message.configuration_aliases;
6794
+ }
6659
6795
  return obj;
6660
6796
  },
6661
6797
  create(base) {
@@ -6666,6 +6802,7 @@ var ProviderReqView = {
6666
6802
  message.name = object.name ?? "";
6667
6803
  message.source = object.source ?? "";
6668
6804
  message.version = object.version ?? "";
6805
+ message.configuration_aliases = object.configuration_aliases?.map((e) => e) || [];
6669
6806
  return message;
6670
6807
  }
6671
6808
  };
@@ -6831,7 +6968,7 @@ var BackendView_ConfigEntry = {
6831
6968
  }
6832
6969
  };
6833
6970
  function createBaseProviderView() {
6834
- return { name: "", alias: "", config: {} };
6971
+ return { name: "", alias: "", config: {}, blocks: [] };
6835
6972
  }
6836
6973
  var ProviderView = {
6837
6974
  encode(message, writer = new import_wire3.BinaryWriter()) {
@@ -6844,6 +6981,9 @@ var ProviderView = {
6844
6981
  globalThis.Object.entries(message.config).forEach(([key, value]) => {
6845
6982
  ProviderView_ConfigEntry.encode({ key, value }, writer.uint32(26).fork()).join();
6846
6983
  });
6984
+ for (const v of message.blocks) {
6985
+ Block.encode(v, writer.uint32(34).fork()).join();
6986
+ }
6847
6987
  return writer;
6848
6988
  },
6849
6989
  decode(input, length) {
@@ -6877,6 +7017,13 @@ var ProviderView = {
6877
7017
  }
6878
7018
  continue;
6879
7019
  }
7020
+ case 4: {
7021
+ if (tag !== 34) {
7022
+ break;
7023
+ }
7024
+ message.blocks.push(Block.decode(reader, reader.uint32()));
7025
+ continue;
7026
+ }
6880
7027
  }
6881
7028
  if ((tag & 7) === 4 || tag === 0) {
6882
7029
  break;
@@ -6895,7 +7042,8 @@ var ProviderView = {
6895
7042
  return acc;
6896
7043
  },
6897
7044
  {}
6898
- ) : {}
7045
+ ) : {},
7046
+ blocks: globalThis.Array.isArray(object?.blocks) ? object.blocks.map((e) => Block.fromJSON(e)) : []
6899
7047
  };
6900
7048
  },
6901
7049
  toJSON(message) {
@@ -6915,6 +7063,9 @@ var ProviderView = {
6915
7063
  });
6916
7064
  }
6917
7065
  }
7066
+ if (message.blocks?.length) {
7067
+ obj.blocks = message.blocks.map((e) => Block.toJSON(e));
7068
+ }
6918
7069
  return obj;
6919
7070
  },
6920
7071
  create(base) {
@@ -6933,6 +7084,7 @@ var ProviderView = {
6933
7084
  },
6934
7085
  {}
6935
7086
  );
7087
+ message.blocks = object.blocks?.map((e) => Block.fromPartial(e)) || [];
6936
7088
  return message;
6937
7089
  }
6938
7090
  };
@@ -7246,7 +7398,9 @@ function createBaseInputDef2() {
7246
7398
  description: "",
7247
7399
  default_value: void 0,
7248
7400
  validation: [],
7249
- ephemeral: void 0
7401
+ ephemeral: void 0,
7402
+ nullable: void 0,
7403
+ sensitive: false
7250
7404
  };
7251
7405
  }
7252
7406
  var InputDef2 = {
@@ -7272,6 +7426,12 @@ var InputDef2 = {
7272
7426
  if (message.ephemeral !== void 0) {
7273
7427
  writer.uint32(56).bool(message.ephemeral);
7274
7428
  }
7429
+ if (message.nullable !== void 0) {
7430
+ writer.uint32(64).bool(message.nullable);
7431
+ }
7432
+ if (message.sensitive !== false) {
7433
+ writer.uint32(72).bool(message.sensitive);
7434
+ }
7275
7435
  return writer;
7276
7436
  },
7277
7437
  decode(input, length) {
@@ -7330,6 +7490,20 @@ var InputDef2 = {
7330
7490
  message.ephemeral = reader.bool();
7331
7491
  continue;
7332
7492
  }
7493
+ case 8: {
7494
+ if (tag !== 64) {
7495
+ break;
7496
+ }
7497
+ message.nullable = reader.bool();
7498
+ continue;
7499
+ }
7500
+ case 9: {
7501
+ if (tag !== 72) {
7502
+ break;
7503
+ }
7504
+ message.sensitive = reader.bool();
7505
+ continue;
7506
+ }
7333
7507
  }
7334
7508
  if ((tag & 7) === 4 || tag === 0) {
7335
7509
  break;
@@ -7346,7 +7520,9 @@ var InputDef2 = {
7346
7520
  description: isSet3(object.description) ? globalThis.String(object.description) : "",
7347
7521
  default_value: isSet3(object?.defaultValue) ? object.defaultValue : isSet3(object?.default_value) ? object.default_value : void 0,
7348
7522
  validation: globalThis.Array.isArray(object?.validation) ? object.validation.map((e) => ValidationBlock2.fromJSON(e)) : [],
7349
- ephemeral: isSet3(object.ephemeral) ? globalThis.Boolean(object.ephemeral) : void 0
7523
+ ephemeral: isSet3(object.ephemeral) ? globalThis.Boolean(object.ephemeral) : void 0,
7524
+ nullable: isSet3(object.nullable) ? globalThis.Boolean(object.nullable) : void 0,
7525
+ sensitive: isSet3(object.sensitive) ? globalThis.Boolean(object.sensitive) : false
7350
7526
  };
7351
7527
  },
7352
7528
  toJSON(message) {
@@ -7372,6 +7548,12 @@ var InputDef2 = {
7372
7548
  if (message.ephemeral !== void 0) {
7373
7549
  obj.ephemeral = message.ephemeral;
7374
7550
  }
7551
+ if (message.nullable !== void 0) {
7552
+ obj.nullable = message.nullable;
7553
+ }
7554
+ if (message.sensitive !== false) {
7555
+ obj.sensitive = message.sensitive;
7556
+ }
7375
7557
  return obj;
7376
7558
  },
7377
7559
  create(base) {
@@ -7386,6 +7568,8 @@ var InputDef2 = {
7386
7568
  message.default_value = object.default_value ?? void 0;
7387
7569
  message.validation = object.validation?.map((e) => ValidationBlock2.fromPartial(e)) || [];
7388
7570
  message.ephemeral = object.ephemeral ?? void 0;
7571
+ message.nullable = object.nullable ?? void 0;
7572
+ message.sensitive = object.sensitive ?? false;
7389
7573
  return message;
7390
7574
  }
7391
7575
  };