@dcl/sdk 7.0.6-4197661608.commit-41efaad → 7.0.6-4217957637.commit-a393ef7
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/package.json +6 -33
- package/cli/commands/build/helpers.d.ts +0 -21
- package/cli/commands/build/helpers.js +0 -50
- package/cli/commands/build/helpers.ts +0 -89
- package/cli/commands/build/index.d.ts +0 -19
- package/cli/commands/build/index.js +0 -69
- package/cli/commands/build/index.ts +0 -91
- package/cli/commands/init/index.d.ts +0 -17
- package/cli/commands/init/index.js +0 -53
- package/cli/commands/init/index.ts +0 -69
- package/cli/commands/init/repos.d.ts +0 -9
- package/cli/commands/init/repos.js +0 -12
- package/cli/commands/init/repos.ts +0 -17
- package/cli/commands/preview/bff.d.ts +0 -3
- package/cli/commands/preview/bff.js +0 -54
- package/cli/commands/preview/bff.ts +0 -63
- package/cli/commands/preview/catalyst.d.ts +0 -5
- package/cli/commands/preview/catalyst.js +0 -24
- package/cli/commands/preview/catalyst.ts +0 -31
- package/cli/commands/preview/coordinates.d.ts +0 -20
- package/cli/commands/preview/coordinates.js +0 -90
- package/cli/commands/preview/coordinates.ts +0 -146
- package/cli/commands/preview/endpoints.d.ts +0 -10
- package/cli/commands/preview/endpoints.js +0 -485
- package/cli/commands/preview/endpoints.ts +0 -578
- package/cli/commands/preview/eth.d.ts +0 -2
- package/cli/commands/preview/eth.js +0 -6
- package/cli/commands/preview/eth.ts +0 -3
- package/cli/commands/preview/index.d.ts +0 -20
- package/cli/commands/preview/index.js +0 -71
- package/cli/commands/preview/index.ts +0 -91
- package/cli/commands/preview/port.d.ts +0 -1
- package/cli/commands/preview/port.js +0 -21
- package/cli/commands/preview/port.ts +0 -15
- package/cli/commands/preview/project.d.ts +0 -14
- package/cli/commands/preview/project.js +0 -77
- package/cli/commands/preview/project.ts +0 -112
- package/cli/commands/preview/types.d.ts +0 -18
- package/cli/commands/preview/types.js +0 -3
- package/cli/commands/preview/types.ts +0 -26
- package/cli/commands/preview/wire.d.ts +0 -2
- package/cli/commands/preview/wire.js +0 -92
- package/cli/commands/preview/wire.ts +0 -107
- package/cli/commands/preview/ws.d.ts +0 -7
- package/cli/commands/preview/ws.js +0 -16
- package/cli/commands/preview/ws.ts +0 -24
- package/cli/commands/start/index.d.ts +0 -29
- package/cli/commands/start/index.js +0 -126
- package/cli/commands/start/index.ts +0 -145
- package/cli/components/fetch.d.ts +0 -5
- package/cli/components/fetch.js +0 -34
- package/cli/components/fetch.ts +0 -11
- package/cli/components/fs.d.ts +0 -11
- package/cli/components/fs.js +0 -60
- package/cli/components/fs.ts +0 -53
- package/cli/components/index.d.ts +0 -7
- package/cli/components/index.js +0 -13
- package/cli/components/index.ts +0 -14
- package/cli/index.d.ts +0 -7
- package/cli/index.js +0 -76
- package/cli/index.ts +0 -85
- package/cli/utils/args.d.ts +0 -10
- package/cli/utils/args.js +0 -16
- package/cli/utils/args.ts +0 -18
- package/cli/utils/commands.d.ts +0 -3
- package/cli/utils/commands.js +0 -24
- package/cli/utils/commands.ts +0 -28
- package/cli/utils/error.d.ts +0 -2
- package/cli/utils/error.js +0 -7
- package/cli/utils/error.ts +0 -1
- package/cli/utils/exec.d.ts +0 -8
- package/cli/utils/exec.js +0 -32
- package/cli/utils/exec.ts +0 -42
- package/cli/utils/fs.d.ts +0 -10
- package/cli/utils/fs.js +0 -26
- package/cli/utils/fs.ts +0 -41
- package/cli/utils/log.d.ts +0 -5
- package/cli/utils/log.js +0 -29
- package/cli/utils/log.ts +0 -39
- package/cli/utils/object.d.ts +0 -9
- package/cli/utils/object.js +0 -45
- package/cli/utils/object.ts +0 -62
- package/cli/utils/out-messages.d.ts +0 -1
- package/cli/utils/out-messages.js +0 -8
- package/cli/utils/out-messages.ts +0 -3
- package/cli/utils/prompt.d.ts +0 -1
- package/cli/utils/prompt.js +0 -17
- package/cli/utils/prompt.ts +0 -11
package/cli/utils/object.ts
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
export type Primitive = string | number
|
2
|
-
export type Dict = { [key: string]: Dict | Primitive | Primitive[] }
|
3
|
-
|
4
|
-
/*
|
5
|
-
* Returns true if value is a "Primitive"
|
6
|
-
*/
|
7
|
-
export const isPrimitive = (value: any): value is Primitive =>
|
8
|
-
(typeof value === 'string' && value.length > 0) || (typeof value === 'number' && !Number.isNaN(value))
|
9
|
-
|
10
|
-
/*
|
11
|
-
* Returns true if both parameters are equal
|
12
|
-
*/
|
13
|
-
export const eqPrimitive = (value: Primitive, value2: Primitive): boolean => value === value2
|
14
|
-
|
15
|
-
/*
|
16
|
-
* Returns true if value is a JS Object
|
17
|
-
*/
|
18
|
-
export const isObject = (value: any): value is Dict =>
|
19
|
-
typeof value === 'object' && !Array.isArray(value) && value !== null
|
20
|
-
|
21
|
-
/*
|
22
|
-
* Returns true if second paramter is a "Primitive" and equal to first parameter
|
23
|
-
*/
|
24
|
-
export const isPrimitiveEqualTo = (val: Primitive, val2: any): val2 is Primitive =>
|
25
|
-
isPrimitive(val2) && eqPrimitive(val, val2)
|
26
|
-
|
27
|
-
/*
|
28
|
-
* Returns true if "original" has all of the props described in "comparator"
|
29
|
-
* NOTE: comparator can provide a list of valid "Primitives" to match values from "original"
|
30
|
-
* EX:
|
31
|
-
* original = { prop1: "some-val" }
|
32
|
-
* comparator = { prop1: [1, 2, "some-val"] }
|
33
|
-
* will return true
|
34
|
-
*/
|
35
|
-
export const hasPrimitiveKeys = <T extends Dict>(original: Record<string, unknown>, comparator: T): boolean => {
|
36
|
-
for (const [key, value] of Object.entries(comparator)) {
|
37
|
-
const originalValue = original[key]
|
38
|
-
if (originalValue === undefined) {
|
39
|
-
return false
|
40
|
-
} else if (isPrimitive(value) && !isPrimitiveEqualTo(value, originalValue)) {
|
41
|
-
return false
|
42
|
-
} else if (Array.isArray(value)) {
|
43
|
-
if (Array.isArray(originalValue)) {
|
44
|
-
const set = new Set(value)
|
45
|
-
for (const v of originalValue) {
|
46
|
-
if (!set.has(v)) return false
|
47
|
-
}
|
48
|
-
} else {
|
49
|
-
const foundPrimitive = value.some((val) => isPrimitive(val) && isPrimitiveEqualTo(val, originalValue))
|
50
|
-
if (!foundPrimitive) {
|
51
|
-
return false
|
52
|
-
}
|
53
|
-
}
|
54
|
-
} else if (isObject(value)) {
|
55
|
-
if (isObject(originalValue) && !hasPrimitiveKeys(originalValue, value)) {
|
56
|
-
return false
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
60
|
-
|
61
|
-
return true
|
62
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function toStringList(strs: string[]): string;
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.toStringList = void 0;
|
4
|
-
function toStringList(strs) {
|
5
|
-
return strs.map(($) => `\t* ${$}\n`).join('');
|
6
|
-
}
|
7
|
-
exports.toStringList = toStringList;
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0LW1lc3NhZ2VzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsib3V0LW1lc3NhZ2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLFNBQWdCLFlBQVksQ0FBQyxJQUFjO0lBQ3pDLE9BQU8sSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQTtBQUMvQyxDQUFDO0FBRkQsb0NBRUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gdG9TdHJpbmdMaXN0KHN0cnM6IHN0cmluZ1tdKTogc3RyaW5nIHtcbiAgcmV0dXJuIHN0cnMubWFwKCgkKSA9PiBgXFx0KiAkeyR9XFxuYCkuam9pbignJylcbn1cbiJdfQ==
|
package/cli/utils/prompt.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export declare function confirm(message: string): Promise<boolean>;
|
package/cli/utils/prompt.js
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.confirm = void 0;
|
7
|
-
const inquirer_1 = __importDefault(require("inquirer"));
|
8
|
-
async function confirm(message) {
|
9
|
-
const { answer } = await inquirer_1.default.prompt({
|
10
|
-
name: 'answer',
|
11
|
-
message,
|
12
|
-
type: 'confirm'
|
13
|
-
});
|
14
|
-
return answer;
|
15
|
-
}
|
16
|
-
exports.confirm = confirm;
|
17
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvbXB0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicHJvbXB0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLHdEQUErQjtBQUV4QixLQUFLLFVBQVUsT0FBTyxDQUFDLE9BQWU7SUFDM0MsTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLE1BQU0sa0JBQVEsQ0FBQyxNQUFNLENBQUM7UUFDdkMsSUFBSSxFQUFFLFFBQVE7UUFDZCxPQUFPO1FBQ1AsSUFBSSxFQUFFLFNBQVM7S0FDaEIsQ0FBQyxDQUFBO0lBRUYsT0FBTyxNQUFNLENBQUE7QUFDZixDQUFDO0FBUkQsMEJBUUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgaW5xdWlyZXIgZnJvbSAnaW5xdWlyZXInXG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBjb25maXJtKG1lc3NhZ2U6IHN0cmluZyk6IFByb21pc2U8Ym9vbGVhbj4ge1xuICBjb25zdCB7IGFuc3dlciB9ID0gYXdhaXQgaW5xdWlyZXIucHJvbXB0KHtcbiAgICBuYW1lOiAnYW5zd2VyJyxcbiAgICBtZXNzYWdlLFxuICAgIHR5cGU6ICdjb25maXJtJ1xuICB9KVxuXG4gIHJldHVybiBhbnN3ZXJcbn1cbiJdfQ==
|
package/cli/utils/prompt.ts
DELETED