@geekmidas/cli 0.49.0 → 0.50.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/dist/deploy/sniffer-envkit-patch.cjs +27 -0
- package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -0
- package/dist/deploy/sniffer-envkit-patch.d.cts +46 -0
- package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -0
- package/dist/deploy/sniffer-envkit-patch.d.mts +46 -0
- package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -0
- package/dist/deploy/sniffer-envkit-patch.mjs +20 -0
- package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -0
- package/dist/deploy/sniffer-hooks.cjs +25 -0
- package/dist/deploy/sniffer-hooks.cjs.map +1 -0
- package/dist/deploy/sniffer-hooks.d.cts +27 -0
- package/dist/deploy/sniffer-hooks.d.cts.map +1 -0
- package/dist/deploy/sniffer-hooks.d.mts +27 -0
- package/dist/deploy/sniffer-hooks.d.mts.map +1 -0
- package/dist/deploy/sniffer-hooks.mjs +24 -0
- package/dist/deploy/sniffer-hooks.mjs.map +1 -0
- package/dist/deploy/sniffer-loader.cjs +16 -0
- package/dist/deploy/sniffer-loader.cjs.map +1 -0
- package/dist/deploy/sniffer-loader.d.cts +1 -0
- package/dist/deploy/sniffer-loader.d.mts +1 -0
- package/dist/deploy/sniffer-loader.mjs +15 -0
- package/dist/deploy/sniffer-loader.mjs.map +1 -0
- package/dist/deploy/sniffer-worker.cjs +42 -0
- package/dist/deploy/sniffer-worker.cjs.map +1 -0
- package/dist/deploy/sniffer-worker.d.cts +9 -0
- package/dist/deploy/sniffer-worker.d.cts.map +1 -0
- package/dist/deploy/sniffer-worker.d.mts +9 -0
- package/dist/deploy/sniffer-worker.d.mts.map +1 -0
- package/dist/deploy/sniffer-worker.mjs +41 -0
- package/dist/deploy/sniffer-worker.mjs.map +1 -0
- package/dist/index.cjs +21 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +21 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/deploy/sniffer-envkit-patch.ts +19 -3
- package/src/deploy/sniffer-hooks.ts +6 -1
- package/src/deploy/sniffer-loader.ts +7 -2
- package/src/deploy/sniffer.ts +36 -2
- package/tsdown.config.ts +5 -0
package/dist/index.mjs
CHANGED
|
@@ -30,7 +30,7 @@ import prompts from "prompts";
|
|
|
30
30
|
|
|
31
31
|
//#region package.json
|
|
32
32
|
var name = "@geekmidas/cli";
|
|
33
|
-
var version = "0.
|
|
33
|
+
var version = "0.50.0";
|
|
34
34
|
var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
|
|
35
35
|
var private$1 = false;
|
|
36
36
|
var type = "module";
|
|
@@ -4868,6 +4868,24 @@ function generateSecretsReport(encryptedApps, sniffedApps) {
|
|
|
4868
4868
|
const __filename = fileURLToPath(import.meta.url);
|
|
4869
4869
|
const __dirname = dirname(__filename);
|
|
4870
4870
|
/**
|
|
4871
|
+
* Resolve the path to a sniffer helper file.
|
|
4872
|
+
* Handles both dev (.ts with tsx) and production (.mjs from dist).
|
|
4873
|
+
*
|
|
4874
|
+
* In production: sniffer.ts is bundled into dist/index.mjs, but sniffer helper
|
|
4875
|
+
* files are output to dist/deploy/ as standalone modules for subprocess loading.
|
|
4876
|
+
*
|
|
4877
|
+
* In development: All files are in src/deploy/ and loaded via tsx.
|
|
4878
|
+
*/
|
|
4879
|
+
function resolveSnifferFile(baseName) {
|
|
4880
|
+
const deployMjsPath = resolve(__dirname, "deploy", `${baseName}.mjs`);
|
|
4881
|
+
if (existsSync(deployMjsPath)) return deployMjsPath;
|
|
4882
|
+
const mjsPath = resolve(__dirname, `${baseName}.mjs`);
|
|
4883
|
+
if (existsSync(mjsPath)) return mjsPath;
|
|
4884
|
+
const tsPath = resolve(__dirname, `${baseName}.ts`);
|
|
4885
|
+
if (existsSync(tsPath)) return tsPath;
|
|
4886
|
+
return tsPath;
|
|
4887
|
+
}
|
|
4888
|
+
/**
|
|
4871
4889
|
* Get required environment variables for an app.
|
|
4872
4890
|
*
|
|
4873
4891
|
* Detection strategy (in order):
|
|
@@ -4941,8 +4959,8 @@ async function sniffAppEnvironment(app, appName, workspacePath, options = {}) {
|
|
|
4941
4959
|
*/
|
|
4942
4960
|
async function sniffEntryFile(entryPath, appPath, workspacePath) {
|
|
4943
4961
|
const fullEntryPath = resolve(workspacePath, appPath, entryPath);
|
|
4944
|
-
const loaderPath =
|
|
4945
|
-
const workerPath =
|
|
4962
|
+
const loaderPath = resolveSnifferFile("sniffer-loader");
|
|
4963
|
+
const workerPath = resolveSnifferFile("sniffer-worker");
|
|
4946
4964
|
return new Promise((resolvePromise) => {
|
|
4947
4965
|
const child = spawn("node", [
|
|
4948
4966
|
"--import",
|