@multiplatform.one/utils 1.0.0 → 5.0.0
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-55ZF3CTQ.cjs +84 -0
- package/lib/chunk-QMKU5DBF.js +84 -0
- package/lib/dev.cjs +102 -0
- package/lib/dev.js +102 -0
- package/lib/index.cjs +5 -0
- package/lib/index.js +5 -1
- package/lib/meshConfig.cjs +98 -0
- package/lib/meshConfig.js +98 -0
- package/lib/wait.cjs +16 -0
- package/lib/wait.js +16 -0
- package/package.json +38 -35
- package/src/dev.ts +132 -0
- 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/{transpileModules → types}/index.d.ts +6 -5
- 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/index.d.ts +0 -2
- package/lib/transpileModules.d.ts +0 -10
- package/lib/transpileModules.js +0 -48
- package/src/transpileModules.ts +0 -68
- package/transpileModules/index.js +0 -22
|
@@ -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/index.d.ts
DELETED
|
@@ -1,10 +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
|
-
|
|
10
|
-
export { type LookupTamaguiModulesOptions, type LookupTranspileModulesOptions, lookupTamaguiModules, lookupTranspileModules };
|
package/lib/transpileModules.js
DELETED
|
@@ -1,48 +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/transpileModules.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((packageDir) => __require(`${packageDir}/package.json`).transpileModules || [])
|
|
23
|
-
)
|
|
24
|
-
].flat();
|
|
25
|
-
if (log) logger.debug("transpileModules:", transpileModules.join(", "));
|
|
26
|
-
return transpileModules;
|
|
27
|
-
}
|
|
28
|
-
function lookupTamaguiModules(packageDirs, { log = true } = {}) {
|
|
29
|
-
const tamaguiModules = [
|
|
30
|
-
.../* @__PURE__ */ new Set([
|
|
31
|
-
"tamagui",
|
|
32
|
-
...[
|
|
33
|
-
.../* @__PURE__ */ new Set([
|
|
34
|
-
projectRoot,
|
|
35
|
-
_path2.default.resolve(projectRoot, "app"),
|
|
36
|
-
_path2.default.resolve(projectRoot, "packages", "ui"),
|
|
37
|
-
...packageDirs || []
|
|
38
|
-
])
|
|
39
|
-
].map((packageDir) => __require(`${packageDir}/package.json`).tamaguiModules || [])
|
|
40
|
-
])
|
|
41
|
-
].flat();
|
|
42
|
-
if (log) logger.debug("tamaguiModules:", tamaguiModules.join(", "));
|
|
43
|
-
return tamaguiModules;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
exports.lookupTamaguiModules = lookupTamaguiModules; exports.lookupTranspileModules = lookupTranspileModules;
|
package/src/transpileModules.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* File: /src/transpileModules.ts
|
|
3
|
-
* Project: @multiplatform.one/utils
|
|
4
|
-
* File Created: 16-06-2024 11:47:19
|
|
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
|
-
|
|
22
|
-
import path from 'path';
|
|
23
|
-
|
|
24
|
-
const logger = console;
|
|
25
|
-
const projectRoot = require.resolve('react/package.json').slice(0, -32);
|
|
26
|
-
|
|
27
|
-
export interface LookupTranspileModulesOptions {
|
|
28
|
-
log?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface LookupTamaguiModulesOptions {
|
|
32
|
-
log?: boolean;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function lookupTranspileModules(packageDirs?: string[], { log = true }: LookupTranspileModulesOptions = {}) {
|
|
36
|
-
const transpileModules = [
|
|
37
|
-
...new Set(
|
|
38
|
-
[
|
|
39
|
-
...new Set([
|
|
40
|
-
projectRoot,
|
|
41
|
-
path.resolve(projectRoot, 'app'),
|
|
42
|
-
path.resolve(projectRoot, 'packages', 'ui'),
|
|
43
|
-
...(packageDirs || []),
|
|
44
|
-
]),
|
|
45
|
-
].map((packageDir) => require(`${packageDir}/package.json`).transpileModules || []),
|
|
46
|
-
),
|
|
47
|
-
].flat();
|
|
48
|
-
if (log) logger.debug('transpileModules:', transpileModules.join(', '));
|
|
49
|
-
return transpileModules;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function lookupTamaguiModules(packageDirs?: string[], { log = true }: LookupTamaguiModulesOptions = {}) {
|
|
53
|
-
const tamaguiModules = [
|
|
54
|
-
...new Set([
|
|
55
|
-
'tamagui',
|
|
56
|
-
...[
|
|
57
|
-
...new Set([
|
|
58
|
-
projectRoot,
|
|
59
|
-
path.resolve(projectRoot, 'app'),
|
|
60
|
-
path.resolve(projectRoot, 'packages', 'ui'),
|
|
61
|
-
...(packageDirs || []),
|
|
62
|
-
]),
|
|
63
|
-
].map((packageDir) => require(`${packageDir}/package.json`).tamaguiModules || []),
|
|
64
|
-
]),
|
|
65
|
-
].flat();
|
|
66
|
-
if (log) logger.debug('tamaguiModules:', tamaguiModules.join(', '));
|
|
67
|
-
return tamaguiModules;
|
|
68
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* File: /transpileModules/index.js
|
|
3
|
-
* Project: @multiplatform.one/utils
|
|
4
|
-
* File Created: 16-06-2024 14:28:33
|
|
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
|
-
|
|
22
|
-
export * from '../lib/transpileModules.js';
|