@chronsyn/eas-on-infra 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/send-build.d.ts.map +1 -1
- package/dist/client/send-build.js +16 -0
- package/dist/ingress.d.ts.map +1 -1
- package/dist/ingress.js +4 -7
- package/package.json +3 -6
- package/src/client/send-build.ts +22 -0
- package/src/ingress.ts +4 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-build.d.ts","sourceRoot":"","sources":["../../src/client/send-build.ts"],"names":[],"mappings":";AAoCA,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"send-build.d.ts","sourceRoot":"","sources":["../../src/client/send-build.ts"],"names":[],"mappings":";AAoCA,eAAO,MAAM,QAAQ,qBA8LpB,CAAA"}
|
|
@@ -101,6 +101,22 @@ const runBuild = async () => {
|
|
|
101
101
|
if (ent.includes(bundleFileExtension)) {
|
|
102
102
|
return false;
|
|
103
103
|
}
|
|
104
|
+
// Exclude zips and binaries
|
|
105
|
+
if (ent.toLowerCase().includes(".zip")) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
if (ent.toLowerCase().includes('.apk')) {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
if (ent.toLowerCase().includes('.aab')) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
if (ent.toLowerCase().includes('.ipa')) {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
if (ent.toLowerCase().includes('.app')) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
104
120
|
return true;
|
|
105
121
|
});
|
|
106
122
|
// console.log(JSON.stringify({directories, rootDirFiles, outputBundlePath}, null, 2))
|
package/dist/ingress.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingress.d.ts","sourceRoot":"","sources":["../src/ingress.ts"],"names":[],"mappings":"AAIA,OAAO,OAAO,MAAM,SAAS,CAAC;AAmB9B,eAAO,MAAM,cAAc,GAAI,KAAK,OAAO,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"ingress.d.ts","sourceRoot":"","sources":["../src/ingress.ts"],"names":[],"mappings":"AAIA,OAAO,OAAO,MAAM,SAAS,CAAC;AAmB9B,eAAO,MAAM,cAAc,GAAI,KAAK,OAAO,CAAC,OAAO,SAiUlD,CAAA"}
|
package/dist/ingress.js
CHANGED
|
@@ -55,12 +55,9 @@ const configureRoute = (app) => {
|
|
|
55
55
|
new Date().getTime(),
|
|
56
56
|
node_crypto_1.default.randomBytes(4).toString("hex")
|
|
57
57
|
].join('_');
|
|
58
|
-
const extractedPath = node_path_1.default.resolve(process.env.
|
|
59
|
-
? (process.env.
|
|
60
|
-
|
|
61
|
-
: (process.cwd(),
|
|
62
|
-
'extracted',
|
|
63
|
-
projectFileExtractName));
|
|
58
|
+
const extractedPath = node_path_1.default.resolve(!!process.env.EXTRACT_DIRECTORY
|
|
59
|
+
? (process.env.EXTRACT_DIRECTORY, projectFileExtractName)
|
|
60
|
+
: (process.cwd(), 'extracted', projectFileExtractName));
|
|
64
61
|
const directory = await unzipper_1.default.Open.file(actualInputFilePath);
|
|
65
62
|
await directory.extract({ path: extractedPath });
|
|
66
63
|
const parse = await ZBodySchema.safeParseAsync(req.body);
|
|
@@ -80,7 +77,7 @@ const configureRoute = (app) => {
|
|
|
80
77
|
].join('__');
|
|
81
78
|
// If user has provided BINARY_OUTPUT_DIRECTORY in env, use that
|
|
82
79
|
// Else, fallback to output directory
|
|
83
|
-
const easBuildOutputPath = node_path_1.default.resolve(((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b.BINARY_OUTPUT_DIRECTORY)
|
|
80
|
+
const easBuildOutputPath = node_path_1.default.resolve(!!((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b.BINARY_OUTPUT_DIRECTORY)
|
|
84
81
|
? ((_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c.BINARY_OUTPUT_DIRECTORY, fn)
|
|
85
82
|
: (process.cwd(), 'builds', fn));
|
|
86
83
|
console.log(`EXTRACTED PATH => ${extractedPath}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chronsyn/eas-on-infra",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"main": "dist/application.core.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"scripts": {
|
|
@@ -9,14 +9,11 @@
|
|
|
9
9
|
"publish": "npm publish --access=public"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
|
-
"eas-on-infra": "
|
|
13
|
-
},
|
|
14
|
-
"_developer_comments": {
|
|
15
|
-
"client_example_command": "npx eas-on-infra build --profile production --platform ios --installer npm --config_file_path .env --build_server http://192.168.1.25:3000"
|
|
12
|
+
"eas-on-infra": "dist/client/root.js"
|
|
16
13
|
},
|
|
17
14
|
"keywords": [],
|
|
18
15
|
"author": "",
|
|
19
|
-
"license": "
|
|
16
|
+
"license": "MIT",
|
|
20
17
|
"description": "",
|
|
21
18
|
"devDependencies": {
|
|
22
19
|
"@types/archiver": "^7.0.0",
|
package/src/client/send-build.ts
CHANGED
|
@@ -108,6 +108,28 @@ export const runBuild = async () => {
|
|
|
108
108
|
if (ent.includes(bundleFileExtension)) {
|
|
109
109
|
return false;
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
// Exclude zips and binaries
|
|
113
|
+
if (ent.toLowerCase().includes(".zip")) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (ent.toLowerCase().includes('.apk')) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (ent.toLowerCase().includes('.aab')) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (ent.toLowerCase().includes('.ipa')) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (ent.toLowerCase().includes('.app')) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
|
|
111
133
|
return true;
|
|
112
134
|
})
|
|
113
135
|
|
package/src/ingress.ts
CHANGED
|
@@ -68,16 +68,9 @@ export const configureRoute = (app: express.Express) => {
|
|
|
68
68
|
].join('_')
|
|
69
69
|
|
|
70
70
|
const extractedPath = path.resolve(
|
|
71
|
-
process.env.
|
|
72
|
-
? (
|
|
73
|
-
|
|
74
|
-
projectFileExtractName
|
|
75
|
-
)
|
|
76
|
-
: (
|
|
77
|
-
process.cwd(),
|
|
78
|
-
'extracted',
|
|
79
|
-
projectFileExtractName
|
|
80
|
-
),
|
|
71
|
+
!!process.env.EXTRACT_DIRECTORY
|
|
72
|
+
? ( process.env.EXTRACT_DIRECTORY, projectFileExtractName )
|
|
73
|
+
: ( process.cwd(), 'extracted', projectFileExtractName ),
|
|
81
74
|
)
|
|
82
75
|
const directory = await unzipper.Open.file(actualInputFilePath)
|
|
83
76
|
await directory.extract({ path: extractedPath });
|
|
@@ -106,7 +99,7 @@ export const configureRoute = (app: express.Express) => {
|
|
|
106
99
|
// If user has provided BINARY_OUTPUT_DIRECTORY in env, use that
|
|
107
100
|
// Else, fallback to output directory
|
|
108
101
|
const easBuildOutputPath = path.resolve(
|
|
109
|
-
process?.env?.BINARY_OUTPUT_DIRECTORY
|
|
102
|
+
!!process?.env?.BINARY_OUTPUT_DIRECTORY
|
|
110
103
|
? (process?.env?.BINARY_OUTPUT_DIRECTORY, fn)
|
|
111
104
|
: (process.cwd(), 'builds', fn)
|
|
112
105
|
)
|