@looker/sdk-node 24.14.0 → 24.16.2

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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_testUtils","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../src/testUtils/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 './testUtils';\n"],"mappings":";;;;;AA0BA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.rootFile = exports.getRootPath = exports.TestConfig = void 0;
7
- var fs = _interopRequireWildcard(require("fs"));
8
- var _path = _interopRequireDefault(require("path"));
9
- var _dotenv = require("dotenv");
10
- var _nodeSettings = require("../nodeSettings");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
- var utf8 = 'utf-8';
15
- var homeToRoost = '../../../../';
16
- var getRootPath = () => _path.default.join(__dirname, homeToRoost);
17
- exports.getRootPath = getRootPath;
18
- var rootFile = exports.rootFile = function rootFile() {
19
- var fileName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
20
- return _path.default.join(getRootPath(), fileName);
21
- };
22
- var TestConfig = exports.TestConfig = function TestConfig() {
23
- var rootPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
24
- (0, _dotenv.config)();
25
- var testFile = 'data.yml.json';
26
- var envPrefix = 'LOOKERSDK';
27
- var sectionName = 'Looker';
28
- rootPath = rootPath || getRootPath();
29
- var localIni = process.env.LOOKERSDK_INI || rootFile('looker.ini');
30
- var testPath = rootFile('test/');
31
- var dataFile = "".concat(testPath).concat(testFile);
32
- var testData = JSON.parse(fs.readFileSync(dataFile, utf8));
33
- var testIni = "".concat(rootPath).concat(testData.iniFile);
34
- var section = (0, _nodeSettings.readIniConfig)(localIni, envPrefix, sectionName);
35
- var baseUrl = section.base_url;
36
- var timeout = parseInt(section.timeout, 10);
37
- var testSection = (0, _nodeSettings.readIniConfig)(localIni, envPrefix, sectionName);
38
- if (!fs.existsSync(localIni)) localIni = '';
39
- if (!fs.existsSync(testIni)) testIni = '';
40
- return {
41
- baseUrl,
42
- dataFile,
43
- localIni,
44
- rootPath,
45
- section,
46
- testData,
47
- testIni,
48
- testPath,
49
- testSection,
50
- timeout
51
- };
52
- };
53
- //# sourceMappingURL=testUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testUtils.js","names":["fs","_interopRequireWildcard","require","_path","_interopRequireDefault","_dotenv","_nodeSettings","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","utf8","homeToRoost","getRootPath","path","join","__dirname","exports","rootFile","fileName","arguments","length","undefined","TestConfig","rootPath","config","testFile","envPrefix","sectionName","localIni","process","env","LOOKERSDK_INI","testPath","dataFile","concat","testData","JSON","parse","readFileSync","testIni","iniFile","section","readIniConfig","baseUrl","base_url","timeout","parseInt","testSection","existsSync"],"sources":["../../src/testUtils/testUtils.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 * as fs from 'fs';\nimport path from 'path';\nimport { config } from 'dotenv';\nimport { readIniConfig } from '../nodeSettings';\n\ninterface IKeyAny {\n [key: string]: any;\n}\n\nconst utf8 = 'utf-8';\n\n/**\n * Properties used for various typescript-based tests\n */\nexport interface ITestConfig {\n rootPath: string;\n testPath: string;\n dataFile: string;\n localIni: string;\n baseUrl: string;\n timeout: number;\n testData: any;\n testIni: string;\n section: IKeyAny;\n testSection: IKeyAny;\n}\n\nconst homeToRoost = '../../../../';\n\nexport const getRootPath = () => path.join(__dirname, homeToRoost);\nexport const rootFile = (fileName = '') => path.join(getRootPath(), fileName);\n\n/**\n * Reads configuration information, returning various test values\n * @param {string} rootPath\n * @returns {{testConfig: {[p: string]: any}; localIni: string; baseUrl: any; testData: any; apiVersion: any; testIni: string; configContents: string; rootPath: string; testSection: any; timeout: number}}\n * @constructor\n */\nexport const TestConfig = (rootPath = ''): ITestConfig => {\n config();\n const testFile = 'data.yml.json';\n const envPrefix = 'LOOKERSDK';\n const sectionName = 'Looker';\n rootPath = rootPath || getRootPath();\n let localIni = process.env.LOOKERSDK_INI || rootFile('looker.ini');\n const testPath = rootFile('test/');\n const dataFile = `${testPath}${testFile}`;\n const testData = JSON.parse(fs.readFileSync(dataFile, utf8));\n let testIni = `${rootPath}${testData.iniFile}`;\n const section = readIniConfig(localIni, envPrefix, sectionName);\n const baseUrl = section.base_url;\n const timeout = parseInt(section.timeout, 10);\n const testSection = readIniConfig(localIni, envPrefix, sectionName);\n\n // If .ini files don't exist, don't try to read them downstream and expect environment variables to be set\n if (!fs.existsSync(localIni)) localIni = '';\n if (!fs.existsSync(testIni)) testIni = '';\n\n return {\n baseUrl,\n dataFile,\n localIni,\n rootPath,\n section,\n testData,\n testIni,\n testPath,\n testSection,\n timeout,\n };\n};\n"],"mappings":";;;;;;AA0BA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAAgD,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,CAAAL,CAAA,OAAAM,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAZ,CAAA,oBAAAY,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAA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