@looker/extension-utils 0.1.62 → 0.1.63
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 +9 -0
- package/lib/APIErrorDisplay/APIErrorContent.js +3 -4
- package/lib/APIErrorDisplay/APIErrorContent.js.map +1 -1
- package/lib/APIErrorDisplay/APIErrorDetails.js +1 -1
- package/lib/APIErrorDisplay/APIErrorDetails.js.map +1 -1
- package/lib/APIErrorDisplay/APIErrorDialog.js +1 -1
- package/lib/APIErrorDisplay/APIErrorDialog.js.map +1 -1
- package/lib/APIErrorDisplay/APIErrorDisplay.js +1 -1
- package/lib/APIErrorDisplay/APIErrorDisplay.js.map +1 -1
- package/lib/APIErrorDisplay/APIErrorDocLink.js +1 -1
- package/lib/APIErrorDisplay/APIErrorDocLink.js.map +1 -1
- package/lib/APIErrorDisplay/index.js.map +1 -1
- package/lib/APIErrorDisplay/utils.js +2 -2
- package/lib/APIErrorDisplay/utils.js.map +1 -1
- package/lib/ExtMarkdown.js +1 -1
- package/lib/ExtMarkdown.js.map +1 -1
- package/lib/OAuthForm/index.js.map +1 -1
- package/lib/OAuthForm/src/components/CollapserCard.js +1 -1
- package/lib/OAuthForm/src/components/CollapserCard.js.map +1 -1
- package/lib/OAuthForm/src/components/ConfigHeading.js +1 -1
- package/lib/OAuthForm/src/components/ConfigHeading.js.map +1 -1
- package/lib/OAuthForm/src/components/OAuthForm.js +3 -4
- package/lib/OAuthForm/src/components/OAuthForm.js.map +1 -1
- package/lib/OAuthForm/src/components/index.js.map +1 -1
- package/lib/OAuthForm/src/index.js.map +1 -1
- package/lib/OAuthForm/src/state/index.js.map +1 -1
- package/lib/OAuthForm/src/state/sagas.js.map +1 -1
- package/lib/OAuthForm/src/state/slice.js +3 -3
- package/lib/OAuthForm/src/state/slice.js.map +1 -1
- package/lib/OAuthForm/src/utils.js +4 -4
- package/lib/OAuthForm/src/utils.js.map +1 -1
- package/lib/OAuthScene.js +3 -4
- package/lib/OAuthScene.js.map +1 -1
- package/lib/adaptorUtils.js.map +1 -1
- package/lib/authUtils.js +2 -2
- package/lib/authUtils.js.map +1 -1
- package/lib/browserAdaptor.js +4 -4
- package/lib/browserAdaptor.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorContent.js +2 -2
- package/lib/esm/APIErrorDisplay/APIErrorContent.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDetails.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDialog.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDisplay.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDocLink.js.map +1 -1
- package/lib/esm/APIErrorDisplay/index.js.map +1 -1
- package/lib/esm/APIErrorDisplay/utils.js +2 -2
- package/lib/esm/APIErrorDisplay/utils.js.map +1 -1
- package/lib/esm/ExtMarkdown.js.map +1 -1
- package/lib/esm/OAuthForm/index.js.map +1 -1
- package/lib/esm/OAuthForm/src/components/CollapserCard.js.map +1 -1
- package/lib/esm/OAuthForm/src/components/ConfigHeading.js.map +1 -1
- package/lib/esm/OAuthForm/src/components/OAuthForm.js +2 -2
- package/lib/esm/OAuthForm/src/components/OAuthForm.js.map +1 -1
- package/lib/esm/OAuthForm/src/components/index.js.map +1 -1
- package/lib/esm/OAuthForm/src/index.js.map +1 -1
- package/lib/esm/OAuthForm/src/state/index.js.map +1 -1
- package/lib/esm/OAuthForm/src/state/sagas.js.map +1 -1
- package/lib/esm/OAuthForm/src/state/slice.js +2 -2
- package/lib/esm/OAuthForm/src/state/slice.js.map +1 -1
- package/lib/esm/OAuthForm/src/utils.js +4 -4
- package/lib/esm/OAuthForm/src/utils.js.map +1 -1
- package/lib/esm/OAuthScene.js +2 -2
- package/lib/esm/OAuthScene.js.map +1 -1
- package/lib/esm/adaptorUtils.js.map +1 -1
- package/lib/esm/authUtils.js +2 -2
- package/lib/esm/authUtils.js.map +1 -1
- package/lib/esm/browserAdaptor.js +4 -4
- package/lib/esm/browserAdaptor.js.map +1 -1
- package/lib/esm/extensionAdaptor.js +4 -4
- package/lib/esm/extensionAdaptor.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/extensionAdaptor.js +4 -4
- package/lib/extensionAdaptor.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +6 -6
package/lib/esm/authUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authUtils.js","names":["ApiSettings","OAuthConfigProvider","constructor","settings","oauthClientId","configKey","_defineProperty","getStorage","key","defaultValue","arguments","length","undefined","value","sessionStorage","getItem","location","localStorage","isConfigured","getStoredConfig","storage","config","base_url","looker_url","client_id","redirect_uri","JSON","parse","authIsConfigured","readConfig","_section","url","URL","authServer","concat","protocol","hostname","window","origin","_objectSpread"],"sources":["../../src/authUtils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { IApiSection, IApiSettings } from '@looker/sdk-rtl';\nimport { ApiSettings } from '@looker/sdk-rtl';\n\nexport type StorageLocation = 'session' | 'local';\n\n/** Object returned from storage service */\nexport interface IStorageValue {\n /** Location of the stored object */\n location: StorageLocation;\n /** Stored string representation of the value (usually JSON) */\n value: string;\n}\n\n/**\n * An OAuth Session configuration provider\n */\nexport class OAuthConfigProvider extends ApiSettings {\n oauthClientId: string;\n constructor(\n settings: Partial<IApiSettings>,\n oauthClientId: string,\n private readonly configKey: string\n ) {\n super(settings);\n this.oauthClientId = oauthClientId;\n }\n\n private getStorage(key: string, defaultValue = ''): IStorageValue {\n let value = sessionStorage.getItem(key);\n if (value) {\n return {\n location: 'session',\n value,\n };\n }\n value = localStorage.getItem(key);\n if (value) {\n return {\n location: 'local',\n value,\n };\n }\n return {\n location: 'session',\n value: defaultValue,\n };\n }\n\n isConfigured(): boolean {\n // Required to be true otherwise SDK initialization fails\n return true;\n }\n\n getStoredConfig() {\n const storage = this.getStorage(this.configKey);\n let config = {\n base_url: '',\n looker_url: '',\n client_id: '',\n redirect_uri: '',\n };\n if (storage.value) {\n config = JSON.parse(storage.value);\n }\n return config;\n }\n\n authIsConfigured(): boolean {\n const config = this.getStoredConfig();\n return config.base_url !== '' && config.looker_url !== '';\n }\n\n readConfig(_section?: string): IApiSection {\n // Read server url values from storage\n let config = this.getStoredConfig();\n if (!this.authIsConfigured()) {\n // derive Looker server URL from base_url\n const url = new URL(this.base_url);\n const authServer = `${url.protocol}//${url.hostname}`;\n config = {\n base_url: this.base_url,\n looker_url: `${authServer}:9999`,\n client_id: this.oauthClientId,\n redirect_uri: `${window.location.origin}/oauth`,\n };\n }\n\n const { base_url, looker_url, client_id, redirect_uri } = config;\n /* update base_url to the dynamically determined value for standard transport requests */\n this.base_url = base_url;\n return {\n ...super.readConfig(_section),\n ...{\n base_url,\n looker_url,\n client_id,\n redirect_uri,\n },\n };\n }\n}\n"],"mappings":";;;;;AA0BA,SAASA,WAAW,QAAQ,iBAAiB;AAe7C,OAAO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MAAM,CAACC,QAAQ,KAAK,EAAE,IAAID,MAAM,CAACE,UAAU,KAAK,EAAE;EAC3D;EAEAM,UAAUA,CAACC,QAAiB,EAAe;IAEzC,IAAIT,MAAM,GAAG,IAAI,CAACF,eAAe,CAAC,CAAC;IACnC,IAAI,CAAC,IAAI,CAACS,gBAAgB,CAAC,CAAC,EAAE;MAE5B,IAAMG,GAAG,GAAG,IAAIC,GAAG,CAAC,IAAI,CAACV,QAAQ,CAAC;MAClC,IAAMW,UAAU,MAAAC,MAAA,CAAMH,GAAG,CAACI,QAAQ,QAAAD,MAAA,CAAKH,GAAG,CAACK,QAAQ,CAAE;MACrDf,MAAM,GAAG;QACPC,QAAQ,EAAE,IAAI,CAACA,QAAQ;QACvBC,UAAU,KAAAW,MAAA,CAAKD,UAAU,UAAO;QAChCT,SAAS,EAAE,IAAI,CAACpB,aAAa;QAC7BqB,YAAY,KAAAS,MAAA,CAAKG,MAAM,CAACrB,QAAQ,CAACsB,MAAM;MACzC,CAAC;IACH;IAEA,IAAM;MAAEhB,QAAQ;MAAEC,UAAU;MAAEC,SAAS;MAAEC;IAAa,CAAC,GAAGJ,MAAM;IAEhE,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,OAAAiB,aAAA,CAAAA,aAAA,KACK,KAAK,CAACV,UAAU,CAACC,QAAQ,CAAC,GAC1B;MACDR,QAAQ;MACRC,UAAU;MACVC,SAAS;MACTC;IACF,CAAC;EAEL;AACF"}
|
|
1
|
+
{"version":3,"file":"authUtils.js","names":["ApiSettings","OAuthConfigProvider","constructor","settings","oauthClientId","configKey","_defineProperty","getStorage","key","defaultValue","arguments","length","undefined","value","sessionStorage","getItem","location","localStorage","isConfigured","getStoredConfig","storage","config","base_url","looker_url","client_id","redirect_uri","JSON","parse","authIsConfigured","readConfig","_section","url","URL","authServer","concat","protocol","hostname","window","origin","_objectSpread"],"sources":["../../src/authUtils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { IApiSection, IApiSettings } from '@looker/sdk-rtl';\nimport { ApiSettings } from '@looker/sdk-rtl';\n\nexport type StorageLocation = 'session' | 'local';\n\n/** Object returned from storage service */\nexport interface IStorageValue {\n /** Location of the stored object */\n location: StorageLocation;\n /** Stored string representation of the value (usually JSON) */\n value: string;\n}\n\n/**\n * An OAuth Session configuration provider\n */\nexport class OAuthConfigProvider extends ApiSettings {\n oauthClientId: string;\n constructor(\n settings: Partial<IApiSettings>,\n oauthClientId: string,\n private readonly configKey: string\n ) {\n super(settings);\n this.oauthClientId = oauthClientId;\n }\n\n private getStorage(key: string, defaultValue = ''): IStorageValue {\n let value = sessionStorage.getItem(key);\n if (value) {\n return {\n location: 'session',\n value,\n };\n }\n value = localStorage.getItem(key);\n if (value) {\n return {\n location: 'local',\n value,\n };\n }\n return {\n location: 'session',\n value: defaultValue,\n };\n }\n\n isConfigured(): boolean {\n // Required to be true otherwise SDK initialization fails\n return true;\n }\n\n getStoredConfig() {\n const storage = this.getStorage(this.configKey);\n let config = {\n base_url: '',\n looker_url: '',\n client_id: '',\n redirect_uri: '',\n };\n if (storage.value) {\n config = JSON.parse(storage.value);\n }\n return config;\n }\n\n authIsConfigured(): boolean {\n const config = this.getStoredConfig();\n return config.base_url !== '' && config.looker_url !== '';\n }\n\n readConfig(_section?: string): IApiSection {\n // Read server url values from storage\n let config = this.getStoredConfig();\n if (!this.authIsConfigured()) {\n // derive Looker server URL from base_url\n const url = new URL(this.base_url);\n const authServer = `${url.protocol}//${url.hostname}`;\n config = {\n base_url: this.base_url,\n looker_url: `${authServer}:9999`,\n client_id: this.oauthClientId,\n redirect_uri: `${window.location.origin}/oauth`,\n };\n }\n\n const { base_url, looker_url, client_id, redirect_uri } = config;\n /* update base_url to the dynamically determined value for standard transport requests */\n this.base_url = base_url;\n return {\n ...super.readConfig(_section),\n ...{\n base_url,\n looker_url,\n client_id,\n redirect_uri,\n },\n };\n }\n}\n"],"mappings":";;;;;AA0BA,SAASA,WAAW,QAAQ,iBAAiB;AAe7C,OAAO,MAAMC,mBAAmB,SAASD,WAAW,CAAC;EAEnDE,WAAWA,CACTC,QAA+B,EAC/BC,aAAqB,EACJC,SAAiB,EAClC;IACA,KAAK,CAACF,QAAQ,CAAC;IAAC,KAFCE,SAAiB,GAAjBA,SAAiB;IAAAC,eAAA;IAGlC,IAAI,CAACF,aAAa,GAAGA,aAAa;EACpC;EAEQG,UAAUA,CAACC,GAAW,EAAoC;IAAA,IAAlCC,YAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAC/C,IAAIG,KAAK,GAAGC,cAAc,CAACC,OAAO,CAACP,GAAG,CAAC;IACvC,IAAIK,KAAK,EAAE;MACT,OAAO;QACLG,QAAQ,EAAE,SAAS;QACnBH;MACF,CAAC;IACH;IACAA,KAAK,GAAGI,YAAY,CAACF,OAAO,CAACP,GAAG,CAAC;IACjC,IAAIK,KAAK,EAAE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AACrB,QAAQ,CAACsB,MAAM;MACzC,CAAC;IACH;IAEA,IAAM;MAAEhB,QAAQ;MAAEC,UAAU;MAAEC,SAAS;MAAEC;IAAa,CAAC,GAAGJ,MAAM;IAEhE,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,OAAAiB,aAAA,CAAAA,aAAA,KACK,KAAK,CAACV,UAAU,CAACC,QAAQ,CAAC,GAC1B;MACDR,QAAQ;MACRC,UAAU;MACVC,SAAS;MACTC;IACF,CAAC;EAEL;AACF","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function _defineProperty(
|
|
2
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
function asyncGeneratorStep(
|
|
5
|
-
function _asyncToGenerator(
|
|
4
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
5
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
6
6
|
import { getThemeOverrides, hostedInternally } from './adaptorUtils';
|
|
7
7
|
export class BrowserAuthAdaptor {
|
|
8
8
|
constructor(sdk) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserAdaptor.js","names":["getThemeOverrides","hostedInternally","BrowserAuthAdaptor","constructor","sdk","login","_this","_asyncToGenerator","token","settings","authSession","authIsConfigured","BrowserAdaptor","_defineProperty","hostname","location","_themeOverrides","copyToClipboard","navigator","clipboard","writeText","href","isExtension","localStorageGetItem","key","localStorage","getItem","localStorageSetItem","value","setItem","localStorageRemoveItem","removeItem","themeOverrides","openBrowserWindow","url","target","window","open","logError","_error","_componentStack"],"sources":["../../src/browserAdaptor.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { IAPIMethods } from '@looker/sdk-rtl';\nimport type {\n IAuthAdaptor,\n IEnvironmentAdaptor,\n ThemeOverrides,\n} from './adaptorUtils';\nimport { getThemeOverrides, hostedInternally } from './adaptorUtils';\nimport type { OAuthConfigProvider } from './authUtils';\n\nexport class BrowserAuthAdaptor implements IAuthAdaptor {\n constructor(public readonly sdk: IAPIMethods) {}\n\n async login() {\n let token;\n const settings = this.sdk.authSession.settings as OAuthConfigProvider;\n if (settings.authIsConfigured()) {\n token = await this.sdk.authSession.login();\n }\n return !!token;\n }\n}\n\n/**\n * An adaptor class for interacting with browser APIs when not running in an extension\n */\nexport class BrowserAdaptor\n extends BrowserAuthAdaptor\n implements IEnvironmentAdaptor\n{\n private _themeOverrides: ThemeOverrides;\n\n constructor(sdk: IAPIMethods) {\n super(sdk);\n const { hostname } = location;\n this._themeOverrides = getThemeOverrides(hostedInternally(hostname));\n }\n\n async copyToClipboard() {\n await navigator.clipboard.writeText(location.href);\n }\n\n isExtension() {\n return false;\n }\n\n async localStorageGetItem(key: string) {\n return localStorage.getItem(key);\n }\n\n async localStorageSetItem(key: string, value: string) {\n await localStorage.setItem(key, value);\n }\n\n async localStorageRemoveItem(key: string) {\n await localStorage.removeItem(key);\n }\n\n themeOverrides() {\n return this._themeOverrides;\n }\n\n openBrowserWindow(url: string, target?: string) {\n window.open(url, target);\n }\n\n logError(_error: Error, _componentStack: string): void {\n // noop - error logging for standalone applications TBD\n }\n}\n"],"mappings":";;;;;AAgCA,SAASA,iBAAiB,EAAEC,gBAAgB,QAAQ,gBAAgB;AAGpE,OAAO,MAAMC,kBAAkB,CAAyB;EACtDC,WAAWA,CAAiBC,GAAgB,EAAE;IAAA,KAAlBA,GAAgB,GAAhBA,GAAgB;EAAG;EAEzCC,KAAKA,CAAA,EAAG;IAAA,IAAAC,KAAA;IAAA,OAAAC,iBAAA;MACZ,IAAIC,KAAK;MACT,IAAMC,QAAQ,GAAGH,KAAI,CAACF,GAAG,CAACM,WAAW,CAACD,QAA+B;MACrE,IAAIA,QAAQ,CAACE,gBAAgB,CAAC,CAAC,EAAE;QAC/BH,KAAK,SAASF,KAAI,CAACF,GAAG,CAACM,WAAW,CAACL,KAAK,CAAC,CAAC;MAC5C;MACA,OAAO,CAAC,CAACG,KAAK;IAAC;EACjB;AACF;AAKA,OAAO,MAAMI,cAAc,SACjBV,kBAAkB,CAE5B;EAGEC,WAAWA,CAACC,GAAgB,EAAE;IAC5B,KAAK,CAACA,GAAG,CAAC;IAACS,eAAA;IACX,IAAM;MAAEC;IAAS,CAAC,GAAGC,QAAQ;IAC7B,IAAI,CAACC,eAAe,GAAGhB,iBAAiB,CAACC,gBAAgB,CAACa,QAAQ,CAAC,CAAC;EACtE;EAEMG,eAAeA,CAAA,EAAG;IAAA,OAAAV,iBAAA;MACtB,MAAMW,SAAS,CAACC,SAAS,CAACC,SAAS,CAACL,QAAQ,CAACM,IAAI,CAAC;IAAC;EACrD;EAEAC,WAAWA,CAAA,EAAG;IACZ,OAAO,KAAK;EACd;EAEMC,mBAAmBA,CAACC,GAAW,EAAE;IAAA,OAAAjB,iBAAA;MACrC,OAAOkB,YAAY,CAACC,OAAO,CAACF,GAAG,CAAC;IAAC;EACnC;EAEMG,mBAAmBA,CAACH,GAAW,EAAEI,KAAa,EAAE;IAAA,OAAArB,iBAAA;MACpD,MAAMkB,YAAY,CAACI,OAAO,CAACL,GAAG,EAAEI,KAAK,CAAC;IAAC;EACzC;EAEME,sBAAsBA,CAACN,GAAW,EAAE;IAAA,OAAAjB,iBAAA;MACxC,MAAMkB,YAAY,CAACM,UAAU,CAACP,GAAG,CAAC;IAAC;EACrC;EAEAQ,cAAcA,CAAA,EAAG;IACf,OAAO,IAAI,CAAChB,eAAe;EAC7B;EAEAiB,iBAAiBA,CAACC,GAAW,EAAEC,MAAe,EAAE;IAC9CC,MAAM,CAACC,IAAI,CAACH,GAAG,EAAEC,MAAM,CAAC;EAC1B;EAEAG,QAAQA,CAACC,MAAa,EAAEC,eAAuB,EAAQ,CAEvD;AACF"}
|
|
1
|
+
{"version":3,"file":"browserAdaptor.js","names":["getThemeOverrides","hostedInternally","BrowserAuthAdaptor","constructor","sdk","login","_this","_asyncToGenerator","token","settings","authSession","authIsConfigured","BrowserAdaptor","_defineProperty","hostname","location","_themeOverrides","copyToClipboard","navigator","clipboard","writeText","href","isExtension","localStorageGetItem","key","localStorage","getItem","localStorageSetItem","value","setItem","localStorageRemoveItem","removeItem","themeOverrides","openBrowserWindow","url","target","window","open","logError","_error","_componentStack"],"sources":["../../src/browserAdaptor.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { IAPIMethods } from '@looker/sdk-rtl';\nimport type {\n IAuthAdaptor,\n IEnvironmentAdaptor,\n ThemeOverrides,\n} from './adaptorUtils';\nimport { getThemeOverrides, hostedInternally } from './adaptorUtils';\nimport type { OAuthConfigProvider } from './authUtils';\n\nexport class BrowserAuthAdaptor implements IAuthAdaptor {\n constructor(public readonly sdk: IAPIMethods) {}\n\n async login() {\n let token;\n const settings = this.sdk.authSession.settings as OAuthConfigProvider;\n if (settings.authIsConfigured()) {\n token = await this.sdk.authSession.login();\n }\n return !!token;\n }\n}\n\n/**\n * An adaptor class for interacting with browser APIs when not running in an extension\n */\nexport class BrowserAdaptor\n extends BrowserAuthAdaptor\n implements IEnvironmentAdaptor\n{\n private _themeOverrides: ThemeOverrides;\n\n constructor(sdk: IAPIMethods) {\n super(sdk);\n const { hostname } = location;\n this._themeOverrides = getThemeOverrides(hostedInternally(hostname));\n }\n\n async copyToClipboard() {\n await navigator.clipboard.writeText(location.href);\n }\n\n isExtension() {\n return false;\n }\n\n async localStorageGetItem(key: string) {\n return localStorage.getItem(key);\n }\n\n async localStorageSetItem(key: string, value: string) {\n await localStorage.setItem(key, value);\n }\n\n async localStorageRemoveItem(key: string) {\n await localStorage.removeItem(key);\n }\n\n themeOverrides() {\n return this._themeOverrides;\n }\n\n openBrowserWindow(url: string, target?: string) {\n window.open(url, target);\n }\n\n logError(_error: Error, _componentStack: string): void {\n // noop - error logging for standalone applications TBD\n }\n}\n"],"mappings":";;;;;AAgCA,SAASA,iBAAiB,EAAEC,gBAAgB,QAAQ,gBAAgB;AAGpE,OAAO,MAAMC,kBAAkB,CAAyB;EACtDC,WAAWA,CAAiBC,GAAgB,EAAE;IAAA,KAAlBA,GAAgB,GAAhBA,GAAgB;EAAG;EAEzCC,KAAKA,CAAA,EAAG;IAAA,IAAAC,KAAA;IAAA,OAAAC,iBAAA;MACZ,IAAIC,KAAK;MACT,IAAMC,QAAQ,GAAGH,KAAI,CAACF,GAAG,CAACM,WAAW,CAACD,QAA+B;MACrE,IAAIA,QAAQ,CAACE,gBAAgB,CAAC,CAAC,EAAE;QAC/BH,KAAK,SAASF,KAAI,CAACF,GAAG,CAACM,WAAW,CAACL,KAAK,CAAC,CAAC;MAC5C;MACA,OAAO,CAAC,CAACG,KAAK;IAAC;EACjB;AACF;AAKA,OAAO,MAAMI,cAAc,SACjBV,kBAAkB,CAE5B;EAGEC,WAAWA,CAACC,GAAgB,EAAE;IAC5B,KAAK,CAACA,GAAG,CAAC;IAACS,eAAA;IACX,IAAM;MAAEC;IAAS,CAAC,GAAGC,QAAQ;IAC7B,IAAI,CAACC,eAAe,GAAGhB,iBAAiB,CAACC,gBAAgB,CAACa,QAAQ,CAAC,CAAC;EACtE;EAEMG,eAAeA,CAAA,EAAG;IAAA,OAAAV,iBAAA;MACtB,MAAMW,SAAS,CAACC,SAAS,CAACC,SAAS,CAACL,QAAQ,CAACM,IAAI,CAAC;IAAC;EACrD;EAEAC,WAAWA,CAAA,EAAG;IACZ,OAAO,KAAK;EACd;EAEMC,mBAAmBA,CAACC,GAAW,EAAE;IAAA,OAAAjB,iBAAA;MACrC,OAAOkB,YAAY,CAACC,OAAO,CAACF,GAAG,CAAC;IAAC;EACnC;EAEMG,mBAAmBA,CAACH,GAAW,EAAEI,KAAa,EAAE;IAAA,OAAArB,iBAAA;MACpD,MAAMkB,YAAY,CAACI,OAAO,CAACL,GAAG,EAAEI,KAAK,CAAC;IAAC;EACzC;EAEME,sBAAsBA,CAACN,GAAW,EAAE;IAAA,OAAAjB,iBAAA;MACxC,MAAMkB,YAAY,CAACM,UAAU,CAACP,GAAG,CAAC;IAAC;EACrC;EAEAQ,cAAcA,CAAA,EAAG;IACf,OAAO,IAAI,CAAChB,eAAe;EAC7B;EAEAiB,iBAAiBA,CAACC,GAAW,EAAEC,MAAe,EAAE;IAC9CC,MAAM,CAACC,IAAI,CAACH,GAAG,EAAEC,MAAM,CAAC;EAC1B;EAEAG,QAAQA,CAACC,MAAa,EAAEC,eAAuB,EAAQ,CAEvD;AACF","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function _defineProperty(
|
|
2
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
function asyncGeneratorStep(
|
|
5
|
-
function _asyncToGenerator(
|
|
4
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
5
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
6
6
|
import { getThemeOverrides } from './adaptorUtils';
|
|
7
7
|
export class ExtensionAuthAdaptor {
|
|
8
8
|
constructor(sdk) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionAdaptor.js","names":["getThemeOverrides","ExtensionAuthAdaptor","constructor","sdk","login","_asyncToGenerator","ExtensionAdaptor","extensionSdk","_defineProperty","_themeOverrides","lookerHostData","hostType","copyToClipboard","location","_this","hostOrigin","extensionId","pathname","search","url","concat","clipboardWrite","isExtension","localStorageGetItem","key","_this2","localStorageSetItem","value","_this3","localStorageRemoveItem","_this4","themeOverrides","openBrowserWindow","target","logError","error","componentStack","message"],"sources":["../../src/extensionAdaptor.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { ExtensionSDK } from '@looker/extension-sdk';\nimport type { IAPIMethods } from '@looker/sdk-rtl';\nimport type {\n IAuthAdaptor,\n IEnvironmentAdaptor,\n ThemeOverrides,\n} from './adaptorUtils';\nimport { getThemeOverrides } from './adaptorUtils';\n\nexport class ExtensionAuthAdaptor implements IAuthAdaptor {\n constructor(public readonly sdk: IAPIMethods) {}\n\n async login() {\n // Noop for extensions. Authentication is not required in an extension context\n return true;\n }\n}\n\n/**\n * An adaptor class for interacting with browser APIs when running as an extension\n */\nexport class ExtensionAdaptor\n extends ExtensionAuthAdaptor\n implements IEnvironmentAdaptor\n{\n _themeOverrides: ThemeOverrides;\n\n constructor(public extensionSdk: ExtensionSDK, sdk: IAPIMethods) {\n super(sdk);\n this._themeOverrides = getThemeOverrides(\n (this.extensionSdk.lookerHostData || { hostType: 'standard' })\n .hostType === 'standard'\n );\n }\n\n async copyToClipboard(location?: { pathname: string; search: string }) {\n const { lookerHostData } = this.extensionSdk;\n if (lookerHostData && location) {\n const { hostOrigin, extensionId } = lookerHostData;\n const { pathname, search } = location;\n const url = `${hostOrigin}/extensions/${extensionId}${pathname}${search}`;\n await this.extensionSdk.clipboardWrite(url);\n }\n }\n\n isExtension() {\n return true;\n }\n\n async localStorageGetItem(key: string) {\n return await this.extensionSdk.localStorageGetItem(key);\n }\n\n async localStorageSetItem(key: string, value: string) {\n await this.extensionSdk.localStorageSetItem(key, value);\n }\n\n async localStorageRemoveItem(key: string) {\n await this.extensionSdk.localStorageRemoveItem(key);\n }\n\n themeOverrides(): ThemeOverrides {\n return this._themeOverrides;\n }\n\n openBrowserWindow(url: string, target?: string) {\n this.extensionSdk.openBrowserWindow(url, target);\n }\n\n logError(error: Error, componentStack: string): void {\n this.extensionSdk.error({\n error: error,\n message: componentStack,\n } as ErrorEvent);\n }\n}\n"],"mappings":";;;;;AAiCA,SAASA,iBAAiB,QAAQ,gBAAgB;AAElD,OAAO,MAAMC,oBAAoB,CAAyB;EACxDC,WAAWA,CAAiBC,GAAgB,EAAE;IAAA,KAAlBA,GAAgB,GAAhBA,GAAgB;EAAG;EAEzCC,KAAKA,CAAA,EAAG;IAAA,OAAAC,iBAAA;MAEZ,OAAO,IAAI;IAAC;EACd;AACF;AAKA,OAAO,MAAMC,gBAAgB,SACnBL,oBAAoB,CAE9B;EAGEC,WAAWA,CAAQK,YAA0B,EAAEJ,GAAgB,EAAE;IAC/D,KAAK,CAACA,GAAG,CAAC;IAAC,KADMI,YAA0B,GAA1BA,YAA0B;IAAAC,eAAA;IAE3C,IAAI,CAACC,eAAe,GAAGT,iBAAiB,CACtC,CAAC,IAAI,CAACO,YAAY,CAACG,cAAc,IAAI;MAAEC,QAAQ,EAAE;IAAW,CAAC,EAC1DA,QAAQ,KAAK,UAClB,CAAC;EACH;EAEMC,eAAeA,CAACC,QAA+C,EAAE;IAAA,IAAAC,KAAA;IAAA,OAAAT,iBAAA;MACrE,IAAM;QAAEK;MAAe,CAAC,GAAGI,KAAI,CAACP,YAAY;MAC5C,IAAIG,cAAc,IAAIG,QAAQ,EAAE;QAC9B,IAAM;UAAEE,UAAU;UAAEC;QAAY,CAAC,GAAGN,cAAc;QAClD,IAAM;UAAEO,QAAQ;UAAEC;QAAO,CAAC,GAAGL,QAAQ;QACrC,IAAMM,GAAG,MAAAC,MAAA,CAAML,UAAU,kBAAAK,MAAA,CAAeJ,WAAW,EAAAI,MAAA,CAAGH,QAAQ,EAAAG,MAAA,CAAGF,MAAM,CAAE;QACzE,MAAMJ,KAAI,CAACP,YAAY,CAACc,cAAc,CAACF,GAAG,CAAC;MAC7C;IAAC;EACH;EAEAG,WAAWA,CAAA,EAAG;IACZ,OAAO,IAAI;EACb;EAEMC,mBAAmBA,CAACC,GAAW,EAAE;IAAA,IAAAC,MAAA;IAAA,OAAApB,iBAAA;MACrC,aAAaoB,MAAI,CAAClB,YAAY,CAACgB,mBAAmB,CAACC,GAAG,CAAC;IAAC;EAC1D;EAEME,mBAAmBA,CAACF,GAAW,EAAEG,KAAa,EAAE;IAAA,IAAAC,MAAA;IAAA,OAAAvB,iBAAA;MACpD,MAAMuB,MAAI,CAACrB,YAAY,CAACmB,mBAAmB,CAACF,GAAG,EAAEG,KAAK,CAAC;IAAC;EAC1D;EAEME,sBAAsBA,CAACL,GAAW,EAAE;IAAA,IAAAM,MAAA;IAAA,OAAAzB,iBAAA;MACxC,MAAMyB,MAAI,CAACvB,YAAY,CAACsB,sBAAsB,CAACL,GAAG,CAAC;IAAC;EACtD;EAEAO,cAAcA,CAAA,EAAmB;IAC/B,OAAO,IAAI,CAACtB,eAAe;EAC7B;EAEAuB,iBAAiBA,CAACb,GAAW,EAAEc,MAAe,EAAE;IAC9C,IAAI,CAAC1B,YAAY,CAACyB,iBAAiB,CAACb,GAAG,EAAEc,MAAM,CAAC;EAClD;EAEAC,QAAQA,CAACC,KAAY,EAAEC,cAAsB,EAAQ;IACnD,IAAI,CAAC7B,YAAY,CAAC4B,KAAK,CAAC;MACtBA,KAAK,EAAEA,KAAK;MACZE,OAAO,EAAED;IACX,CAAe,CAAC;EAClB;AACF"}
|
|
1
|
+
{"version":3,"file":"extensionAdaptor.js","names":["getThemeOverrides","ExtensionAuthAdaptor","constructor","sdk","login","_asyncToGenerator","ExtensionAdaptor","extensionSdk","_defineProperty","_themeOverrides","lookerHostData","hostType","copyToClipboard","location","_this","hostOrigin","extensionId","pathname","search","url","concat","clipboardWrite","isExtension","localStorageGetItem","key","_this2","localStorageSetItem","value","_this3","localStorageRemoveItem","_this4","themeOverrides","openBrowserWindow","target","logError","error","componentStack","message"],"sources":["../../src/extensionAdaptor.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { ExtensionSDK } from '@looker/extension-sdk';\nimport type { IAPIMethods } from '@looker/sdk-rtl';\nimport type {\n IAuthAdaptor,\n IEnvironmentAdaptor,\n ThemeOverrides,\n} from './adaptorUtils';\nimport { getThemeOverrides } from './adaptorUtils';\n\nexport class ExtensionAuthAdaptor implements IAuthAdaptor {\n constructor(public readonly sdk: IAPIMethods) {}\n\n async login() {\n // Noop for extensions. Authentication is not required in an extension context\n return true;\n }\n}\n\n/**\n * An adaptor class for interacting with browser APIs when running as an extension\n */\nexport class ExtensionAdaptor\n extends ExtensionAuthAdaptor\n implements IEnvironmentAdaptor\n{\n _themeOverrides: ThemeOverrides;\n\n constructor(public extensionSdk: ExtensionSDK, sdk: IAPIMethods) {\n super(sdk);\n this._themeOverrides = getThemeOverrides(\n (this.extensionSdk.lookerHostData || { hostType: 'standard' })\n .hostType === 'standard'\n );\n }\n\n async copyToClipboard(location?: { pathname: string; search: string }) {\n const { lookerHostData } = this.extensionSdk;\n if (lookerHostData && location) {\n const { hostOrigin, extensionId } = lookerHostData;\n const { pathname, search } = location;\n const url = `${hostOrigin}/extensions/${extensionId}${pathname}${search}`;\n await this.extensionSdk.clipboardWrite(url);\n }\n }\n\n isExtension() {\n return true;\n }\n\n async localStorageGetItem(key: string) {\n return await this.extensionSdk.localStorageGetItem(key);\n }\n\n async localStorageSetItem(key: string, value: string) {\n await this.extensionSdk.localStorageSetItem(key, value);\n }\n\n async localStorageRemoveItem(key: string) {\n await this.extensionSdk.localStorageRemoveItem(key);\n }\n\n themeOverrides(): ThemeOverrides {\n return this._themeOverrides;\n }\n\n openBrowserWindow(url: string, target?: string) {\n this.extensionSdk.openBrowserWindow(url, target);\n }\n\n logError(error: Error, componentStack: string): void {\n this.extensionSdk.error({\n error: error,\n message: componentStack,\n } as ErrorEvent);\n }\n}\n"],"mappings":";;;;;AAiCA,SAASA,iBAAiB,QAAQ,gBAAgB;AAElD,OAAO,MAAMC,oBAAoB,CAAyB;EACxDC,WAAWA,CAAiBC,GAAgB,EAAE;IAAA,KAAlBA,GAAgB,GAAhBA,GAAgB;EAAG;EAEzCC,KAAKA,CAAA,EAAG;IAAA,OAAAC,iBAAA;MAEZ,OAAO,IAAI;IAAC;EACd;AACF;AAKA,OAAO,MAAMC,gBAAgB,SACnBL,oBAAoB,CAE9B;EAGEC,WAAWA,CAAQK,YAA0B,EAAEJ,GAAgB,EAAE;IAC/D,KAAK,CAACA,GAAG,CAAC;IAAC,KADMI,YAA0B,GAA1BA,YAA0B;IAAAC,eAAA;IAE3C,IAAI,CAACC,eAAe,GAAGT,iBAAiB,CACtC,CAAC,IAAI,CAACO,YAAY,CAACG,cAAc,IAAI;MAAEC,QA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AI,CAAC1B,YAAY,CAACyB,iBAAiB,CAACb,GAAG,EAAEc,MAAM,CAAC;EAClD;EAEAC,QAAQA,CAACC,KAAY,EAAEC,cAAsB,EAAQ;IACnD,IAAI,CAAC7B,YAAY,CAAC4B,KAAK,CAAC;MACtBA,KAAK,EAAEA,KAAK;MACZE,OAAO,EAAED;IACX,CAAe,CAAC;EAClB;AACF","ignoreList":[]}
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport * from './adaptorUtils';\nexport * from './APIErrorDisplay';\nexport * from './browserAdaptor';\nexport * from './extensionAdaptor';\nexport * from './ExtMarkdown';\nexport * from './authUtils';\nexport * from './OAuthScene';\nexport * from './OAuthForm';\n"],"mappings":"AA0BA,cAAc,gBAAgB;AAC9B,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,eAAe;AAC7B,cAAc,aAAa;AAC3B,cAAc,cAAc;AAC5B,cAAc,aAAa"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport * from './adaptorUtils';\nexport * from './APIErrorDisplay';\nexport * from './browserAdaptor';\nexport * from './extensionAdaptor';\nexport * from './ExtMarkdown';\nexport * from './authUtils';\nexport * from './OAuthScene';\nexport * from './OAuthForm';\n"],"mappings":"AA0BA,cAAc,gBAAgB;AAC9B,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,eAAe;AAC7B,cAAc,aAAa;AAC3B,cAAc,cAAc;AAC5B,cAAc,aAAa","ignoreList":[]}
|
package/lib/extensionAdaptor.js
CHANGED
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ExtensionAuthAdaptor = exports.ExtensionAdaptor = void 0;
|
|
7
7
|
var _adaptorUtils = require("./adaptorUtils");
|
|
8
|
-
function _defineProperty(
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
10
10
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
-
function asyncGeneratorStep(
|
|
12
|
-
function _asyncToGenerator(
|
|
11
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
12
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
13
13
|
class ExtensionAuthAdaptor {
|
|
14
14
|
constructor(sdk) {
|
|
15
15
|
this.sdk = sdk;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionAdaptor.js","names":["_adaptorUtils","require","_defineProperty","
|
|
1
|
+
{"version":3,"file":"extensionAdaptor.js","names":["_adaptorUtils","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","asyncGeneratorStep","n","o","a","c","u","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","ExtensionAuthAdaptor","constructor","sdk","login","exports","ExtensionAdaptor","extensionSdk","_themeOverrides","getThemeOverrides","lookerHostData","hostType","copyToClipboard","location","_this","hostOrigin","extensionId","pathname","search","url","concat","clipboardWrite","isExtension","localStorageGetItem","key","_this2","localStorageSetItem","_this3","localStorageRemoveItem","_this4","themeOverrides","openBrowserWindow","target","logError","error","componentStack","message"],"sources":["../src/extensionAdaptor.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { ExtensionSDK } from '@looker/extension-sdk';\nimport type { IAPIMethods } from '@looker/sdk-rtl';\nimport type {\n IAuthAdaptor,\n IEnvironmentAdaptor,\n ThemeOverrides,\n} from './adaptorUtils';\nimport { getThemeOverrides } from './adaptorUtils';\n\nexport class ExtensionAuthAdaptor implements IAuthAdaptor {\n constructor(public readonly sdk: IAPIMethods) {}\n\n async login() {\n // Noop for extensions. Authentication is not required in an extension context\n return true;\n }\n}\n\n/**\n * An adaptor class for interacting with browser APIs when running as an extension\n */\nexport class ExtensionAdaptor\n extends ExtensionAuthAdaptor\n implements IEnvironmentAdaptor\n{\n _themeOverrides: ThemeOverrides;\n\n constructor(public extensionSdk: ExtensionSDK, sdk: IAPIMethods) {\n super(sdk);\n this._themeOverrides = getThemeOverrides(\n (this.extensionSdk.lookerHostData || { hostType: 'standard' })\n .hostType === 'standard'\n );\n }\n\n async copyToClipboard(location?: { pathname: string; search: string }) {\n const { lookerHostData } = this.extensionSdk;\n if (lookerHostData && location) {\n const { hostOrigin, extensionId } = lookerHostData;\n const { pathname, search } = location;\n const url = `${hostOrigin}/extensions/${extensionId}${pathname}${search}`;\n await this.extensionSdk.clipboardWrite(url);\n }\n }\n\n isExtension() {\n return true;\n }\n\n async localStorageGetItem(key: string) {\n return await this.extensionSdk.localStorageGetItem(key);\n }\n\n async localStorageSetItem(key: string, value: string) {\n await this.extensionSdk.localStorageSetItem(key, value);\n }\n\n async localStorageRemoveItem(key: string) {\n await this.extensionSdk.localStorageRemoveItem(key);\n }\n\n themeOverrides(): ThemeOverrides {\n return this._themeOverrides;\n }\n\n openBrowserWindow(url: string, target?: string) {\n this.extensionSdk.openBrowserWindow(url, target);\n }\n\n logError(error: Error, componentStack: string): void {\n this.extensionSdk.error({\n error: error,\n message: componentStack,\n } as ErrorEvent);\n }\n}\n"],"mappings":";;;;;;AAiCA,IAAAA,aAAA,GAAAC,OAAA;AAAmD,SAAAC,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CA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,aAAa6B,MAAI,CAAClB,YAAY,CAACgB,mBAAmB,CAACC,GAAG,CAAC;IAAC;EAC1D;EAEME,mBAAmBA,CAACF,GAAW,EAAElD,KAAa,EAAE;IAAA,IAAAqD,MAAA;IAAA,OAAA/B,iBAAA;MACpD,MAAM+B,MAAI,CAACpB,YAAY,CAACmB,mBAAmB,CAACF,GAAG,EAAElD,KAAK,CAAC;IAAC;EAC1D;EAEMsD,sBAAsBA,CAACJ,GAAW,EAAE;IAAA,IAAAK,MAAA;IAAA,OAAAjC,iBAAA;MACxC,MAAMiC,MAAI,CAACtB,YAAY,CAACqB,sBAAsB,CAACJ,GAAG,CAAC;IAAC;EACtD;EAEAM,cAAcA,CAAA,EAAmB;IAC/B,OAAO,IAAI,CAACtB,eAAe;EAC7B;EAEAuB,iBAAiBA,CAACZ,GAAW,EAAEa,MAAe,EAAE;IAC9C,IAAI,CAACzB,YAAY,CAACwB,iBAAiB,CAACZ,GAAG,EAAEa,MAAM,CAAC;EAClD;EAEAC,QAAQA,CAACC,KAAY,EAAEC,cAAsB,EAAQ;IACnD,IAAI,CAAC5B,YAAY,CAAC2B,KAAK,CAAC;MACtBA,KAAK,EAAEA,KAAK;MACZE,OAAO,EAAED;IACX,CAAe,CAAC;EAClB;AACF;AAAC9B,OAAA,CAAAC,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_adaptorUtils","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_APIErrorDisplay","_browserAdaptor","_extensionAdaptor","_ExtMarkdown","_authUtils","_OAuthScene","_OAuthForm"],"sources":["../src/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport * from './adaptorUtils';\nexport * from './APIErrorDisplay';\nexport * from './browserAdaptor';\nexport * from './extensionAdaptor';\nexport * from './ExtMarkdown';\nexport * from './authUtils';\nexport * from './OAuthScene';\nexport * from './OAuthForm';\n"],"mappings":";;;;;AA0BA,IAAAA,aAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,aAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,aAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,aAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,gBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,gBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,gBAAA,CAA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AAA;AAAA;AACA,IAAAS,UAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,UAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAS,UAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAK,UAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,WAAA,GAAAd,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAY,WAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAU,WAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAM,WAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,UAAA,GAAAf,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAa,UAAA,EAAAZ,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAW,UAAA,CAAAX,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAO,UAAA,CAAAX,GAAA;IAAA;EAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_adaptorUtils","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_APIErrorDisplay","_browserAdaptor","_extensionAdaptor","_ExtMarkdown","_authUtils","_OAuthScene","_OAuthForm"],"sources":["../src/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport * from './adaptorUtils';\nexport * from './APIErrorDisplay';\nexport * from './browserAdaptor';\nexport * from './extensionAdaptor';\nexport * from './ExtMarkdown';\nexport * from './authUtils';\nexport * from './OAuthScene';\nexport * from './OAuthForm';\n"],"mappings":";;;;;AA0BA,IAAAA,aAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,aAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,aAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,aAAA,CAAAK,GAAA;IAAA;EAAA;AAA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C,GAAA,WAAAA,IAAA;MAAA,OAAAO,UAAA,CAAAX,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@looker/extension-utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"description": "Looker Extension Utilities",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"watch": "yarn lerna exec --scope @looker/extension-utils --stream 'BABEL_ENV=build babel src --root-mode upward --out-dir lib/esm --source-maps --extensions .ts,.tsx --no-comments --watch'"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@looker/code-editor": "0.1.
|
|
28
|
+
"@looker/code-editor": "0.1.53",
|
|
29
29
|
"@looker/components": "^5.0.3",
|
|
30
|
-
"@looker/extension-sdk": "26.
|
|
31
|
-
"@looker/extension-sdk-react": "26.
|
|
30
|
+
"@looker/extension-sdk": "26.8.0",
|
|
31
|
+
"@looker/extension-sdk-react": "26.8.0",
|
|
32
32
|
"@looker/redux": "^0.0.1",
|
|
33
|
-
"@looker/sdk": "26.
|
|
33
|
+
"@looker/sdk": "26.8.0",
|
|
34
34
|
"@looker/sdk-rtl": "21.6.5",
|
|
35
35
|
"@reduxjs/toolkit": "^1.9.3",
|
|
36
36
|
"@styled-icons/material": "^10.47.0",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"webpack-cli": "5.0.1",
|
|
55
55
|
"webpack-merge": "^5.7.3"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "2eef678cbe8af38ea6070b08e80895df7c5f5ee0"
|
|
58
58
|
}
|