@eluvio/elv-client-js 4.2.27 → 4.2.30
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/ElvClient-min.js +1 -1
- package/dist/ElvClient-node-min.js +1 -1
- package/dist/ElvFrameClient-min.js +1 -1
- package/dist/ElvPermissionsClient-min.js +1 -1
- package/dist/ElvWalletClient-min.js +1 -1
- package/dist/ElvWalletClient-node-min.js +1 -1
- package/dist/src/ElvClient.js +355 -275
- package/dist/src/EthClient.js +3 -2
- package/dist/src/FrameClient.js +1 -1
- package/dist/src/client/ABRPublishing.js +71 -60
- package/dist/src/client/ContentAccess.js +298 -204
- package/dist/src/client/Files.js +1400 -844
- package/dist/src/client/LiveConf.js +54 -37
- package/dist/src/client/LiveStream.js +123 -81
- package/package.json +1 -1
- package/src/ElvClient.js +51 -0
- package/src/EthClient.js +2 -1
- package/src/FrameClient.js +1 -0
- package/src/client/ContentAccess.js +70 -1
- package/src/client/Files.js +413 -208
- package/src/client/LiveStream.js +32 -16
- package/utilities/MigrateEncryptionConkForNewUser.js +62 -0
- package/utilities/ObjectAddFiles.js +29 -9
- package/utilities/lib/concerns/CloudFile.js +2 -1
- package/utilities/lib/concerns/LocalFile.js +2 -1
- package/dist/src/ContentObjectVerification.js +0 -281
package/dist/src/EthClient.js
CHANGED
|
@@ -494,11 +494,11 @@ var EthClient = /*#__PURE__*/function () {
|
|
|
494
494
|
key: "CallContractMethodAndWait",
|
|
495
495
|
value: function () {
|
|
496
496
|
var _CallContractMethodAndWait = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref10) {
|
|
497
|
-
var contractAddress, abi, methodName, methodArgs, value, timeout, _ref10$formatArgument, formatArguments, _ref10$cacheContract, cacheContract, _ref10$overrideCached, overrideCachedContract, contract, createMethodCall, interval, elapsed, methodEvent;
|
|
497
|
+
var contractAddress, abi, methodName, methodArgs, value, _ref10$overrides, overrides, timeout, _ref10$formatArgument, formatArguments, _ref10$cacheContract, cacheContract, _ref10$overrideCached, overrideCachedContract, contract, createMethodCall, interval, elapsed, methodEvent;
|
|
498
498
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
499
499
|
while (1) switch (_context7.prev = _context7.next) {
|
|
500
500
|
case 0:
|
|
501
|
-
contractAddress = _ref10.contractAddress, abi = _ref10.abi, methodName = _ref10.methodName, methodArgs = _ref10.methodArgs, value = _ref10.value, timeout = _ref10.timeout, _ref10$formatArgument = _ref10.formatArguments, formatArguments = _ref10$formatArgument === void 0 ? true : _ref10$formatArgument, _ref10$cacheContract = _ref10.cacheContract, cacheContract = _ref10$cacheContract === void 0 ? true : _ref10$cacheContract, _ref10$overrideCached = _ref10.overrideCachedContract, overrideCachedContract = _ref10$overrideCached === void 0 ? false : _ref10$overrideCached;
|
|
501
|
+
contractAddress = _ref10.contractAddress, abi = _ref10.abi, methodName = _ref10.methodName, methodArgs = _ref10.methodArgs, value = _ref10.value, _ref10$overrides = _ref10.overrides, overrides = _ref10$overrides === void 0 ? {} : _ref10$overrides, timeout = _ref10.timeout, _ref10$formatArgument = _ref10.formatArguments, formatArguments = _ref10$formatArgument === void 0 ? true : _ref10$formatArgument, _ref10$cacheContract = _ref10.cacheContract, cacheContract = _ref10$cacheContract === void 0 ? true : _ref10$cacheContract, _ref10$overrideCached = _ref10.overrideCachedContract, overrideCachedContract = _ref10$overrideCached === void 0 ? false : _ref10$overrideCached;
|
|
502
502
|
timeout = timeout || this.timeout || 10000;
|
|
503
503
|
if (abi) {
|
|
504
504
|
_context7.next = 6;
|
|
@@ -524,6 +524,7 @@ var EthClient = /*#__PURE__*/function () {
|
|
|
524
524
|
methodName: methodName,
|
|
525
525
|
methodArgs: methodArgs,
|
|
526
526
|
value: value,
|
|
527
|
+
overrides: overrides,
|
|
527
528
|
formatArguments: formatArguments,
|
|
528
529
|
cacheContract: cacheContract
|
|
529
530
|
});
|
package/dist/src/FrameClient.js
CHANGED
|
@@ -449,7 +449,7 @@ var FrameClient = /*#__PURE__*/function () {
|
|
|
449
449
|
}, {
|
|
450
450
|
key: "AllowedMethods",
|
|
451
451
|
value: function AllowedMethods() {
|
|
452
|
-
return ["AccessGroupManagers", "AccessGroupMembers", "AccessGroupOwner", "AccessInfo", "AccessRequest", "AccessType", "AddAccessGroupManager", "AddAccessGroupMember", "AddContentLibraryGroup", "AddContentObjectGroupPermission", "AddLibraryContentType", "AssetMetadata", "AuditContentObject", "AuditStream", "AvailableDRMs", "AvailableOfferings", "AwaitPending", "BitmovinPlayoutOptions", "BlockNumber", "CallBitcodeMethod", "CallContractMethod", "CallContractMethodAndWait", "ClearCache", "ClearStaticToken", "Collection", "CollectionTransactions", "ConfigUrl", "ContentLibraries", "ContentLibrary", "ContentLibraryGroupPermissions", "ContentLibraryOwner", "ContentObject", "ContentObjectAccessComplete", "ContentObjectGraph", "ContentObjectGroupPermissions", "ContentObjectImageUrl", "ContentObjectLibraryId", "ContentObjectMetadata", "ContentObjectOwner", "ContentObjectTenantId", "ContentObjectVersions", "ContentObjects", "ContentPart", "ContentParts", "ContentSpaceId", "ContentType", "ContentTypeOwner", "ContentTypes", "ContractAbi", "ContractEvents", "ContractInfo", "ContractMetadata", "ContractName", "CopyContentObject", "CreateABRMezzanine", "CreateAccessGroup", "CreateAndFinalizeContentObject", "CreateAuthorizationToken", "CreateContentLibrary", "CreateContentObject", "CreateContentType", "CreateEncryptionConk", "CreateFabricToken", "CreateFileDirectories", "CreateFileUploadJob", "CreateLinks", "CreateNTPInstance", "CreateNonOwnerCap", "CreatePart", "CreateProductionMaster", "CreateShare", "CreateSignedMessageJSON", "CreateSignedToken", "CreateStaticToken", "CurrentAccountAddress", "CustomContractAddress", "DecodeSignedMessageJSON", "Decrypt", "DecryptECIES", "DefaultKMSAddress", "DeleteAccessGroup", "DeleteContentLibrary", "DeleteContentObject", "DeleteContentVersion", "DeleteFiles", "DeleteMetadata", "DeleteNTPInstance", "DeletePart", "DeleteWriteToken", "DeployContract", "Download", "DownloadEncrypted", "DownloadFile", "DownloadPart", "EditAndFinalizeContentObject", "EditContentObject", "EmbedUrl", "Encrypt", "EncryptECIES", "EncryptionConk", "Events", "ExtractEventFromLogs", "ExtractValueFromEvent", "FabricUrl", "FileUrl", "FinalizeABRMezzanine", "FinalizeContentObject", "FinalizePart", "FinalizeStateChannelAccess", "FinalizeUploadJob", "FormatContractArguments", "GenerateStateChannelToken", "GenerateSignedLinkToken", "GetBalance", "GlobalUrl", "InitializeAuthPolicy", "IssueNTPCode", "IssueSignedNTPCode", "LatestVersionHash", "LibraryContentTypes", "LinkAccessGroupToOauth", "LinkData", "LinkTarget", "LinkUrl", "ListAccessGroups", "ListFiles", "ListNTPInstances", "LRODraftInfo", "LROStatus", "MakeAuthServiceRequest", "MakeFileServiceRequest", "MergeContractMetadata", "MergeMetadata", "MetadataAuth", "MintNFT", "MoveFiles", "NetworkInfo", "NodeId", "Nodes", "NTPInstance", "ObjectCleanup", "OutputsCreate", "OutputsDelete", "OutputsDeleteBatch", "OutputsList", "OutputsListItem", "OutputsModify", "OutputsModifyBatch", "OutputsReset", "OutputsResolveSrtPullUrls", "OutputsState", "OutputsStop", "Permission", "PlayoutOptions", "PlayoutPathResolution", "ProduceMetadataLinks", "Proofs", "PublicRep", "PublishContentVersion", "QParts", "RecordWriteToken", "RedeemCode", "RedeemShareToken", "RemoveAccessGroupManager", "RemoveAccessGroupMember", "RemoveContentObjectGroupPermission", "RemoveContentLibraryGroup", "RemoveLibraryContentType", "Rep", "ReplaceContractMetadata", "ReplaceMetadata", "Request", "ResetRegion", "ResetTenantId", "RevokeShare", "SendFunds", "SetAccessCharge", "StreamApplyProfile", "SetAuth", "SetAuthContext", "SetAuthPolicy", "SetContentLibraryImage", "SetContentObjectImage", "SetCustomContentContract", "SetGroupPermission", "SetNodes", "SetOauthToken", "SetPolicyAuthorization", "SetSignerFromOauthToken", "SetStaticToken", "SetTenantContractId", "SetTenantId", "TenantAdminGroup", "ContentAdminGroup", "TenantUsersGroup", "SetVisibility", "SetPermission", "ShareInfo", "Shares", "SpaceNodes", "StartABRMezzanineJobs", "StreamAddWatermark", "StreamApplyProfile", "StreamAssignProfile", "StreamConfig", "StreamConfigProfile", "StreamConfigProfiles", "StreamCopyToVod", "StreamCreate", "StreamInitialize", "StreamInsertion", "StreamLinkToSite", "StreamListUrls", "StreamRemoveLinkToSite", "StreamRemoveWatermark", "StreamSaveConfigProfile", "StreamSetOfferingAndDRM", "StreamSiteSettings", "StreamStartRecording", "StreamStartOrStopOrReset", "StreamStatus", "StreamStopRecording", "StreamUnassignProfile", "StreamUpdateConfig", "SuspendNTPInstance", "TenantContractId", "TenantId", "UnlinkAccessGroupFromOauth", "UpdateContentObjectGraph", "UpdateNTPInstance", "UpdateShare", "UploadFileData", "UploadFilesFromS3", "UploadJobStatus", "UploadPart", "UploadPartChunk", "UploadStatus", "UseRegion", "Visibility", "WriteTokenNodeUrlLocal", "WriteTokenNodeUrlNetwork"];
|
|
452
|
+
return ["AccessGroupManagers", "AccessGroupMembers", "AccessGroupOwner", "AccessInfo", "AccessRequest", "AccessType", "AddAccessGroupManager", "AddAccessGroupMember", "AddContentLibraryGroup", "AddContentObjectGroupPermission", "AddLibraryContentType", "AssetMetadata", "AuditContentObject", "AuditStream", "AvailableDRMs", "AvailableOfferings", "AwaitPending", "BitmovinPlayoutOptions", "BlockNumber", "CallBitcodeMethod", "CallContractMethod", "CallContractMethodAndWait", "ClearCache", "ClearStaticToken", "Collection", "CollectionTransactions", "ConfigUrl", "ContentLibraries", "ContentLibrary", "ContentLibraryGroupPermissions", "ContentLibraryOwner", "ContentObject", "ContentObjectAccessComplete", "ContentObjectGraph", "ContentObjectGroupPermissions", "ContentObjectImageUrl", "ContentObjectLibraryId", "ContentObjectMetadata", "ContentObjectOwner", "ContentObjectTenantId", "ContentObjectVersions", "ContentObjects", "ContentPart", "ContentParts", "ContentSpaceId", "ContentType", "ContentTypeOwner", "ContentTypes", "ContractAbi", "ContractEvents", "ContractInfo", "ContractMetadata", "ContractName", "CopyContentObject", "CreateABRMezzanine", "CreateAccessGroup", "CreateAndFinalizeContentObject", "CreateAuthorizationToken", "CreateContentLibrary", "CreateContentObject", "CreateContentType", "CreateEncryptionConk", "CreateFabricToken", "CreateFileDirectories", "CreateFileUploadJob", "CreateLinks", "CreateNTPInstance", "CreateNonOwnerCap", "CreatePart", "CreatePlainToken", "CreateProductionMaster", "CreateShare", "CreateSignedMessageJSON", "CreateSignedToken", "CreateStaticToken", "CurrentAccountAddress", "CustomContractAddress", "DecodeSignedMessageJSON", "Decrypt", "DecryptECIES", "DefaultKMSAddress", "DeleteAccessGroup", "DeleteContentLibrary", "DeleteContentObject", "DeleteContentVersion", "DeleteFiles", "DeleteMetadata", "DeleteNTPInstance", "DeletePart", "DeleteWriteToken", "DeployContract", "Download", "DownloadEncrypted", "DownloadFile", "DownloadPart", "EditAndFinalizeContentObject", "EditContentObject", "EmbedUrl", "Encrypt", "EncryptECIES", "EncryptionConk", "Events", "ExtractEventFromLogs", "ExtractValueFromEvent", "FabricUrl", "FileUrl", "FinalizeABRMezzanine", "FinalizeContentObject", "FinalizePart", "FinalizeStateChannelAccess", "FinalizeUploadJob", "FormatContractArguments", "GenerateStateChannelToken", "GenerateSignedLinkToken", "GetBalance", "GlobalUrl", "InitializeAuthPolicy", "IssueNTPCode", "IssueSignedNTPCode", "LatestVersionHash", "LibraryContentTypes", "LinkAccessGroupToOauth", "LinkData", "LinkTarget", "LinkUrl", "ListAccessGroups", "ListFiles", "ListNTPInstances", "LRODraftInfo", "LROStatus", "MakeAuthServiceRequest", "MakeFileServiceRequest", "MergeContractMetadata", "MergeMetadata", "MetadataAuth", "MintNFT", "MoveFiles", "NetworkInfo", "NodeId", "Nodes", "NTPInstance", "ObjectCleanup", "OutputsCreate", "OutputsDelete", "OutputsDeleteBatch", "OutputsList", "OutputsListItem", "OutputsModify", "OutputsModifyBatch", "OutputsReset", "OutputsResolveSrtPullUrls", "OutputsState", "OutputsStop", "Permission", "PlayoutOptions", "PlayoutPathResolution", "ProduceMetadataLinks", "Proofs", "PublicRep", "PublishContentVersion", "QParts", "RecordWriteToken", "RedeemCode", "RedeemShareToken", "RemoveAccessGroupManager", "RemoveAccessGroupMember", "RemoveContentObjectGroupPermission", "RemoveContentLibraryGroup", "RemoveLibraryContentType", "Rep", "ReplaceContractMetadata", "ReplaceMetadata", "Request", "ResetRegion", "ResetTenantId", "RevokeShare", "SendFunds", "SetAccessCharge", "StreamApplyProfile", "SetAuth", "SetAuthContext", "SetAuthPolicy", "SetContentLibraryImage", "SetContentObjectImage", "SetCustomContentContract", "SetGroupPermission", "SetNodes", "SetOauthToken", "SetPolicyAuthorization", "SetSignerFromOauthToken", "SetStaticToken", "SetTenantContractId", "SetTenantId", "TenantAdminGroup", "ContentAdminGroup", "TenantUsersGroup", "SetVisibility", "SetPermission", "ShareInfo", "Shares", "SpaceNodes", "StartABRMezzanineJobs", "StreamAddWatermark", "StreamApplyProfile", "StreamAssignProfile", "StreamConfig", "StreamConfigProfile", "StreamConfigProfiles", "StreamCopyToVod", "StreamCreate", "StreamInitialize", "StreamInsertion", "StreamLinkToSite", "StreamListUrls", "StreamRemoveLinkToSite", "StreamRemoveWatermark", "StreamSaveConfigProfile", "StreamSetOfferingAndDRM", "StreamSiteSettings", "StreamStartRecording", "StreamStartOrStopOrReset", "StreamStatus", "StreamStopRecording", "StreamUnassignProfile", "StreamUpdateConfig", "SuspendNTPInstance", "TenantContractId", "TenantId", "UnlinkAccessGroupFromOauth", "UpdateContentObjectGraph", "UpdateNTPInstance", "UpdateShare", "UploadFileData", "UploadFilesFromS3", "UploadJobStatus", "UploadPart", "UploadPartChunk", "UploadStatus", "UseRegion", "Visibility", "WriteTokenNodeUrlLocal", "WriteTokenNodeUrlNetwork"];
|
|
453
453
|
}
|
|
454
454
|
}, {
|
|
455
455
|
key: "AllowedUserProfileMethods",
|
|
@@ -84,6 +84,11 @@ var MezJobMainOfferingKey = function MezJobMainOfferingKey(abrMezOfferings) {
|
|
|
84
84
|
* - ...
|
|
85
85
|
* - ]
|
|
86
86
|
* -
|
|
87
|
+
* - For a presigned URL, `path` and `storage_endpoint` are not required and `cloud_credentials` should be:
|
|
88
|
+
* - {
|
|
89
|
+
* - signed_url: "YOUR_PRESIGNED_S3_URL"
|
|
90
|
+
* - }
|
|
91
|
+
* -
|
|
87
92
|
* - The simplest case is a one element array with .path_matchers == [".*"], in which case the same credentials will be used for all items in fileInfo
|
|
88
93
|
*
|
|
89
94
|
* @throws {Object} error - If the initialization of the master fails, error details can be found in error.body
|
|
@@ -91,7 +96,7 @@ var MezJobMainOfferingKey = function MezJobMainOfferingKey(abrMezOfferings) {
|
|
|
91
96
|
*/
|
|
92
97
|
exports.CreateProductionMaster = /*#__PURE__*/function () {
|
|
93
98
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
94
|
-
var libraryId, type, writeToken, name, description, _ref$metadata, metadata, fileInfo, _ref$encrypt, encrypt, _ref$access, access, _ref$copy, copy, callback, _ref$respLogLevel, respLogLevel, _ref$structLogLevel, structLogLevel, objectId, finalize, _yield$this$CreateCon, s3prefixRegex, i, oneFileInfo, matched, j, credentialSet, credentialSetBucket, matchers, k, matcher, fileSourcePath, s3prefixMatch, bucketName, _i, _credentialSet, region, bucket, accessKey, secret, _yield$this$CallBitco, logs, errors, warnings, additionalReturnVals;
|
|
99
|
+
var libraryId, type, writeToken, name, description, _ref$metadata, metadata, fileInfo, _ref$encrypt, encrypt, _ref$access, access, _ref$copy, copy, callback, _ref$respLogLevel, respLogLevel, _ref$structLogLevel, structLogLevel, objectId, finalize, _yield$this$CreateCon, s3prefixRegex, i, oneFileInfo, matched, j, credentialSet, remoteAccess, credentialSetBucket, matchers, k, matcher, fileSourcePath, s3prefixMatch, bucketName, _i, _credentialSet, _remoteAccess, cloudCredentials, region, bucket, accessKey, secret, signedUrl, _yield$this$CallBitco, logs, errors, warnings, mergeMetadata, additionalReturnVals;
|
|
95
100
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
96
101
|
while (1) switch (_context.prev = _context.next) {
|
|
97
102
|
case 0:
|
|
@@ -120,11 +125,11 @@ exports.CreateProductionMaster = /*#__PURE__*/function () {
|
|
|
120
125
|
writeToken = _yield$this$CreateCon.writeToken;
|
|
121
126
|
case 12:
|
|
122
127
|
if (!fileInfo) {
|
|
123
|
-
_context.next =
|
|
128
|
+
_context.next = 68;
|
|
124
129
|
break;
|
|
125
130
|
}
|
|
126
131
|
if (!(access.length > 0)) {
|
|
127
|
-
_context.next =
|
|
132
|
+
_context.next = 66;
|
|
128
133
|
break;
|
|
129
134
|
}
|
|
130
135
|
// S3 Upload
|
|
@@ -133,7 +138,7 @@ exports.CreateProductionMaster = /*#__PURE__*/function () {
|
|
|
133
138
|
i = 0;
|
|
134
139
|
case 16:
|
|
135
140
|
if (!(i < fileInfo.length)) {
|
|
136
|
-
_context.next =
|
|
141
|
+
_context.next = 48;
|
|
137
142
|
break;
|
|
138
143
|
}
|
|
139
144
|
oneFileInfo = fileInfo[i];
|
|
@@ -141,38 +146,39 @@ exports.CreateProductionMaster = /*#__PURE__*/function () {
|
|
|
141
146
|
j = 0;
|
|
142
147
|
case 20:
|
|
143
148
|
if (!(!matched && j < access.length)) {
|
|
144
|
-
_context.next =
|
|
149
|
+
_context.next = 43;
|
|
145
150
|
break;
|
|
146
151
|
}
|
|
147
|
-
credentialSet = access[j];
|
|
148
|
-
|
|
152
|
+
credentialSet = access[j];
|
|
153
|
+
remoteAccess = credentialSet.remote_access; // strip trailing slash to get bucket name for credential set
|
|
154
|
+
credentialSetBucket = remoteAccess.path ? remoteAccess.path.replace(/\/$/, "") : undefined;
|
|
149
155
|
matchers = credentialSet.path_matchers;
|
|
150
156
|
k = 0;
|
|
151
|
-
case
|
|
157
|
+
case 26:
|
|
152
158
|
if (!(!matched && k < matchers.length)) {
|
|
153
|
-
_context.next =
|
|
159
|
+
_context.next = 40;
|
|
154
160
|
break;
|
|
155
161
|
}
|
|
156
162
|
matcher = new RegExp(matchers[k]);
|
|
157
163
|
fileSourcePath = oneFileInfo.source;
|
|
158
164
|
if (!matcher.test(fileSourcePath)) {
|
|
159
|
-
_context.next =
|
|
165
|
+
_context.next = 37;
|
|
160
166
|
break;
|
|
161
167
|
}
|
|
162
168
|
matched = true;
|
|
163
169
|
// if full s3 path supplied, check bucket name
|
|
164
170
|
s3prefixMatch = s3prefixRegex.exec(fileSourcePath);
|
|
165
171
|
if (!s3prefixMatch) {
|
|
166
|
-
_context.next =
|
|
172
|
+
_context.next = 36;
|
|
167
173
|
break;
|
|
168
174
|
}
|
|
169
175
|
bucketName = s3prefixMatch[1];
|
|
170
|
-
if (!(bucketName !== credentialSetBucket)) {
|
|
171
|
-
_context.next =
|
|
176
|
+
if (!(credentialSetBucket && bucketName !== credentialSetBucket)) {
|
|
177
|
+
_context.next = 36;
|
|
172
178
|
break;
|
|
173
179
|
}
|
|
174
180
|
throw Error("Full S3 file path \"" + fileSourcePath + "\" matched to credential set with different bucket name '" + credentialSetBucket + "'");
|
|
175
|
-
case
|
|
181
|
+
case 36:
|
|
176
182
|
if (credentialSet.hasOwnProperty("matched")) {
|
|
177
183
|
credentialSet.matched.push(oneFileInfo);
|
|
178
184
|
} else {
|
|
@@ -180,41 +186,44 @@ exports.CreateProductionMaster = /*#__PURE__*/function () {
|
|
|
180
186
|
// initialize new 'matched' property to 1-element array
|
|
181
187
|
credentialSet.matched = [oneFileInfo];
|
|
182
188
|
}
|
|
183
|
-
case
|
|
189
|
+
case 37:
|
|
184
190
|
k++;
|
|
185
|
-
_context.next =
|
|
191
|
+
_context.next = 26;
|
|
186
192
|
break;
|
|
187
|
-
case
|
|
193
|
+
case 40:
|
|
188
194
|
j++;
|
|
189
195
|
_context.next = 20;
|
|
190
196
|
break;
|
|
191
|
-
case
|
|
197
|
+
case 43:
|
|
192
198
|
if (matched) {
|
|
193
|
-
_context.next =
|
|
199
|
+
_context.next = 45;
|
|
194
200
|
break;
|
|
195
201
|
}
|
|
196
|
-
throw Error("no credential set found for file path: \"" +
|
|
197
|
-
case
|
|
202
|
+
throw Error("no credential set found for file path: \"" + oneFileInfo.source + "\"");
|
|
203
|
+
case 45:
|
|
198
204
|
i++;
|
|
199
205
|
_context.next = 16;
|
|
200
206
|
break;
|
|
201
|
-
case 47:
|
|
202
|
-
_i = 0;
|
|
203
207
|
case 48:
|
|
208
|
+
_i = 0;
|
|
209
|
+
case 49:
|
|
204
210
|
if (!(_i < access.length)) {
|
|
205
|
-
_context.next =
|
|
211
|
+
_context.next = 64;
|
|
206
212
|
break;
|
|
207
213
|
}
|
|
208
214
|
_credentialSet = access[_i];
|
|
209
215
|
if (!(_credentialSet.hasOwnProperty("matched") && _credentialSet.matched.length > 0)) {
|
|
210
|
-
_context.next =
|
|
216
|
+
_context.next = 61;
|
|
211
217
|
break;
|
|
212
218
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
219
|
+
_remoteAccess = _credentialSet.remote_access;
|
|
220
|
+
cloudCredentials = _remoteAccess.cloud_credentials;
|
|
221
|
+
region = _remoteAccess.storage_endpoint && _remoteAccess.storage_endpoint.region;
|
|
222
|
+
bucket = _remoteAccess.path && _remoteAccess.path.replace(/\/$/, "");
|
|
223
|
+
accessKey = cloudCredentials.access_key_id;
|
|
224
|
+
secret = cloudCredentials.secret_access_key;
|
|
225
|
+
signedUrl = cloudCredentials.signed_url;
|
|
226
|
+
_context.next = 61;
|
|
218
227
|
return this.UploadFilesFromS3({
|
|
219
228
|
libraryId: libraryId,
|
|
220
229
|
objectId: objectId,
|
|
@@ -224,19 +233,20 @@ exports.CreateProductionMaster = /*#__PURE__*/function () {
|
|
|
224
233
|
bucket: bucket,
|
|
225
234
|
accessKey: accessKey,
|
|
226
235
|
secret: secret,
|
|
236
|
+
signedUrl: signedUrl,
|
|
227
237
|
copy: copy,
|
|
228
238
|
callback: callback,
|
|
229
239
|
encryption: encrypt ? "cgck" : "none"
|
|
230
240
|
});
|
|
231
|
-
case
|
|
241
|
+
case 61:
|
|
232
242
|
_i++;
|
|
233
|
-
_context.next =
|
|
243
|
+
_context.next = 49;
|
|
234
244
|
break;
|
|
235
|
-
case
|
|
236
|
-
_context.next =
|
|
245
|
+
case 64:
|
|
246
|
+
_context.next = 68;
|
|
237
247
|
break;
|
|
238
|
-
case
|
|
239
|
-
_context.next =
|
|
248
|
+
case 66:
|
|
249
|
+
_context.next = 68;
|
|
240
250
|
return this.UploadFiles({
|
|
241
251
|
libraryId: libraryId,
|
|
242
252
|
objectId: objectId,
|
|
@@ -245,16 +255,16 @@ exports.CreateProductionMaster = /*#__PURE__*/function () {
|
|
|
245
255
|
callback: callback,
|
|
246
256
|
encryption: encrypt ? "cgck" : "none"
|
|
247
257
|
});
|
|
248
|
-
case
|
|
249
|
-
_context.next =
|
|
258
|
+
case 68:
|
|
259
|
+
_context.next = 70;
|
|
250
260
|
return this.CreateEncryptionConk({
|
|
251
261
|
libraryId: libraryId,
|
|
252
262
|
objectId: objectId,
|
|
253
263
|
writeToken: writeToken,
|
|
254
264
|
createKMSConk: true
|
|
255
265
|
});
|
|
256
|
-
case
|
|
257
|
-
_context.next =
|
|
266
|
+
case 70:
|
|
267
|
+
_context.next = 72;
|
|
258
268
|
return this.CallBitcodeMethod({
|
|
259
269
|
libraryId: libraryId,
|
|
260
270
|
objectId: objectId,
|
|
@@ -269,33 +279,34 @@ exports.CreateProductionMaster = /*#__PURE__*/function () {
|
|
|
269
279
|
},
|
|
270
280
|
constant: false
|
|
271
281
|
});
|
|
272
|
-
case
|
|
282
|
+
case 72:
|
|
273
283
|
_yield$this$CallBitco = _context.sent;
|
|
274
284
|
logs = _yield$this$CallBitco.logs;
|
|
275
285
|
errors = _yield$this$CallBitco.errors;
|
|
276
286
|
warnings = _yield$this$CallBitco.warnings;
|
|
277
|
-
|
|
287
|
+
mergeMetadata = _objectSpread(_objectSpread({}, metadata || {}), {}, {
|
|
288
|
+
name: name !== undefined ? name : (metadata || {}).name,
|
|
289
|
+
description: description !== undefined ? description : (metadata || {}).description,
|
|
290
|
+
reference: access && !copy,
|
|
291
|
+
"public": _objectSpread(_objectSpread({}, (metadata || {})["public"] || {}), {}, {
|
|
292
|
+
name: name !== undefined ? name : ((metadata || {})["public"] || {}).name,
|
|
293
|
+
description: description !== undefined ? description : ((metadata || {})["public"] || {}).description
|
|
294
|
+
}),
|
|
295
|
+
elv_created_at: new Date().getTime()
|
|
296
|
+
});
|
|
297
|
+
_context.next = 79;
|
|
278
298
|
return this.MergeMetadata({
|
|
279
299
|
libraryId: libraryId,
|
|
280
300
|
objectId: objectId,
|
|
281
301
|
writeToken: writeToken,
|
|
282
|
-
metadata:
|
|
283
|
-
name: name,
|
|
284
|
-
description: description,
|
|
285
|
-
reference: access && !copy,
|
|
286
|
-
"public": _objectSpread(_objectSpread({}, (metadata || {})["public"] || {}), {}, {
|
|
287
|
-
name: name || "",
|
|
288
|
-
description: description || ""
|
|
289
|
-
}),
|
|
290
|
-
elv_created_at: new Date().getTime()
|
|
291
|
-
})
|
|
302
|
+
metadata: mergeMetadata
|
|
292
303
|
});
|
|
293
|
-
case
|
|
304
|
+
case 79:
|
|
294
305
|
if (!finalize) {
|
|
295
|
-
_context.next =
|
|
306
|
+
_context.next = 85;
|
|
296
307
|
break;
|
|
297
308
|
}
|
|
298
|
-
_context.next =
|
|
309
|
+
_context.next = 82;
|
|
299
310
|
return this.FinalizeContentObject({
|
|
300
311
|
libraryId: libraryId,
|
|
301
312
|
objectId: objectId,
|
|
@@ -303,24 +314,24 @@ exports.CreateProductionMaster = /*#__PURE__*/function () {
|
|
|
303
314
|
commitMessage: "Create master",
|
|
304
315
|
awaitCommitConfirmation: false
|
|
305
316
|
});
|
|
306
|
-
case
|
|
317
|
+
case 82:
|
|
307
318
|
additionalReturnVals = _context.sent;
|
|
308
|
-
_context.next =
|
|
319
|
+
_context.next = 86;
|
|
309
320
|
break;
|
|
310
|
-
case
|
|
321
|
+
case 85:
|
|
311
322
|
additionalReturnVals = {
|
|
312
323
|
write_token: writeToken,
|
|
313
324
|
type: type,
|
|
314
325
|
qlib_id: libraryId,
|
|
315
326
|
id: objectId
|
|
316
327
|
};
|
|
317
|
-
case
|
|
328
|
+
case 86:
|
|
318
329
|
return _context.abrupt("return", _objectSpread({
|
|
319
330
|
errors: errors || [],
|
|
320
331
|
logs: logs || [],
|
|
321
332
|
warnings: warnings || []
|
|
322
333
|
}, additionalReturnVals));
|
|
323
|
-
case
|
|
334
|
+
case 87:
|
|
324
335
|
case "end":
|
|
325
336
|
return _context.stop();
|
|
326
337
|
}
|