@multiplatform.one/utils 0.1.8 → 0.1.9
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/lib/chunk-QMKU5DBF.js +84 -0
- package/lib/dev.js +102 -0
- package/lib/index.js +5 -1
- package/lib/meshConfig.js +98 -0
- package/lib/wait.js +16 -0
- package/package.json +33 -23
- package/src/{build.ts → dev.ts} +57 -15
- package/src/index.ts +4 -4
- package/src/meshConfig.ts +130 -0
- package/src/wait.ts +99 -0
- package/types/.tsbuildinfo +1 -0
- package/types/dev.d.ts +12 -0
- package/types/dev.d.ts.map +1 -0
- package/types/index.d.ts +23 -0
- package/types/index.d.ts.map +1 -0
- package/types/meshConfig.d.ts +86 -0
- package/types/meshConfig.d.ts.map +1 -0
- package/types/wait.d.ts +8 -0
- package/types/wait.d.ts.map +1 -0
- package/lib/build.d.ts +0 -11
- package/lib/build.js +0 -62
- package/lib/index.d.ts +0 -2
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// src/wait.ts
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import pg from "pg";
|
|
4
|
+
async function waitForApi(interval) {
|
|
5
|
+
try {
|
|
6
|
+
const res = await axios.get(
|
|
7
|
+
`http://localhost:${process.env.API_PORT || "5001"}/healthz`
|
|
8
|
+
);
|
|
9
|
+
if ((res?.status || 500) < 300) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
} catch (err) {
|
|
13
|
+
}
|
|
14
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
15
|
+
return waitForApi(interval);
|
|
16
|
+
}
|
|
17
|
+
async function waitForFrappe(interval) {
|
|
18
|
+
try {
|
|
19
|
+
const res = await axios.get(
|
|
20
|
+
`${process.env.FRAPPE_BASE_URL || "http://frappe.localhost"}/api/method/ping`
|
|
21
|
+
);
|
|
22
|
+
if ((res?.status || 500) < 300) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
} catch (err) {
|
|
26
|
+
}
|
|
27
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
28
|
+
return waitForFrappe(interval);
|
|
29
|
+
}
|
|
30
|
+
async function waitForPostgres(interval) {
|
|
31
|
+
const client = new pg.Client({
|
|
32
|
+
database: process.env.POSTGRES_DATABASE || "postgres",
|
|
33
|
+
host: process.env.POSTGRES_HOSTNAME || "localhost",
|
|
34
|
+
password: process.env.POSTGRES_PASSWORD || "postgres",
|
|
35
|
+
port: Number.parseInt(process.env.POSTGRES_PORT || "5432"),
|
|
36
|
+
user: process.env.POSTGRES_USERNAME || "postgres"
|
|
37
|
+
});
|
|
38
|
+
try {
|
|
39
|
+
await client.connect();
|
|
40
|
+
while (true) {
|
|
41
|
+
try {
|
|
42
|
+
await client.query("SELECT 1");
|
|
43
|
+
return;
|
|
44
|
+
} catch (error) {
|
|
45
|
+
}
|
|
46
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
47
|
+
}
|
|
48
|
+
} finally {
|
|
49
|
+
await client.end();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async function waitForKeycloak(interval) {
|
|
53
|
+
try {
|
|
54
|
+
const res = await axios.get(
|
|
55
|
+
`${process.env.KEYCLOAK_BASE_URL || "http://localhost:8080"}/realms/master/.well-known/openid-configuration`
|
|
56
|
+
);
|
|
57
|
+
if ((res?.status || 500) < 300) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
} catch (err) {
|
|
61
|
+
}
|
|
62
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
63
|
+
return waitForKeycloak(interval);
|
|
64
|
+
}
|
|
65
|
+
function formatServiceList(services) {
|
|
66
|
+
if (services.length === 1) return services[0];
|
|
67
|
+
if (services.length === 2) return `${services[0]} and ${services[1]}`;
|
|
68
|
+
return `${services.slice(0, -1).join(", ")} and ${services[services.length - 1]}`;
|
|
69
|
+
}
|
|
70
|
+
var waitServices = [
|
|
71
|
+
"graphql",
|
|
72
|
+
"frappe",
|
|
73
|
+
"postgres",
|
|
74
|
+
"keycloak"
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
export {
|
|
78
|
+
waitForApi,
|
|
79
|
+
waitForFrappe,
|
|
80
|
+
waitForPostgres,
|
|
81
|
+
waitForKeycloak,
|
|
82
|
+
formatServiceList,
|
|
83
|
+
waitServices
|
|
84
|
+
};
|
package/lib/dev.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatServiceList,
|
|
3
|
+
waitForApi,
|
|
4
|
+
waitForFrappe,
|
|
5
|
+
waitForKeycloak,
|
|
6
|
+
waitForPostgres,
|
|
7
|
+
waitServices
|
|
8
|
+
} from "./chunk-QMKU5DBF.js";
|
|
9
|
+
|
|
10
|
+
// src/dev.ts
|
|
11
|
+
import fs from "node:fs";
|
|
12
|
+
import path from "node:path";
|
|
13
|
+
var logger = console;
|
|
14
|
+
function lookupTranspileModules(packageDirs, { log = true } = {}) {
|
|
15
|
+
const transpileModules = [
|
|
16
|
+
...new Set(
|
|
17
|
+
[
|
|
18
|
+
.../* @__PURE__ */ new Set([
|
|
19
|
+
projectRoot,
|
|
20
|
+
path.resolve(projectRoot, "app"),
|
|
21
|
+
path.resolve(projectRoot, "packages", "ui"),
|
|
22
|
+
...packageDirs || []
|
|
23
|
+
])
|
|
24
|
+
].map((packageDir) => {
|
|
25
|
+
try {
|
|
26
|
+
return JSON.parse(
|
|
27
|
+
fs.readFileSync(path.join(packageDir, "package.json"), "utf-8")
|
|
28
|
+
).transpileModules || [];
|
|
29
|
+
} catch (err) {
|
|
30
|
+
if (log) logger.error(err);
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
)
|
|
35
|
+
].flat();
|
|
36
|
+
if (log) logger.debug("transpileModules:", transpileModules.join(", "));
|
|
37
|
+
return transpileModules;
|
|
38
|
+
}
|
|
39
|
+
function lookupTamaguiModules(packageDirs, { log = true } = {}) {
|
|
40
|
+
const tamaguiModules = [
|
|
41
|
+
.../* @__PURE__ */ new Set([
|
|
42
|
+
"tamagui",
|
|
43
|
+
...[
|
|
44
|
+
.../* @__PURE__ */ new Set([
|
|
45
|
+
projectRoot,
|
|
46
|
+
path.resolve(projectRoot, "app"),
|
|
47
|
+
path.resolve(projectRoot, "packages", "ui"),
|
|
48
|
+
...packageDirs || []
|
|
49
|
+
])
|
|
50
|
+
].map((packageDir) => {
|
|
51
|
+
try {
|
|
52
|
+
return JSON.parse(
|
|
53
|
+
fs.readFileSync(path.join(packageDir, "package.json"), "utf-8")
|
|
54
|
+
).tamaguiModules || [];
|
|
55
|
+
} catch (err) {
|
|
56
|
+
if (log) logger.error(err);
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
])
|
|
61
|
+
].flat();
|
|
62
|
+
if (log) logger.debug("tamaguiModules:", tamaguiModules.join(", "));
|
|
63
|
+
return tamaguiModules;
|
|
64
|
+
}
|
|
65
|
+
function resolveConfig(keys = []) {
|
|
66
|
+
return keys.reduce(
|
|
67
|
+
(acc, key) => {
|
|
68
|
+
if (process.env[key]) acc[key] = process.env[key];
|
|
69
|
+
return acc;
|
|
70
|
+
},
|
|
71
|
+
{}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
var projectRoot = (() => {
|
|
75
|
+
const rootDir = path.parse(new URL(import.meta.url).pathname).root;
|
|
76
|
+
let projectRoot2 = path.dirname(new URL(import.meta.url).pathname);
|
|
77
|
+
while (projectRoot2 !== rootDir) {
|
|
78
|
+
const packageJsonPath = path.join(projectRoot2, "package.json");
|
|
79
|
+
const packageJsonExists = fs.existsSync(packageJsonPath) && fs.statSync(packageJsonPath).isFile();
|
|
80
|
+
if (packageJsonExists) {
|
|
81
|
+
const npmrcPath = path.join(projectRoot2, ".npmrc");
|
|
82
|
+
const nodeModulesPath = path.join(projectRoot2, "node_modules");
|
|
83
|
+
const npmrcExists = fs.existsSync(npmrcPath) && fs.statSync(npmrcPath).isFile();
|
|
84
|
+
const nodeModulesExists = fs.existsSync(nodeModulesPath) && fs.statSync(nodeModulesPath).isDirectory();
|
|
85
|
+
if (npmrcExists && nodeModulesExists) return projectRoot2;
|
|
86
|
+
}
|
|
87
|
+
projectRoot2 = path.dirname(projectRoot2);
|
|
88
|
+
}
|
|
89
|
+
return process.cwd();
|
|
90
|
+
})();
|
|
91
|
+
export {
|
|
92
|
+
formatServiceList,
|
|
93
|
+
lookupTamaguiModules,
|
|
94
|
+
lookupTranspileModules,
|
|
95
|
+
projectRoot,
|
|
96
|
+
resolveConfig,
|
|
97
|
+
waitForApi,
|
|
98
|
+
waitForFrappe,
|
|
99
|
+
waitForKeycloak,
|
|
100
|
+
waitForPostgres,
|
|
101
|
+
waitServices
|
|
102
|
+
};
|
package/lib/index.js
CHANGED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// src/meshConfig.ts
|
|
2
|
+
var meshConfig = {
|
|
3
|
+
sources: [
|
|
4
|
+
...process.env.MESH_API === "1" ? [
|
|
5
|
+
{
|
|
6
|
+
name: "API",
|
|
7
|
+
handler: {
|
|
8
|
+
graphql: {
|
|
9
|
+
endpoint: `http://localhost:${process.env.API_PORT}/graphql`,
|
|
10
|
+
subscriptionsEndpoint: `ws://localhost:${process.env.API_PORT}/graphql`,
|
|
11
|
+
subscriptionsProtocol: "WS",
|
|
12
|
+
operationHeaders: {
|
|
13
|
+
Authorization: "{context.headers.Authorization}",
|
|
14
|
+
Cookie: "{context.headers.Cookie}"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
transforms: [
|
|
19
|
+
{
|
|
20
|
+
prefix: {
|
|
21
|
+
mode: "wrap",
|
|
22
|
+
value: "API"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
filterSchema: {
|
|
27
|
+
mode: "wrap",
|
|
28
|
+
filters: []
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
] : [],
|
|
34
|
+
...process.env.MESH_FRAPPE === "1" ? [
|
|
35
|
+
{
|
|
36
|
+
name: "Frappe",
|
|
37
|
+
handler: {
|
|
38
|
+
graphql: {
|
|
39
|
+
endpoint: `${process.env.FRAPPE_BASE_URL}/api/method/graphql`,
|
|
40
|
+
subscriptionsEndpoint: `${process.env.FRAPPE_BASE_URL}/api/method/graphql`.replace(
|
|
41
|
+
/^https?/,
|
|
42
|
+
"ws"
|
|
43
|
+
),
|
|
44
|
+
subscriptionsProtocol: "WS",
|
|
45
|
+
operationHeaders: {
|
|
46
|
+
Authorization: "{context.headers.Authorization}",
|
|
47
|
+
Cookie: "{context.headers.Cookie}"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
transforms: [
|
|
52
|
+
{
|
|
53
|
+
prefix: {
|
|
54
|
+
mode: "wrap",
|
|
55
|
+
value: "Frappe"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
filterSchema: {
|
|
60
|
+
mode: "wrap",
|
|
61
|
+
filters: ["Subscription.doc_events"]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
] : []
|
|
67
|
+
],
|
|
68
|
+
additionalEnvelopPlugins: "./envelopPlugins.js",
|
|
69
|
+
serve: {
|
|
70
|
+
browser: false
|
|
71
|
+
},
|
|
72
|
+
plugins: [
|
|
73
|
+
{
|
|
74
|
+
rateLimit: {
|
|
75
|
+
config: []
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
maxTokens: {
|
|
80
|
+
n: 1e3
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
maxDepth: {
|
|
85
|
+
n: 10
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
blockFieldSuggestions: {}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
responseCache: {}
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
meshConfig
|
|
98
|
+
};
|
package/lib/wait.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatServiceList,
|
|
3
|
+
waitForApi,
|
|
4
|
+
waitForFrappe,
|
|
5
|
+
waitForKeycloak,
|
|
6
|
+
waitForPostgres,
|
|
7
|
+
waitServices
|
|
8
|
+
} from "./chunk-QMKU5DBF.js";
|
|
9
|
+
export {
|
|
10
|
+
formatServiceList,
|
|
11
|
+
waitForApi,
|
|
12
|
+
waitForFrappe,
|
|
13
|
+
waitForKeycloak,
|
|
14
|
+
waitForPostgres,
|
|
15
|
+
waitServices
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "utilities for multiplatform.one",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"sideEffects": false,
|
|
6
7
|
"keywords": [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"electron"
|
|
8
|
+
"multiplatform.one",
|
|
9
|
+
"utils"
|
|
10
10
|
],
|
|
11
11
|
"homepage": "https://multiplatform.one",
|
|
12
12
|
"bugs": {
|
|
@@ -18,40 +18,50 @@
|
|
|
18
18
|
"main": "lib/index.js",
|
|
19
19
|
"module": "lib/index.js",
|
|
20
20
|
"source": "src/index.ts",
|
|
21
|
-
"types": "
|
|
22
|
-
"exports": {
|
|
23
|
-
".": {
|
|
24
|
-
"import": "./lib/index.js",
|
|
25
|
-
"require": "./lib/index.js"
|
|
26
|
-
},
|
|
27
|
-
"./build": {
|
|
28
|
-
"import": "./lib/build.js",
|
|
29
|
-
"require": "./lib/build.js"
|
|
30
|
-
},
|
|
31
|
-
"./package.json": "./package.json"
|
|
32
|
-
},
|
|
21
|
+
"types": "types/index.d.ts",
|
|
33
22
|
"files": [
|
|
34
23
|
"bin",
|
|
35
24
|
"lib",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
25
|
+
"types",
|
|
26
|
+
"src"
|
|
38
27
|
],
|
|
39
28
|
"repository": {
|
|
40
29
|
"type": "git",
|
|
41
30
|
"url": "https://gitlab.com/bitspur/multiplatform.one/multiplatform.one"
|
|
42
31
|
},
|
|
43
32
|
"devDependencies": {
|
|
44
|
-
"@types/node": "~20.12.
|
|
45
|
-
"
|
|
46
|
-
"
|
|
33
|
+
"@types/node": "~20.12.14",
|
|
34
|
+
"@types/pg": "^8.10.9",
|
|
35
|
+
"tsup": "^8.3.5",
|
|
36
|
+
"typescript": "~5.3.3",
|
|
37
|
+
"vitest": "^1.4.0"
|
|
47
38
|
},
|
|
48
39
|
"engines": {
|
|
49
40
|
"node": ">=6.0.0"
|
|
50
41
|
},
|
|
51
42
|
"dependencies": {
|
|
52
|
-
"
|
|
43
|
+
"axios": "^1.7.9",
|
|
44
|
+
"pg": "^8.13.1",
|
|
45
|
+
"yaml": "^2.7.0"
|
|
46
|
+
},
|
|
47
|
+
"exports": {
|
|
48
|
+
".": {
|
|
49
|
+
"types": "./types/index.d.ts",
|
|
50
|
+
"import": "./lib/index.js"
|
|
51
|
+
},
|
|
52
|
+
"./dev": {
|
|
53
|
+
"types": "./types/dev.d.ts",
|
|
54
|
+
"import": "./lib/dev.js"
|
|
55
|
+
},
|
|
56
|
+
"./meshConfig": {
|
|
57
|
+
"types": "./types/meshConfig.d.ts",
|
|
58
|
+
"import": "./lib/meshConfig.js"
|
|
59
|
+
},
|
|
60
|
+
"./package.json": "./package.json"
|
|
53
61
|
},
|
|
54
62
|
"scripts": {
|
|
55
|
-
"
|
|
63
|
+
"typecheck": "tsc --noEmit",
|
|
64
|
+
"build": "rm -rf lib types 2>/dev/null && tsc -b --emitDeclarationOnly && tsup",
|
|
65
|
+
"test": "vitest run --coverage --coverage.provider=v8 --coverage.reporter=text --coverage.reporter=lcov --coverage.reporter=html"
|
|
56
66
|
}
|
|
57
67
|
}
|
package/src/{build.ts → dev.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* File: /src/
|
|
2
|
+
* File: /src/dev.ts
|
|
3
3
|
* Project: @multiplatform.one/utils
|
|
4
|
-
* File Created:
|
|
4
|
+
* File Created: 17-01-2025 23:30:37
|
|
5
5
|
* Author: Clay Risser
|
|
6
6
|
* -----
|
|
7
|
-
* BitSpur (c) Copyright 2021 -
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2025
|
|
8
8
|
*
|
|
9
9
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
10
|
* you may not use this file except in compliance with the License.
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
import fs from "node:fs";
|
|
22
23
|
import path from "node:path";
|
|
23
24
|
|
|
24
25
|
const logger = console;
|
|
25
|
-
const projectRoot = require.resolve("react/package.json").slice(0, -32);
|
|
26
26
|
|
|
27
27
|
export interface LookupTranspileModulesOptions {
|
|
28
28
|
log?: boolean;
|
|
@@ -45,10 +45,18 @@ export function lookupTranspileModules(
|
|
|
45
45
|
path.resolve(projectRoot, "packages", "ui"),
|
|
46
46
|
...(packageDirs || []),
|
|
47
47
|
]),
|
|
48
|
-
].map(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
].map((packageDir) => {
|
|
49
|
+
try {
|
|
50
|
+
return (
|
|
51
|
+
JSON.parse(
|
|
52
|
+
fs.readFileSync(path.join(packageDir, "package.json"), "utf-8"),
|
|
53
|
+
).transpileModules || []
|
|
54
|
+
);
|
|
55
|
+
} catch (err) {
|
|
56
|
+
if (log) logger.error(err);
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
52
60
|
),
|
|
53
61
|
].flat();
|
|
54
62
|
if (log) logger.debug("transpileModules:", transpileModules.join(", "));
|
|
@@ -69,22 +77,56 @@ export function lookupTamaguiModules(
|
|
|
69
77
|
path.resolve(projectRoot, "packages", "ui"),
|
|
70
78
|
...(packageDirs || []),
|
|
71
79
|
]),
|
|
72
|
-
].map(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
].map((packageDir) => {
|
|
81
|
+
try {
|
|
82
|
+
return (
|
|
83
|
+
JSON.parse(
|
|
84
|
+
fs.readFileSync(path.join(packageDir, "package.json"), "utf-8"),
|
|
85
|
+
).tamaguiModules || []
|
|
86
|
+
);
|
|
87
|
+
} catch (err) {
|
|
88
|
+
if (log) logger.error(err);
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
}),
|
|
76
92
|
]),
|
|
77
93
|
].flat();
|
|
78
94
|
if (log) logger.debug("tamaguiModules:", tamaguiModules.join(", "));
|
|
79
95
|
return tamaguiModules;
|
|
80
96
|
}
|
|
81
97
|
|
|
82
|
-
export function resolveConfig(
|
|
98
|
+
export function resolveConfig(
|
|
99
|
+
keys: string[] = [],
|
|
100
|
+
): Record<string, string | undefined> {
|
|
83
101
|
return keys.reduce(
|
|
84
|
-
(acc: Record<string,
|
|
102
|
+
(acc: Record<string, string | undefined>, key: string) => {
|
|
85
103
|
if (process.env[key]) acc[key] = process.env[key];
|
|
86
104
|
return acc;
|
|
87
105
|
},
|
|
88
|
-
{} as Record<string,
|
|
106
|
+
{} as Record<string, string | undefined>,
|
|
89
107
|
);
|
|
90
108
|
}
|
|
109
|
+
|
|
110
|
+
export const projectRoot = (() => {
|
|
111
|
+
const rootDir = path.parse(new URL(import.meta.url).pathname).root;
|
|
112
|
+
let projectRoot = path.dirname(new URL(import.meta.url).pathname);
|
|
113
|
+
while (projectRoot !== rootDir) {
|
|
114
|
+
const packageJsonPath = path.join(projectRoot, "package.json");
|
|
115
|
+
const packageJsonExists =
|
|
116
|
+
fs.existsSync(packageJsonPath) && fs.statSync(packageJsonPath).isFile();
|
|
117
|
+
if (packageJsonExists) {
|
|
118
|
+
const npmrcPath = path.join(projectRoot, ".npmrc");
|
|
119
|
+
const nodeModulesPath = path.join(projectRoot, "node_modules");
|
|
120
|
+
const npmrcExists =
|
|
121
|
+
fs.existsSync(npmrcPath) && fs.statSync(npmrcPath).isFile();
|
|
122
|
+
const nodeModulesExists =
|
|
123
|
+
fs.existsSync(nodeModulesPath) &&
|
|
124
|
+
fs.statSync(nodeModulesPath).isDirectory();
|
|
125
|
+
if (npmrcExists && nodeModulesExists) return projectRoot;
|
|
126
|
+
}
|
|
127
|
+
projectRoot = path.dirname(projectRoot);
|
|
128
|
+
}
|
|
129
|
+
return process.cwd();
|
|
130
|
+
})();
|
|
131
|
+
|
|
132
|
+
export * from "./wait";
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
2
|
* File: /src/index.ts
|
|
3
|
-
* Project: @multiplatform.one/
|
|
4
|
-
* File Created:
|
|
3
|
+
* Project: @multiplatform.one/utils
|
|
4
|
+
* File Created: 19-11-2024 20:26:31
|
|
5
5
|
* Author: Clay Risser
|
|
6
6
|
* -----
|
|
7
7
|
* BitSpur (c) Copyright 2021 - 2024
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
export
|
|
22
|
+
export default {};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* File: /src/meshConfig.ts
|
|
3
|
+
* Project: @multiplatform.one/utils
|
|
4
|
+
* File Created: 18-01-2025 18:38:49
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2025
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* File: /src/meshConfig.ts
|
|
24
|
+
* Project: utils
|
|
25
|
+
* -----
|
|
26
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
27
|
+
*
|
|
28
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
29
|
+
* you may not use this file except in compliance with the License.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
export const meshConfig = {
|
|
33
|
+
sources: [
|
|
34
|
+
...(process.env.MESH_API === "1"
|
|
35
|
+
? [
|
|
36
|
+
{
|
|
37
|
+
name: "API",
|
|
38
|
+
handler: {
|
|
39
|
+
graphql: {
|
|
40
|
+
endpoint: `http://localhost:${process.env.API_PORT}/graphql`,
|
|
41
|
+
subscriptionsEndpoint: `ws://localhost:${process.env.API_PORT}/graphql`,
|
|
42
|
+
subscriptionsProtocol: "WS",
|
|
43
|
+
operationHeaders: {
|
|
44
|
+
Authorization: "{context.headers.Authorization}",
|
|
45
|
+
Cookie: "{context.headers.Cookie}",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
transforms: [
|
|
50
|
+
{
|
|
51
|
+
prefix: {
|
|
52
|
+
mode: "wrap",
|
|
53
|
+
value: "API",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
filterSchema: {
|
|
58
|
+
mode: "wrap",
|
|
59
|
+
filters: [],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
]
|
|
65
|
+
: []),
|
|
66
|
+
...(process.env.MESH_FRAPPE === "1"
|
|
67
|
+
? [
|
|
68
|
+
{
|
|
69
|
+
name: "Frappe",
|
|
70
|
+
handler: {
|
|
71
|
+
graphql: {
|
|
72
|
+
endpoint: `${process.env.FRAPPE_BASE_URL}/api/method/graphql`,
|
|
73
|
+
subscriptionsEndpoint:
|
|
74
|
+
`${process.env.FRAPPE_BASE_URL}/api/method/graphql`.replace(
|
|
75
|
+
/^https?/,
|
|
76
|
+
"ws",
|
|
77
|
+
),
|
|
78
|
+
subscriptionsProtocol: "WS",
|
|
79
|
+
operationHeaders: {
|
|
80
|
+
Authorization: "{context.headers.Authorization}",
|
|
81
|
+
Cookie: "{context.headers.Cookie}",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
transforms: [
|
|
86
|
+
{
|
|
87
|
+
prefix: {
|
|
88
|
+
mode: "wrap",
|
|
89
|
+
value: "Frappe",
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
filterSchema: {
|
|
94
|
+
mode: "wrap",
|
|
95
|
+
filters: ["Subscription.doc_events"],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
]
|
|
101
|
+
: []),
|
|
102
|
+
],
|
|
103
|
+
additionalEnvelopPlugins: "./envelopPlugins.js",
|
|
104
|
+
serve: {
|
|
105
|
+
browser: false,
|
|
106
|
+
},
|
|
107
|
+
plugins: [
|
|
108
|
+
{
|
|
109
|
+
rateLimit: {
|
|
110
|
+
config: [],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
maxTokens: {
|
|
115
|
+
n: 1000,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
maxDepth: {
|
|
120
|
+
n: 10,
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
blockFieldSuggestions: {},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
responseCache: {},
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
} as const;
|
package/src/wait.ts
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* File: /src/wait.ts
|
|
3
|
+
* Project: @multiplatform.one/utils
|
|
4
|
+
* File Created: 18-01-2025 18:38:49
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2025
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import axios from "axios";
|
|
23
|
+
import pg from "pg";
|
|
24
|
+
|
|
25
|
+
export async function waitForApi(interval: number) {
|
|
26
|
+
try {
|
|
27
|
+
const res = await axios.get(
|
|
28
|
+
`http://localhost:${process.env.API_PORT || "5001"}/healthz`,
|
|
29
|
+
);
|
|
30
|
+
if ((res?.status || 500) < 300) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
} catch (err) {}
|
|
34
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
35
|
+
return waitForApi(interval);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export async function waitForFrappe(interval: number) {
|
|
39
|
+
try {
|
|
40
|
+
const res = await axios.get(
|
|
41
|
+
`${process.env.FRAPPE_BASE_URL || "http://frappe.localhost"}/api/method/ping`,
|
|
42
|
+
);
|
|
43
|
+
if ((res?.status || 500) < 300) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
} catch (err) {}
|
|
47
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
48
|
+
return waitForFrappe(interval);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export async function waitForPostgres(interval: number) {
|
|
52
|
+
const client = new pg.Client({
|
|
53
|
+
database: process.env.POSTGRES_DATABASE || "postgres",
|
|
54
|
+
host: process.env.POSTGRES_HOSTNAME || "localhost",
|
|
55
|
+
password: process.env.POSTGRES_PASSWORD || "postgres",
|
|
56
|
+
port: Number.parseInt(process.env.POSTGRES_PORT || "5432"),
|
|
57
|
+
user: process.env.POSTGRES_USERNAME || "postgres",
|
|
58
|
+
});
|
|
59
|
+
try {
|
|
60
|
+
await client.connect();
|
|
61
|
+
while (true) {
|
|
62
|
+
try {
|
|
63
|
+
await client.query("SELECT 1");
|
|
64
|
+
return;
|
|
65
|
+
} catch (error) {}
|
|
66
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
67
|
+
}
|
|
68
|
+
} finally {
|
|
69
|
+
await client.end();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export async function waitForKeycloak(interval: number) {
|
|
74
|
+
try {
|
|
75
|
+
const res = await axios.get(
|
|
76
|
+
`${process.env.KEYCLOAK_BASE_URL || "http://localhost:8080"}/realms/master/.well-known/openid-configuration`,
|
|
77
|
+
);
|
|
78
|
+
if ((res?.status || 500) < 300) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
} catch (err) {}
|
|
82
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
83
|
+
return waitForKeycloak(interval);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function formatServiceList(services: readonly string[]): string {
|
|
87
|
+
if (services.length === 1) return services[0];
|
|
88
|
+
if (services.length === 2) return `${services[0]} and ${services[1]}`;
|
|
89
|
+
return `${services.slice(0, -1).join(", ")} and ${services[services.length - 1]}`;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export const waitServices = [
|
|
93
|
+
"graphql",
|
|
94
|
+
"frappe",
|
|
95
|
+
"postgres",
|
|
96
|
+
"keycloak",
|
|
97
|
+
] as const;
|
|
98
|
+
|
|
99
|
+
export type WaitService = (typeof waitServices)[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/react/jsx-runtime.d.ts","../../../node_modules/axios/index.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/index.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/sea.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../../../node_modules/@types/pg/node_modules/pg-types/index.d.ts","../../../node_modules/pg-protocol/dist/messages.d.ts","../../../node_modules/pg-protocol/dist/serializer.d.ts","../../../node_modules/pg-protocol/dist/parser.d.ts","../../../node_modules/pg-protocol/dist/index.d.ts","../../../node_modules/@types/pg/index.d.ts","../src/wait.ts","../src/dev.ts","../src/index.ts","../src/meshConfig.ts","../../../node_modules/vite/types/hmrPayload.d.ts","../../../node_modules/vite/types/customEvent.d.ts","../../../node_modules/vite/types/hot.d.ts","../../../node_modules/vite/types/importGlob.d.ts","../../../node_modules/vite/types/importMeta.d.ts","../../../node_modules/vite/client.d.ts"],"fileInfos":[{"version":"f33e5332b24c3773e930e212cbb8b6867c8ba3ec4492064ea78e55a524d57450","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","26f2f787e82c4222710f3b676b4d83eb5ad0a72fa7b746f03449e7a026ce5073","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","bed7b7ba0eb5a160b69af72814b4dde371968e40b6c5e73d3a9f7bee407d158c",{"version":"21e41a76098aa7a191028256e52a726baafd45a925ea5cf0222eb430c96c1d83","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"e0275cd0e42990dc3a16f0b7c8bca3efe87f1c8ad404f80c6db1c7c0b828c59f","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"acae90d417bee324b1372813b5a00829d31c7eb670d299cd7f8f9a648ac05688","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"62a4966981264d1f04c44eb0f4b5bdc3d81c1a54725608861e44755aa24ad6a5","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"86a34c7a13de9cabc43161348f663624b56871ed80986e41d214932ddd8d6719","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"4350e5922fecd4bedda2964d69c213a1436349d0b8d260dd902795f5b94dc74b","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec",{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true},"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee",{"version":"b89c2ddec6bd955e8721d41e24ca667de06882338d88b183c2cdc1f41f4c5a34","affectsGlobalScope":true},"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","dc602ef9638db2163c461ec64133fe76f890f6e03b69b1c96f5c5e59592025e8","d78c698fa755ef94e3af591883bfee3a330ffec36392e00aaacdff3541cf5382","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true},"6968359c8dbc693224fd1ea0b1f96b135f14d8eee3d6e23296d68c3a9da3ea00",{"version":"79d75a353f29d9f7fc63e879ccebe213baaaea26676fb3e47cc96cf221b27b4f","affectsGlobalScope":true},"dfdc7699360a0d512d7e31c69f75cb6a419cf415c98673e24499793170db5d6b","dcf46daa1e04481b1c2f360c7a77bf019885bd70353a92aa698b9c22b7fe3d6b",{"version":"033350619c2cfcbeab2a483f4b221e0866e17cc4ac514240d285d35c35eecf7c","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb",{"version":"b197fb2d5fa71cebc66e5d10e15c7d02f15fcd3194fbdaafeb964262582f2a82","affectsGlobalScope":true},"1a7f593d587f49ca97710c021c453ab1b95db5e39e58567f4af644f97a5fb0e0","dd4705d1d78af32c407e93e5df009962bed324599d6a5b2a9d661ba44dd99e43","3a02975d4a7034567425e529a0770f7f895ed605d2b576f7831668b7beea9fea","7525257b4aa35efc7a1bbc00f205a9a96c4e4ab791da90db41b77938c4e0c18e","cf87b355c4f531e98a9bba2b0e62d413b49b58b26bf8a9865e60a22d3af1fcd3",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"1a08fe5930473dcae34b831b3440cd51ff2c682cf03bd70e28812751dd1644dd","affectsGlobalScope":true},"6f3e00b838cf23f7837ffca5da88ae25f0a81742af9ccadce5cb85ac72050929","304f66274aa8119e8d65a49b1cff84cbf803def6afe1b2cc987386e9a9890e22","cbcb993f1fa22b7769074eb09c1307756e6380659a2990d6f50cfd8943bd8333","55a93997681797056da069cfac92878bff4d2a35e61c1c16280ee0cba38702f2","ea25afcaf96904668f7eebc1b834f89b5b5e5acafd430c29990028a1aaa0bcbe","df981b2ce32930887db27eeae29e48b9b841e4ba0bbba1162ebed04c778cd7e1",{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true},"3be96458790a77cb357856dab45d1cc8383ac63ba4e085f620b202fb62a6e1db","02d85d03fd4a4f63cba0b133f0e0192368dfeb4338bd33f87788a4f6302de873","bb3a0ce56babb71d7c208ed848b4aafe545e7a7e06304fc0c8cfe3ad328cab7a",{"version":"43bb766c0dc5f1150021f161aa6831eb2cc75dab278172408515cb6e47f697a9","affectsGlobalScope":true},{"version":"8bcf09ba67bd0ec12a9f1efc1e58e1ba2cb1ff78920ce6cf67ebfe6003c54b82","affectsGlobalScope":true},"13ce7518e39051544dd1e3124c185665adda05a5021676f2606c2c74ad2c964f","4ac5899be65d5e2cabe3aaf3dfc2cf7641e54dde23db198d9f683dfabe228145","124dacf89c97915479ed6ad81b09ba42fd40962d069c0642fed42e2d9719f2ba","139ad1dc93a503da85b7a0d5f615bddbae61ad796bc68fedd049150db67a1e26","ad06959073c066bb9543ef9c1dee37fc3140d2ecaae42b97bf4e27f2f03d6511","9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","782abaae13e868dee4ea9c16d44499af251d112fba535c558d10ff5279b34678","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","3c1f19c7abcda6b3a4cf9438a15c7307a080bd3b51dfd56b198d9f86baf19447","98e7b7220dad76c509d584c9b7b1ec4dcbd7df5e3a2d37d28c54f74461ec0975",{"version":"c61b5fad633f25bb0de0f95612191c1df9a6671cd66f451507b5223bff41b50d","affectsGlobalScope":true},{"version":"d21966ba3284ade60cb94eb2c533ab5b2af7fd0b4b28462043f6ebcb8400bd21","affectsGlobalScope":true},"98e00f3613402504bc2a2c9a621800ab48e0a463d1eed062208a4ae98ad8f84c","b8e9e44ce8eba70af569523ff31d669cc239a93f548899a259f3224392a75e6c","005d1caa2a5d9bc096f75b598d0fd184bc848dd2665b050a17a17d5dc1ef652d","619735e4e221e1bf137ae3efa5330beee4a06039dccb876c822f9d8913a392da",{"version":"3560d0809b0677d77e39d0459ae6129c0e045cb3d43d1f345df06cf7ab7d6029","affectsGlobalScope":true},{"version":"5ab086d9457abbc69cca270e5475073f2e8eb35b2fb810c516400de7b7c7d575","affectsGlobalScope":true},"2a2fd53f2d963624b596fb720b390cbfe8d744e92cb55b48a8090a8fd42a302d","1f01c8fde66abc4ff6aed1db050a928b3bcb6f29bc89630a0d748a0649e14074","60223439b7ee9b26a08d527cacc8b34ea6c6741589ef4949f4669c9aeb97978e",{"version":"48fffe7824c2e8cf8c812f528c33d4c4f502767582083df35920a7f56fe794b3","affectsGlobalScope":true},"561bf7d1d3163db272980f9167b4b98f6a9ee8698c5955e9d9584e84088aad51",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"a42be67ed1ddaec743582f41fc219db96a1b69719fccac6d1464321178d610fc","a589f9f052276a3fc00b75e62f73b93ea568fce3e935b86ed7052945f99d9dc2","17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","9b4f7ff9681448c72abe38ea8eefd7ffe0c3aefe495137f02012a08801373f71","0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","1fcf48177cd64f25c193ecc0bf33995d54ea527e29f7faf8cf666f54f3fa0375",{"version":"35704dcd9d5063b47e00b4ef036d8d9f66525ffbf43840814ff5b8bd88a96f8e","signature":"a69e95577406e45e7c9f9f75808c3a73c7621858a29ec0fd4eac35e8c7a8fe34"},{"version":"c1d4170d535b0b580df5bffbe28f7e012492ad4f27b980c4267155927e9cb953","signature":"61674190e1862555824c5b9691bc129e602a6b61062c7d3f707efec8370648bb"},{"version":"5ae7003f6a2207b016382f61a975f8c72cebf014b666abc1eccb431e7772dca3","signature":"120c53dc7d121646090ea8490c2d80d686d18dfba7ac26cd60a96ee69008458b"},{"version":"179e6914c96144bbaadc694007dd357906a0b1dce0e8c3d84b5cba3cbfc4346d","signature":"73454a73a79d881f89b72d44bb363be10aa6d447a869127c7359b6977b20fc08"},"02b1133807234b1a7d9bf9b1419ee19444dd8c26b101bc268aa8181591241f1f","6222e987b58abfe92597e1273ad7233626285bc2d78409d4a7b113d81a83496b","cbe726263ae9a7bf32352380f7e8ab66ee25b3457137e316929269c19e18a2be","7f698624bbbb060ece7c0e51b7236520ebada74b747d7523c7df376453ed6fea",{"version":"4025a454b1ca489b179ee8c684bdd70ff8c1967e382076ade53e7e4653e1daec","affectsGlobalScope":true},{"version":"0e38a1461bc498f67fd75cc12dbf745dc9894dd9f283750de60d5e516243fa24","affectsGlobalScope":true}],"root":[[166,169]],"options":{"allowJs":false,"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"downlevelIteration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"importHelpers":true,"jsx":4,"module":99,"noEmitOnError":true,"noImplicitAny":false,"noImplicitReturns":false,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","preserveConstEnums":true,"removeComments":false,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"target":7,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[121,140,148,159,160,161,164,165],[66,67,68],[69],[159,161,162,163],[159],[140,159,161],[83,87,151],[83,140,151],[78],[80,83,148,151],[129,148],[78,159],[80,83,129,151],[75,76,79,82,109,121,140,151],[75,81],[79,83,109,143,151,159],[109,159],[99,109,159],[77,78,159],[83],[77,78,79,80,81,82,83,84,85,87,88,89,90,91,92,93,94,95,96,97,98,100,101,102,103,104,105],[83,90,91],[81,83,91,92],[82],[75,78,83],[83,87,91,92],[87],[81,83,86,151],[75,80,81,83,87,90],[109,140],[78,83,99,109,156,159],[174],[170],[171],[172,173],[72],[108],[109,114,143],[110,121,122,129,140,151],[110,111,121,129],[112,152],[113,114,122,130],[114,140,148],[115,117,121,129],[108,116],[117,118],[121],[119,121],[108,121],[121,122,123,140,151],[121,122,123,136,140,143],[106,109,156],[117,121,124,129,140,151],[121,122,124,125,129,140,148,151],[124,126,140,148,151],[72,73,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158],[121,127],[128,151,156],[117,121,129,140],[130],[131],[108,132],[129,130,133,150,156],[134],[135],[121,136,137],[136,138,152,154],[109,121,140,141,142,143],[109,140,142],[140,141],[143],[144],[108,140],[121,146,147],[146,147],[114,129,140,148],[149],[129,150],[109,124,135,151],[114,152],[140,153],[128,154],[155],[109,114,121,123,132,140,151,154,156],[140,157],[65,70,122,131,166],[65,70],[65,70,71,165],[166]],"referencedMap":[[165,1],[69,2],[70,3],[164,4],[161,5],[163,6],[90,7],[97,8],[89,7],[104,9],[81,10],[80,11],[103,5],[98,12],[101,13],[83,14],[82,15],[78,16],[77,17],[100,18],[79,19],[84,20],[88,20],[106,21],[105,20],[92,22],[93,23],[95,24],[91,25],[94,26],[99,5],[86,27],[87,28],[96,29],[76,30],[102,31],[175,32],[171,33],[172,34],[174,35],[72,36],[73,36],[108,37],[109,38],[110,39],[111,40],[112,41],[113,42],[114,43],[115,44],[116,45],[117,46],[118,46],[120,47],[119,48],[121,49],[122,50],[123,51],[107,52],[124,53],[125,54],[126,55],[159,56],[127,57],[128,58],[129,59],[130,60],[131,61],[132,62],[133,63],[134,64],[135,65],[136,66],[137,66],[138,67],[140,68],[142,69],[141,70],[143,71],[144,72],[145,73],[146,74],[147,75],[148,76],[149,77],[150,78],[151,79],[152,80],[153,81],[154,82],[155,83],[156,84],[157,85],[167,86],[168,87],[169,87],[166,88]],"exportedModulesMap":[[165,1],[69,2],[70,3],[164,4],[161,5],[163,6],[90,7],[97,8],[89,7],[104,9],[81,10],[80,11],[103,5],[98,12],[101,13],[83,14],[82,15],[78,16],[77,17],[100,18],[79,19],[84,20],[88,20],[106,21],[105,20],[92,22],[93,23],[95,24],[91,25],[94,26],[99,5],[86,27],[87,28],[96,29],[76,30],[102,31],[175,32],[171,33],[172,34],[174,35],[72,36],[73,36],[108,37],[109,38],[110,39],[111,40],[112,41],[113,42],[114,43],[115,44],[116,45],[117,46],[118,46],[120,47],[119,48],[121,49],[122,50],[123,51],[107,52],[124,53],[125,54],[126,55],[159,56],[127,57],[128,58],[129,59],[130,60],[131,61],[132,62],[133,63],[134,64],[135,65],[136,66],[137,66],[138,67],[140,68],[142,69],[141,70],[143,71],[144,72],[145,73],[146,74],[147,75],[148,76],[149,77],[150,78],[151,79],[152,80],[153,81],[154,82],[155,83],[156,84],[157,85],[167,89]],"semanticDiagnosticsPerFile":[165,160,68,66,69,70,71,74,67,164,161,163,162,65,63,64,12,14,13,2,15,16,17,18,19,20,21,22,3,4,23,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,57,55,56,58,59,10,1,11,62,61,60,90,97,89,104,81,80,103,98,101,83,82,78,77,100,79,84,85,88,75,106,105,92,93,95,91,94,99,86,87,96,76,102,175,171,170,172,173,174,72,73,108,109,110,111,112,113,114,115,116,117,118,120,119,121,122,123,107,158,124,125,126,159,127,128,129,130,131,132,133,134,135,136,137,138,139,140,142,141,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,167,168,169,166],"latestChangedDtsFile":"./meshConfig.d.ts"},"version":"5.3.3"}
|
package/types/dev.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface LookupTranspileModulesOptions {
|
|
2
|
+
log?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export interface LookupTamaguiModulesOptions {
|
|
5
|
+
log?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function lookupTranspileModules(packageDirs?: string[], { log }?: LookupTranspileModulesOptions): any[];
|
|
8
|
+
export declare function lookupTamaguiModules(packageDirs?: string[], { log }?: LookupTamaguiModulesOptions): any[];
|
|
9
|
+
export declare function resolveConfig(keys?: string[]): Record<string, string | undefined>;
|
|
10
|
+
export declare const projectRoot: string;
|
|
11
|
+
export * from "./wait";
|
|
12
|
+
//# sourceMappingURL=dev.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"AA0BA,MAAM,WAAW,6BAA6B;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,2BAA2B;IAC1C,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAgB,sBAAsB,CACpC,WAAW,CAAC,EAAE,MAAM,EAAE,EACtB,EAAE,GAAU,EAAE,GAAE,6BAAkC,SA2BnD;AAED,wBAAgB,oBAAoB,CAClC,WAAW,CAAC,EAAE,MAAM,EAAE,EACtB,EAAE,GAAU,EAAE,GAAE,2BAAgC,SA4BjD;AAED,wBAAgB,aAAa,CAC3B,IAAI,GAAE,MAAM,EAAO,GAClB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAQpC;AAED,eAAO,MAAM,WAAW,QAoBpB,CAAC;AAEL,cAAc,QAAQ,CAAC"}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/index.ts
|
|
3
|
+
* Project: @multiplatform.one/utils
|
|
4
|
+
* File Created: 19-11-2024 20:26:31
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
declare const _default: {};
|
|
22
|
+
export default _default;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AAEH,wBAAkB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/meshConfig.ts
|
|
3
|
+
* Project: utils
|
|
4
|
+
* -----
|
|
5
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
*/
|
|
10
|
+
export declare const meshConfig: {
|
|
11
|
+
readonly sources: readonly ({
|
|
12
|
+
name: string;
|
|
13
|
+
handler: {
|
|
14
|
+
graphql: {
|
|
15
|
+
endpoint: string;
|
|
16
|
+
subscriptionsEndpoint: string;
|
|
17
|
+
subscriptionsProtocol: string;
|
|
18
|
+
operationHeaders: {
|
|
19
|
+
Authorization: string;
|
|
20
|
+
Cookie: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
transforms: ({
|
|
25
|
+
prefix: {
|
|
26
|
+
mode: string;
|
|
27
|
+
value: string;
|
|
28
|
+
};
|
|
29
|
+
filterSchema?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
filterSchema: {
|
|
32
|
+
mode: string;
|
|
33
|
+
filters: never[];
|
|
34
|
+
};
|
|
35
|
+
prefix?: undefined;
|
|
36
|
+
})[];
|
|
37
|
+
} | {
|
|
38
|
+
name: string;
|
|
39
|
+
handler: {
|
|
40
|
+
graphql: {
|
|
41
|
+
endpoint: string;
|
|
42
|
+
subscriptionsEndpoint: string;
|
|
43
|
+
subscriptionsProtocol: string;
|
|
44
|
+
operationHeaders: {
|
|
45
|
+
Authorization: string;
|
|
46
|
+
Cookie: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
transforms: ({
|
|
51
|
+
prefix: {
|
|
52
|
+
mode: string;
|
|
53
|
+
value: string;
|
|
54
|
+
};
|
|
55
|
+
filterSchema?: undefined;
|
|
56
|
+
} | {
|
|
57
|
+
filterSchema: {
|
|
58
|
+
mode: string;
|
|
59
|
+
filters: string[];
|
|
60
|
+
};
|
|
61
|
+
prefix?: undefined;
|
|
62
|
+
})[];
|
|
63
|
+
})[];
|
|
64
|
+
readonly additionalEnvelopPlugins: "./envelopPlugins.js";
|
|
65
|
+
readonly serve: {
|
|
66
|
+
readonly browser: false;
|
|
67
|
+
};
|
|
68
|
+
readonly plugins: readonly [{
|
|
69
|
+
readonly rateLimit: {
|
|
70
|
+
readonly config: readonly [];
|
|
71
|
+
};
|
|
72
|
+
}, {
|
|
73
|
+
readonly maxTokens: {
|
|
74
|
+
readonly n: 1000;
|
|
75
|
+
};
|
|
76
|
+
}, {
|
|
77
|
+
readonly maxDepth: {
|
|
78
|
+
readonly n: 10;
|
|
79
|
+
};
|
|
80
|
+
}, {
|
|
81
|
+
readonly blockFieldSuggestions: {};
|
|
82
|
+
}, {
|
|
83
|
+
readonly responseCache: {};
|
|
84
|
+
}];
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=meshConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meshConfig.d.ts","sourceRoot":"","sources":["../src/meshConfig.ts"],"names":[],"mappings":"AAqBA;;;;;;;;GAQG;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGb,CAAC"}
|
package/types/wait.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function waitForApi(interval: number): Promise<void>;
|
|
2
|
+
export declare function waitForFrappe(interval: number): Promise<void>;
|
|
3
|
+
export declare function waitForPostgres(interval: number): Promise<void>;
|
|
4
|
+
export declare function waitForKeycloak(interval: number): Promise<void>;
|
|
5
|
+
export declare function formatServiceList(services: readonly string[]): string;
|
|
6
|
+
export declare const waitServices: readonly ["graphql", "frappe", "postgres", "keycloak"];
|
|
7
|
+
export type WaitService = (typeof waitServices)[number];
|
|
8
|
+
//# sourceMappingURL=wait.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../src/wait.ts"],"names":[],"mappings":"AAwBA,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,iBAWhD;AAED,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,iBAWnD;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,iBAoBrD;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,iBAWrD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAIrE;AAED,eAAO,MAAM,YAAY,wDAKf,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/lib/build.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface LookupTranspileModulesOptions {
|
|
2
|
-
log?: boolean;
|
|
3
|
-
}
|
|
4
|
-
interface LookupTamaguiModulesOptions {
|
|
5
|
-
log?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare function lookupTranspileModules(packageDirs?: string[], { log }?: LookupTranspileModulesOptions): any[];
|
|
8
|
-
declare function lookupTamaguiModules(packageDirs?: string[], { log }?: LookupTamaguiModulesOptions): any[];
|
|
9
|
-
declare function resolveConfig(keys?: Record<string, any>): any;
|
|
10
|
-
|
|
11
|
-
export { type LookupTamaguiModulesOptions, type LookupTranspileModulesOptions, lookupTamaguiModules, lookupTranspileModules, resolveConfig };
|
package/lib/build.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
// src/build.ts
|
|
9
|
-
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
10
|
-
var logger = console;
|
|
11
|
-
var projectRoot = __require.resolve("react/package.json").slice(0, -32);
|
|
12
|
-
function lookupTranspileModules(packageDirs, { log = true } = {}) {
|
|
13
|
-
const transpileModules = [
|
|
14
|
-
...new Set(
|
|
15
|
-
[
|
|
16
|
-
.../* @__PURE__ */ new Set([
|
|
17
|
-
projectRoot,
|
|
18
|
-
_path2.default.resolve(projectRoot, "app"),
|
|
19
|
-
_path2.default.resolve(projectRoot, "packages", "ui"),
|
|
20
|
-
...packageDirs || []
|
|
21
|
-
])
|
|
22
|
-
].map(
|
|
23
|
-
(packageDir) => __require(`${packageDir}/package.json`).transpileModules || []
|
|
24
|
-
)
|
|
25
|
-
)
|
|
26
|
-
].flat();
|
|
27
|
-
if (log) logger.debug("transpileModules:", transpileModules.join(", "));
|
|
28
|
-
return transpileModules;
|
|
29
|
-
}
|
|
30
|
-
function lookupTamaguiModules(packageDirs, { log = true } = {}) {
|
|
31
|
-
const tamaguiModules = [
|
|
32
|
-
.../* @__PURE__ */ new Set([
|
|
33
|
-
"tamagui",
|
|
34
|
-
...[
|
|
35
|
-
.../* @__PURE__ */ new Set([
|
|
36
|
-
projectRoot,
|
|
37
|
-
_path2.default.resolve(projectRoot, "app"),
|
|
38
|
-
_path2.default.resolve(projectRoot, "packages", "ui"),
|
|
39
|
-
...packageDirs || []
|
|
40
|
-
])
|
|
41
|
-
].map(
|
|
42
|
-
(packageDir) => __require(`${packageDir}/package.json`).tamaguiModules || []
|
|
43
|
-
)
|
|
44
|
-
])
|
|
45
|
-
].flat();
|
|
46
|
-
if (log) logger.debug("tamaguiModules:", tamaguiModules.join(", "));
|
|
47
|
-
return tamaguiModules;
|
|
48
|
-
}
|
|
49
|
-
function resolveConfig(keys = {}) {
|
|
50
|
-
return keys.reduce(
|
|
51
|
-
(acc, key) => {
|
|
52
|
-
if (process.env[key]) acc[key] = process.env[key];
|
|
53
|
-
return acc;
|
|
54
|
-
},
|
|
55
|
-
{}
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
exports.lookupTamaguiModules = lookupTamaguiModules; exports.lookupTranspileModules = lookupTranspileModules; exports.resolveConfig = resolveConfig;
|
package/lib/index.d.ts
DELETED