windmill-cli 1.621.0 → 1.621.2
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/esm/gen/core/OpenAPI.js +1 -1
- package/esm/src/commands/app/dev.js +28 -12
- package/esm/src/commands/sync/sync.js +2 -12
- package/esm/src/main.js +1 -1
- package/package.json +1 -1
- package/types/src/commands/app/dev.d.ts +1 -1
- package/types/src/commands/app/dev.d.ts.map +1 -1
- package/types/src/commands/sync/sync.d.ts.map +1 -1
- package/types/src/main.d.ts +1 -1
package/esm/gen/core/OpenAPI.js
CHANGED
|
@@ -273,31 +273,46 @@ const createHTML = (jsPath, cssPath) => `
|
|
|
273
273
|
</body>
|
|
274
274
|
</html>
|
|
275
275
|
`;
|
|
276
|
-
async function dev(opts) {
|
|
276
|
+
async function dev(opts, appFolder) {
|
|
277
277
|
GLOBAL_CONFIG_OPT.noCdToRoot = true;
|
|
278
278
|
// Search for wmill.yaml by traversing upward (without git root constraint)
|
|
279
279
|
// to initialize nonDottedPaths setting before using folder suffix functions
|
|
280
280
|
await loadNonDottedPathsSetting();
|
|
281
|
-
//
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
if (
|
|
281
|
+
// Resolve target directory from argument or use current directory
|
|
282
|
+
const originalCwd = process.cwd();
|
|
283
|
+
let targetDir = originalCwd;
|
|
284
|
+
if (appFolder) {
|
|
285
|
+
targetDir = path.isAbsolute(appFolder)
|
|
286
|
+
? appFolder
|
|
287
|
+
: path.join(originalCwd, appFolder);
|
|
288
|
+
if (!fs.existsSync(targetDir)) {
|
|
289
|
+
log.error(colors.red(`Error: Directory not found: ${targetDir}`));
|
|
290
|
+
dntShim.Deno.exit(1);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
// Validate that target is a .raw_app folder
|
|
294
|
+
const targetDirName = path.basename(targetDir);
|
|
295
|
+
if (!hasFolderSuffix(targetDirName, "raw_app")) {
|
|
285
296
|
log.error(colors.red(`Error: The dev command must be run inside a ${getFolderSuffix("raw_app")} folder.\n` +
|
|
286
|
-
`
|
|
287
|
-
`Please navigate to a folder ending with '${getFolderSuffix("raw_app")}'
|
|
297
|
+
`Target directory: ${targetDirName}\n` +
|
|
298
|
+
`Please navigate to a folder ending with '${getFolderSuffix("raw_app")}' or specify one as argument.`));
|
|
288
299
|
dntShim.Deno.exit(1);
|
|
289
300
|
}
|
|
290
|
-
// Check for raw_app.yaml
|
|
291
|
-
const rawAppPath = path.join(
|
|
301
|
+
// Check for raw_app.yaml in target directory
|
|
302
|
+
const rawAppPath = path.join(targetDir, "raw_app.yaml");
|
|
292
303
|
if (!fs.existsSync(rawAppPath)) {
|
|
293
|
-
log.error(colors.red(`Error: raw_app.yaml not found in
|
|
294
|
-
`The dev command
|
|
304
|
+
log.error(colors.red(`Error: raw_app.yaml not found in ${targetDir}.\n` +
|
|
305
|
+
`The dev command requires a ${getFolderSuffix("raw_app")} folder containing a raw_app.yaml file.`));
|
|
295
306
|
dntShim.Deno.exit(1);
|
|
296
307
|
}
|
|
297
|
-
// Resolve workspace and authenticate
|
|
308
|
+
// Resolve workspace and authenticate (from original cwd to find wmill.yaml)
|
|
298
309
|
const workspace = await resolveWorkspace(opts);
|
|
299
310
|
await requireLogin(opts);
|
|
300
311
|
const workspaceId = workspace.workspaceId;
|
|
312
|
+
// Change to target directory for the rest of the command
|
|
313
|
+
if (appFolder) {
|
|
314
|
+
process.chdir(targetDir);
|
|
315
|
+
}
|
|
301
316
|
// Load app path from raw_app.yaml
|
|
302
317
|
const rawApp = (await yamlParseFile(rawAppPath));
|
|
303
318
|
const appPath = rawApp?.custom_path ?? "u/unknown/newapp";
|
|
@@ -966,6 +981,7 @@ async function dev(opts) {
|
|
|
966
981
|
}
|
|
967
982
|
const command = new Command()
|
|
968
983
|
.description("Start a development server for building apps with live reload and hot module replacement")
|
|
984
|
+
.arguments("[app_folder:string]")
|
|
969
985
|
.option("--port <port:number>", "Port to run the dev server on (will find next available port if occupied)")
|
|
970
986
|
.option("--host <host:string>", "Host to bind the dev server to", {
|
|
971
987
|
default: DEFAULT_HOST,
|
|
@@ -35,16 +35,6 @@ export function findCodebase(path, codebases) {
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
for (const c of codebases) {
|
|
38
|
-
// First check if the path is within this codebase's relative_path
|
|
39
|
-
const codebasePath = c.relative_path.replaceAll("\\", "/");
|
|
40
|
-
const normalizedPath = path.replaceAll("\\", "/");
|
|
41
|
-
if (!normalizedPath.startsWith(codebasePath + "/") && normalizedPath !== codebasePath) {
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
// Get the path relative to the codebase root for pattern matching
|
|
45
|
-
const relativePath = normalizedPath.startsWith(codebasePath + "/")
|
|
46
|
-
? normalizedPath.substring(codebasePath.length + 1)
|
|
47
|
-
: normalizedPath;
|
|
48
38
|
let included = false;
|
|
49
39
|
let excluded = false;
|
|
50
40
|
if (c.includes == undefined || c.includes == null) {
|
|
@@ -57,7 +47,7 @@ export function findCodebase(path, codebases) {
|
|
|
57
47
|
if (included) {
|
|
58
48
|
break;
|
|
59
49
|
}
|
|
60
|
-
if (minimatch(
|
|
50
|
+
if (minimatch(path, r)) {
|
|
61
51
|
included = true;
|
|
62
52
|
}
|
|
63
53
|
}
|
|
@@ -65,7 +55,7 @@ export function findCodebase(path, codebases) {
|
|
|
65
55
|
c.excludes = [c.excludes];
|
|
66
56
|
}
|
|
67
57
|
for (const r of c.excludes ?? []) {
|
|
68
|
-
if (minimatch(
|
|
58
|
+
if (minimatch(path, r)) {
|
|
69
59
|
excluded = true;
|
|
70
60
|
}
|
|
71
61
|
}
|
package/esm/src/main.js
CHANGED
|
@@ -46,7 +46,7 @@ export { flow, app, script, workspace, resource, resourceType, user, variable, h
|
|
|
46
46
|
// console.error(JSON.stringify(event.error, null, 4));
|
|
47
47
|
// }
|
|
48
48
|
// });
|
|
49
|
-
export const VERSION = "1.621.
|
|
49
|
+
export const VERSION = "1.621.2";
|
|
50
50
|
// Re-exported from constants.ts to maintain backwards compatibility
|
|
51
51
|
export { WM_FORK_PREFIX } from "./core/constants.js";
|
|
52
52
|
const command = new Command()
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ declare const command: Command<void, void, Omit<{
|
|
|
7
7
|
entry?: (import("../../../deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").StringType & string) | undefined;
|
|
8
8
|
}, "open"> & Omit<{
|
|
9
9
|
open: boolean;
|
|
10
|
-
}, "port" | "host" | "entry"> & {} & {}, [], void, {
|
|
10
|
+
}, "port" | "host" | "entry"> & {} & {}, [((import("../../../deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").StringType & string) | undefined)?], void, {
|
|
11
11
|
number: number;
|
|
12
12
|
integer: number;
|
|
13
13
|
string: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../src/src/commands/app/dev.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,OAAO,EAOR,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../src/src/commands/app/dev.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,OAAO,EAOR,MAAM,kBAAkB,CAAC;AAgxC1B,QAAA,MAAM,OAAO;;;;;;;;;;;;;;mBAiBQ,CAAC;AAEtB,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/src/commands/sync/sync.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,OAAO,EAUR,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAEL,aAAa,EAMd,MAAM,gBAAgB,CAAC;AAmBxB,OAAO,EAGL,WAAW,EAEZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAQL,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAqB,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,CAAC,SAAS,EAAE;IACvC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,OAAO,CAAC,CAsExD;AA4DD,wBAAsB,IAAI,CACxB,IAAI,EAAE,aAAa,GACjB,WAAW,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,iBAqY7E;AA+FD,wBAAsB,IAAI,CACxB,IAAI,EAAE,aAAa,GAAG,WAAW,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,iBAyvB7E;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAuHS,CAAC;AAEvB,eAAe,OAAO,CAAC"}
|
package/types/src/main.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { pull as hubPull } from "./commands/hub/hub.js";
|
|
|
22
22
|
import { pull, push } from "./commands/sync/sync.js";
|
|
23
23
|
import { add as workspaceAdd } from "./commands/workspace/workspace.js";
|
|
24
24
|
export { flow, app, script, workspace, resource, resourceType, user, variable, hub, folder, schedule, trigger, sync, gitsyncSettings, instance, dev, hubPull, pull, push, workspaceAdd, };
|
|
25
|
-
export declare const VERSION = "1.621.
|
|
25
|
+
export declare const VERSION = "1.621.2";
|
|
26
26
|
export { WM_FORK_PREFIX } from "./core/constants.js";
|
|
27
27
|
declare const command: Command<{
|
|
28
28
|
workspace?: (import("../deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").StringType & string) | undefined;
|