aeria-sdk 0.0.20 → 0.0.22
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/dist/utils.js +2 -24
- package/dist/utils.mjs +2 -1
- package/package.json +3 -3
package/dist/utils.js
CHANGED
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
6
|
exports.getConfig = exports.apiUrl = void 0;
|
|
7
|
+
const common_1 = require("@aeriajs/common");
|
|
30
8
|
const path_1 = __importDefault(require("path"));
|
|
31
9
|
const apiUrl = (config) => {
|
|
32
10
|
if (typeof config.apiUrl === 'string') {
|
|
@@ -38,7 +16,7 @@ const apiUrl = (config) => {
|
|
|
38
16
|
};
|
|
39
17
|
exports.apiUrl = apiUrl;
|
|
40
18
|
const getConfig = async () => {
|
|
41
|
-
const { aeriaSdk } = await
|
|
19
|
+
const { aeriaSdk } = await (0, common_1.dynamicImport)(path_1.default.join(process.cwd(), 'package.json'));
|
|
42
20
|
if (typeof aeriaSdk !== 'object' || !aeriaSdk) {
|
|
43
21
|
throw new Error('aeriaSdk is absent in package.json');
|
|
44
22
|
}
|
package/dist/utils.mjs
CHANGED
|
@@ -122,6 +122,7 @@ function _ts_generator(thisArg, body) {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
+
import { dynamicImport } from "@aeriajs/common";
|
|
125
126
|
import path from "path";
|
|
126
127
|
export var apiUrl = function(config) {
|
|
127
128
|
if (typeof config.apiUrl === "string") {
|
|
@@ -137,7 +138,7 @@ export var getConfig = function() {
|
|
|
137
138
|
case 0:
|
|
138
139
|
return [
|
|
139
140
|
4,
|
|
140
|
-
|
|
141
|
+
dynamicImport(path.join(process.cwd(), "package.json"))
|
|
141
142
|
];
|
|
142
143
|
case 1:
|
|
143
144
|
aeriaSdk = _state.sent().aeriaSdk;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aeria-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@aeriajs/common": "^0.0.
|
|
53
|
-
"@aeriajs/types": "^0.0.
|
|
52
|
+
"@aeriajs/common": "^0.0.3",
|
|
53
|
+
"@aeriajs/types": "^0.0.2"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"test": "echo skipping",
|