npm package diff

Package: @forge/i18n

Versions: 0.0.4 - 0.0.5-next.0

Modified: package/out/translationsGetter.js

Index: package/out/translationsGetter.js
===================================================================
--- package/out/translationsGetter.js
+++ package/out/translationsGetter.js
@@ -1,12 +1,19 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
-exports.TranslationsGetter = void 0;
+exports.TranslationsGetter = exports.TranslationGetterError = void 0;
 const pushIfNotExists = (array, item) => {
     if (!array.includes(item)) {
         array.push(item);
     }
 };
+class TranslationGetterError extends Error {
+    constructor(message) {
+        super(message);
+        this.name = 'TranslationGetterError';
+    }
+}
+exports.TranslationGetterError = TranslationGetterError;
 class TranslationsGetter {
     resourcesAccessor;
     i18nInfoConfig = null;
     translationResources = new Map();
@@ -62,9 +69,12 @@
                 resource = await this.resourcesAccessor.getTranslationResource(locale);
                 this.translationResources.set(locale, resource);
             }
             catch (error) {
-                throw new Error(`Failed to get translation resource for locale: ${locale}`);
+                if (error instanceof TranslationGetterError) {
+                    throw error;
+                }
+                throw new TranslationGetterError(`Failed to get translation resource for locale: ${locale}`);
             }
         }
         return resource;
     }
@@ -73,9 +83,12 @@
             try {
                 this.i18nInfoConfig = await this.resourcesAccessor.getI18nInfoConfig();
             }
             catch (error) {
-                throw new Error('Failed to get i18n info config');
+                if (error instanceof TranslationGetterError) {
+                    throw error;
+                }
+                throw new TranslationGetterError('Failed to get i18n info config');
             }
         }
         return this.i18nInfoConfig;
     }

Modified: package/package.json

Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@forge/i18n",
-  "version": "0.0.4",
+  "version": "0.0.5-next.0",
   "description": "Common utilities and typings for Forge i18n support",
   "author": "Atlassian",
   "license": "SEE LICENSE IN LICENSE.txt",
   "main": "out/index.js",

Modified: package/out/translationsGetter.d.ts.map

Index: package/out/translationsGetter.d.ts.map
===================================================================
--- package/out/translationsGetter.d.ts.map
+++ package/out/translationsGetter.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"translationsGetter.d.ts","sourceRoot":"","sources":["../src/translationsGetter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEvE,MAAM,WAAW,0BAA0B;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,0BAA0B,CAAC;CACpD;AAED,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrD,sBAAsB,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACnG;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,wBAAwB,CAAC;IACjC,YAAY,EAAE,0BAA0B,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAYD,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,iBAAiB,CAAwB;IAEjD,OAAO,CAAC,cAAc,CAAmC;IACzD,OAAO,CAAC,oBAAoB,CAAwE;gBAKxF,iBAAiB,EAAE,qBAAqB;IAgBvC,eAAe,CAC1B,MAAM,EAAE,wBAAwB,EAChC,OAAO,GAAE,sBAA2C,GACnD,OAAO,CAAC,qBAAqB,CAAC;IA8BpB,kCAAkC,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CACxF,KAAK,CAAC;QACJ,MAAM,EAAE,wBAAwB,CAAC;QACjC,YAAY,EAAE,0BAA0B,CAAC;KAC1C,CAAC,CACH;IAkBM,KAAK;YAKE,sBAAsB;YActB,iBAAiB;IAW/B,OAAO,CAAC,oBAAoB;CAW7B"}
\ No newline at end of file
+{"version":3,"file":"translationsGetter.d.ts","sourceRoot":"","sources":["../src/translationsGetter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEvE,MAAM,WAAW,0BAA0B;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,0BAA0B,CAAC;CACpD;AAED,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrD,sBAAsB,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACnG;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,wBAAwB,CAAC;IACjC,YAAY,EAAE,0BAA0B,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAQD,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAMD,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,iBAAiB,CAAwB;IAEjD,OAAO,CAAC,cAAc,CAAmC;IACzD,OAAO,CAAC,oBAAoB,CAAwE;gBAKxF,iBAAiB,EAAE,qBAAqB;IAgBvC,eAAe,CAC1B,MAAM,EAAE,wBAAwB,EAChC,OAAO,GAAE,sBAA2C,GACnD,OAAO,CAAC,qBAAqB,CAAC;IA8BpB,kCAAkC,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CACxF,KAAK,CAAC;QACJ,MAAM,EAAE,wBAAwB,CAAC;QACjC,YAAY,EAAE,0BAA0B,CAAC;KAC1C,CAAC,CACH;IAkBM,KAAK;YAKE,sBAAsB;YAiBtB,iBAAiB;IAc/B,OAAO,CAAC,oBAAoB;CAW7B"}
\ No newline at end of file

Modified: package/CHANGELOG.md

Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,6 +1,12 @@
 # @forge/i18n
 
+## 0.0.5-next.0
+
+### Patch Changes
+
+- 336f74f: Support serving i18n resources while using `forge tunnel`
+
 ## 0.0.4
 
 ### Patch Changes

Modified: package/out/translationsGetter.d.ts

Index: package/out/translationsGetter.d.ts
===================================================================
--- package/out/translationsGetter.d.ts
+++ package/out/translationsGetter.d.ts
@@ -12,8 +12,11 @@
 }
 export interface GetTranslationsOptions {
     fallback: boolean;
 }
+export declare class TranslationGetterError extends Error {
+    constructor(message: string);
+}
 export declare class TranslationsGetter {
     private resourcesAccessor;
     private i18nInfoConfig;
     private translationResources;