@forge/migrations 0.7.0 → 1.0.0-next.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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @forge/migrations
2
2
 
3
+ ## 1.0.0-next.0
4
+
5
+ ### Major Changes
6
+
7
+ - 48774b3: Making Forge App Migrations generally available
8
+
9
+ ### Patch Changes
10
+
11
+ - d2676d6: Add migration api error class
12
+
3
13
  ## 0.7.0
4
14
 
5
15
  ### Minor Changes
@@ -1,4 +1,5 @@
1
1
  export declare class APIError extends Error {
2
+ status: number | undefined;
2
3
  private constructor();
3
4
  static forStatus(status: number, message: string): APIError;
4
5
  static forUnexpected(message: string): APIError;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/migration/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;IACjC,OAAO;WAIO,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,QAAQ;WAIpD,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ;CAGvD"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/migration/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;IACjC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3B,OAAO;WAKO,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,QAAQ;WAIpD,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ;CAGvD"}
@@ -2,11 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.APIError = void 0;
4
4
  class APIError extends Error {
5
- constructor(message) {
5
+ status;
6
+ constructor(message, status) {
6
7
  super(message);
8
+ this.status = status;
7
9
  }
8
10
  static forStatus(status, message) {
9
- return new APIError(message);
11
+ return new APIError(message, status);
10
12
  }
11
13
  static forUnexpected(message) {
12
14
  return new APIError(message);
@@ -19,4 +19,5 @@ export declare const migration: {
19
19
  getMappings: (transferId: string, namespace: string) => DefaultQueryBuilder;
20
20
  getContainers: (transferId: string, containerType: ContainerType) => DefaultQueryBuilder;
21
21
  };
22
+ export { APIError as MigrationAPIError } from './errors';
22
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,oBAAoB,YAAa,SAAS;iCAEtB,MAAM,aAAa,MAAM,QAAQ,MAAM,MAAM,CAAC;mCAE5C,MAAM,aAAa,MAAM;yBACnC,MAAM,cAAc,MAAM;iCAClB,MAAM;+BACR,MAAM;8BACP,MAAM,aAAa,MAAM;gCAEvB,MAAM,iBAAiB,aAAa;CAGnE,CAAC;AAEF,eAAO,MAAM,SAAS;iCACS,MAAM,aAAa,MAAM,QAAQ,MAAM,MAAM,CAAC;mCAE5C,MAAM,aAAa,MAAM;yBAEnC,MAAM,cAAc,MAAM;iCAElB,MAAM;+BACR,MAAM;8BACP,MAAM,aAAa,MAAM;gCAEvB,MAAM,iBAAiB,aAAa;CAEjE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,oBAAoB,YAAa,SAAS;iCAEtB,MAAM,aAAa,MAAM,QAAQ,MAAM,MAAM,CAAC;mCAE5C,MAAM,aAAa,MAAM;yBACnC,MAAM,cAAc,MAAM;iCAClB,MAAM;+BACR,MAAM;8BACP,MAAM,aAAa,MAAM;gCAEvB,MAAM,iBAAiB,aAAa;CAGnE,CAAC;AAEF,eAAO,MAAM,SAAS;iCACS,MAAM,aAAa,MAAM,QAAQ,MAAM,MAAM,CAAC;mCAE5C,MAAM,aAAa,MAAM;yBAEnC,MAAM,cAAc,MAAM;iCAElB,MAAM;+BACR,MAAM;8BACP,MAAM,aAAa,MAAM;gCAEvB,MAAM,iBAAiB,aAAa;CAEjE,CAAC;AAEF,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migration = exports.getMigrationInstance = void 0;
3
+ exports.MigrationAPIError = exports.migration = exports.getMigrationInstance = void 0;
4
4
  const migration_1 = require("./migration");
5
5
  const query_api_1 = require("./query-api");
6
6
  const getMigrationInstance = (adapter) => {
@@ -24,3 +24,5 @@ exports.migration = {
24
24
  getMappings: (transferId, namespace) => (0, exports.getMigrationInstance)(new migration_1.Migration()).getMappings(transferId, namespace),
25
25
  getContainers: (transferId, containerType) => (0, exports.getMigrationInstance)(new migration_1.Migration()).getContainers(transferId, containerType)
26
26
  };
27
+ var errors_1 = require("./errors");
28
+ Object.defineProperty(exports, "MigrationAPIError", { enumerable: true, get: function () { return errors_1.APIError; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/migrations",
3
- "version": "0.7.0",
3
+ "version": "1.0.0-next.0",
4
4
  "description": "App migration methods for Forge app",
5
5
  "main": "out/index.js",
6
6
  "scripts": {