contentful-management 11.33.0 → 11.35.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/contentful-management.browser.js +929 -191
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +841 -147
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/index.js +4 -0
- package/dist/es-modules/adapters/REST/endpoints/resource-type.js +23 -0
- package/dist/es-modules/adapters/REST/endpoints/resource.js +5 -0
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-environment-api.js +78 -0
- package/dist/es-modules/entities/index.js +4 -0
- package/dist/es-modules/entities/resource-provider.js +41 -0
- package/dist/es-modules/entities/resource-type.js +93 -0
- package/dist/es-modules/entities/resource.js +7 -0
- package/dist/es-modules/plain/entities/resource-type.js +1 -0
- package/dist/es-modules/plain/entities/resource.js +1 -0
- package/dist/es-modules/plain/plain-client.js +10 -0
- package/dist/typings/adapters/REST/endpoints/index.d.ts +4 -0
- package/dist/typings/adapters/REST/endpoints/resource-type.d.ts +6 -0
- package/dist/typings/adapters/REST/endpoints/resource.d.ts +2 -0
- package/dist/typings/common-types.d.ts +49 -0
- package/dist/typings/constants/editor-interface-defaults/controls-defaults.d.ts +1 -1
- package/dist/typings/create-environment-api.d.ts +50 -0
- package/dist/typings/entities/index.d.ts +4 -0
- package/dist/typings/entities/resource-provider.d.ts +5 -1
- package/dist/typings/entities/resource-type.d.ts +52 -0
- package/dist/typings/entities/resource.d.ts +36 -0
- package/dist/typings/export-types.d.ts +2 -0
- package/dist/typings/plain/common-types.d.ts +5 -1
- package/dist/typings/plain/entities/resource-type.d.ts +14 -0
- package/dist/typings/plain/entities/resource.d.ts +38 -0
- package/package.json +1 -1
|
@@ -2509,27 +2509,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2509
2509
|
/* harmony import */ var _preview_api_key__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./preview-api-key */ "./adapters/REST/endpoints/preview-api-key.ts");
|
|
2510
2510
|
/* harmony import */ var _release__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./release */ "./adapters/REST/endpoints/release.ts");
|
|
2511
2511
|
/* harmony import */ var _release_action__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./release-action */ "./adapters/REST/endpoints/release-action.ts");
|
|
2512
|
-
/* harmony import */ var
|
|
2513
|
-
/* harmony import */ var
|
|
2514
|
-
/* harmony import */ var
|
|
2515
|
-
/* harmony import */ var
|
|
2516
|
-
/* harmony import */ var
|
|
2517
|
-
/* harmony import */ var
|
|
2518
|
-
/* harmony import */ var
|
|
2519
|
-
/* harmony import */ var
|
|
2520
|
-
/* harmony import */ var
|
|
2521
|
-
/* harmony import */ var
|
|
2522
|
-
/* harmony import */ var
|
|
2523
|
-
/* harmony import */ var
|
|
2524
|
-
/* harmony import */ var
|
|
2525
|
-
/* harmony import */ var
|
|
2526
|
-
/* harmony import */ var
|
|
2527
|
-
/* harmony import */ var
|
|
2528
|
-
/* harmony import */ var
|
|
2529
|
-
/* harmony import */ var
|
|
2530
|
-
/* harmony import */ var
|
|
2531
|
-
/* harmony import */ var
|
|
2532
|
-
/* harmony import */ var
|
|
2512
|
+
/* harmony import */ var _resource__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./resource */ "./adapters/REST/endpoints/resource.ts");
|
|
2513
|
+
/* harmony import */ var _resource_provider__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./resource-provider */ "./adapters/REST/endpoints/resource-provider.ts");
|
|
2514
|
+
/* harmony import */ var _resource_type__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./resource-type */ "./adapters/REST/endpoints/resource-type.ts");
|
|
2515
|
+
/* harmony import */ var _role__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./role */ "./adapters/REST/endpoints/role.ts");
|
|
2516
|
+
/* harmony import */ var _scheduled_action__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./scheduled-action */ "./adapters/REST/endpoints/scheduled-action.ts");
|
|
2517
|
+
/* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./snapshot */ "./adapters/REST/endpoints/snapshot.ts");
|
|
2518
|
+
/* harmony import */ var _space__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./space */ "./adapters/REST/endpoints/space.ts");
|
|
2519
|
+
/* harmony import */ var _space_member__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./space-member */ "./adapters/REST/endpoints/space-member.ts");
|
|
2520
|
+
/* harmony import */ var _space_membership__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./space-membership */ "./adapters/REST/endpoints/space-membership.ts");
|
|
2521
|
+
/* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./tag */ "./adapters/REST/endpoints/tag.ts");
|
|
2522
|
+
/* harmony import */ var _task__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./task */ "./adapters/REST/endpoints/task.ts");
|
|
2523
|
+
/* harmony import */ var _team__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./team */ "./adapters/REST/endpoints/team.ts");
|
|
2524
|
+
/* harmony import */ var _team_membership__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./team-membership */ "./adapters/REST/endpoints/team-membership.ts");
|
|
2525
|
+
/* harmony import */ var _team_space_membership__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./team-space-membership */ "./adapters/REST/endpoints/team-space-membership.ts");
|
|
2526
|
+
/* harmony import */ var _ui_config__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./ui-config */ "./adapters/REST/endpoints/ui-config.ts");
|
|
2527
|
+
/* harmony import */ var _upload__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./upload */ "./adapters/REST/endpoints/upload.ts");
|
|
2528
|
+
/* harmony import */ var _usage__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./usage */ "./adapters/REST/endpoints/usage.ts");
|
|
2529
|
+
/* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./user */ "./adapters/REST/endpoints/user.ts");
|
|
2530
|
+
/* harmony import */ var _user_ui_config__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./user-ui-config */ "./adapters/REST/endpoints/user-ui-config.ts");
|
|
2531
|
+
/* harmony import */ var _webhook__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./webhook */ "./adapters/REST/endpoints/webhook.ts");
|
|
2532
|
+
/* harmony import */ var _workflow__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./workflow */ "./adapters/REST/endpoints/workflow.ts");
|
|
2533
|
+
/* harmony import */ var _workflow_definition__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./workflow-definition */ "./adapters/REST/endpoints/workflow-definition.ts");
|
|
2534
|
+
/* harmony import */ var _workflows_changelog__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./workflows-changelog */ "./adapters/REST/endpoints/workflows-changelog.ts");
|
|
2535
|
+
|
|
2536
|
+
|
|
2533
2537
|
|
|
2534
2538
|
|
|
2535
2539
|
|
|
@@ -2626,27 +2630,29 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2626
2630
|
PreviewApiKey: _preview_api_key__WEBPACK_IMPORTED_MODULE_34__,
|
|
2627
2631
|
Release: _release__WEBPACK_IMPORTED_MODULE_35__,
|
|
2628
2632
|
ReleaseAction: _release_action__WEBPACK_IMPORTED_MODULE_36__,
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2633
|
+
Resource: _resource__WEBPACK_IMPORTED_MODULE_37__,
|
|
2634
|
+
ResourceProvider: _resource_provider__WEBPACK_IMPORTED_MODULE_38__,
|
|
2635
|
+
ResourceType: _resource_type__WEBPACK_IMPORTED_MODULE_39__,
|
|
2636
|
+
Role: _role__WEBPACK_IMPORTED_MODULE_40__,
|
|
2637
|
+
ScheduledAction: _scheduled_action__WEBPACK_IMPORTED_MODULE_41__,
|
|
2638
|
+
Snapshot: _snapshot__WEBPACK_IMPORTED_MODULE_42__,
|
|
2639
|
+
Space: _space__WEBPACK_IMPORTED_MODULE_43__,
|
|
2640
|
+
SpaceMember: _space_member__WEBPACK_IMPORTED_MODULE_44__,
|
|
2641
|
+
SpaceMembership: _space_membership__WEBPACK_IMPORTED_MODULE_45__,
|
|
2642
|
+
Tag: _tag__WEBPACK_IMPORTED_MODULE_46__,
|
|
2643
|
+
Task: _task__WEBPACK_IMPORTED_MODULE_47__,
|
|
2644
|
+
Team: _team__WEBPACK_IMPORTED_MODULE_48__,
|
|
2645
|
+
TeamMembership: _team_membership__WEBPACK_IMPORTED_MODULE_49__,
|
|
2646
|
+
TeamSpaceMembership: _team_space_membership__WEBPACK_IMPORTED_MODULE_50__,
|
|
2647
|
+
UIConfig: _ui_config__WEBPACK_IMPORTED_MODULE_51__,
|
|
2648
|
+
Upload: _upload__WEBPACK_IMPORTED_MODULE_52__,
|
|
2649
|
+
Usage: _usage__WEBPACK_IMPORTED_MODULE_53__,
|
|
2650
|
+
User: _user__WEBPACK_IMPORTED_MODULE_54__,
|
|
2651
|
+
UserUIConfig: _user_ui_config__WEBPACK_IMPORTED_MODULE_55__,
|
|
2652
|
+
Webhook: _webhook__WEBPACK_IMPORTED_MODULE_56__,
|
|
2653
|
+
WorkflowDefinition: _workflow_definition__WEBPACK_IMPORTED_MODULE_58__,
|
|
2654
|
+
Workflow: _workflow__WEBPACK_IMPORTED_MODULE_57__,
|
|
2655
|
+
WorkflowsChangelog: _workflows_changelog__WEBPACK_IMPORTED_MODULE_59__
|
|
2650
2656
|
});
|
|
2651
2657
|
|
|
2652
2658
|
/***/ }),
|
|
@@ -3131,6 +3137,69 @@ const del = (http, params) => {
|
|
|
3131
3137
|
|
|
3132
3138
|
/***/ }),
|
|
3133
3139
|
|
|
3140
|
+
/***/ "./adapters/REST/endpoints/resource-type.ts":
|
|
3141
|
+
/*!**************************************************!*\
|
|
3142
|
+
!*** ./adapters/REST/endpoints/resource-type.ts ***!
|
|
3143
|
+
\**************************************************/
|
|
3144
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3145
|
+
|
|
3146
|
+
"use strict";
|
|
3147
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3148
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3149
|
+
/* harmony export */ del: () => (/* binding */ del),
|
|
3150
|
+
/* harmony export */ get: () => (/* binding */ get),
|
|
3151
|
+
/* harmony export */ getForEnvironment: () => (/* binding */ getForEnvironment),
|
|
3152
|
+
/* harmony export */ getMany: () => (/* binding */ getMany),
|
|
3153
|
+
/* harmony export */ upsert: () => (/* binding */ upsert)
|
|
3154
|
+
/* harmony export */ });
|
|
3155
|
+
/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
|
|
3156
|
+
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
|
|
3157
|
+
|
|
3158
|
+
|
|
3159
|
+
const getBaseUrl = params => `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/resource_provider/resource_types`;
|
|
3160
|
+
const getEntityUrl = params => `${getBaseUrl(params)}/${params.resourceTypeId}`;
|
|
3161
|
+
const getSpaceEnvUrl = params => `/spaces/${params.spaceId}/environments/${params.environmentId}/resource_types`;
|
|
3162
|
+
const get = (http, params) => {
|
|
3163
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, getEntityUrl(params));
|
|
3164
|
+
};
|
|
3165
|
+
const upsert = (http, params, rawData, headers) => {
|
|
3166
|
+
const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_1__["default"])(rawData);
|
|
3167
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__.put(http, getEntityUrl(params), data, {
|
|
3168
|
+
headers
|
|
3169
|
+
});
|
|
3170
|
+
};
|
|
3171
|
+
const del = (http, params) => {
|
|
3172
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__.del(http, getEntityUrl(params));
|
|
3173
|
+
};
|
|
3174
|
+
const getMany = (http, params) => {
|
|
3175
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, getBaseUrl(params));
|
|
3176
|
+
};
|
|
3177
|
+
const getForEnvironment = (http, params) => {
|
|
3178
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, getSpaceEnvUrl(params));
|
|
3179
|
+
};
|
|
3180
|
+
|
|
3181
|
+
/***/ }),
|
|
3182
|
+
|
|
3183
|
+
/***/ "./adapters/REST/endpoints/resource.ts":
|
|
3184
|
+
/*!*********************************************!*\
|
|
3185
|
+
!*** ./adapters/REST/endpoints/resource.ts ***!
|
|
3186
|
+
\*********************************************/
|
|
3187
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3188
|
+
|
|
3189
|
+
"use strict";
|
|
3190
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3191
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3192
|
+
/* harmony export */ getMany: () => (/* binding */ getMany)
|
|
3193
|
+
/* harmony export */ });
|
|
3194
|
+
/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
|
|
3195
|
+
|
|
3196
|
+
const getBaseUrl = params => `/spaces/${params.spaceId}/environments/${params.environmentId}/resource_types/${params.resourceTypeId}/resources`;
|
|
3197
|
+
const getMany = (http, params) => _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, getBaseUrl(params), {
|
|
3198
|
+
params: params.query
|
|
3199
|
+
});
|
|
3200
|
+
|
|
3201
|
+
/***/ }),
|
|
3202
|
+
|
|
3134
3203
|
/***/ "./adapters/REST/endpoints/role.ts":
|
|
3135
3204
|
/*!*****************************************!*\
|
|
3136
3205
|
!*** ./adapters/REST/endpoints/role.ts ***!
|
|
@@ -6484,6 +6553,12 @@ function createEnvironmentApi(makeRequest) {
|
|
|
6484
6553
|
const {
|
|
6485
6554
|
wrapAppAccessToken
|
|
6486
6555
|
} = _entities__WEBPACK_IMPORTED_MODULE_1__["default"].appAccessToken;
|
|
6556
|
+
const {
|
|
6557
|
+
wrapResourceTypesForEnvironmentCollection
|
|
6558
|
+
} = _entities__WEBPACK_IMPORTED_MODULE_1__["default"].resourceType;
|
|
6559
|
+
const {
|
|
6560
|
+
wrapResourceCollection
|
|
6561
|
+
} = _entities__WEBPACK_IMPORTED_MODULE_1__["default"].resource;
|
|
6487
6562
|
return {
|
|
6488
6563
|
/**
|
|
6489
6564
|
* Deletes the environment
|
|
@@ -8655,6 +8730,78 @@ function createEnvironmentApi(makeRequest) {
|
|
|
8655
8730
|
environmentId: raw.sys.id
|
|
8656
8731
|
})
|
|
8657
8732
|
}).then(data => (0,_entities_environment_template_installation__WEBPACK_IMPORTED_MODULE_7__.wrapEnvironmentTemplateInstallationCollection)(makeRequest, data));
|
|
8733
|
+
},
|
|
8734
|
+
/**
|
|
8735
|
+
* Gets a collection of all resource types based on native external references app installations in the environment
|
|
8736
|
+
* @param query - BasicCursorPaginationOptions
|
|
8737
|
+
* @return Promise for a collection of ResourceTypes
|
|
8738
|
+
* ```javascript
|
|
8739
|
+
* const contentful = require('contentful-management')
|
|
8740
|
+
*
|
|
8741
|
+
* const client = contentful.createClient({
|
|
8742
|
+
* accessToken: '<content_management_api_key>'
|
|
8743
|
+
* })
|
|
8744
|
+
*
|
|
8745
|
+
* client.getSpace('<space_id>')
|
|
8746
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
8747
|
+
* .then((environment) => environment.getResourceTypes({limit: 10}))
|
|
8748
|
+
* .then((installations) => console.log(installations.items))
|
|
8749
|
+
* .catch(console.error)
|
|
8750
|
+
* ```
|
|
8751
|
+
*/
|
|
8752
|
+
async getResourceTypes(query) {
|
|
8753
|
+
const raw = this.toPlainObject();
|
|
8754
|
+
return makeRequest({
|
|
8755
|
+
entityType: 'ResourceType',
|
|
8756
|
+
action: 'getForEnvironment',
|
|
8757
|
+
params: {
|
|
8758
|
+
query,
|
|
8759
|
+
spaceId: raw.sys.space.sys.id,
|
|
8760
|
+
environmentId: raw.sys.id
|
|
8761
|
+
}
|
|
8762
|
+
}).then(data => wrapResourceTypesForEnvironmentCollection(makeRequest, data));
|
|
8763
|
+
},
|
|
8764
|
+
/**
|
|
8765
|
+
* Gets a collection of all resources for a given resource type based on native external references app installations in the environment
|
|
8766
|
+
* @param resourceTypeId - Id of the resourceType to get its resources
|
|
8767
|
+
* @param query - Either LookupQuery options with 'sys.urn[in]' param or a Search query with 'query' param, in both cases you can add pagination options
|
|
8768
|
+
* @return Promise for a collection of Resources for a given resourceTypeId
|
|
8769
|
+
* ```javascript
|
|
8770
|
+
* const contentful = require('contentful-management')
|
|
8771
|
+
*
|
|
8772
|
+
* const client = contentful.createClient({
|
|
8773
|
+
* accessToken: '<content_management_api_key>'
|
|
8774
|
+
* })
|
|
8775
|
+
*
|
|
8776
|
+
* // Search Query
|
|
8777
|
+
* client.getSpace('<space_id>')
|
|
8778
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
8779
|
+
* // <search_query> is a string you want to search for in the external resources
|
|
8780
|
+
* .then((environment) => environment.getResourcesForResourceType('<resource_type_id>', {query: '<search_query>', limit: 10}))
|
|
8781
|
+
* .then((installations) => console.log(installations.items))
|
|
8782
|
+
* .catch(console.error)
|
|
8783
|
+
*
|
|
8784
|
+
* // Lookup query
|
|
8785
|
+
*
|
|
8786
|
+
* client.getSpace('<space_id>')
|
|
8787
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
8788
|
+
* .then((environment) => environment.getResourcesForResourceType('<resource_type_id>', {'sys.urn[in]': '<resource_urn1>,<resource_urn2>', limit: 10}))
|
|
8789
|
+
* .then((installations) => console.log(installations.items))
|
|
8790
|
+
* .catch(console.error)
|
|
8791
|
+
* ```
|
|
8792
|
+
*/
|
|
8793
|
+
async getResourcesForResourceType(resourceTypeId, query) {
|
|
8794
|
+
const raw = this.toPlainObject();
|
|
8795
|
+
return makeRequest({
|
|
8796
|
+
entityType: 'Resource',
|
|
8797
|
+
action: 'getMany',
|
|
8798
|
+
params: {
|
|
8799
|
+
query,
|
|
8800
|
+
spaceId: raw.sys.space.sys.id,
|
|
8801
|
+
environmentId: raw.sys.id,
|
|
8802
|
+
resourceTypeId
|
|
8803
|
+
}
|
|
8804
|
+
}).then(data => wrapResourceCollection(makeRequest, data));
|
|
8658
8805
|
}
|
|
8659
8806
|
};
|
|
8660
8807
|
}
|
|
@@ -13784,6 +13931,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13784
13931
|
/* harmony import */ var _concept__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./concept */ "./entities/concept.ts");
|
|
13785
13932
|
/* harmony import */ var _concept_scheme__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./concept-scheme */ "./entities/concept-scheme.ts");
|
|
13786
13933
|
/* harmony import */ var _resource_provider__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./resource-provider */ "./entities/resource-provider.ts");
|
|
13934
|
+
/* harmony import */ var _resource_type__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./resource-type */ "./entities/resource-type.ts");
|
|
13935
|
+
/* harmony import */ var _resource__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./resource */ "./entities/resource.ts");
|
|
13936
|
+
|
|
13937
|
+
|
|
13787
13938
|
|
|
13788
13939
|
|
|
13789
13940
|
|
|
@@ -13877,6 +14028,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13877
14028
|
release: _release__WEBPACK_IMPORTED_MODULE_32__,
|
|
13878
14029
|
releaseAction: _release_action__WEBPACK_IMPORTED_MODULE_33__,
|
|
13879
14030
|
resourceProvider: _resource_provider__WEBPACK_IMPORTED_MODULE_54__,
|
|
14031
|
+
resourceType: _resource_type__WEBPACK_IMPORTED_MODULE_55__,
|
|
14032
|
+
resource: _resource__WEBPACK_IMPORTED_MODULE_56__,
|
|
13880
14033
|
role: _role__WEBPACK_IMPORTED_MODULE_34__,
|
|
13881
14034
|
scheduledAction: _scheduled_action__WEBPACK_IMPORTED_MODULE_35__,
|
|
13882
14035
|
snapshot: _snapshot__WEBPACK_IMPORTED_MODULE_36__,
|
|
@@ -14426,6 +14579,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14426
14579
|
/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
|
14427
14580
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
|
|
14428
14581
|
/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
|
|
14582
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! . */ "./entities/index.ts");
|
|
14583
|
+
|
|
14429
14584
|
|
|
14430
14585
|
|
|
14431
14586
|
|
|
@@ -14433,6 +14588,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14433
14588
|
* @private
|
|
14434
14589
|
*/
|
|
14435
14590
|
function createResourceProviderApi(makeRequest) {
|
|
14591
|
+
const {
|
|
14592
|
+
wrapResourceType
|
|
14593
|
+
} = ___WEBPACK_IMPORTED_MODULE_3__["default"].resourceType;
|
|
14436
14594
|
return {
|
|
14437
14595
|
/**
|
|
14438
14596
|
* Sends an update to the server with any changes made to the object's properties
|
|
@@ -14488,6 +14646,43 @@ function createResourceProviderApi(makeRequest) {
|
|
|
14488
14646
|
action: 'delete',
|
|
14489
14647
|
params: getParams(data)
|
|
14490
14648
|
});
|
|
14649
|
+
},
|
|
14650
|
+
getResourceType: function getResourceType(id) {
|
|
14651
|
+
return makeRequest({
|
|
14652
|
+
entityType: 'ResourceType',
|
|
14653
|
+
action: 'get',
|
|
14654
|
+
params: {
|
|
14655
|
+
organizationId: this.sys.organization.sys.id,
|
|
14656
|
+
appDefinitionId: this.sys.appDefinition.sys.id,
|
|
14657
|
+
resourceTypeId: id
|
|
14658
|
+
}
|
|
14659
|
+
}).then(data => wrapResourceType(makeRequest, data));
|
|
14660
|
+
},
|
|
14661
|
+
upsertResourceType: function upsertResourceType(id, data) {
|
|
14662
|
+
return makeRequest({
|
|
14663
|
+
entityType: 'ResourceType',
|
|
14664
|
+
action: 'upsert',
|
|
14665
|
+
params: {
|
|
14666
|
+
organizationId: this.sys.organization.sys.id,
|
|
14667
|
+
appDefinitionId: this.sys.appDefinition.sys.id,
|
|
14668
|
+
resourceTypeId: id
|
|
14669
|
+
},
|
|
14670
|
+
headers: {},
|
|
14671
|
+
payload: data
|
|
14672
|
+
}).then(data => wrapResourceType(makeRequest, data));
|
|
14673
|
+
},
|
|
14674
|
+
getResourceTypes: function getResourceTypes() {
|
|
14675
|
+
return makeRequest({
|
|
14676
|
+
entityType: 'ResourceType',
|
|
14677
|
+
action: 'getMany',
|
|
14678
|
+
params: {
|
|
14679
|
+
organizationId: this.sys.organization.sys.id,
|
|
14680
|
+
appDefinitionId: this.sys.appDefinition.sys.id
|
|
14681
|
+
}
|
|
14682
|
+
}).then(data => {
|
|
14683
|
+
data.items = data.items.map(item => wrapResourceType(makeRequest, item));
|
|
14684
|
+
return data;
|
|
14685
|
+
});
|
|
14491
14686
|
}
|
|
14492
14687
|
};
|
|
14493
14688
|
}
|
|
@@ -14527,6 +14722,143 @@ function wrapResourceProvider(makeRequest, data) {
|
|
|
14527
14722
|
|
|
14528
14723
|
/***/ }),
|
|
14529
14724
|
|
|
14725
|
+
/***/ "./entities/resource-type.ts":
|
|
14726
|
+
/*!***********************************!*\
|
|
14727
|
+
!*** ./entities/resource-type.ts ***!
|
|
14728
|
+
\***********************************/
|
|
14729
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14730
|
+
|
|
14731
|
+
"use strict";
|
|
14732
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14733
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14734
|
+
/* harmony export */ wrapResourceType: () => (/* binding */ wrapResourceType),
|
|
14735
|
+
/* harmony export */ wrapResourceTypeforEnvironment: () => (/* binding */ wrapResourceTypeforEnvironment),
|
|
14736
|
+
/* harmony export */ wrapResourceTypesForEnvironmentCollection: () => (/* binding */ wrapResourceTypesForEnvironmentCollection)
|
|
14737
|
+
/* harmony export */ });
|
|
14738
|
+
/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
|
14739
|
+
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
|
|
14740
|
+
/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
|
|
14741
|
+
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
|
|
14742
|
+
|
|
14743
|
+
|
|
14744
|
+
|
|
14745
|
+
|
|
14746
|
+
const publicResourceTypeFields = ['name'];
|
|
14747
|
+
/**
|
|
14748
|
+
* @private
|
|
14749
|
+
*/
|
|
14750
|
+
function createResourceTypeApi(makeRequest) {
|
|
14751
|
+
return {
|
|
14752
|
+
/**
|
|
14753
|
+
* Sends an update to the server with any changes made to the object's properties
|
|
14754
|
+
* @return Object returned from the server with updated changes.
|
|
14755
|
+
* @example ```javascript
|
|
14756
|
+
* const contentful = require('contentful-management')
|
|
14757
|
+
*
|
|
14758
|
+
* const client = contentful.createClient({
|
|
14759
|
+
* accessToken: '<content_management_api_key>'
|
|
14760
|
+
* })
|
|
14761
|
+
*
|
|
14762
|
+
* client.getOrganization('<org_id>')
|
|
14763
|
+
* .then((org) => org.getAppDefinition('<app_def_id>'))
|
|
14764
|
+
* .then((appDefinition) => appDefinition.getResourceType())
|
|
14765
|
+
* .then((resourceType) => {
|
|
14766
|
+
* resourceType.name = '<new_name>'
|
|
14767
|
+
* return resourceType.upsert()
|
|
14768
|
+
* })
|
|
14769
|
+
* .catch(console.error)
|
|
14770
|
+
* ```
|
|
14771
|
+
*/
|
|
14772
|
+
upsert: function upsert() {
|
|
14773
|
+
const data = this.toPlainObject();
|
|
14774
|
+
return makeRequest({
|
|
14775
|
+
entityType: 'ResourceType',
|
|
14776
|
+
action: 'upsert',
|
|
14777
|
+
params: getParams(data),
|
|
14778
|
+
headers: {},
|
|
14779
|
+
payload: getUpsertParams(data)
|
|
14780
|
+
}).then(data => wrapResourceType(makeRequest, data));
|
|
14781
|
+
},
|
|
14782
|
+
/**
|
|
14783
|
+
* Deletes this object on the server.
|
|
14784
|
+
* @return Promise for the deletion. It contains no data, but the Promise error case should be handled.
|
|
14785
|
+
* @example ```javascript
|
|
14786
|
+
* const contentful = require('contentful-management')
|
|
14787
|
+
*
|
|
14788
|
+
* const client = contentful.createClient({
|
|
14789
|
+
* accessToken: '<content_management_api_key>'
|
|
14790
|
+
* })
|
|
14791
|
+
*
|
|
14792
|
+
* client.getOrganization('<org_id>')
|
|
14793
|
+
* .then((org) => org.getAppDefinition('<app_def_id>'))
|
|
14794
|
+
* .then((appDefinition) => appDefinition.getResourceType())
|
|
14795
|
+
* .then((resourceType) => resourceType.delete())
|
|
14796
|
+
* .catch(console.error)
|
|
14797
|
+
* ```
|
|
14798
|
+
*/
|
|
14799
|
+
delete: function del() {
|
|
14800
|
+
const data = this.toPlainObject();
|
|
14801
|
+
return makeRequest({
|
|
14802
|
+
entityType: 'ResourceType',
|
|
14803
|
+
action: 'delete',
|
|
14804
|
+
params: getParams(data)
|
|
14805
|
+
});
|
|
14806
|
+
}
|
|
14807
|
+
};
|
|
14808
|
+
}
|
|
14809
|
+
const getParams = data => ({
|
|
14810
|
+
organizationId: data.sys.organization.sys.id,
|
|
14811
|
+
appDefinitionId: data.sys.appDefinition.sys.id,
|
|
14812
|
+
resourceTypeId: data.sys.id
|
|
14813
|
+
});
|
|
14814
|
+
const getUpsertParams = data => ({
|
|
14815
|
+
name: data.name,
|
|
14816
|
+
defaultFieldMapping: data.defaultFieldMapping
|
|
14817
|
+
});
|
|
14818
|
+
|
|
14819
|
+
/**
|
|
14820
|
+
* @private
|
|
14821
|
+
* @param makeRequest - function to make requests via an adapter
|
|
14822
|
+
* @param data - Raw Resource Type data
|
|
14823
|
+
* @return Wrapped Resource Type data
|
|
14824
|
+
*/
|
|
14825
|
+
function wrapResourceType(makeRequest, data) {
|
|
14826
|
+
const resourceType = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.toPlainObject)((0,fast_copy__WEBPACK_IMPORTED_MODULE_1__["default"])(data));
|
|
14827
|
+
const ResourceTypeWithMethods = (0,_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(resourceType, createResourceTypeApi(makeRequest));
|
|
14828
|
+
return (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.freezeSys)(ResourceTypeWithMethods);
|
|
14829
|
+
}
|
|
14830
|
+
function wrapResourceTypeforEnvironment(makeRequest, data) {
|
|
14831
|
+
const resourceType = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.toPlainObject)(data);
|
|
14832
|
+
return (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.freezeSys)(resourceType);
|
|
14833
|
+
}
|
|
14834
|
+
const wrapResourceTypesForEnvironmentCollection = (0,_common_utils__WEBPACK_IMPORTED_MODULE_3__.wrapCursorPaginatedCollection)(wrapResourceTypeforEnvironment);
|
|
14835
|
+
|
|
14836
|
+
/***/ }),
|
|
14837
|
+
|
|
14838
|
+
/***/ "./entities/resource.ts":
|
|
14839
|
+
/*!******************************!*\
|
|
14840
|
+
!*** ./entities/resource.ts ***!
|
|
14841
|
+
\******************************/
|
|
14842
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14843
|
+
|
|
14844
|
+
"use strict";
|
|
14845
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14846
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14847
|
+
/* harmony export */ wrapResource: () => (/* binding */ wrapResource),
|
|
14848
|
+
/* harmony export */ wrapResourceCollection: () => (/* binding */ wrapResourceCollection)
|
|
14849
|
+
/* harmony export */ });
|
|
14850
|
+
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
|
|
14851
|
+
/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
|
14852
|
+
|
|
14853
|
+
|
|
14854
|
+
function wrapResource(makeRequest, data) {
|
|
14855
|
+
const resource = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__.toPlainObject)(data);
|
|
14856
|
+
return (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__.freezeSys)(resource);
|
|
14857
|
+
}
|
|
14858
|
+
const wrapResourceCollection = (0,_common_utils__WEBPACK_IMPORTED_MODULE_0__.wrapCursorPaginatedCollection)(wrapResource);
|
|
14859
|
+
|
|
14860
|
+
/***/ }),
|
|
14861
|
+
|
|
14530
14862
|
/***/ "./entities/role.ts":
|
|
14531
14863
|
/*!**************************!*\
|
|
14532
14864
|
!*** ./entities/role.ts ***!
|
|
@@ -16487,11 +16819,21 @@ const createPlainClient = (makeRequest, defaults) => {
|
|
|
16487
16819
|
upsert: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'AppInstallation', 'upsert'),
|
|
16488
16820
|
delete: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'AppInstallation', 'delete')
|
|
16489
16821
|
},
|
|
16822
|
+
resource: {
|
|
16823
|
+
getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Resource', 'getMany')
|
|
16824
|
+
},
|
|
16490
16825
|
resourceProvider: {
|
|
16491
16826
|
get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ResourceProvider', 'get'),
|
|
16492
16827
|
upsert: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ResourceProvider', 'upsert'),
|
|
16493
16828
|
delete: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ResourceProvider', 'delete')
|
|
16494
16829
|
},
|
|
16830
|
+
resourceType: {
|
|
16831
|
+
get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ResourceType', 'get'),
|
|
16832
|
+
getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ResourceType', 'getMany'),
|
|
16833
|
+
upsert: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ResourceType', 'upsert'),
|
|
16834
|
+
delete: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ResourceType', 'delete'),
|
|
16835
|
+
getForEnvironment: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ResourceType', 'getForEnvironment')
|
|
16836
|
+
},
|
|
16495
16837
|
extension: {
|
|
16496
16838
|
get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Extension', 'get'),
|
|
16497
16839
|
getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Extension', 'getMany'),
|
|
@@ -16736,38 +17078,26 @@ module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
|
16736
17078
|
|
|
16737
17079
|
var bind = __webpack_require__(/*! function-bind */ "../node_modules/function-bind/index.js");
|
|
16738
17080
|
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "../node_modules/get-intrinsic/index.js");
|
|
17081
|
+
var setFunctionLength = __webpack_require__(/*! set-function-length */ "../node_modules/set-function-length/index.js");
|
|
16739
17082
|
|
|
17083
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "../node_modules/es-errors/type.js");
|
|
16740
17084
|
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
16741
17085
|
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
16742
17086
|
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
16743
17087
|
|
|
16744
|
-
var $
|
|
16745
|
-
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
17088
|
+
var $defineProperty = __webpack_require__(/*! es-define-property */ "../node_modules/es-define-property/index.js");
|
|
16746
17089
|
var $max = GetIntrinsic('%Math.max%');
|
|
16747
17090
|
|
|
16748
|
-
if ($defineProperty) {
|
|
16749
|
-
try {
|
|
16750
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
16751
|
-
} catch (e) {
|
|
16752
|
-
// IE 8 has a broken defineProperty
|
|
16753
|
-
$defineProperty = null;
|
|
16754
|
-
}
|
|
16755
|
-
}
|
|
16756
|
-
|
|
16757
17091
|
module.exports = function callBind(originalFunction) {
|
|
16758
|
-
|
|
16759
|
-
|
|
16760
|
-
var desc = $gOPD(func, 'length');
|
|
16761
|
-
if (desc.configurable) {
|
|
16762
|
-
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
16763
|
-
$defineProperty(
|
|
16764
|
-
func,
|
|
16765
|
-
'length',
|
|
16766
|
-
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
16767
|
-
);
|
|
16768
|
-
}
|
|
17092
|
+
if (typeof originalFunction !== 'function') {
|
|
17093
|
+
throw new $TypeError('a function is required');
|
|
16769
17094
|
}
|
|
16770
|
-
|
|
17095
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
17096
|
+
return setFunctionLength(
|
|
17097
|
+
func,
|
|
17098
|
+
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
|
17099
|
+
true
|
|
17100
|
+
);
|
|
16771
17101
|
};
|
|
16772
17102
|
|
|
16773
17103
|
var applyBind = function applyBind() {
|
|
@@ -17671,7 +18001,7 @@ function rateLimit(instance) {
|
|
|
17671
18001
|
}
|
|
17672
18002
|
}
|
|
17673
18003
|
if (!retryErrorType) {
|
|
17674
|
-
_context.next =
|
|
18004
|
+
_context.next = 19;
|
|
17675
18005
|
break;
|
|
17676
18006
|
}
|
|
17677
18007
|
// convert to ms and add jitter
|
|
@@ -17686,20 +18016,12 @@ function rateLimit(instance) {
|
|
|
17686
18016
|
requests still use the original http/httpsAgent property */
|
|
17687
18017
|
delete config.httpAgent;
|
|
17688
18018
|
delete config.httpsAgent;
|
|
17689
|
-
|
|
17690
|
-
/**
|
|
17691
|
-
* Hack to mitigate (likely) bug introduced in axios v1.7.0 where `url`,
|
|
17692
|
-
* when using the default `xhr` adapter, is a fully qualified URL (instead of a path),
|
|
17693
|
-
* which somehow causes the request params to be repeatedly appended
|
|
17694
|
-
* to the final request URL upon each retry.
|
|
17695
|
-
*/
|
|
17696
|
-
config.url = config.url.split('?')[0];
|
|
17697
18019
|
return _context.abrupt("return", delay(wait).then(function () {
|
|
17698
18020
|
return instance(config);
|
|
17699
18021
|
}));
|
|
17700
|
-
case
|
|
18022
|
+
case 19:
|
|
17701
18023
|
return _context.abrupt("return", Promise.reject(error));
|
|
17702
|
-
case
|
|
18024
|
+
case 20:
|
|
17703
18025
|
case "end":
|
|
17704
18026
|
return _context.stop();
|
|
17705
18027
|
}
|
|
@@ -20243,6 +20565,73 @@ formatters.O = function (v) {
|
|
|
20243
20565
|
|
|
20244
20566
|
|
|
20245
20567
|
|
|
20568
|
+
/***/ }),
|
|
20569
|
+
|
|
20570
|
+
/***/ "../node_modules/define-data-property/index.js":
|
|
20571
|
+
/*!*****************************************************!*\
|
|
20572
|
+
!*** ../node_modules/define-data-property/index.js ***!
|
|
20573
|
+
\*****************************************************/
|
|
20574
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
20575
|
+
|
|
20576
|
+
"use strict";
|
|
20577
|
+
|
|
20578
|
+
|
|
20579
|
+
var $defineProperty = __webpack_require__(/*! es-define-property */ "../node_modules/es-define-property/index.js");
|
|
20580
|
+
|
|
20581
|
+
var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ "../node_modules/es-errors/syntax.js");
|
|
20582
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "../node_modules/es-errors/type.js");
|
|
20583
|
+
|
|
20584
|
+
var gopd = __webpack_require__(/*! gopd */ "../node_modules/gopd/index.js");
|
|
20585
|
+
|
|
20586
|
+
/** @type {import('.')} */
|
|
20587
|
+
module.exports = function defineDataProperty(
|
|
20588
|
+
obj,
|
|
20589
|
+
property,
|
|
20590
|
+
value
|
|
20591
|
+
) {
|
|
20592
|
+
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
20593
|
+
throw new $TypeError('`obj` must be an object or a function`');
|
|
20594
|
+
}
|
|
20595
|
+
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
|
20596
|
+
throw new $TypeError('`property` must be a string or a symbol`');
|
|
20597
|
+
}
|
|
20598
|
+
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
|
20599
|
+
throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
|
|
20600
|
+
}
|
|
20601
|
+
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
|
20602
|
+
throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
|
|
20603
|
+
}
|
|
20604
|
+
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
|
20605
|
+
throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
|
|
20606
|
+
}
|
|
20607
|
+
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
|
20608
|
+
throw new $TypeError('`loose`, if provided, must be a boolean');
|
|
20609
|
+
}
|
|
20610
|
+
|
|
20611
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
20612
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
20613
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
20614
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
20615
|
+
|
|
20616
|
+
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
|
20617
|
+
var desc = !!gopd && gopd(obj, property);
|
|
20618
|
+
|
|
20619
|
+
if ($defineProperty) {
|
|
20620
|
+
$defineProperty(obj, property, {
|
|
20621
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
20622
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
20623
|
+
value: value,
|
|
20624
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
20625
|
+
});
|
|
20626
|
+
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
|
20627
|
+
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
|
20628
|
+
obj[property] = value; // eslint-disable-line no-param-reassign
|
|
20629
|
+
} else {
|
|
20630
|
+
throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
|
20631
|
+
}
|
|
20632
|
+
};
|
|
20633
|
+
|
|
20634
|
+
|
|
20246
20635
|
/***/ }),
|
|
20247
20636
|
|
|
20248
20637
|
/***/ "../node_modules/delayed-stream/lib/delayed_stream.js":
|
|
@@ -20360,6 +20749,138 @@ DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
|
|
|
20360
20749
|
};
|
|
20361
20750
|
|
|
20362
20751
|
|
|
20752
|
+
/***/ }),
|
|
20753
|
+
|
|
20754
|
+
/***/ "../node_modules/es-define-property/index.js":
|
|
20755
|
+
/*!***************************************************!*\
|
|
20756
|
+
!*** ../node_modules/es-define-property/index.js ***!
|
|
20757
|
+
\***************************************************/
|
|
20758
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
20759
|
+
|
|
20760
|
+
"use strict";
|
|
20761
|
+
|
|
20762
|
+
|
|
20763
|
+
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "../node_modules/get-intrinsic/index.js");
|
|
20764
|
+
|
|
20765
|
+
/** @type {import('.')} */
|
|
20766
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
|
|
20767
|
+
if ($defineProperty) {
|
|
20768
|
+
try {
|
|
20769
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
20770
|
+
} catch (e) {
|
|
20771
|
+
// IE 8 has a broken defineProperty
|
|
20772
|
+
$defineProperty = false;
|
|
20773
|
+
}
|
|
20774
|
+
}
|
|
20775
|
+
|
|
20776
|
+
module.exports = $defineProperty;
|
|
20777
|
+
|
|
20778
|
+
|
|
20779
|
+
/***/ }),
|
|
20780
|
+
|
|
20781
|
+
/***/ "../node_modules/es-errors/eval.js":
|
|
20782
|
+
/*!*****************************************!*\
|
|
20783
|
+
!*** ../node_modules/es-errors/eval.js ***!
|
|
20784
|
+
\*****************************************/
|
|
20785
|
+
/***/ ((module) => {
|
|
20786
|
+
|
|
20787
|
+
"use strict";
|
|
20788
|
+
|
|
20789
|
+
|
|
20790
|
+
/** @type {import('./eval')} */
|
|
20791
|
+
module.exports = EvalError;
|
|
20792
|
+
|
|
20793
|
+
|
|
20794
|
+
/***/ }),
|
|
20795
|
+
|
|
20796
|
+
/***/ "../node_modules/es-errors/index.js":
|
|
20797
|
+
/*!******************************************!*\
|
|
20798
|
+
!*** ../node_modules/es-errors/index.js ***!
|
|
20799
|
+
\******************************************/
|
|
20800
|
+
/***/ ((module) => {
|
|
20801
|
+
|
|
20802
|
+
"use strict";
|
|
20803
|
+
|
|
20804
|
+
|
|
20805
|
+
/** @type {import('.')} */
|
|
20806
|
+
module.exports = Error;
|
|
20807
|
+
|
|
20808
|
+
|
|
20809
|
+
/***/ }),
|
|
20810
|
+
|
|
20811
|
+
/***/ "../node_modules/es-errors/range.js":
|
|
20812
|
+
/*!******************************************!*\
|
|
20813
|
+
!*** ../node_modules/es-errors/range.js ***!
|
|
20814
|
+
\******************************************/
|
|
20815
|
+
/***/ ((module) => {
|
|
20816
|
+
|
|
20817
|
+
"use strict";
|
|
20818
|
+
|
|
20819
|
+
|
|
20820
|
+
/** @type {import('./range')} */
|
|
20821
|
+
module.exports = RangeError;
|
|
20822
|
+
|
|
20823
|
+
|
|
20824
|
+
/***/ }),
|
|
20825
|
+
|
|
20826
|
+
/***/ "../node_modules/es-errors/ref.js":
|
|
20827
|
+
/*!****************************************!*\
|
|
20828
|
+
!*** ../node_modules/es-errors/ref.js ***!
|
|
20829
|
+
\****************************************/
|
|
20830
|
+
/***/ ((module) => {
|
|
20831
|
+
|
|
20832
|
+
"use strict";
|
|
20833
|
+
|
|
20834
|
+
|
|
20835
|
+
/** @type {import('./ref')} */
|
|
20836
|
+
module.exports = ReferenceError;
|
|
20837
|
+
|
|
20838
|
+
|
|
20839
|
+
/***/ }),
|
|
20840
|
+
|
|
20841
|
+
/***/ "../node_modules/es-errors/syntax.js":
|
|
20842
|
+
/*!*******************************************!*\
|
|
20843
|
+
!*** ../node_modules/es-errors/syntax.js ***!
|
|
20844
|
+
\*******************************************/
|
|
20845
|
+
/***/ ((module) => {
|
|
20846
|
+
|
|
20847
|
+
"use strict";
|
|
20848
|
+
|
|
20849
|
+
|
|
20850
|
+
/** @type {import('./syntax')} */
|
|
20851
|
+
module.exports = SyntaxError;
|
|
20852
|
+
|
|
20853
|
+
|
|
20854
|
+
/***/ }),
|
|
20855
|
+
|
|
20856
|
+
/***/ "../node_modules/es-errors/type.js":
|
|
20857
|
+
/*!*****************************************!*\
|
|
20858
|
+
!*** ../node_modules/es-errors/type.js ***!
|
|
20859
|
+
\*****************************************/
|
|
20860
|
+
/***/ ((module) => {
|
|
20861
|
+
|
|
20862
|
+
"use strict";
|
|
20863
|
+
|
|
20864
|
+
|
|
20865
|
+
/** @type {import('./type')} */
|
|
20866
|
+
module.exports = TypeError;
|
|
20867
|
+
|
|
20868
|
+
|
|
20869
|
+
/***/ }),
|
|
20870
|
+
|
|
20871
|
+
/***/ "../node_modules/es-errors/uri.js":
|
|
20872
|
+
/*!****************************************!*\
|
|
20873
|
+
!*** ../node_modules/es-errors/uri.js ***!
|
|
20874
|
+
\****************************************/
|
|
20875
|
+
/***/ ((module) => {
|
|
20876
|
+
|
|
20877
|
+
"use strict";
|
|
20878
|
+
|
|
20879
|
+
|
|
20880
|
+
/** @type {import('./uri')} */
|
|
20881
|
+
module.exports = URIError;
|
|
20882
|
+
|
|
20883
|
+
|
|
20363
20884
|
/***/ }),
|
|
20364
20885
|
|
|
20365
20886
|
/***/ "../node_modules/follow-redirects/debug.js":
|
|
@@ -21722,9 +22243,15 @@ module.exports = Function.prototype.bind || implementation;
|
|
|
21722
22243
|
|
|
21723
22244
|
var undefined;
|
|
21724
22245
|
|
|
21725
|
-
var $
|
|
22246
|
+
var $Error = __webpack_require__(/*! es-errors */ "../node_modules/es-errors/index.js");
|
|
22247
|
+
var $EvalError = __webpack_require__(/*! es-errors/eval */ "../node_modules/es-errors/eval.js");
|
|
22248
|
+
var $RangeError = __webpack_require__(/*! es-errors/range */ "../node_modules/es-errors/range.js");
|
|
22249
|
+
var $ReferenceError = __webpack_require__(/*! es-errors/ref */ "../node_modules/es-errors/ref.js");
|
|
22250
|
+
var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ "../node_modules/es-errors/syntax.js");
|
|
22251
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "../node_modules/es-errors/type.js");
|
|
22252
|
+
var $URIError = __webpack_require__(/*! es-errors/uri */ "../node_modules/es-errors/uri.js");
|
|
22253
|
+
|
|
21726
22254
|
var $Function = Function;
|
|
21727
|
-
var $TypeError = TypeError;
|
|
21728
22255
|
|
|
21729
22256
|
// eslint-disable-next-line consistent-return
|
|
21730
22257
|
var getEvalledConstructor = function (expressionSyntax) {
|
|
@@ -21776,6 +22303,7 @@ var needsEval = {};
|
|
|
21776
22303
|
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);
|
|
21777
22304
|
|
|
21778
22305
|
var INTRINSICS = {
|
|
22306
|
+
__proto__: null,
|
|
21779
22307
|
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
|
21780
22308
|
'%Array%': Array,
|
|
21781
22309
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
|
@@ -21796,9 +22324,9 @@ var INTRINSICS = {
|
|
|
21796
22324
|
'%decodeURIComponent%': decodeURIComponent,
|
|
21797
22325
|
'%encodeURI%': encodeURI,
|
|
21798
22326
|
'%encodeURIComponent%': encodeURIComponent,
|
|
21799
|
-
'%Error%': Error,
|
|
22327
|
+
'%Error%': $Error,
|
|
21800
22328
|
'%eval%': eval, // eslint-disable-line no-eval
|
|
21801
|
-
'%EvalError%': EvalError,
|
|
22329
|
+
'%EvalError%': $EvalError,
|
|
21802
22330
|
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
|
|
21803
22331
|
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
|
|
21804
22332
|
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
|
|
@@ -21820,8 +22348,8 @@ var INTRINSICS = {
|
|
|
21820
22348
|
'%parseInt%': parseInt,
|
|
21821
22349
|
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
|
|
21822
22350
|
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
|
|
21823
|
-
'%RangeError%': RangeError,
|
|
21824
|
-
'%ReferenceError%': ReferenceError,
|
|
22351
|
+
'%RangeError%': $RangeError,
|
|
22352
|
+
'%ReferenceError%': $ReferenceError,
|
|
21825
22353
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
|
21826
22354
|
'%RegExp%': RegExp,
|
|
21827
22355
|
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
|
@@ -21838,7 +22366,7 @@ var INTRINSICS = {
|
|
|
21838
22366
|
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
|
|
21839
22367
|
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
|
|
21840
22368
|
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
|
|
21841
|
-
'%URIError%': URIError,
|
|
22369
|
+
'%URIError%': $URIError,
|
|
21842
22370
|
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
|
|
21843
22371
|
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
|
|
21844
22372
|
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
|
|
@@ -21880,6 +22408,7 @@ var doEval = function doEval(name) {
|
|
|
21880
22408
|
};
|
|
21881
22409
|
|
|
21882
22410
|
var LEGACY_ALIASES = {
|
|
22411
|
+
__proto__: null,
|
|
21883
22412
|
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
21884
22413
|
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
21885
22414
|
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
@@ -21934,7 +22463,7 @@ var LEGACY_ALIASES = {
|
|
|
21934
22463
|
};
|
|
21935
22464
|
|
|
21936
22465
|
var bind = __webpack_require__(/*! function-bind */ "../node_modules/function-bind/index.js");
|
|
21937
|
-
var hasOwn = __webpack_require__(/*!
|
|
22466
|
+
var hasOwn = __webpack_require__(/*! hasown */ "../node_modules/hasown/index.js");
|
|
21938
22467
|
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
21939
22468
|
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
21940
22469
|
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
@@ -22071,6 +22600,33 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|
|
22071
22600
|
};
|
|
22072
22601
|
|
|
22073
22602
|
|
|
22603
|
+
/***/ }),
|
|
22604
|
+
|
|
22605
|
+
/***/ "../node_modules/gopd/index.js":
|
|
22606
|
+
/*!*************************************!*\
|
|
22607
|
+
!*** ../node_modules/gopd/index.js ***!
|
|
22608
|
+
\*************************************/
|
|
22609
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
22610
|
+
|
|
22611
|
+
"use strict";
|
|
22612
|
+
|
|
22613
|
+
|
|
22614
|
+
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "../node_modules/get-intrinsic/index.js");
|
|
22615
|
+
|
|
22616
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
22617
|
+
|
|
22618
|
+
if ($gOPD) {
|
|
22619
|
+
try {
|
|
22620
|
+
$gOPD([], 'length');
|
|
22621
|
+
} catch (e) {
|
|
22622
|
+
// IE 8 has a broken gOPD
|
|
22623
|
+
$gOPD = null;
|
|
22624
|
+
}
|
|
22625
|
+
}
|
|
22626
|
+
|
|
22627
|
+
module.exports = $gOPD;
|
|
22628
|
+
|
|
22629
|
+
|
|
22074
22630
|
/***/ }),
|
|
22075
22631
|
|
|
22076
22632
|
/***/ "../node_modules/has-flag/index.js":
|
|
@@ -22090,6 +22646,39 @@ module.exports = (flag, argv) => {
|
|
|
22090
22646
|
};
|
|
22091
22647
|
|
|
22092
22648
|
|
|
22649
|
+
/***/ }),
|
|
22650
|
+
|
|
22651
|
+
/***/ "../node_modules/has-property-descriptors/index.js":
|
|
22652
|
+
/*!*********************************************************!*\
|
|
22653
|
+
!*** ../node_modules/has-property-descriptors/index.js ***!
|
|
22654
|
+
\*********************************************************/
|
|
22655
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
22656
|
+
|
|
22657
|
+
"use strict";
|
|
22658
|
+
|
|
22659
|
+
|
|
22660
|
+
var $defineProperty = __webpack_require__(/*! es-define-property */ "../node_modules/es-define-property/index.js");
|
|
22661
|
+
|
|
22662
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
22663
|
+
return !!$defineProperty;
|
|
22664
|
+
};
|
|
22665
|
+
|
|
22666
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
22667
|
+
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
22668
|
+
if (!$defineProperty) {
|
|
22669
|
+
return null;
|
|
22670
|
+
}
|
|
22671
|
+
try {
|
|
22672
|
+
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
|
22673
|
+
} catch (e) {
|
|
22674
|
+
// In Firefox 4-22, defining length on an array throws an exception.
|
|
22675
|
+
return true;
|
|
22676
|
+
}
|
|
22677
|
+
};
|
|
22678
|
+
|
|
22679
|
+
module.exports = hasPropertyDescriptors;
|
|
22680
|
+
|
|
22681
|
+
|
|
22093
22682
|
/***/ }),
|
|
22094
22683
|
|
|
22095
22684
|
/***/ "../node_modules/has-proto/index.js":
|
|
@@ -22102,13 +22691,17 @@ module.exports = (flag, argv) => {
|
|
|
22102
22691
|
|
|
22103
22692
|
|
|
22104
22693
|
var test = {
|
|
22694
|
+
__proto__: null,
|
|
22105
22695
|
foo: {}
|
|
22106
22696
|
};
|
|
22107
22697
|
|
|
22108
22698
|
var $Object = Object;
|
|
22109
22699
|
|
|
22700
|
+
/** @type {import('.')} */
|
|
22110
22701
|
module.exports = function hasProto() {
|
|
22111
|
-
|
|
22702
|
+
// @ts-expect-error: TS errors on an inherited property for some reason
|
|
22703
|
+
return { __proto__: test }.foo === test.foo
|
|
22704
|
+
&& !(test instanceof $Object);
|
|
22112
22705
|
};
|
|
22113
22706
|
|
|
22114
22707
|
|
|
@@ -22191,18 +22784,21 @@ module.exports = function hasSymbols() {
|
|
|
22191
22784
|
|
|
22192
22785
|
/***/ }),
|
|
22193
22786
|
|
|
22194
|
-
/***/ "../node_modules/
|
|
22195
|
-
|
|
22196
|
-
!*** ../node_modules/
|
|
22197
|
-
|
|
22787
|
+
/***/ "../node_modules/hasown/index.js":
|
|
22788
|
+
/*!***************************************!*\
|
|
22789
|
+
!*** ../node_modules/hasown/index.js ***!
|
|
22790
|
+
\***************************************/
|
|
22198
22791
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
22199
22792
|
|
|
22200
22793
|
"use strict";
|
|
22201
22794
|
|
|
22202
22795
|
|
|
22796
|
+
var call = Function.prototype.call;
|
|
22797
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
22203
22798
|
var bind = __webpack_require__(/*! function-bind */ "../node_modules/function-bind/index.js");
|
|
22204
22799
|
|
|
22205
|
-
|
|
22800
|
+
/** @type {import('.')} */
|
|
22801
|
+
module.exports = bind.call(call, $hasOwn);
|
|
22206
22802
|
|
|
22207
22803
|
|
|
22208
22804
|
/***/ }),
|
|
@@ -22929,6 +23525,17 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
|
|
22929
23525
|
if (isString(obj)) {
|
|
22930
23526
|
return markBoxed(inspect(String(obj)));
|
|
22931
23527
|
}
|
|
23528
|
+
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
|
|
23529
|
+
/* eslint-env browser */
|
|
23530
|
+
if (typeof window !== 'undefined' && obj === window) {
|
|
23531
|
+
return '{ [object Window] }';
|
|
23532
|
+
}
|
|
23533
|
+
if (
|
|
23534
|
+
(typeof globalThis !== 'undefined' && obj === globalThis)
|
|
23535
|
+
|| (typeof global !== 'undefined' && obj === global)
|
|
23536
|
+
) {
|
|
23537
|
+
return '{ [object globalThis] }';
|
|
23538
|
+
}
|
|
22932
23539
|
if (!isDate(obj) && !isRegExp(obj)) {
|
|
22933
23540
|
var ys = arrObjKeys(obj, inspect);
|
|
22934
23541
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
@@ -23449,6 +24056,59 @@ function getEnv(key) {
|
|
|
23449
24056
|
exports.getProxyForUrl = getProxyForUrl;
|
|
23450
24057
|
|
|
23451
24058
|
|
|
24059
|
+
/***/ }),
|
|
24060
|
+
|
|
24061
|
+
/***/ "../node_modules/set-function-length/index.js":
|
|
24062
|
+
/*!****************************************************!*\
|
|
24063
|
+
!*** ../node_modules/set-function-length/index.js ***!
|
|
24064
|
+
\****************************************************/
|
|
24065
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
24066
|
+
|
|
24067
|
+
"use strict";
|
|
24068
|
+
|
|
24069
|
+
|
|
24070
|
+
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "../node_modules/get-intrinsic/index.js");
|
|
24071
|
+
var define = __webpack_require__(/*! define-data-property */ "../node_modules/define-data-property/index.js");
|
|
24072
|
+
var hasDescriptors = __webpack_require__(/*! has-property-descriptors */ "../node_modules/has-property-descriptors/index.js")();
|
|
24073
|
+
var gOPD = __webpack_require__(/*! gopd */ "../node_modules/gopd/index.js");
|
|
24074
|
+
|
|
24075
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "../node_modules/es-errors/type.js");
|
|
24076
|
+
var $floor = GetIntrinsic('%Math.floor%');
|
|
24077
|
+
|
|
24078
|
+
/** @type {import('.')} */
|
|
24079
|
+
module.exports = function setFunctionLength(fn, length) {
|
|
24080
|
+
if (typeof fn !== 'function') {
|
|
24081
|
+
throw new $TypeError('`fn` is not a function');
|
|
24082
|
+
}
|
|
24083
|
+
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {
|
|
24084
|
+
throw new $TypeError('`length` must be a positive 32-bit integer');
|
|
24085
|
+
}
|
|
24086
|
+
|
|
24087
|
+
var loose = arguments.length > 2 && !!arguments[2];
|
|
24088
|
+
|
|
24089
|
+
var functionLengthIsConfigurable = true;
|
|
24090
|
+
var functionLengthIsWritable = true;
|
|
24091
|
+
if ('length' in fn && gOPD) {
|
|
24092
|
+
var desc = gOPD(fn, 'length');
|
|
24093
|
+
if (desc && !desc.configurable) {
|
|
24094
|
+
functionLengthIsConfigurable = false;
|
|
24095
|
+
}
|
|
24096
|
+
if (desc && !desc.writable) {
|
|
24097
|
+
functionLengthIsWritable = false;
|
|
24098
|
+
}
|
|
24099
|
+
}
|
|
24100
|
+
|
|
24101
|
+
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
24102
|
+
if (hasDescriptors) {
|
|
24103
|
+
define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
|
|
24104
|
+
} else {
|
|
24105
|
+
define(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
|
|
24106
|
+
}
|
|
24107
|
+
}
|
|
24108
|
+
return fn;
|
|
24109
|
+
};
|
|
24110
|
+
|
|
24111
|
+
|
|
23452
24112
|
/***/ }),
|
|
23453
24113
|
|
|
23454
24114
|
/***/ "../node_modules/side-channel/index.js":
|
|
@@ -24050,7 +24710,11 @@ const getBodyLength = async (body) => {
|
|
|
24050
24710
|
}
|
|
24051
24711
|
|
|
24052
24712
|
if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) {
|
|
24053
|
-
|
|
24713
|
+
const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
|
|
24714
|
+
method: 'POST',
|
|
24715
|
+
body,
|
|
24716
|
+
});
|
|
24717
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
24054
24718
|
}
|
|
24055
24719
|
|
|
24056
24720
|
if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) {
|
|
@@ -24090,18 +24754,13 @@ const resolveBodyLength = async (headers, body) => {
|
|
|
24090
24754
|
|
|
24091
24755
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
24092
24756
|
|
|
24093
|
-
let
|
|
24094
|
-
(0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken], timeout) : [];
|
|
24757
|
+
let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
24095
24758
|
|
|
24096
|
-
let
|
|
24759
|
+
let request;
|
|
24097
24760
|
|
|
24098
|
-
const
|
|
24099
|
-
|
|
24100
|
-
|
|
24101
|
-
});
|
|
24102
|
-
|
|
24103
|
-
finished = true;
|
|
24104
|
-
}
|
|
24761
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
24762
|
+
composedSignal.unsubscribe();
|
|
24763
|
+
});
|
|
24105
24764
|
|
|
24106
24765
|
let requestContentLength;
|
|
24107
24766
|
|
|
@@ -24128,7 +24787,7 @@ const resolveBodyLength = async (headers, body) => {
|
|
|
24128
24787
|
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onUploadProgress))
|
|
24129
24788
|
);
|
|
24130
24789
|
|
|
24131
|
-
data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush
|
|
24790
|
+
data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
24132
24791
|
}
|
|
24133
24792
|
}
|
|
24134
24793
|
|
|
@@ -24138,7 +24797,7 @@ const resolveBodyLength = async (headers, body) => {
|
|
|
24138
24797
|
|
|
24139
24798
|
// Cloudflare Workers throws when credentials are defined
|
|
24140
24799
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
24141
|
-
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
24800
|
+
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
24142
24801
|
request = new Request(url, {
|
|
24143
24802
|
...fetchOptions,
|
|
24144
24803
|
signal: composedSignal,
|
|
@@ -24153,7 +24812,7 @@ const resolveBodyLength = async (headers, body) => {
|
|
|
24153
24812
|
|
|
24154
24813
|
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
24155
24814
|
|
|
24156
|
-
if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
|
|
24815
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
24157
24816
|
const options = {};
|
|
24158
24817
|
|
|
24159
24818
|
['status', 'statusText', 'headers'].forEach(prop => {
|
|
@@ -24170,8 +24829,8 @@ const resolveBodyLength = async (headers, body) => {
|
|
|
24170
24829
|
response = new Response(
|
|
24171
24830
|
(0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
24172
24831
|
flush && flush();
|
|
24173
|
-
|
|
24174
|
-
}
|
|
24832
|
+
unsubscribe && unsubscribe();
|
|
24833
|
+
}),
|
|
24175
24834
|
options
|
|
24176
24835
|
);
|
|
24177
24836
|
}
|
|
@@ -24180,9 +24839,7 @@ const resolveBodyLength = async (headers, body) => {
|
|
|
24180
24839
|
|
|
24181
24840
|
let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](response, config);
|
|
24182
24841
|
|
|
24183
|
-
!isStreamResponse &&
|
|
24184
|
-
|
|
24185
|
-
stopTimeout && stopTimeout();
|
|
24842
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
24186
24843
|
|
|
24187
24844
|
return await new Promise((resolve, reject) => {
|
|
24188
24845
|
(0,_core_settle_js__WEBPACK_IMPORTED_MODULE_7__["default"])(resolve, reject, {
|
|
@@ -24195,7 +24852,7 @@ const resolveBodyLength = async (headers, body) => {
|
|
|
24195
24852
|
})
|
|
24196
24853
|
})
|
|
24197
24854
|
} catch (err) {
|
|
24198
|
-
|
|
24855
|
+
unsubscribe && unsubscribe();
|
|
24199
24856
|
|
|
24200
24857
|
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
|
24201
24858
|
throw Object.assign(
|
|
@@ -24681,7 +25338,7 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
24681
25338
|
if (config.socketPath) {
|
|
24682
25339
|
options.socketPath = config.socketPath;
|
|
24683
25340
|
} else {
|
|
24684
|
-
options.hostname = parsed.hostname;
|
|
25341
|
+
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
24685
25342
|
options.port = parsed.port;
|
|
24686
25343
|
setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
|
|
24687
25344
|
}
|
|
@@ -25410,6 +26067,20 @@ class CancelToken {
|
|
|
25410
26067
|
}
|
|
25411
26068
|
}
|
|
25412
26069
|
|
|
26070
|
+
toAbortSignal() {
|
|
26071
|
+
const controller = new AbortController();
|
|
26072
|
+
|
|
26073
|
+
const abort = (err) => {
|
|
26074
|
+
controller.abort(err);
|
|
26075
|
+
};
|
|
26076
|
+
|
|
26077
|
+
this.subscribe(abort);
|
|
26078
|
+
|
|
26079
|
+
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
26080
|
+
|
|
26081
|
+
return controller.signal;
|
|
26082
|
+
}
|
|
26083
|
+
|
|
25413
26084
|
/**
|
|
25414
26085
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
25415
26086
|
* cancels the `CancelToken`.
|
|
@@ -26837,7 +27508,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26837
27508
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26838
27509
|
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
26839
27510
|
/* harmony export */ });
|
|
26840
|
-
const VERSION = "1.7.
|
|
27511
|
+
const VERSION = "1.7.7";
|
|
26841
27512
|
|
|
26842
27513
|
/***/ }),
|
|
26843
27514
|
|
|
@@ -27382,49 +28053,52 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27382
28053
|
/* harmony export */ });
|
|
27383
28054
|
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "../node_modules/axios/lib/cancel/CanceledError.js");
|
|
27384
28055
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "../node_modules/axios/lib/core/AxiosError.js");
|
|
28056
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "../node_modules/axios/lib/utils.js");
|
|
28057
|
+
|
|
27385
28058
|
|
|
27386
28059
|
|
|
27387
28060
|
|
|
27388
28061
|
const composeSignals = (signals, timeout) => {
|
|
27389
|
-
|
|
28062
|
+
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
27390
28063
|
|
|
27391
|
-
|
|
28064
|
+
if (timeout || length) {
|
|
28065
|
+
let controller = new AbortController();
|
|
27392
28066
|
|
|
27393
|
-
|
|
27394
|
-
if (!aborted) {
|
|
27395
|
-
aborted = true;
|
|
27396
|
-
unsubscribe();
|
|
27397
|
-
const err = cancel instanceof Error ? cancel : this.reason;
|
|
27398
|
-
controller.abort(err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? err : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__["default"](err instanceof Error ? err.message : err));
|
|
27399
|
-
}
|
|
27400
|
-
}
|
|
28067
|
+
let aborted;
|
|
27401
28068
|
|
|
27402
|
-
|
|
27403
|
-
|
|
27404
|
-
|
|
28069
|
+
const onabort = function (reason) {
|
|
28070
|
+
if (!aborted) {
|
|
28071
|
+
aborted = true;
|
|
28072
|
+
unsubscribe();
|
|
28073
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
28074
|
+
controller.abort(err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? err : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__["default"](err instanceof Error ? err.message : err));
|
|
28075
|
+
}
|
|
28076
|
+
}
|
|
27405
28077
|
|
|
27406
|
-
|
|
27407
|
-
if (signals) {
|
|
27408
|
-
timer && clearTimeout(timer);
|
|
28078
|
+
let timer = timeout && setTimeout(() => {
|
|
27409
28079
|
timer = null;
|
|
27410
|
-
|
|
27411
|
-
|
|
27412
|
-
|
|
27413
|
-
|
|
27414
|
-
signals
|
|
28080
|
+
onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](`timeout ${timeout} of ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ETIMEDOUT))
|
|
28081
|
+
}, timeout)
|
|
28082
|
+
|
|
28083
|
+
const unsubscribe = () => {
|
|
28084
|
+
if (signals) {
|
|
28085
|
+
timer && clearTimeout(timer);
|
|
28086
|
+
timer = null;
|
|
28087
|
+
signals.forEach(signal => {
|
|
28088
|
+
signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
|
|
28089
|
+
});
|
|
28090
|
+
signals = null;
|
|
28091
|
+
}
|
|
27415
28092
|
}
|
|
27416
|
-
}
|
|
27417
28093
|
|
|
27418
|
-
|
|
28094
|
+
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
27419
28095
|
|
|
27420
|
-
|
|
28096
|
+
const {signal} = controller;
|
|
27421
28097
|
|
|
27422
|
-
|
|
28098
|
+
signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe);
|
|
27423
28099
|
|
|
27424
|
-
|
|
27425
|
-
|
|
27426
|
-
timer = null;
|
|
27427
|
-
}];
|
|
28100
|
+
return signal;
|
|
28101
|
+
}
|
|
27428
28102
|
}
|
|
27429
28103
|
|
|
27430
28104
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals);
|
|
@@ -28690,14 +29364,34 @@ const streamChunk = function* (chunk, chunkSize) {
|
|
|
28690
29364
|
}
|
|
28691
29365
|
}
|
|
28692
29366
|
|
|
28693
|
-
const readBytes = async function* (iterable, chunkSize
|
|
28694
|
-
for await (const chunk of iterable) {
|
|
28695
|
-
yield* streamChunk(
|
|
29367
|
+
const readBytes = async function* (iterable, chunkSize) {
|
|
29368
|
+
for await (const chunk of readStream(iterable)) {
|
|
29369
|
+
yield* streamChunk(chunk, chunkSize);
|
|
29370
|
+
}
|
|
29371
|
+
}
|
|
29372
|
+
|
|
29373
|
+
const readStream = async function* (stream) {
|
|
29374
|
+
if (stream[Symbol.asyncIterator]) {
|
|
29375
|
+
yield* stream;
|
|
29376
|
+
return;
|
|
29377
|
+
}
|
|
29378
|
+
|
|
29379
|
+
const reader = stream.getReader();
|
|
29380
|
+
try {
|
|
29381
|
+
for (;;) {
|
|
29382
|
+
const {done, value} = await reader.read();
|
|
29383
|
+
if (done) {
|
|
29384
|
+
break;
|
|
29385
|
+
}
|
|
29386
|
+
yield value;
|
|
29387
|
+
}
|
|
29388
|
+
} finally {
|
|
29389
|
+
await reader.cancel();
|
|
28696
29390
|
}
|
|
28697
29391
|
}
|
|
28698
29392
|
|
|
28699
|
-
const trackStream = (stream, chunkSize, onProgress, onFinish
|
|
28700
|
-
const iterator = readBytes(stream, chunkSize
|
|
29393
|
+
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
29394
|
+
const iterator = readBytes(stream, chunkSize);
|
|
28701
29395
|
|
|
28702
29396
|
let bytes = 0;
|
|
28703
29397
|
let done;
|
|
@@ -30358,7 +31052,7 @@ function createClient(params, opts = {}) {
|
|
|
30358
31052
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
30359
31053
|
const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
|
|
30360
31054
|
// @ts-expect-error
|
|
30361
|
-
`${sdkMain}/${"11.
|
|
31055
|
+
`${sdkMain}/${"11.35.0"}`, params.application, params.integration, params.feature);
|
|
30362
31056
|
const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
30363
31057
|
userAgent
|
|
30364
31058
|
}));
|