@liff/i18n
Advanced tools
Comparing version 2.21.1 to 2.21.2
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@liff/consts"),n=require("@liff/util"),i=require("@liff/server-api"),r=navigator.language,s=null;function a(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return r=t,[4,o()];case 1:return e.sent(),[2]}}))}))}function o(){return e.__awaiter(this,void 0,void 0,(function(){var t,n;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,i.fetch("https://liffsdk.line-scdn.net/xlt/manifest.json",{method:"GET",headers:{Accept:"application/json"}})];case 1:return t=e.sent(),n=""+r,!t.languages[n]&&r.includes("-")&&(n=r.split("-")[0]),t.languages[n]||(n="en"),[4,i.fetch("https://liffsdk.line-scdn.net/xlt/"+t.languages[n],{method:"GET",headers:{Accept:"application/json"}})];case 2:return s=e.sent(),[2]}}))}))}var u=new(function(){function t(){this.name="i18n"}return t.prototype.install=function(e){return e.internalHooks.init.beforeFinished(this.beforeInitFinished.bind(this)),{setLang:a}},t.prototype.beforeInitFinished=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,o()];case 1:return e.sent(),[2]}}))}))},t}());exports.module=u,exports.t=function(e){if(null===s)throw n.createLiffError(t.INIT_FAILED,"please call xlt after liff.init");return s[e]}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@liff/consts"),n=require("@liff/util"),i=require("@liff/server-api"),r=navigator.language,s=null;function a(t){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return r=t,[4,o()];case 1:return e.sent(),[2]}}))}))}function o(){return e.__awaiter(this,void 0,void 0,(function(){var t,n;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,i.fetch("".concat("https://liffsdk.line-scdn.net/xlt/manifest.json"),{method:"GET",headers:{Accept:"application/json"}})];case 1:return t=e.sent(),n="".concat(r),!t.languages[n]&&r.includes("-")&&(n=r.split("-")[0]),t.languages[n]||(n="en"),[4,i.fetch("".concat("https://liffsdk.line-scdn.net/xlt","/").concat(t.languages[n]),{method:"GET",headers:{Accept:"application/json"}})];case 2:return s=e.sent(),[2]}}))}))}var c=new(function(){function t(){this.name="i18n"}return t.prototype.install=function(e){return e.internalHooks.init.beforeFinished(this.beforeInitFinished.bind(this)),{setLang:a}},t.prototype.beforeInitFinished=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,o()];case 1:return e.sent(),[2]}}))}))},t}());exports.module=c,exports.t=function(e){if(null===s)throw n.createLiffError(t.INIT_FAILED,"please call xlt after liff.init");return s[e]}; |
@@ -1,1 +0,1 @@ | ||
import{__awaiter as t,__generator as n}from"tslib";import{INIT_FAILED as i}from"@liff/consts";import{createLiffError as e}from"@liff/util";import{fetch as r}from"@liff/server-api";var s=navigator.language,o=null;function a(i){return t(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return s=i,[4,l()];case 1:return t.sent(),[2]}}))}))}function l(){return t(this,void 0,void 0,(function(){var t,i;return n(this,(function(n){switch(n.label){case 0:return[4,r("https://liffsdk.line-scdn.net/xlt/manifest.json",{method:"GET",headers:{Accept:"application/json"}})];case 1:return t=n.sent(),i=""+s,!t.languages[i]&&s.includes("-")&&(i=s.split("-")[0]),t.languages[i]||(i="en"),[4,r("https://liffsdk.line-scdn.net/xlt/"+t.languages[i],{method:"GET",headers:{Accept:"application/json"}})];case 2:return o=n.sent(),[2]}}))}))}function u(t){if(null===o)throw e(i,"please call xlt after liff.init");return o[t]}var f=new(function(){function i(){this.name="i18n"}return i.prototype.install=function(t){return t.internalHooks.init.beforeFinished(this.beforeInitFinished.bind(this)),{setLang:a}},i.prototype.beforeInitFinished=function(){return t(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,l()];case 1:return t.sent(),[2]}}))}))},i}());export{f as module,u as t}; | ||
import{__awaiter as t,__generator as n}from"tslib";import{INIT_FAILED as i}from"@liff/consts";import{createLiffError as e}from"@liff/util";import{fetch as r}from"@liff/server-api";var o=navigator.language,s=null;function a(i){return t(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return o=i,[4,c()];case 1:return t.sent(),[2]}}))}))}function c(){return t(this,void 0,void 0,(function(){var t,i;return n(this,(function(n){switch(n.label){case 0:return[4,r("".concat("https://liffsdk.line-scdn.net/xlt/manifest.json"),{method:"GET",headers:{Accept:"application/json"}})];case 1:return t=n.sent(),i="".concat(o),!t.languages[i]&&o.includes("-")&&(i=o.split("-")[0]),t.languages[i]||(i="en"),[4,r("".concat("https://liffsdk.line-scdn.net/xlt","/").concat(t.languages[i]),{method:"GET",headers:{Accept:"application/json"}})];case 2:return s=n.sent(),[2]}}))}))}function l(t){if(null===s)throw e(i,"please call xlt after liff.init");return s[t]}var u=new(function(){function i(){this.name="i18n"}return i.prototype.install=function(t){return t.internalHooks.init.beforeFinished(this.beforeInitFinished.bind(this)),{setLang:a}},i.prototype.beforeInitFinished=function(){return t(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,c()];case 1:return t.sent(),[2]}}))}))},i}());export{u as module,l as t}; |
@@ -1,2 +0,2 @@ | ||
declare const XLTKeys: readonly ["liff.sdk.test.key", "alert.android.extBrowser.autoLoginWorkaround.button.text", "alert.android.extBrowser.autoLoginWorkaround.title", "alert.android.extBrowser.autoLoginWorkaround.desc"]; | ||
declare const XLTKeys: readonly ["alert.android.extBrowser.autoLoginWorkaround.button.text", "alert.android.extBrowser.autoLoginWorkaround.desc", "alert.android.extBrowser.autoLoginWorkaround.title"]; | ||
export default XLTKeys; |
{ | ||
"name": "@liff/i18n", | ||
"version": "2.21.1", | ||
"version": "2.21.2", | ||
"description": "@liff/i18n", | ||
@@ -24,5 +24,5 @@ "license": "SEE LICENSE IN README.md", | ||
"build:npm": "rollup -c rollup.config.js", | ||
"build:watch": "yarn build:npm -w --watch.include './src/**'", | ||
"dev-server": "yarn build:watch", | ||
"dev-server:https": "yarn build:watch", | ||
"build:watch": "npm run build:npm -- --watch", | ||
"dev-server": "npm run build:watch", | ||
"dev-server:https": "npm run build:watch", | ||
"build:prerelease": "rollup -c rollup.config.prerelease.js", | ||
@@ -33,11 +33,11 @@ "clean": "rm -rf ./lib ./tsconfig.tsbuildinfo", | ||
"peerDependencies": { | ||
"tslib": "2.3.0" | ||
"tslib": "^2.3.0" | ||
}, | ||
"dependencies": { | ||
"@liff/consts": "2.21.1", | ||
"@liff/server-api": "2.21.1", | ||
"@liff/use": "2.21.1", | ||
"@liff/util": "2.21.1" | ||
"@liff/consts": "2.21.2", | ||
"@liff/server-api": "2.21.2", | ||
"@liff/use": "2.21.2", | ||
"@liff/util": "2.21.2" | ||
}, | ||
"gitHead": "9af2e0816a5cd5547b99e8cadba3ee274b270a9a" | ||
"gitHead": "b43eee22bc2c90b85e9919820c557cc15fb9712c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6743
50
+ Added@liff/consts@2.21.2(transitive)
+ Added@liff/hooks@2.21.2(transitive)
+ Added@liff/is-in-client@2.21.2(transitive)
+ Added@liff/logger@2.21.2(transitive)
+ Added@liff/server-api@2.21.2(transitive)
+ Added@liff/store@2.21.2(transitive)
+ Added@liff/types@2.21.2(transitive)
+ Added@liff/use@2.21.2(transitive)
+ Added@liff/util@2.21.2(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@liff/consts@2.21.1(transitive)
- Removed@liff/hooks@2.21.1(transitive)
- Removed@liff/is-in-client@2.21.1(transitive)
- Removed@liff/logger@2.21.1(transitive)
- Removed@liff/server-api@2.21.1(transitive)
- Removed@liff/store@2.21.1(transitive)
- Removed@liff/types@2.21.1(transitive)
- Removed@liff/use@2.21.1(transitive)
- Removed@liff/util@2.21.1(transitive)
- Removedtslib@2.3.0(transitive)
Updated@liff/consts@2.21.2
Updated@liff/server-api@2.21.2
Updated@liff/use@2.21.2
Updated@liff/util@2.21.2