@esri/solution-common 5.6.8 → 5.7.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/README.md +0 -50
- package/dist/cjs/arcgisRestJS.d.ts +42 -4
- package/dist/cjs/arcgisRestJS.js +121 -52
- package/dist/cjs/arcgisRestJS.js.map +1 -1
- package/dist/cjs/getItemTypeAbbrev.js +2 -2
- package/dist/cjs/resources/add-resource.d.ts +38 -0
- package/dist/cjs/resources/add-resource.js +84 -0
- package/dist/cjs/resources/add-resource.js.map +1 -0
- package/dist/cjs/resources/copyAssociatedFiles.d.ts +2 -2
- package/dist/cjs/resources/copyAssociatedFiles.js +34 -15
- package/dist/cjs/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/cjs/resources/index.d.ts +2 -1
- package/dist/cjs/resources/index.js +2 -1
- package/dist/cjs/resources/index.js.map +1 -1
- package/dist/cjs/resources/{add-resource-from-blob.d.ts → update-resource.d.ts} +8 -7
- package/dist/cjs/resources/{add-resource-from-blob.js → update-resource.js} +15 -14
- package/dist/cjs/resources/update-resource.js.map +1 -0
- package/dist/esm/arcgisRestJS.d.ts +42 -4
- package/dist/esm/arcgisRestJS.js +75 -4
- package/dist/esm/arcgisRestJS.js.map +1 -1
- package/dist/esm/getItemTypeAbbrev.js +2 -2
- package/dist/esm/resources/add-resource.d.ts +38 -0
- package/dist/esm/resources/add-resource.js +79 -0
- package/dist/esm/resources/add-resource.js.map +1 -0
- package/dist/esm/resources/copyAssociatedFiles.d.ts +2 -2
- package/dist/esm/resources/copyAssociatedFiles.js +34 -15
- package/dist/esm/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/esm/resources/index.d.ts +2 -1
- package/dist/esm/resources/index.js +2 -1
- package/dist/esm/resources/index.js.map +1 -1
- package/dist/esm/resources/{add-resource-from-blob.d.ts → update-resource.d.ts} +8 -7
- package/dist/esm/resources/{add-resource-from-blob.js → update-resource.js} +14 -13
- package/dist/esm/resources/update-resource.js.map +1 -0
- package/dist/solution.js_commit.txt +6 -8
- package/package.json +2 -2
- package/dist/cjs/resources/add-resource-from-blob.js.map +0 -1
- package/dist/esm/resources/add-resource-from-blob.js.map +0 -1
|
@@ -13,35 +13,36 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ArcGISAuthError,
|
|
16
|
+
import { ArcGISAuthError, updateItemResource } from "../arcgisRestJS";
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Adds a text resource.
|
|
19
19
|
*
|
|
20
|
-
* @param
|
|
21
|
-
* @param itemId
|
|
22
|
-
* @param folder
|
|
23
|
-
* @param filename
|
|
24
|
-
*
|
|
20
|
+
* @param content Text to add as a resource
|
|
21
|
+
* @param itemId Id of the item to add the resource to
|
|
22
|
+
* @param folder A prefix string added to the filename in the storage; use null or undefined for no folder
|
|
23
|
+
* @param filename File name used to rename an existing file resource uploaded, or to be used together with
|
|
24
|
+
* text as file name for it. File name must have the file resource extension.
|
|
25
|
+
* @param authentication Credentials for the request
|
|
25
26
|
*/
|
|
26
|
-
export function
|
|
27
|
+
export function updateTextResource(content, itemId, folder, filename, authentication) {
|
|
27
28
|
// Check that the filename has an extension because it is required by the addResources call
|
|
28
29
|
if (filename && filename.indexOf(".") < 0) {
|
|
29
30
|
return new Promise((resolve, reject) => {
|
|
30
31
|
reject(new ArcGISAuthError("Filename must have an extension indicating its type"));
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
|
-
const
|
|
34
|
+
const requestOptions = {
|
|
34
35
|
id: itemId,
|
|
35
|
-
|
|
36
|
+
content,
|
|
36
37
|
name: filename,
|
|
37
38
|
authentication: authentication,
|
|
38
39
|
params: {},
|
|
39
40
|
};
|
|
40
41
|
if (folder) {
|
|
41
|
-
|
|
42
|
+
requestOptions.params = {
|
|
42
43
|
resourcesPrefix: folder,
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
return
|
|
46
|
+
return updateItemResource(requestOptions);
|
|
46
47
|
}
|
|
47
|
-
//# sourceMappingURL=
|
|
48
|
+
//# sourceMappingURL=update-resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-resource.js","sourceRoot":"","sources":["../../../src/resources/update-resource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAwB,eAAe,EAAE,kBAAkB,EAAe,MAAM,iBAAiB,CAAC;AAEzG;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAe,EACf,MAAc,EACd,MAAc,EACd,QAAgB,EAChB,cAA2B;IAE3B,2FAA2F;IAC3F,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,CAAC,IAAI,eAAe,CAAC,qDAAqD,CAAC,CAAC,CAAC;QACrF,CAAC,CAAC,CAAC;KACJ;IAED,MAAM,cAAc,GAAyB;QAC3C,EAAE,EAAE,MAAM;QACV,OAAO;QACP,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE,cAAc;QAC9B,MAAM,EAAE,EAAE;KACX,CAAC;IACF,IAAI,MAAM,EAAE;QACV,cAAc,CAAC,MAAM,GAAG;YACtB,eAAe,EAAE,MAAM;SACxB,CAAC;KACH;IACD,OAAO,kBAAkB,CAAC,cAAc,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
Built
|
|
2
|
-
|
|
3
|
-
commit
|
|
4
|
-
Merge:
|
|
1
|
+
Built 11/22/2024 13:45:22.32
|
|
2
|
+
master
|
|
3
|
+
commit d8e35eca01138cbe1831599daefca4063af552ed
|
|
4
|
+
Merge: 6802c26b0 fb8fdf237
|
|
5
5
|
Author: Mike Tschudi <mtschudi@esri.com>
|
|
6
|
-
Date:
|
|
6
|
+
Date: Thu Oct 17 09:50:27 2024 -0700
|
|
7
7
|
|
|
8
|
-
Merge
|
|
9
|
-
|
|
10
|
-
Item IDs referenced in Workflow project are not being replaced with variables during creation
|
|
8
|
+
Merge branch 'develop'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-common",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "Provides general helper functions for @esri/solution.js.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"esri",
|
|
95
95
|
"ES6"
|
|
96
96
|
],
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "7b2f1a03ba139c773d0aa9731ff7c479497d1b30"
|
|
98
98
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-resource-from-blob.js","sourceRoot":"","sources":["../../../src/resources/add-resource-from-blob.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,kDAAgF;AAChF;;;;;;;;GAQG;AACH,SAAgB,mBAAmB,CACjC,IAAS,EACT,MAAc,EACd,MAAc,EACd,QAAgB,EAChB,cAA2B;IAE3B,2FAA2F;IAC3F,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,CAAC,IAAI,8BAAe,CAAC,qDAAqD,CAAC,CAAC,CAAC;QACrF,CAAC,CAAC,CAAC;KACJ;IAED,MAAM,cAAc,GAAG;QACrB,EAAE,EAAE,MAAM;QACV,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE,cAAc;QAC9B,MAAM,EAAE,EAAE;KACX,CAAC;IACF,IAAI,MAAM,EAAE;QACV,cAAc,CAAC,MAAM,GAAG;YACtB,eAAe,EAAE,MAAM;SACxB,CAAC;KACH;IACD,OAAO,IAAA,8BAAe,EAAC,cAAc,CAAC,CAAC;AACzC,CAAC;AA3BD,kDA2BC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-resource-from-blob.js","sourceRoot":"","sources":["../../../src/resources/add-resource-from-blob.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAe,MAAM,iBAAiB,CAAC;AAChF;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAAS,EACT,MAAc,EACd,MAAc,EACd,QAAgB,EAChB,cAA2B;IAE3B,2FAA2F;IAC3F,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,CAAC,IAAI,eAAe,CAAC,qDAAqD,CAAC,CAAC,CAAC;QACrF,CAAC,CAAC,CAAC;KACJ;IAED,MAAM,cAAc,GAAG;QACrB,EAAE,EAAE,MAAM;QACV,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE,cAAc;QAC9B,MAAM,EAAE,EAAE;KACX,CAAC;IACF,IAAI,MAAM,EAAE;QACV,cAAc,CAAC,MAAM,GAAG;YACtB,eAAe,EAAE,MAAM;SACxB,CAAC;KACH;IACD,OAAO,eAAe,CAAC,cAAc,CAAC,CAAC;AACzC,CAAC"}
|