@esri/hub-common 12.12.0 → 12.13.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.
@@ -6,16 +6,37 @@ import { getVersionData } from "./_internal/getVersionData";
6
6
  import { VERSION_RESOURCE_NAME, VERSION_RESOURCE_PROPERTIES, } from "./_internal/constants";
7
7
  import { getIncludeListFromItemType } from "./_internal/getIncludeListFromItemType";
8
8
  import { updateItemResource } from "@esri/arcgis-rest-portal";
9
+ import { checkForStaleVersion } from "./utils";
10
+ /**
11
+ * Custom error to be thrown when attempting to save a stale version
12
+ * @class StaleVersionError
13
+ * @extends {Error}
14
+ */
15
+ class StaleVersionError extends Error {
16
+ constructor(id, updated) {
17
+ super(`Version ${id} is stale. Use force to overwrite.`);
18
+ this.updated = updated;
19
+ this.name = "StaleVersionError";
20
+ }
21
+ }
9
22
  /**
10
23
  * Updates the specified version with with the state of the supplied model
24
+ * throws an exception if the version is stale and force is not true
11
25
  * @param model
12
26
  * @param version
13
27
  * @param requestOptions
28
+ * @param force
14
29
  * @returns
15
30
  */
16
- export async function updateVersion(model, version, requestOptions) {
31
+ export async function updateVersion(model, version, requestOptions, force) {
17
32
  // we expect the model to contain the changes that we want to apply to the version
18
33
  // but we also need the versionResource so we can preserve the created and creator props
34
+ if (!force) {
35
+ const isStaleResponse = await checkForStaleVersion(model.item.id, version, requestOptions);
36
+ if (isStaleResponse.isStale) {
37
+ throw new StaleVersionError(version.id, isStaleResponse.updated);
38
+ }
39
+ }
19
40
  const includeList = getIncludeListFromItemType(model);
20
41
  version.data = getVersionData(model, includeList);
21
42
  const prefix = getPrefix(version.id);
@@ -1 +1 @@
1
- {"version":3,"file":"updateVersion.js","sourceRoot":"","sources":["../../../src/versioning/updateVersion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAA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C;IAElD,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACrC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAE9C,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,EAAE,EAAE,EAAE,2BAA2B,CAAC,CAAC;IAE1E,MAAM,kBAAkB,iCACnB,cAAc,KACjB,EAAE,EAAE,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,EAC7B,IAAI,EAAE,qBAAqB,EAC3B,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,YAAY,CAAC,EACnC,MAAM,EAAE,EAAE,UAAU,EAAE,EACtB,MAAM,EACN,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,WAAW,IACrB,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { cloneObject } from "../util";
2
2
  import { mergeObjects } from "../objects/merge-objects";
3
+ import { getVersion } from "./getVersion";
3
4
  import { getIncludeListFromItemType } from "./_internal/getIncludeListFromItemType";
4
5
  /**
5
6
  * Applies the versioned data to the model
@@ -14,4 +15,19 @@ export function applyVersion(model, version, includeList) {
14
15
  }
15
16
  return mergeObjects(version.data, cloneObject(model), includeList);
16
17
  }
18
+ /**
19
+ * Checks if the upstream version is newer than the passed in version
20
+ * @param itemId
21
+ * @param version
22
+ * @param requestOptions
23
+ * @returns
24
+ */
25
+ export async function checkForStaleVersion(itemId, version, requestOptions) {
26
+ const upstream = await getVersion(itemId, version.id, requestOptions);
27
+ const isStale = upstream.updated > version.updated;
28
+ return {
29
+ isStale,
30
+ updated: upstream.updated,
31
+ };
32
+ }
17
33
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/versioning/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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,OAAO;QACL,OAAO;QACP,OAAO,EAAE,QAAQ,CAAC,OAAO;KAC1B,CAAC;AACJ,CAAC"}
@@ -9,16 +9,37 @@ const getVersionData_1 = require("./_internal/getVersionData");
9
9
  const constants_1 = require("./_internal/constants");
10
10
  const getIncludeListFromItemType_1 = require("./_internal/getIncludeListFromItemType");
11
11
  const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
12
+ const utils_1 = require("./utils");
13
+ /**
14
+ * Custom error to be thrown when attempting to save a stale version
15
+ * @class StaleVersionError
16
+ * @extends {Error}
17
+ */
18
+ class StaleVersionError extends Error {
19
+ constructor(id, updated) {
20
+ super(`Version ${id} is stale. Use force to overwrite.`);
21
+ this.updated = updated;
22
+ this.name = "StaleVersionError";
23
+ }
24
+ }
12
25
  /**
13
26
  * Updates the specified version with with the state of the supplied model
27
+ * throws an exception if the version is stale and force is not true
14
28
  * @param model
15
29
  * @param version
16
30
  * @param requestOptions
31
+ * @param force
17
32
  * @returns
18
33
  */
19
- async function updateVersion(model, version, requestOptions) {
34
+ async function updateVersion(model, version, requestOptions, force) {
20
35
  // we expect the model to contain the changes that we want to apply to the version
21
36
  // but we also need the versionResource so we can preserve the created and creator props
37
+ if (!force) {
38
+ const isStaleResponse = await utils_1.checkForStaleVersion(model.item.id, version, requestOptions);
39
+ if (isStaleResponse.isStale) {
40
+ throw new StaleVersionError(version.id, isStaleResponse.updated);
41
+ }
42
+ }
22
43
  const includeList = getIncludeListFromItemType_1.getIncludeListFromItemType(model);
23
44
  version.data = getVersionData_1.getVersionData(model, includeList);
24
45
  const prefix = getPrefix_1.getPrefix(version.id);
@@ -1 +1 @@
1
- {"version":3,"file":"updateVersion.js","sourceRoot":"","sources":["../../../src/versioning/updateVersion.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAC9C,4DAAwD;AACxD,0EAAoE;AAGpE,qDAAkD;AAClD,+DAA4D;AAC5D,qDAG+B;AAC/B,uFAAoF;AACpF,iEAA8D;AAE9D;;;;;;GAM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.applyVersion = void 0;
3
+ exports.checkForStaleVersion = exports.applyVersion = void 0;
4
4
  const util_1 = require("../util");
5
5
  const merge_objects_1 = require("../objects/merge-objects");
6
+ const getVersion_1 = require("./getVersion");
6
7
  const getIncludeListFromItemType_1 = require("./_internal/getIncludeListFromItemType");
7
8
  /**
8
9
  * Applies the versioned data to the model
@@ -18,4 +19,20 @@ function applyVersion(model, version, includeList) {
18
19
  return merge_objects_1.mergeObjects(version.data, util_1.cloneObject(model), includeList);
19
20
  }
20
21
  exports.applyVersion = applyVersion;
22
+ /**
23
+ * Checks if the upstream version is newer than the passed in version
24
+ * @param itemId
25
+ * @param version
26
+ * @param requestOptions
27
+ * @returns
28
+ */
29
+ async function checkForStaleVersion(itemId, version, requestOptions) {
30
+ const upstream = await getVersion_1.getVersion(itemId, version.id, requestOptions);
31
+ const isStale = upstream.updated > version.updated;
32
+ return {
33
+ isStale,
34
+ updated: upstream.updated,
35
+ };
36
+ }
37
+ exports.checkForStaleVersion = checkForStaleVersion;
21
38
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/versioning/utils.ts"],"names":[],"mappings":";;;AAAA,kCAAsC;AACtC,4DAAwD;AAGxD,uFAAoF;AAEpF;;;;;;GAMG;AACH,SAAgB,YAAY,CAC1B,KAAa,EACb,OAAiB,EACjB,WAAsB;IAEtB,IAAI,CAAC,WAAW,EAAE;QAChB,WAAW,GAAG,uDAA0B,CAAC,KAAK,CAAC,CAAC;KACjD;IACD,OAAO,4BAAY,CAAC,OAAO,CAAC,IAAI,EAAE,kBAAW,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC;AACrE,CAAC;AATD,oCASC"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/versioning/utils.ts"],"names":[],"mappings":";;;AAAA,kCAAsC;AACtC,4DAAwD;AAGxD,6CAA0C;AAC1C,uFAAoF;AAEpF;;;;;;GAMG;AACH,SAAgB,YAAY,CAC1B,KAAa,EACb,OAAiB,EACjB,WAAsB;IAEtB,IAAI,CAAC,WAAW,EAAE;QAChB,WAAW,GAAG,uDAA0B,CAAC,KAAK,CAAC,CAAC;KACjD;IACD,OAAO,4BAAY,CAAC,OAAO,CAAC,IAAI,EAAE,kBAAW,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC;AACrE,CAAC;AATD,oCASC;AAOD;;;;;;GAMG;AACI,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,OAAiB,EACjB,cAAsC;IAEtC,MAAM,QAAQ,GAAG,MAAM,uBAAU,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IACnD,OAAO;QACL,OAAO;QACP,OAAO,EAAE,QAAQ,CAAC,OAAO;KAC1B,CAAC;AACJ,CAAC;AAXD,oDAWC"}
@@ -3,9 +3,11 @@ import { IModel } from "../types";
3
3
  import { IVersion } from "./types";
4
4
  /**
5
5
  * Updates the specified version with with the state of the supplied model
6
+ * throws an exception if the version is stale and force is not true
6
7
  * @param model
7
8
  * @param version
8
9
  * @param requestOptions
10
+ * @param force
9
11
  * @returns
10
12
  */
11
- export declare function updateVersion(model: IModel, version: IVersion, requestOptions: IHubUserRequestOptions): Promise<IVersion>;
13
+ export declare function updateVersion(model: IModel, version: IVersion, requestOptions: IHubUserRequestOptions, force?: boolean): Promise<IVersion>;
@@ -1,4 +1,4 @@
1
- import { IModel } from "../types";
1
+ import { IHubUserRequestOptions, IModel } from "../types";
2
2
  import { IVersion } from "./types/IVersion";
3
3
  /**
4
4
  * Applies the versioned data to the model
@@ -8,3 +8,16 @@ import { IVersion } from "./types/IVersion";
8
8
  * @returns
9
9
  */
10
10
  export declare function applyVersion(model: IModel, version: IVersion, includeList?: string[]): IModel;
11
+ interface IStaleVersionResponse {
12
+ isStale: boolean;
13
+ updated: number;
14
+ }
15
+ /**
16
+ * Checks if the upstream version is newer than the passed in version
17
+ * @param itemId
18
+ * @param version
19
+ * @param requestOptions
20
+ * @returns
21
+ */
22
+ export declare function checkForStaleVersion(itemId: string, version: IVersion, requestOptions: IHubUserRequestOptions): Promise<IStaleVersionResponse>;
23
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "12.12.0",
3
+ "version": "12.13.0",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",