@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.
Files changed (88) hide show
  1. package/package.json +6 -33
  2. package/cli/commands/build/helpers.d.ts +0 -21
  3. package/cli/commands/build/helpers.js +0 -50
  4. package/cli/commands/build/helpers.ts +0 -89
  5. package/cli/commands/build/index.d.ts +0 -19
  6. package/cli/commands/build/index.js +0 -69
  7. package/cli/commands/build/index.ts +0 -91
  8. package/cli/commands/init/index.d.ts +0 -17
  9. package/cli/commands/init/index.js +0 -53
  10. package/cli/commands/init/index.ts +0 -69
  11. package/cli/commands/init/repos.d.ts +0 -9
  12. package/cli/commands/init/repos.js +0 -12
  13. package/cli/commands/init/repos.ts +0 -17
  14. package/cli/commands/preview/bff.d.ts +0 -3
  15. package/cli/commands/preview/bff.js +0 -54
  16. package/cli/commands/preview/bff.ts +0 -63
  17. package/cli/commands/preview/catalyst.d.ts +0 -5
  18. package/cli/commands/preview/catalyst.js +0 -24
  19. package/cli/commands/preview/catalyst.ts +0 -31
  20. package/cli/commands/preview/coordinates.d.ts +0 -20
  21. package/cli/commands/preview/coordinates.js +0 -90
  22. package/cli/commands/preview/coordinates.ts +0 -146
  23. package/cli/commands/preview/endpoints.d.ts +0 -10
  24. package/cli/commands/preview/endpoints.js +0 -485
  25. package/cli/commands/preview/endpoints.ts +0 -578
  26. package/cli/commands/preview/eth.d.ts +0 -2
  27. package/cli/commands/preview/eth.js +0 -6
  28. package/cli/commands/preview/eth.ts +0 -3
  29. package/cli/commands/preview/index.d.ts +0 -20
  30. package/cli/commands/preview/index.js +0 -71
  31. package/cli/commands/preview/index.ts +0 -91
  32. package/cli/commands/preview/port.d.ts +0 -1
  33. package/cli/commands/preview/port.js +0 -21
  34. package/cli/commands/preview/port.ts +0 -15
  35. package/cli/commands/preview/project.d.ts +0 -14
  36. package/cli/commands/preview/project.js +0 -77
  37. package/cli/commands/preview/project.ts +0 -112
  38. package/cli/commands/preview/types.d.ts +0 -18
  39. package/cli/commands/preview/types.js +0 -3
  40. package/cli/commands/preview/types.ts +0 -26
  41. package/cli/commands/preview/wire.d.ts +0 -2
  42. package/cli/commands/preview/wire.js +0 -92
  43. package/cli/commands/preview/wire.ts +0 -107
  44. package/cli/commands/preview/ws.d.ts +0 -7
  45. package/cli/commands/preview/ws.js +0 -16
  46. package/cli/commands/preview/ws.ts +0 -24
  47. package/cli/commands/start/index.d.ts +0 -29
  48. package/cli/commands/start/index.js +0 -126
  49. package/cli/commands/start/index.ts +0 -145
  50. package/cli/components/fetch.d.ts +0 -5
  51. package/cli/components/fetch.js +0 -34
  52. package/cli/components/fetch.ts +0 -11
  53. package/cli/components/fs.d.ts +0 -11
  54. package/cli/components/fs.js +0 -60
  55. package/cli/components/fs.ts +0 -53
  56. package/cli/components/index.d.ts +0 -7
  57. package/cli/components/index.js +0 -13
  58. package/cli/components/index.ts +0 -14
  59. package/cli/index.d.ts +0 -7
  60. package/cli/index.js +0 -76
  61. package/cli/index.ts +0 -85
  62. package/cli/utils/args.d.ts +0 -10
  63. package/cli/utils/args.js +0 -16
  64. package/cli/utils/args.ts +0 -18
  65. package/cli/utils/commands.d.ts +0 -3
  66. package/cli/utils/commands.js +0 -24
  67. package/cli/utils/commands.ts +0 -28
  68. package/cli/utils/error.d.ts +0 -2
  69. package/cli/utils/error.js +0 -7
  70. package/cli/utils/error.ts +0 -1
  71. package/cli/utils/exec.d.ts +0 -8
  72. package/cli/utils/exec.js +0 -32
  73. package/cli/utils/exec.ts +0 -42
  74. package/cli/utils/fs.d.ts +0 -10
  75. package/cli/utils/fs.js +0 -26
  76. package/cli/utils/fs.ts +0 -41
  77. package/cli/utils/log.d.ts +0 -5
  78. package/cli/utils/log.js +0 -29
  79. package/cli/utils/log.ts +0 -39
  80. package/cli/utils/object.d.ts +0 -9
  81. package/cli/utils/object.js +0 -45
  82. package/cli/utils/object.ts +0 -62
  83. package/cli/utils/out-messages.d.ts +0 -1
  84. package/cli/utils/out-messages.js +0 -8
  85. package/cli/utils/out-messages.ts +0 -3
  86. package/cli/utils/prompt.d.ts +0 -1
  87. package/cli/utils/prompt.js +0 -17
  88. package/cli/utils/prompt.ts +0 -11
@@ -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==
@@ -1,3 +0,0 @@
1
- export function toStringList(strs: string[]): string {
2
- return strs.map(($) => `\t* ${$}\n`).join('')
3
- }
@@ -1 +0,0 @@
1
- export declare function confirm(message: string): Promise<boolean>;
@@ -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==
@@ -1,11 +0,0 @@
1
- import inquirer from 'inquirer'
2
-
3
- export async function confirm(message: string): Promise<boolean> {
4
- const { answer } = await inquirer.prompt({
5
- name: 'answer',
6
- message,
7
- type: 'confirm'
8
- })
9
-
10
- return answer
11
- }