@wix/ditto-codegen-public 1.0.236 → 1.0.237
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/out.js +165 -146
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -5705,12 +5705,12 @@ var require_index_node = __commonJS({
|
|
|
5705
5705
|
}
|
|
5706
5706
|
});
|
|
5707
5707
|
|
|
5708
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
5708
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serialization/utils.js
|
|
5709
5709
|
var require_utils4 = __commonJS({
|
|
5710
|
-
"../../node_modules/@wix/metro-runtime/
|
|
5710
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serialization/utils.js"(exports2) {
|
|
5711
5711
|
"use strict";
|
|
5712
|
-
exports2
|
|
5713
|
-
exports2.parseLeanSchemaRef =
|
|
5712
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5713
|
+
exports2.parseLeanSchemaRef = void 0;
|
|
5714
5714
|
function parseLeanSchemaRef(renderedSchemaName = "") {
|
|
5715
5715
|
const [typeOrName, schemaName] = getSchemaNameAndType(renderedSchemaName);
|
|
5716
5716
|
if (schemaName) {
|
|
@@ -5723,30 +5723,42 @@ var require_utils4 = __commonJS({
|
|
|
5723
5723
|
schemaName: typeOrName
|
|
5724
5724
|
};
|
|
5725
5725
|
}
|
|
5726
|
+
exports2.parseLeanSchemaRef = parseLeanSchemaRef;
|
|
5726
5727
|
var getSchemaNameAndType = (leanSchema) => leanSchema.split("#");
|
|
5727
5728
|
}
|
|
5728
5729
|
});
|
|
5729
5730
|
|
|
5730
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
5731
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serialization/index.js
|
|
5731
5732
|
var require_serialization = __commonJS({
|
|
5732
|
-
"../../node_modules/@wix/metro-runtime/
|
|
5733
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serialization/index.js"(exports2) {
|
|
5733
5734
|
"use strict";
|
|
5734
|
-
exports2.
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
if (
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5735
|
+
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
5736
|
+
if (k2 === void 0) k2 = k;
|
|
5737
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5738
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5739
|
+
desc = { enumerable: true, get: function() {
|
|
5740
|
+
return m[k];
|
|
5741
|
+
} };
|
|
5742
|
+
}
|
|
5743
|
+
Object.defineProperty(o, k2, desc);
|
|
5744
|
+
}) : (function(o, m, k, k2) {
|
|
5745
|
+
if (k2 === void 0) k2 = k;
|
|
5746
|
+
o[k2] = m[k];
|
|
5747
|
+
}));
|
|
5748
|
+
var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
5749
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p);
|
|
5750
|
+
};
|
|
5751
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5752
|
+
__exportStar2(require_utils4(), exports2);
|
|
5741
5753
|
}
|
|
5742
5754
|
});
|
|
5743
5755
|
|
|
5744
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
5756
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/utils.js
|
|
5745
5757
|
var require_utils5 = __commonJS({
|
|
5746
|
-
"../../node_modules/@wix/metro-runtime/
|
|
5758
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/utils.js"(exports2) {
|
|
5747
5759
|
"use strict";
|
|
5748
|
-
exports2
|
|
5749
|
-
exports2.findByPath =
|
|
5760
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5761
|
+
exports2.findByPath = void 0;
|
|
5750
5762
|
function findByPath(obj, path4, defaultValue, suffix) {
|
|
5751
5763
|
let result = obj;
|
|
5752
5764
|
for (const field of path4.split(".")) {
|
|
@@ -5757,16 +5769,17 @@ var require_utils5 = __commonJS({
|
|
|
5757
5769
|
}
|
|
5758
5770
|
return `${result}${suffix}`;
|
|
5759
5771
|
}
|
|
5772
|
+
exports2.findByPath = findByPath;
|
|
5760
5773
|
}
|
|
5761
5774
|
});
|
|
5762
5775
|
|
|
5763
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
5776
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/url-resolver.js
|
|
5764
5777
|
var require_url_resolver = __commonJS({
|
|
5765
|
-
"../../node_modules/@wix/metro-runtime/
|
|
5778
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/url-resolver.js"(exports2) {
|
|
5766
5779
|
"use strict";
|
|
5767
|
-
exports2
|
|
5768
|
-
exports2.resolveUrl =
|
|
5769
|
-
var
|
|
5780
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5781
|
+
exports2.resolveUrl = void 0;
|
|
5782
|
+
var utils_js_1 = require_utils5();
|
|
5770
5783
|
var USER_DOMAIN = "_";
|
|
5771
5784
|
var DOMAINS = ["wix.com", "editorx.com"];
|
|
5772
5785
|
var WIX_API_DOMAINS = ["42.wixprod.net", "uw2-edt-1.wixprod.net"];
|
|
@@ -5781,6 +5794,7 @@ var require_url_resolver = __commonJS({
|
|
|
5781
5794
|
const path4 = injectDataIntoProtoPath(opts.protoPath, opts.data || {});
|
|
5782
5795
|
return resolvePath(path4, mappings);
|
|
5783
5796
|
}
|
|
5797
|
+
exports2.resolveUrl = resolveUrl;
|
|
5784
5798
|
function injectDataIntoProtoPath(protoPath, data) {
|
|
5785
5799
|
return protoPath.split("/").map((path4) => maybeProtoPathToData(path4, data)).join("/");
|
|
5786
5800
|
}
|
|
@@ -5789,7 +5803,7 @@ var require_url_resolver = __commonJS({
|
|
|
5789
5803
|
const field = protoRegExpMatch[1];
|
|
5790
5804
|
if (field) {
|
|
5791
5805
|
const suffix = protoPath.replace(protoRegExpMatch[0], "");
|
|
5792
|
-
return (0,
|
|
5806
|
+
return (0, utils_js_1.findByPath)(data, field, protoPath, suffix);
|
|
5793
5807
|
}
|
|
5794
5808
|
return protoPath;
|
|
5795
5809
|
}
|
|
@@ -5818,14 +5832,13 @@ var require_url_resolver = __commonJS({
|
|
|
5818
5832
|
return rootDomainMappings ?? [];
|
|
5819
5833
|
}
|
|
5820
5834
|
function resolveRootDomain(domain2, domainToMappings) {
|
|
5821
|
-
|
|
5822
|
-
return (_Object$entries$find = Object.entries(domainToMappings).find(([entryDomain]) => {
|
|
5835
|
+
return Object.entries(domainToMappings).find(([entryDomain]) => {
|
|
5823
5836
|
const [_, ...rooDomainSegments] = domain2.split(".");
|
|
5824
5837
|
return rooDomainSegments.join(".") === entryDomain;
|
|
5825
|
-
})
|
|
5838
|
+
})?.[1];
|
|
5826
5839
|
}
|
|
5827
5840
|
function resolvePath(protoPath, mappings) {
|
|
5828
|
-
const mapping = mappings
|
|
5841
|
+
const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));
|
|
5829
5842
|
if (!mapping) {
|
|
5830
5843
|
return protoPath;
|
|
5831
5844
|
}
|
|
@@ -6094,13 +6107,13 @@ var require_base642 = __commonJS({
|
|
|
6094
6107
|
}
|
|
6095
6108
|
});
|
|
6096
6109
|
|
|
6097
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6110
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/flatten-params.js
|
|
6098
6111
|
var require_flatten_params = __commonJS({
|
|
6099
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6112
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/flatten-params.js"(exports2) {
|
|
6100
6113
|
"use strict";
|
|
6101
|
-
exports2
|
|
6102
|
-
exports2.toURLSearchParams =
|
|
6103
|
-
var
|
|
6114
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6115
|
+
exports2.toURLSearchParams = void 0;
|
|
6116
|
+
var js_base64_1 = require_base642();
|
|
6104
6117
|
function flattenParams(data, path4 = "") {
|
|
6105
6118
|
const params = {};
|
|
6106
6119
|
Object.entries(data).forEach(([key, value]) => {
|
|
@@ -6123,9 +6136,7 @@ var require_flatten_params = __commonJS({
|
|
|
6123
6136
|
const isPayloadNonSerializableAsUrlSearchParams = Object.entries(flatten).some(([key, value]) => key.includes(".") || Array.isArray(value) && value.some((v) => typeof v === "object"));
|
|
6124
6137
|
const shouldSerializeToRParam = isComplexRequest && isPayloadNonSerializableAsUrlSearchParams;
|
|
6125
6138
|
if (shouldSerializeToRParam) {
|
|
6126
|
-
return new URLSearchParams({
|
|
6127
|
-
".r": (0, _jsBase.encode)(JSON.stringify(params), true)
|
|
6128
|
-
});
|
|
6139
|
+
return new URLSearchParams({ ".r": (0, js_base64_1.encode)(JSON.stringify(params), true) });
|
|
6129
6140
|
} else {
|
|
6130
6141
|
return Object.entries(flatten).reduce((urlSearchParams, [key, value]) => {
|
|
6131
6142
|
const keyParams = Array.isArray(value) ? value : [value];
|
|
@@ -6139,56 +6150,58 @@ var require_flatten_params = __commonJS({
|
|
|
6139
6150
|
}, new URLSearchParams());
|
|
6140
6151
|
}
|
|
6141
6152
|
}
|
|
6153
|
+
exports2.toURLSearchParams = toURLSearchParams;
|
|
6142
6154
|
}
|
|
6143
6155
|
});
|
|
6144
6156
|
|
|
6145
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6146
|
-
var
|
|
6147
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6157
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/index.js
|
|
6158
|
+
var require_build = __commonJS({
|
|
6159
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/index.js"(exports2) {
|
|
6148
6160
|
"use strict";
|
|
6149
|
-
exports2.
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
if (
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
if (
|
|
6160
|
-
|
|
6161
|
-
});
|
|
6162
|
-
var
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6161
|
+
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
6162
|
+
if (k2 === void 0) k2 = k;
|
|
6163
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6164
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6165
|
+
desc = { enumerable: true, get: function() {
|
|
6166
|
+
return m[k];
|
|
6167
|
+
} };
|
|
6168
|
+
}
|
|
6169
|
+
Object.defineProperty(o, k2, desc);
|
|
6170
|
+
}) : (function(o, m, k, k2) {
|
|
6171
|
+
if (k2 === void 0) k2 = k;
|
|
6172
|
+
o[k2] = m[k];
|
|
6173
|
+
}));
|
|
6174
|
+
var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
6175
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p);
|
|
6176
|
+
};
|
|
6177
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6178
|
+
__exportStar2(require_serialization(), exports2);
|
|
6179
|
+
__exportStar2(require_url_resolver(), exports2);
|
|
6180
|
+
__exportStar2(require_flatten_params(), exports2);
|
|
6168
6181
|
}
|
|
6169
6182
|
});
|
|
6170
6183
|
|
|
6171
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6184
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serializer/domain.js
|
|
6172
6185
|
var require_domain2 = __commonJS({
|
|
6173
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6186
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serializer/domain.js"(exports2) {
|
|
6174
6187
|
"use strict";
|
|
6175
|
-
exports2
|
|
6188
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6176
6189
|
exports2.ConverterType = void 0;
|
|
6177
|
-
var ConverterType
|
|
6190
|
+
var ConverterType;
|
|
6191
|
+
(function(ConverterType2) {
|
|
6178
6192
|
ConverterType2[ConverterType2["TO_JSON"] = 0] = "TO_JSON";
|
|
6179
6193
|
ConverterType2[ConverterType2["FROM_JSON"] = 1] = "FROM_JSON";
|
|
6180
|
-
|
|
6181
|
-
})({});
|
|
6194
|
+
})(ConverterType = exports2.ConverterType || (exports2.ConverterType = {}));
|
|
6182
6195
|
}
|
|
6183
6196
|
});
|
|
6184
6197
|
|
|
6185
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6198
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serializer/serializer.js
|
|
6186
6199
|
var require_serializer = __commonJS({
|
|
6187
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6200
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serializer/serializer.js"(exports2) {
|
|
6188
6201
|
"use strict";
|
|
6189
|
-
exports2
|
|
6190
|
-
exports2.schemaSerializer =
|
|
6191
|
-
var
|
|
6202
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6203
|
+
exports2.schemaSerializer = void 0;
|
|
6204
|
+
var index_js_1 = require_build();
|
|
6192
6205
|
function schemaSerializer(rootSchema, depSchemas = {}, converterSets) {
|
|
6193
6206
|
return function serialize(json2 = {}, converterType) {
|
|
6194
6207
|
return typeof json2 === "string" ? json2 : transformSchema(rootSchema, json2);
|
|
@@ -6198,14 +6211,10 @@ var require_serializer = __commonJS({
|
|
|
6198
6211
|
return payload;
|
|
6199
6212
|
}
|
|
6200
6213
|
Object.entries(payload).forEach(([key, val]) => {
|
|
6201
|
-
var _getConverter;
|
|
6202
6214
|
const renderedSchemaName = schema[key];
|
|
6203
|
-
const {
|
|
6204
|
-
schemaName,
|
|
6205
|
-
schemaType
|
|
6206
|
-
} = (0, _.parseLeanSchemaRef)(renderedSchemaName);
|
|
6215
|
+
const { schemaName, schemaType } = (0, index_js_1.parseLeanSchemaRef)(renderedSchemaName);
|
|
6207
6216
|
const isMap = schemaType === "Map";
|
|
6208
|
-
const isRepeatable =
|
|
6217
|
+
const isRepeatable = getConverter(schemaName)?.checkRepetable?.(val) ?? Array.isArray(val);
|
|
6209
6218
|
let parsedValue;
|
|
6210
6219
|
if (isRepeatable) {
|
|
6211
6220
|
parsedValue = val.map((v) => applyField(v, schemaName));
|
|
@@ -6232,8 +6241,7 @@ var require_serializer = __commonJS({
|
|
|
6232
6241
|
throw new Error(`${schemaOrSerializer} is neither schema nor serializable type`);
|
|
6233
6242
|
}
|
|
6234
6243
|
function getConverter(name) {
|
|
6235
|
-
|
|
6236
|
-
return (_converterSets$name = converterSets[name]) == null ? void 0 : _converterSets$name[converterType];
|
|
6244
|
+
return converterSets[name]?.[converterType];
|
|
6237
6245
|
}
|
|
6238
6246
|
function applyFieldOnMap(val, sanitizedSchemaOrSerializer) {
|
|
6239
6247
|
return Object.entries(val).reduce((acc, [propertyName, value]) => {
|
|
@@ -6243,19 +6251,20 @@ var require_serializer = __commonJS({
|
|
|
6243
6251
|
}
|
|
6244
6252
|
};
|
|
6245
6253
|
}
|
|
6254
|
+
exports2.schemaSerializer = schemaSerializer;
|
|
6246
6255
|
}
|
|
6247
6256
|
});
|
|
6248
6257
|
|
|
6249
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6258
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/timestamp.js
|
|
6250
6259
|
var require_timestamp = __commonJS({
|
|
6251
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6260
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/timestamp.js"(exports2) {
|
|
6252
6261
|
"use strict";
|
|
6253
|
-
exports2
|
|
6262
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6254
6263
|
exports2.timestamp = void 0;
|
|
6255
|
-
var
|
|
6256
|
-
|
|
6264
|
+
var domain_js_1 = require_domain2();
|
|
6265
|
+
exports2.timestamp = {
|
|
6257
6266
|
types: ["google.protobuf.Timestamp"],
|
|
6258
|
-
[
|
|
6267
|
+
[domain_js_1.ConverterType.TO_JSON]: {
|
|
6259
6268
|
transform: (val) => {
|
|
6260
6269
|
if (typeof val === "string" || !val) {
|
|
6261
6270
|
return val;
|
|
@@ -6263,23 +6272,23 @@ var require_timestamp = __commonJS({
|
|
|
6263
6272
|
return val.toISOString();
|
|
6264
6273
|
}
|
|
6265
6274
|
},
|
|
6266
|
-
[
|
|
6275
|
+
[domain_js_1.ConverterType.FROM_JSON]: {
|
|
6267
6276
|
transform: (val) => val ? new Date(val) : val
|
|
6268
6277
|
}
|
|
6269
6278
|
};
|
|
6270
6279
|
}
|
|
6271
6280
|
});
|
|
6272
6281
|
|
|
6273
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6282
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/field-mask.js
|
|
6274
6283
|
var require_field_mask = __commonJS({
|
|
6275
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6284
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/field-mask.js"(exports2) {
|
|
6276
6285
|
"use strict";
|
|
6277
|
-
exports2
|
|
6286
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6278
6287
|
exports2.fieldMask = void 0;
|
|
6279
|
-
var
|
|
6280
|
-
|
|
6288
|
+
var domain_js_1 = require_domain2();
|
|
6289
|
+
exports2.fieldMask = {
|
|
6281
6290
|
types: ["google.protobuf.FieldMask"],
|
|
6282
|
-
[
|
|
6291
|
+
[domain_js_1.ConverterType.TO_JSON]: {
|
|
6283
6292
|
transform: (val) => val.join(","),
|
|
6284
6293
|
/**
|
|
6285
6294
|
* This one handles cases where we have a repeated google.protobuf.FieldMask type,
|
|
@@ -6299,7 +6308,7 @@ var require_field_mask = __commonJS({
|
|
|
6299
6308
|
return val.some((v) => Array.isArray(v));
|
|
6300
6309
|
}
|
|
6301
6310
|
},
|
|
6302
|
-
[
|
|
6311
|
+
[domain_js_1.ConverterType.FROM_JSON]: {
|
|
6303
6312
|
transform: (val) => {
|
|
6304
6313
|
if (typeof val === "object") {
|
|
6305
6314
|
return val.paths;
|
|
@@ -6311,22 +6320,22 @@ var require_field_mask = __commonJS({
|
|
|
6311
6320
|
}
|
|
6312
6321
|
});
|
|
6313
6322
|
|
|
6314
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6323
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/bytes.js
|
|
6315
6324
|
var require_bytes = __commonJS({
|
|
6316
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6325
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/bytes.js"(exports2) {
|
|
6317
6326
|
"use strict";
|
|
6318
|
-
exports2
|
|
6327
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6319
6328
|
exports2.bytes = void 0;
|
|
6320
|
-
var
|
|
6321
|
-
|
|
6329
|
+
var domain_js_1 = require_domain2();
|
|
6330
|
+
exports2.bytes = {
|
|
6322
6331
|
types: ["google.protobuf.BytesValue", "BYTES"],
|
|
6323
|
-
[
|
|
6332
|
+
[domain_js_1.ConverterType.TO_JSON]: {
|
|
6324
6333
|
transform: (val) => {
|
|
6325
6334
|
const chars = val.reduce((res, c) => res + String.fromCharCode(c), "");
|
|
6326
6335
|
return btoa(chars);
|
|
6327
6336
|
}
|
|
6328
6337
|
},
|
|
6329
|
-
[
|
|
6338
|
+
[domain_js_1.ConverterType.FROM_JSON]: {
|
|
6330
6339
|
transform: (val) => {
|
|
6331
6340
|
return Uint8Array.from(atob(val), (c) => c.charCodeAt(0));
|
|
6332
6341
|
}
|
|
@@ -6335,20 +6344,17 @@ var require_bytes = __commonJS({
|
|
|
6335
6344
|
}
|
|
6336
6345
|
});
|
|
6337
6346
|
|
|
6338
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6347
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/duration.js
|
|
6339
6348
|
var require_duration = __commonJS({
|
|
6340
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6349
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/duration.js"(exports2) {
|
|
6341
6350
|
"use strict";
|
|
6342
|
-
exports2
|
|
6351
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6343
6352
|
exports2.duration = void 0;
|
|
6344
|
-
var
|
|
6345
|
-
|
|
6353
|
+
var domain_js_1 = require_domain2();
|
|
6354
|
+
exports2.duration = {
|
|
6346
6355
|
types: ["google.protobuf.Duration"],
|
|
6347
|
-
[
|
|
6348
|
-
transform: ({
|
|
6349
|
-
seconds = "0",
|
|
6350
|
-
nanos = 0
|
|
6351
|
-
}) => {
|
|
6356
|
+
[domain_js_1.ConverterType.TO_JSON]: {
|
|
6357
|
+
transform: ({ seconds = "0", nanos = 0 }) => {
|
|
6352
6358
|
let nanosPortion = "";
|
|
6353
6359
|
if (nanos !== 0) {
|
|
6354
6360
|
nanosPortion = `.${nanos.toString().padStart(9, "0")}`;
|
|
@@ -6356,7 +6362,7 @@ var require_duration = __commonJS({
|
|
|
6356
6362
|
return `${seconds}${nanosPortion}s`;
|
|
6357
6363
|
}
|
|
6358
6364
|
},
|
|
6359
|
-
[
|
|
6365
|
+
[domain_js_1.ConverterType.FROM_JSON]: {
|
|
6360
6366
|
transform: (val) => {
|
|
6361
6367
|
const [seconds, nanos] = val.substring(0, val.length - 1).split(".");
|
|
6362
6368
|
return {
|
|
@@ -6377,21 +6383,26 @@ var require_duration = __commonJS({
|
|
|
6377
6383
|
}
|
|
6378
6384
|
});
|
|
6379
6385
|
|
|
6380
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6386
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/float.js
|
|
6381
6387
|
var require_float = __commonJS({
|
|
6382
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6388
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/float.js"(exports2) {
|
|
6383
6389
|
"use strict";
|
|
6384
|
-
exports2
|
|
6390
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6385
6391
|
exports2.float = void 0;
|
|
6386
|
-
var
|
|
6387
|
-
|
|
6388
|
-
types: [
|
|
6389
|
-
|
|
6392
|
+
var domain_js_1 = require_domain2();
|
|
6393
|
+
exports2.float = {
|
|
6394
|
+
types: [
|
|
6395
|
+
"FLOAT",
|
|
6396
|
+
"DOUBLE",
|
|
6397
|
+
"google.protobuf.FloatValue",
|
|
6398
|
+
"google.protobuf.DoubleValue"
|
|
6399
|
+
],
|
|
6400
|
+
[domain_js_1.ConverterType.TO_JSON]: {
|
|
6390
6401
|
transform: (val) => {
|
|
6391
6402
|
return isFinite(val) ? val : val.toString();
|
|
6392
6403
|
}
|
|
6393
6404
|
},
|
|
6394
|
-
[
|
|
6405
|
+
[domain_js_1.ConverterType.FROM_JSON]: {
|
|
6395
6406
|
transform: (val) => {
|
|
6396
6407
|
if (val === "NaN") {
|
|
6397
6408
|
return NaN;
|
|
@@ -6409,27 +6420,33 @@ var require_float = __commonJS({
|
|
|
6409
6420
|
}
|
|
6410
6421
|
});
|
|
6411
6422
|
|
|
6412
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6423
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/converters.js
|
|
6413
6424
|
var require_converters = __commonJS({
|
|
6414
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6425
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serializer/protobuf-converters/converters.js"(exports2) {
|
|
6415
6426
|
"use strict";
|
|
6416
|
-
exports2
|
|
6427
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6417
6428
|
exports2.protobufConverters = void 0;
|
|
6418
|
-
var
|
|
6419
|
-
var
|
|
6420
|
-
var
|
|
6421
|
-
var
|
|
6422
|
-
var
|
|
6423
|
-
|
|
6429
|
+
var timestamp_js_1 = require_timestamp();
|
|
6430
|
+
var field_mask_js_1 = require_field_mask();
|
|
6431
|
+
var bytes_js_1 = require_bytes();
|
|
6432
|
+
var duration_js_1 = require_duration();
|
|
6433
|
+
var float_js_1 = require_float();
|
|
6434
|
+
exports2.protobufConverters = [
|
|
6435
|
+
timestamp_js_1.timestamp,
|
|
6436
|
+
field_mask_js_1.fieldMask,
|
|
6437
|
+
bytes_js_1.bytes,
|
|
6438
|
+
duration_js_1.duration,
|
|
6439
|
+
float_js_1.float
|
|
6440
|
+
];
|
|
6424
6441
|
}
|
|
6425
6442
|
});
|
|
6426
6443
|
|
|
6427
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6444
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/serializer/utils.js
|
|
6428
6445
|
var require_utils6 = __commonJS({
|
|
6429
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6446
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/serializer/utils.js"(exports2) {
|
|
6430
6447
|
"use strict";
|
|
6431
|
-
exports2
|
|
6432
|
-
exports2.typeToConverterSet =
|
|
6448
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6449
|
+
exports2.typeToConverterSet = void 0;
|
|
6433
6450
|
function typeToConverterSet(converterSets) {
|
|
6434
6451
|
return converterSets.reduce((result, converterSet) => {
|
|
6435
6452
|
const types = converterSet.types.reduce((typeResult, type) => {
|
|
@@ -6444,32 +6461,34 @@ var require_utils6 = __commonJS({
|
|
|
6444
6461
|
};
|
|
6445
6462
|
}, {});
|
|
6446
6463
|
}
|
|
6464
|
+
exports2.typeToConverterSet = typeToConverterSet;
|
|
6447
6465
|
}
|
|
6448
6466
|
});
|
|
6449
6467
|
|
|
6450
|
-
// ../../node_modules/@wix/metro-runtime/
|
|
6468
|
+
// ../../node_modules/@wix/metro-runtime/cjs/build/ambassador-index.js
|
|
6451
6469
|
var require_ambassador_index = __commonJS({
|
|
6452
|
-
"../../node_modules/@wix/metro-runtime/
|
|
6470
|
+
"../../node_modules/@wix/metro-runtime/cjs/build/ambassador-index.js"(exports2) {
|
|
6453
6471
|
"use strict";
|
|
6454
|
-
exports2
|
|
6455
|
-
exports2.serializer =
|
|
6456
|
-
var
|
|
6457
|
-
var
|
|
6458
|
-
var
|
|
6459
|
-
var
|
|
6460
|
-
var ambassadorConverters = (0,
|
|
6472
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6473
|
+
exports2.serializer = void 0;
|
|
6474
|
+
var domain_js_1 = require_domain2();
|
|
6475
|
+
var serializer_js_1 = require_serializer();
|
|
6476
|
+
var converters_js_1 = require_converters();
|
|
6477
|
+
var utils_js_1 = require_utils6();
|
|
6478
|
+
var ambassadorConverters = (0, utils_js_1.typeToConverterSet)([...converters_js_1.protobufConverters]);
|
|
6461
6479
|
function serializer(rootSchema, depSchemas = {}) {
|
|
6462
|
-
const transform2 = (0,
|
|
6480
|
+
const transform2 = (0, serializer_js_1.schemaSerializer)(rootSchema, depSchemas, ambassadorConverters);
|
|
6463
6481
|
return {
|
|
6464
6482
|
fromJSON(jsonOrString) {
|
|
6465
6483
|
const jsonOrText = safeJsonParse(jsonOrString) || jsonOrString;
|
|
6466
|
-
return transform2(jsonOrText,
|
|
6484
|
+
return transform2(jsonOrText, domain_js_1.ConverterType.FROM_JSON);
|
|
6467
6485
|
},
|
|
6468
6486
|
toJSON(json2) {
|
|
6469
|
-
return transform2(json2,
|
|
6487
|
+
return transform2(json2, domain_js_1.ConverterType.TO_JSON);
|
|
6470
6488
|
}
|
|
6471
6489
|
};
|
|
6472
6490
|
}
|
|
6491
|
+
exports2.serializer = serializer;
|
|
6473
6492
|
function safeJsonParse(someString) {
|
|
6474
6493
|
try {
|
|
6475
6494
|
return JSON.parse(someString);
|
|
@@ -6493,9 +6512,9 @@ var require_http_impl = __commonJS({
|
|
|
6493
6512
|
exports2.updateTask = updateTask;
|
|
6494
6513
|
exports2.stopGeneration = stopGeneration;
|
|
6495
6514
|
exports2.submitUserDecision = submitUserDecision;
|
|
6496
|
-
var metro_runtime_1 =
|
|
6515
|
+
var metro_runtime_1 = require_build();
|
|
6497
6516
|
var ambassador_1 = require_ambassador_index();
|
|
6498
|
-
var metro_runtime_2 =
|
|
6517
|
+
var metro_runtime_2 = require_build();
|
|
6499
6518
|
var _createJobRequest = { job: "_job" };
|
|
6500
6519
|
var _createJobResponse = { job: "_job" };
|
|
6501
6520
|
var _createTaskRequest = { task: "_task" };
|
|
@@ -81473,7 +81492,7 @@ var require_zodToJsonSchema = __commonJS({
|
|
|
81473
81492
|
});
|
|
81474
81493
|
|
|
81475
81494
|
// ../../node_modules/zod-to-json-schema/dist/cjs/index.js
|
|
81476
|
-
var
|
|
81495
|
+
var require_cjs2 = __commonJS({
|
|
81477
81496
|
"../../node_modules/zod-to-json-schema/dist/cjs/index.js"(exports2) {
|
|
81478
81497
|
"use strict";
|
|
81479
81498
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -81573,7 +81592,7 @@ var require_zod_json_schema_compat = __commonJS({
|
|
|
81573
81592
|
exports2.parseWithCompat = parseWithCompat;
|
|
81574
81593
|
var z4mini = __importStar2(require_v4_mini());
|
|
81575
81594
|
var zod_compat_js_1 = require_zod_compat();
|
|
81576
|
-
var zod_to_json_schema_1 =
|
|
81595
|
+
var zod_to_json_schema_1 = require_cjs2();
|
|
81577
81596
|
function mapMiniTarget(t) {
|
|
81578
81597
|
if (!t)
|
|
81579
81598
|
return "draft-7";
|
|
@@ -105878,7 +105897,7 @@ var require_http_impl2 = __commonJS({
|
|
|
105878
105897
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
105879
105898
|
exports2.getRequiredPermissions = exports2.editBlueprint = exports2.createAppName = exports2.createBlueprint = void 0;
|
|
105880
105899
|
var ambassador_1 = require_ambassador_index();
|
|
105881
|
-
var metro_runtime_1 =
|
|
105900
|
+
var metro_runtime_1 = require_build();
|
|
105882
105901
|
var _createAppNameRequest = {};
|
|
105883
105902
|
var _createAppNameResponse = {};
|
|
105884
105903
|
var _createBlueprintRequest = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/ditto-codegen-public",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.237",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"@wix/ditto-codegen": "1.0.0",
|
|
29
29
|
"esbuild": "^0.27.2"
|
|
30
30
|
},
|
|
31
|
-
"falconPackageHash": "
|
|
31
|
+
"falconPackageHash": "f778aaa95602f71d34922c8107b4b45f09c127f93dc5727db9ba27be"
|
|
32
32
|
}
|