@kithinji/pod 1.0.28 → 1.0.30
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/main.js +14 -9
- package/dist/main.js.map +2 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -4853,6 +4853,7 @@ async function addTs(name) {
|
|
|
4853
4853
|
]
|
|
4854
4854
|
};
|
|
4855
4855
|
createStructure(baseDir, structure);
|
|
4856
|
+
process.chdir(baseDir);
|
|
4856
4857
|
console.log(`TypeScript project created for ${target} environment`);
|
|
4857
4858
|
}
|
|
4858
4859
|
function getSrcFiles(target) {
|
|
@@ -4881,7 +4882,8 @@ function genPackageJson2(name, target) {
|
|
|
4881
4882
|
},
|
|
4882
4883
|
devDependencies: {
|
|
4883
4884
|
typescript: "^5.9.3",
|
|
4884
|
-
esbuild: "^0.27.2"
|
|
4885
|
+
esbuild: "^0.27.2",
|
|
4886
|
+
"@types/node": "^25.0.3"
|
|
4885
4887
|
}
|
|
4886
4888
|
};
|
|
4887
4889
|
if (target === "node") {
|
|
@@ -4936,9 +4938,9 @@ function genTsConfig(target) {
|
|
|
4936
4938
|
return JSON.stringify(config, null, 2);
|
|
4937
4939
|
}
|
|
4938
4940
|
function genBuildConfig(name, target) {
|
|
4939
|
-
return `
|
|
4940
|
-
|
|
4941
|
-
|
|
4941
|
+
return `import * as esbuild from "esbuild";
|
|
4942
|
+
import { execSync } from "child_process";
|
|
4943
|
+
import path from "path";
|
|
4942
4944
|
|
|
4943
4945
|
const isWatch = process.argv.includes('--watch');
|
|
4944
4946
|
|
|
@@ -4946,7 +4948,7 @@ const isWatch = process.argv.includes('--watch');
|
|
|
4946
4948
|
const aliasPlugin = {
|
|
4947
4949
|
name: 'alias',
|
|
4948
4950
|
setup(build) {
|
|
4949
|
-
build.onResolve({ filter:
|
|
4951
|
+
build.onResolve({ filter: /^@/ }, args => {
|
|
4950
4952
|
return {
|
|
4951
4953
|
path: path.resolve(__dirname, 'src', args.path.slice(2))
|
|
4952
4954
|
};
|
|
@@ -4954,7 +4956,6 @@ const aliasPlugin = {
|
|
|
4954
4956
|
}
|
|
4955
4957
|
};
|
|
4956
4958
|
|
|
4957
|
-
|
|
4958
4959
|
const buildConfigs = ${JSON.stringify(getBuildConfigs(target), null, 2).replace(
|
|
4959
4960
|
/"plugins": null/g,
|
|
4960
4961
|
'"plugins": [aliasPlugin]'
|
|
@@ -6432,7 +6433,7 @@ Deployment Failed: ${err.message}`));
|
|
|
6432
6433
|
// src/main.ts
|
|
6433
6434
|
import chalk2 from "chalk";
|
|
6434
6435
|
var program = new Command();
|
|
6435
|
-
program.name("pod").description("Pod cli tool").version("1.0.
|
|
6436
|
+
program.name("pod").description("Pod cli tool").version("1.0.30");
|
|
6436
6437
|
program.command("new <name> [type]").description("Start a new Orca Project").action(async (name, type) => {
|
|
6437
6438
|
const orca = async () => {
|
|
6438
6439
|
await addNew(name);
|
|
@@ -6446,8 +6447,12 @@ program.command("new <name> [type]").description("Start a new Orca Project").act
|
|
|
6446
6447
|
`All done! Your app "${name}" is running in development mode.`
|
|
6447
6448
|
);
|
|
6448
6449
|
};
|
|
6449
|
-
const ts4 = () => {
|
|
6450
|
-
addTs(name);
|
|
6450
|
+
const ts4 = async () => {
|
|
6451
|
+
await addTs(name);
|
|
6452
|
+
const appDir = path15.resolve(process.cwd());
|
|
6453
|
+
const shell = process.platform === "win32" ? process.env.ComSpec || "cmd.exe" : "/bin/sh";
|
|
6454
|
+
console.log("Installing dependencies...");
|
|
6455
|
+
execSync("npm install", { stdio: "inherit", cwd: appDir, shell });
|
|
6451
6456
|
};
|
|
6452
6457
|
switch (type) {
|
|
6453
6458
|
case "orca":
|