windmill-cli 1.393.3 → 1.393.5
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/deps.js +1 -1
- package/esm/dev.js +3 -3
- package/esm/login.js +5 -3
- package/esm/main.js +19 -21
- package/esm/sync.js +9 -5
- package/package.json +2 -1
- package/types/_dnt.polyfills.d.ts +24 -0
- package/types/_dnt.polyfills.d.ts.map +1 -1
- package/types/deps.d.ts +1 -1
- package/types/deps.d.ts.map +1 -1
- package/types/login.d.ts.map +1 -1
- package/types/main.d.ts +2 -4
- package/types/main.d.ts.map +1 -1
- package/types/sync.d.ts +3 -0
- package/types/sync.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/net/1.0.2/get_available_port.js +0 -125
- package/esm/deps/jsr.io/@std/net/1.0.2/get_network_address.js +0 -46
- package/esm/deps/jsr.io/@std/net/1.0.2/mod.js +0 -20
- package/esm/push.js +0 -10
- package/types/deps/jsr.io/@std/net/1.0.2/get_available_port.d.ts +0 -52
- package/types/deps/jsr.io/@std/net/1.0.2/get_available_port.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/net/1.0.2/get_network_address.d.ts +0 -37
- package/types/deps/jsr.io/@std/net/1.0.2/get_network_address.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/net/1.0.2/mod.d.ts +0 -20
- package/types/deps/jsr.io/@std/net/1.0.2/mod.d.ts.map +0 -1
- package/types/push.d.ts +0 -10
- package/types/push.d.ts.map +0 -1
package/esm/deps.js
CHANGED
|
@@ -17,7 +17,6 @@ export { ensureDir } from "./deps/jsr.io/@std/fs/1.0.3/mod.js";
|
|
|
17
17
|
export { SEPARATOR as SEP } from "./deps/jsr.io/@std/path/1.0.4/mod.js";
|
|
18
18
|
export * as path from "./deps/jsr.io/@std/path/1.0.4/mod.js";
|
|
19
19
|
export { encodeHex } from "./deps/jsr.io/@std/encoding/1.0.4/mod.js";
|
|
20
|
-
export { getAvailablePort } from "./deps/jsr.io/@std/net/1.0.2/mod.js";
|
|
21
20
|
export { writeAllSync } from "./deps/jsr.io/@std/io/0.224.7/write_all.js";
|
|
22
21
|
export { copy } from "./deps/jsr.io/@std/io/0.224.7/copy.js";
|
|
23
22
|
export { readAll } from "./deps/jsr.io/@std/io/0.224.7/read_all.js";
|
|
@@ -30,5 +29,6 @@ export { default as JSZip } from "jszip";
|
|
|
30
29
|
export * as express from "express";
|
|
31
30
|
export * as http from "node:http";
|
|
32
31
|
export { WebSocketServer, WebSocket } from "ws";
|
|
32
|
+
export * as getPort from "get-port";
|
|
33
33
|
export * as open from "open";
|
|
34
34
|
export * as esMain from "es-main";
|
package/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as dntShim from "./_dnt.shims.js";
|
|
2
|
-
import { Command, SEP, WebSocketServer, express,
|
|
2
|
+
import { Command, SEP, WebSocketServer, express, getPort, http, log, open, } from "./deps.js";
|
|
3
3
|
import { ignoreF } from "./sync.js";
|
|
4
4
|
import { requireLogin, resolveWorkspace } from "./context.js";
|
|
5
5
|
import { mergeConfigWithConfigFile, readConfigFile, } from "./conf.js";
|
|
@@ -52,7 +52,7 @@ async function dev(opts) {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
async function startApp() {
|
|
55
|
-
const app = express();
|
|
55
|
+
const app = express.default();
|
|
56
56
|
const server = http.createServer(app);
|
|
57
57
|
const wss = new WebSocketServer({ server });
|
|
58
58
|
// WebSocket server event listeners
|
|
@@ -83,7 +83,7 @@ async function dev(opts) {
|
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
// Start the server
|
|
86
|
-
const port = await
|
|
86
|
+
const port = await getPort.default({ port: 3001 });
|
|
87
87
|
const url = `${workspace.remote}scripts/dev?workspace=${workspace.workspaceId}&local=true` +
|
|
88
88
|
(port === PORT ? "" : `&port=${port}`);
|
|
89
89
|
console.log(`Go to ${url}`);
|
package/esm/login.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as dntShim from "./_dnt.shims.js";
|
|
2
|
-
import { colors,
|
|
2
|
+
import { colors, getPort, log, open, Secret, Select } from "./deps.js";
|
|
3
3
|
import * as http from "node:http";
|
|
4
4
|
export async function loginInteractive(remote) {
|
|
5
5
|
let token;
|
|
@@ -35,8 +35,10 @@ export async function tryGetLoginInfo(opts) {
|
|
|
35
35
|
return undefined;
|
|
36
36
|
}
|
|
37
37
|
export async function browserLogin(baseUrl) {
|
|
38
|
-
const env = dntShim.Deno.env.get("TOKEN_PORT")
|
|
39
|
-
|
|
38
|
+
const env = dntShim.Deno.env.get("TOKEN_PORT") != undefined
|
|
39
|
+
? parseInt(dntShim.Deno.env.get("TOKEN_PORT"))
|
|
40
|
+
: undefined;
|
|
41
|
+
const port = await getPort.default({ port: env });
|
|
40
42
|
if (port == undefined) {
|
|
41
43
|
log.info(colors.red.underline("failed to aquire port"));
|
|
42
44
|
return undefined;
|
package/esm/main.js
CHANGED
|
@@ -10,8 +10,6 @@ import workspace, { getActiveWorkspace } from "./workspace.js";
|
|
|
10
10
|
import resource from "./resource.js";
|
|
11
11
|
import user from "./user.js";
|
|
12
12
|
import variable from "./variable.js";
|
|
13
|
-
import lgeacyPush from "./push.js";
|
|
14
|
-
import legacyPull from "./pull.js";
|
|
15
13
|
import hub from "./hub.js";
|
|
16
14
|
import folder from "./folder.js";
|
|
17
15
|
import schedule from "./schedule.js";
|
|
@@ -25,14 +23,14 @@ import { NpmProvider } from "./upgrade.js";
|
|
|
25
23
|
import { pull as hubPull } from "./hub.js";
|
|
26
24
|
import { pull, push } from "./sync.js";
|
|
27
25
|
import { add as workspaceAdd } from "./workspace.js";
|
|
28
|
-
export { flow, app, script, workspace, resource, user, variable, hub, folder, schedule, sync, instance, dev,
|
|
26
|
+
export { flow, app, script, workspace, resource, user, variable, hub, folder, schedule, sync, instance, dev, hubPull, pull, push, workspaceAdd, };
|
|
29
27
|
// addEventListener("error", (event) => {
|
|
30
28
|
// if (event.error) {
|
|
31
29
|
// console.error("Error details of: " + event.error.message);
|
|
32
30
|
// console.error(JSON.stringify(event.error, null, 4));
|
|
33
31
|
// }
|
|
34
32
|
// });
|
|
35
|
-
export const VERSION = "1.393.
|
|
33
|
+
export const VERSION = "1.393.4";
|
|
36
34
|
let command = new Command()
|
|
37
35
|
.name("wmill")
|
|
38
36
|
.action(() => log.info(`Welcome to Windmill CLI ${VERSION}. Use -h for help.`))
|
|
@@ -87,9 +85,6 @@ let command = new Command()
|
|
|
87
85
|
provider: new NpmProvider({ package: "windmill-cli" }),
|
|
88
86
|
}))
|
|
89
87
|
.command("completions", new CompletionsCommand());
|
|
90
|
-
if (Number.parseInt(VERSION.replace("v", "").replace(".", "")) > 1700) {
|
|
91
|
-
command = command.command("push", lgeacyPush).command("pull", legacyPull);
|
|
92
|
-
}
|
|
93
88
|
export let showDiffs = false;
|
|
94
89
|
async function main() {
|
|
95
90
|
try {
|
|
@@ -128,20 +123,23 @@ async function main() {
|
|
|
128
123
|
throw e;
|
|
129
124
|
}
|
|
130
125
|
}
|
|
131
|
-
|
|
132
|
-
|
|
126
|
+
function isMain() {
|
|
127
|
+
// dnt-shim-ignore
|
|
128
|
+
const { Deno } = globalThis;
|
|
129
|
+
const isDeno = Deno != undefined;
|
|
130
|
+
if (isDeno) {
|
|
131
|
+
const isMain = (import.meta.url === ("file:///" + process.argv[1].replace(/\\/g, "/")).replace(/\/{3,}/, "///"));
|
|
132
|
+
if (isMain) {
|
|
133
|
+
log.warn("Using the deno runtime for the Windmill CLI is deprecated, you can now use node: deno uninstall wmill && npm install -g windmill-cli");
|
|
134
|
+
}
|
|
135
|
+
return isMain;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
//@ts-ignore
|
|
139
|
+
return esMain.default(import.meta);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (isMain()) {
|
|
133
143
|
main();
|
|
134
|
-
// test1();
|
|
135
|
-
// test2();
|
|
136
|
-
// module was not imported but called directly
|
|
137
144
|
}
|
|
138
|
-
// function test1() {
|
|
139
|
-
// // dnt-shim-ignore deno-lint-ignore no-explicit-any
|
|
140
|
-
// const { Deno, process } = globalThis as any;
|
|
141
|
-
// console.log(Deno);
|
|
142
|
-
// }
|
|
143
|
-
// function test2() {
|
|
144
|
-
// const { Deno, process } = globalThis as any;
|
|
145
|
-
// console.log(Deno);
|
|
146
|
-
// }
|
|
147
145
|
export default command;
|
package/esm/sync.js
CHANGED
|
@@ -666,7 +666,9 @@ export async function ignoreF(wmillconf) {
|
|
|
666
666
|
return ((!wmillconf.includes ||
|
|
667
667
|
wmillconf.includes?.some((i) => minimatch(file, i))) &&
|
|
668
668
|
(!wmillconf?.excludes ||
|
|
669
|
-
wmillconf.excludes.every((i) => !minimatch(file, i)))
|
|
669
|
+
wmillconf.excludes.every((i) => !minimatch(file, i))) &&
|
|
670
|
+
(!wmillconf.extraIncludes ||
|
|
671
|
+
wmillconf.extraIncludes.some((i) => minimatch(file, i))));
|
|
670
672
|
},
|
|
671
673
|
};
|
|
672
674
|
}
|
|
@@ -1083,7 +1085,7 @@ const command = new Command()
|
|
|
1083
1085
|
.description("sync local with a remote workspaces or the opposite (push or pull)")
|
|
1084
1086
|
.action(() => log.info("2 actions available, pull and push. Use -h to display help."))
|
|
1085
1087
|
.command("pull")
|
|
1086
|
-
.description("Pull any remote changes and apply them locally.
|
|
1088
|
+
.description("Pull any remote changes and apply them locally.")
|
|
1087
1089
|
.option("--fail-conflicts", "Error on conflicts (both remote and local have changes on the same item)")
|
|
1088
1090
|
.option("--raw", "Push without using state, just overwrite. (Default, has no effect)")
|
|
1089
1091
|
.option("--yes", "Pull without needing confirmation")
|
|
@@ -1098,12 +1100,13 @@ const command = new Command()
|
|
|
1098
1100
|
.option("--include-groups", "Include syncing groups")
|
|
1099
1101
|
.option("--include-settings", "Include syncing workspace settings")
|
|
1100
1102
|
.option("--include-key", "Include workspace encryption key")
|
|
1101
|
-
.option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)")
|
|
1102
|
-
.option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.")
|
|
1103
|
+
.option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Overrides wmill.yaml includes")
|
|
1104
|
+
.option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account. Overrides wmill.yaml excludes")
|
|
1105
|
+
.option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy")
|
|
1103
1106
|
// deno-lint-ignore no-explicit-any
|
|
1104
1107
|
.action(pull)
|
|
1105
1108
|
.command("push")
|
|
1106
|
-
.description("Push any local changes and apply them remotely.
|
|
1109
|
+
.description("Push any local changes and apply them remotely.")
|
|
1107
1110
|
.option("--fail-conflicts", "Error on conflicts (both remote and local have changes on the same item)")
|
|
1108
1111
|
.option("--raw", "Push without using state, just overwrite. (Default, has no effect)")
|
|
1109
1112
|
.option("--stateful", "Pull using state tracking (use .wmill folder and needed for --fail-conflicts)w")
|
|
@@ -1121,6 +1124,7 @@ const command = new Command()
|
|
|
1121
1124
|
.option("--include-key", "Include workspace encryption key")
|
|
1122
1125
|
.option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)")
|
|
1123
1126
|
.option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.")
|
|
1127
|
+
.option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy")
|
|
1124
1128
|
.option("--message <message:string>", "Include a message that will be added to all scripts/flows/apps updated during this push")
|
|
1125
1129
|
// deno-lint-ignore no-explicit-any
|
|
1126
1130
|
.action(push);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "windmill-cli",
|
|
3
|
-
"version": "1.393.
|
|
3
|
+
"version": "1.393.5",
|
|
4
4
|
"description": "CLI for Windmill",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"es-main": "*",
|
|
34
34
|
"esbuild": "*",
|
|
35
35
|
"express": "*",
|
|
36
|
+
"get-port": "7.1.0",
|
|
36
37
|
"jszip": "3.7.1",
|
|
37
38
|
"minimatch": "*",
|
|
38
39
|
"open": "*",
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface ImportMeta {
|
|
3
|
+
/** A flag that indicates if the current module is the main module that was
|
|
4
|
+
* called when starting the program under Deno.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* if (import.meta.main) {
|
|
8
|
+
* // this was loaded as the main module, maybe do some bootstrapping
|
|
9
|
+
* }
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
main: boolean;
|
|
13
|
+
/** A function that returns resolved specifier as if it would be imported
|
|
14
|
+
* using `import(specifier)`.
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* console.log(import.meta.resolve("./foo.js"));
|
|
18
|
+
* // file:///dev/foo.js
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
resolve(specifier: string): string;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
1
25
|
declare global {
|
|
2
26
|
interface Object {
|
|
3
27
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB;;;;;;;;WAQG;QACH,IAAI,EAAE,OAAO,CAAC;QAEd;;;;;;;WAOG;QAEH,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;KACpC;CACF;AAED,OAAO,EAAE,CAAA;AAgBT,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;;;WAIG;QACH,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;KAC5C;CACF;AAED,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,gBAAgB;QACxB,SAAS,CAAC,CAAC,EACP,mBAAmB,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,GAC7F,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;QAEhB,SAAS,CAAC,CAAC,EAAE,CAAC,EACV,mBAAmB,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAClE,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAC/B,OAAO,CAAC,EAAE,GAAG,GACd,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KAC1B;CACF;AAoID,OAAO,EAAE,CAAC"}
|
package/types/deps.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export { ensureDir } from "./deps/jsr.io/@std/fs/1.0.3/mod.js";
|
|
|
14
14
|
export { SEPARATOR as SEP } from "./deps/jsr.io/@std/path/1.0.4/mod.js";
|
|
15
15
|
export * as path from "./deps/jsr.io/@std/path/1.0.4/mod.js";
|
|
16
16
|
export { encodeHex } from "./deps/jsr.io/@std/encoding/1.0.4/mod.js";
|
|
17
|
-
export { getAvailablePort } from "./deps/jsr.io/@std/net/1.0.2/mod.js";
|
|
18
17
|
export { writeAllSync } from "./deps/jsr.io/@std/io/0.224.7/write_all.js";
|
|
19
18
|
export { copy } from "./deps/jsr.io/@std/io/0.224.7/copy.js";
|
|
20
19
|
export { readAll } from "./deps/jsr.io/@std/io/0.224.7/read_all.js";
|
|
@@ -26,6 +25,7 @@ export { default as JSZip } from "jszip";
|
|
|
26
25
|
export * as express from "express";
|
|
27
26
|
export * as http from "node:http";
|
|
28
27
|
export { WebSocketServer, WebSocket } from "ws";
|
|
28
|
+
export * as getPort from "get-port";
|
|
29
29
|
export * as open from "open";
|
|
30
30
|
export * as esMain from "es-main";
|
|
31
31
|
//# sourceMappingURL=deps.d.ts.map
|
package/types/deps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../src/deps.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,OAAO,EAAE,MAAM,+DAA+D,CAAC;AACxF,OAAO,EAAE,KAAK,EAAE,MAAM,6DAA6D,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,+DAA+D,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,iEAAiE,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,iEAAiE,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,kEAAkE,CAAC;AAC3F,OAAO,EAAE,KAAK,EAAE,MAAM,gEAAgE,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,uEAAuE,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,gFAAgF,CAAC;AAC7G,OAAO,EAAE,QAAQ,EAAE,MAAM,uEAAuE,CAAC;AAEjG,OAAO,EAAE,kBAAkB,EAAE,MAA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,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AAEpE,OAAO,KAAK,GAAG,MAAM,uCAAuC,CAAC;AAC7D,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAItG,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,UAAU,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC"}
|
package/types/login.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../src/login.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,+BA2BpD;AAGD,wBAAsB,eAAe,CACnC,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAM7B;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../src/login.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,+BA2BpD;AAGD,wBAAsB,eAAe,CACnC,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAM7B;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA2E7B"}
|
package/types/main.d.ts
CHANGED
|
@@ -8,8 +8,6 @@ import workspace from "./workspace.js";
|
|
|
8
8
|
import resource from "./resource.js";
|
|
9
9
|
import user from "./user.js";
|
|
10
10
|
import variable from "./variable.js";
|
|
11
|
-
import lgeacyPush from "./push.js";
|
|
12
|
-
import legacyPull from "./pull.js";
|
|
13
11
|
import hub from "./hub.js";
|
|
14
12
|
import folder from "./folder.js";
|
|
15
13
|
import schedule from "./schedule.js";
|
|
@@ -19,8 +17,8 @@ import dev from "./dev.js";
|
|
|
19
17
|
import { pull as hubPull } from "./hub.js";
|
|
20
18
|
import { pull, push } from "./sync.js";
|
|
21
19
|
import { add as workspaceAdd } from "./workspace.js";
|
|
22
|
-
export { flow, app, script, workspace, resource, user, variable, hub, folder, schedule, sync, instance, dev,
|
|
23
|
-
export declare const VERSION = "1.393.
|
|
20
|
+
export { flow, app, script, workspace, resource, user, variable, hub, folder, schedule, sync, instance, dev, hubPull, pull, push, workspaceAdd, };
|
|
21
|
+
export declare const VERSION = "1.393.4";
|
|
24
22
|
declare let command: any;
|
|
25
23
|
export declare let showDiffs: boolean;
|
|
26
24
|
export default command;
|
package/types/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AACA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAW7B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,GAAG,MAAM,WAAW,CAAC;AAC5B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,SAAiC,MAAM,gBAAgB,CAAC;AAC/D,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,IAAI,MAAM,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/sync.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export declare const isWhitelisted: (p: string) => boolean;
|
|
|
49
49
|
export declare function ignoreF(wmillconf: {
|
|
50
50
|
includes?: string[];
|
|
51
51
|
excludes?: string[];
|
|
52
|
+
extraIncludes?: string[];
|
|
52
53
|
}): Promise<(p: string, isDirectory: boolean) => boolean>;
|
|
53
54
|
export declare function pull(opts: GlobalOptions & SyncOptions): Promise<void>;
|
|
54
55
|
export declare function push(opts: GlobalOptions & SyncOptions): Promise<void>;
|
|
@@ -86,6 +87,8 @@ declare const command: Command<void, void, {
|
|
|
86
87
|
includes?: import("./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").FileType[] | undefined;
|
|
87
88
|
} & {
|
|
88
89
|
excludes?: import("./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").FileType[] | undefined;
|
|
90
|
+
} & {
|
|
91
|
+
extraIncludes?: import("./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").FileType[] | undefined;
|
|
89
92
|
} & {
|
|
90
93
|
message?: import("./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").StringType | undefined;
|
|
91
94
|
}, [], void, void, void, Command<void, void, void, [], void, {
|
package/types/sync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,OAAO,EAaP,UAAU,EASX,MAAM,WAAW,CAAC;AACnB,OAAO,EAEL,aAAa,EAKd,MAAM,YAAY,CAAC;AAapB,OAAO,EAAE,WAAW,EAA6B,MAAM,WAAW,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAqB,MAAM,eAAe,CAAC;AAMhE,KAAK,YAAY,GAAG;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IAEb,cAAc,IAAI,OAAO,CAAC,M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Resource) || function (env, value, async) {
|
|
3
|
-
if (value !== null && value !== void 0) {
|
|
4
|
-
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
5
|
-
var dispose, inner;
|
|
6
|
-
if (async) {
|
|
7
|
-
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
8
|
-
dispose = value[Symbol.asyncDispose];
|
|
9
|
-
}
|
|
10
|
-
if (dispose === void 0) {
|
|
11
|
-
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
12
|
-
dispose = value[Symbol.dispose];
|
|
13
|
-
if (async) inner = dispose;
|
|
14
|
-
}
|
|
15
|
-
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
16
|
-
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
17
|
-
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
18
|
-
}
|
|
19
|
-
else if (async) {
|
|
20
|
-
env.stack.push({ async: true });
|
|
21
|
-
}
|
|
22
|
-
return value;
|
|
23
|
-
};
|
|
24
|
-
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
25
|
-
return function (env) {
|
|
26
|
-
function fail(e) {
|
|
27
|
-
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
28
|
-
env.hasError = true;
|
|
29
|
-
}
|
|
30
|
-
function next() {
|
|
31
|
-
while (env.stack.length) {
|
|
32
|
-
var rec = env.stack.pop();
|
|
33
|
-
try {
|
|
34
|
-
var result = rec.dispose && rec.dispose.call(rec.value);
|
|
35
|
-
if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
36
|
-
}
|
|
37
|
-
catch (e) {
|
|
38
|
-
fail(e);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
if (env.hasError) throw env.error;
|
|
42
|
-
}
|
|
43
|
-
return next();
|
|
44
|
-
};
|
|
45
|
-
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
46
|
-
var e = new Error(message);
|
|
47
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
48
|
-
});
|
|
49
|
-
/** Options for {@linkcode getAvailablePort}. */
|
|
50
|
-
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
51
|
-
/**
|
|
52
|
-
* Returns an available network port.
|
|
53
|
-
*
|
|
54
|
-
* > [!IMPORTANT]
|
|
55
|
-
* > In most cases, this function is not needed. Do not use it for trivial uses
|
|
56
|
-
* > such as when using {@linkcode Deno.serve} or {@linkcode Deno.listen}
|
|
57
|
-
* > directly. Instead, set the `port` option to `0` to automatically use an
|
|
58
|
-
* > available port, then get the assigned port from the function's return
|
|
59
|
-
* > object (see "Recommended Usage" example).
|
|
60
|
-
*
|
|
61
|
-
* @param options Options for getting an available port.
|
|
62
|
-
* @returns An available network port.
|
|
63
|
-
*
|
|
64
|
-
* @example Recommended Usage
|
|
65
|
-
*
|
|
66
|
-
* Bad:
|
|
67
|
-
* ```ts no-eval no-assert
|
|
68
|
-
* import { getAvailablePort } from "@std/net/get-available-port";
|
|
69
|
-
*
|
|
70
|
-
* const port = getAvailablePort();
|
|
71
|
-
* Deno.serve({ port }, () => new Response("Hello, world!"));
|
|
72
|
-
* ```
|
|
73
|
-
*
|
|
74
|
-
* Good:
|
|
75
|
-
* ```ts no-eval no-assert
|
|
76
|
-
* const { port } = Deno.serve({ port: 0 }, () => new Response("Hello, world!")).addr;
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* Good:
|
|
80
|
-
* ```ts no-eval no-assert
|
|
81
|
-
* import { getAvailablePort } from "@std/net/get-available-port";
|
|
82
|
-
*
|
|
83
|
-
* const command = new Deno.Command(Deno.execPath(), {
|
|
84
|
-
* args: ["test.ts", "--port", getAvailablePort().toString()],
|
|
85
|
-
* });
|
|
86
|
-
* // ...
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
export function getAvailablePort(options) {
|
|
90
|
-
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
91
|
-
try {
|
|
92
|
-
if (options?.preferredPort) {
|
|
93
|
-
try {
|
|
94
|
-
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
95
|
-
try {
|
|
96
|
-
// Check if the preferred port is available
|
|
97
|
-
const listener = __addDisposableResource(env_2, dntShim.Deno.listen({ port: options.preferredPort }), false);
|
|
98
|
-
return listener.addr.port;
|
|
99
|
-
}
|
|
100
|
-
catch (e_1) {
|
|
101
|
-
env_2.error = e_1;
|
|
102
|
-
env_2.hasError = true;
|
|
103
|
-
}
|
|
104
|
-
finally {
|
|
105
|
-
__disposeResources(env_2);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
catch (e) {
|
|
109
|
-
// If the preferred port is not available, fall through and find an available port
|
|
110
|
-
if (!(e instanceof dntShim.Deno.errors.AddrInUse)) {
|
|
111
|
-
throw e;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
const listener = __addDisposableResource(env_1, dntShim.Deno.listen({ port: 0 }), false);
|
|
116
|
-
return listener.addr.port;
|
|
117
|
-
}
|
|
118
|
-
catch (e_2) {
|
|
119
|
-
env_1.error = e_2;
|
|
120
|
-
env_1.hasError = true;
|
|
121
|
-
}
|
|
122
|
-
finally {
|
|
123
|
-
__disposeResources(env_1);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
-
/**
|
|
3
|
-
* Gets the IPv4 or IPv6 network address of the machine.
|
|
4
|
-
*
|
|
5
|
-
* @experimental **UNSTABLE**: New API, yet to be vetted.
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
* This is inspired by the util of the same name in
|
|
9
|
-
* {@linkcode https://www.npmjs.com/package/serve | npm:serve}.
|
|
10
|
-
*
|
|
11
|
-
* For more advanced use, use {@linkcode Deno.networkInterfaces} directly.
|
|
12
|
-
*
|
|
13
|
-
* @see {@link https://github.com/vercel/serve/blob/1ea55b1b5004f468159b54775e4fb3090fedbb2b/source/utilities/http.ts#L33}
|
|
14
|
-
*
|
|
15
|
-
* @param family The IP protocol version of the interface to get the address of.
|
|
16
|
-
* @returns The IPv4 network address of the machine or `undefined` if not found.
|
|
17
|
-
*
|
|
18
|
-
* @example Get the IPv4 network address (default)
|
|
19
|
-
* ```ts no-assert no-eval
|
|
20
|
-
* import { getNetworkAddress } from "@std/net/get-network-address";
|
|
21
|
-
*
|
|
22
|
-
* const hostname = getNetworkAddress()!;
|
|
23
|
-
*
|
|
24
|
-
* Deno.serve({ port: 0, hostname }, () => new Response("Hello, world!"));
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @example Get the IPv6 network address
|
|
28
|
-
* ```ts no-assert no-eval
|
|
29
|
-
* import { getNetworkAddress } from "@std/net/get-network-address";
|
|
30
|
-
*
|
|
31
|
-
* const hostname = getNetworkAddress("IPv6")!;
|
|
32
|
-
*
|
|
33
|
-
* Deno.serve({ port: 0, hostname }, () => new Response("Hello, world!"));
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
37
|
-
export function getNetworkAddress(family = "IPv4") {
|
|
38
|
-
return dntShim.Deno.networkInterfaces()
|
|
39
|
-
.find((i) => i.family === family &&
|
|
40
|
-
(family === "IPv4"
|
|
41
|
-
// Cannot lie within 127.0.0.0/8
|
|
42
|
-
? !i.address.startsWith("127")
|
|
43
|
-
// Cannot be loopback or link-local addresses
|
|
44
|
-
: !(i.address === "::1" || i.address === "fe80::1") && i.scopeid === 0))
|
|
45
|
-
?.address;
|
|
46
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
-
/**
|
|
3
|
-
* Network utilities.
|
|
4
|
-
*
|
|
5
|
-
* ```ts no-assert no-eval
|
|
6
|
-
* import { getNetworkAddress, getAvailablePort } from "@std/net";
|
|
7
|
-
*
|
|
8
|
-
* console.log(`My network IP address is ${getNetworkAddress()}`);
|
|
9
|
-
*
|
|
10
|
-
* const command = new Deno.Command(Deno.execPath(), {
|
|
11
|
-
* args: ["test.ts", "--port", getAvailablePort().toString()],
|
|
12
|
-
* });
|
|
13
|
-
*
|
|
14
|
-
* // ...
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* @module
|
|
18
|
-
*/
|
|
19
|
-
export * from "./get_available_port.js";
|
|
20
|
-
export * from "./get_network_address.js";
|
package/esm/push.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// deno-lint-ignore-file no-explicit-any
|
|
2
|
-
import { colors, Command, log } from "./deps.js";
|
|
3
|
-
function stub(_opts, _dir) {
|
|
4
|
-
log.info(colors.red.underline('Push is deprecated. Use "sync push --raw" instead. See <TODO_LINK_HERE> for more information.'));
|
|
5
|
-
}
|
|
6
|
-
const command = new Command()
|
|
7
|
-
.description("Push all files from a folder")
|
|
8
|
-
.arguments("[dir:string]")
|
|
9
|
-
.action(stub);
|
|
10
|
-
export default command;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export interface GetAvailablePortOptions {
|
|
2
|
-
/**
|
|
3
|
-
* A port to check availability of first. If the port isn't available, fall
|
|
4
|
-
* back to another port.
|
|
5
|
-
*
|
|
6
|
-
* Defaults to port 0, which will let the operating system choose an available
|
|
7
|
-
* port.
|
|
8
|
-
*
|
|
9
|
-
* @default {0}
|
|
10
|
-
*/
|
|
11
|
-
preferredPort?: number;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Returns an available network port.
|
|
15
|
-
*
|
|
16
|
-
* > [!IMPORTANT]
|
|
17
|
-
* > In most cases, this function is not needed. Do not use it for trivial uses
|
|
18
|
-
* > such as when using {@linkcode Deno.serve} or {@linkcode Deno.listen}
|
|
19
|
-
* > directly. Instead, set the `port` option to `0` to automatically use an
|
|
20
|
-
* > available port, then get the assigned port from the function's return
|
|
21
|
-
* > object (see "Recommended Usage" example).
|
|
22
|
-
*
|
|
23
|
-
* @param options Options for getting an available port.
|
|
24
|
-
* @returns An available network port.
|
|
25
|
-
*
|
|
26
|
-
* @example Recommended Usage
|
|
27
|
-
*
|
|
28
|
-
* Bad:
|
|
29
|
-
* ```ts no-eval no-assert
|
|
30
|
-
* import { getAvailablePort } from "@std/net/get-available-port";
|
|
31
|
-
*
|
|
32
|
-
* const port = getAvailablePort();
|
|
33
|
-
* Deno.serve({ port }, () => new Response("Hello, world!"));
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* Good:
|
|
37
|
-
* ```ts no-eval no-assert
|
|
38
|
-
* const { port } = Deno.serve({ port: 0 }, () => new Response("Hello, world!")).addr;
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* Good:
|
|
42
|
-
* ```ts no-eval no-assert
|
|
43
|
-
* import { getAvailablePort } from "@std/net/get-available-port";
|
|
44
|
-
*
|
|
45
|
-
* const command = new Deno.Command(Deno.execPath(), {
|
|
46
|
-
* args: ["test.ts", "--port", getAvailablePort().toString()],
|
|
47
|
-
* });
|
|
48
|
-
* // ...
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export declare function getAvailablePort(options?: GetAvailablePortOptions): number;
|
|
52
|
-
//# sourceMappingURL=get_available_port.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get_available_port.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/net/1.0.2/get_available_port.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,MAAM,CAgB1E"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gets the IPv4 or IPv6 network address of the machine.
|
|
3
|
-
*
|
|
4
|
-
* @experimental **UNSTABLE**: New API, yet to be vetted.
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* This is inspired by the util of the same name in
|
|
8
|
-
* {@linkcode https://www.npmjs.com/package/serve | npm:serve}.
|
|
9
|
-
*
|
|
10
|
-
* For more advanced use, use {@linkcode Deno.networkInterfaces} directly.
|
|
11
|
-
*
|
|
12
|
-
* @see {@link https://github.com/vercel/serve/blob/1ea55b1b5004f468159b54775e4fb3090fedbb2b/source/utilities/http.ts#L33}
|
|
13
|
-
*
|
|
14
|
-
* @param family The IP protocol version of the interface to get the address of.
|
|
15
|
-
* @returns The IPv4 network address of the machine or `undefined` if not found.
|
|
16
|
-
*
|
|
17
|
-
* @example Get the IPv4 network address (default)
|
|
18
|
-
* ```ts no-assert no-eval
|
|
19
|
-
* import { getNetworkAddress } from "@std/net/get-network-address";
|
|
20
|
-
*
|
|
21
|
-
* const hostname = getNetworkAddress()!;
|
|
22
|
-
*
|
|
23
|
-
* Deno.serve({ port: 0, hostname }, () => new Response("Hello, world!"));
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @example Get the IPv6 network address
|
|
27
|
-
* ```ts no-assert no-eval
|
|
28
|
-
* import { getNetworkAddress } from "@std/net/get-network-address";
|
|
29
|
-
*
|
|
30
|
-
* const hostname = getNetworkAddress("IPv6")!;
|
|
31
|
-
*
|
|
32
|
-
* Deno.serve({ port: 0, hostname }, () => new Response("Hello, world!"));
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
36
|
-
export declare function getNetworkAddress(family?: dntShim.Deno.NetworkInterfaceInfo["family"]): string | undefined;
|
|
37
|
-
//# sourceMappingURL=get_network_address.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get_network_address.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/net/1.0.2/get_network_address.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAExD,wBAAgB,iBAAiB,CAC/B,MAAM,GAAE,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAU,GAC3D,MAAM,GAAG,SAAS,CAWpB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Network utilities.
|
|
3
|
-
*
|
|
4
|
-
* ```ts no-assert no-eval
|
|
5
|
-
* import { getNetworkAddress, getAvailablePort } from "@std/net";
|
|
6
|
-
*
|
|
7
|
-
* console.log(`My network IP address is ${getNetworkAddress()}`);
|
|
8
|
-
*
|
|
9
|
-
* const command = new Deno.Command(Deno.execPath(), {
|
|
10
|
-
* args: ["test.ts", "--port", getAvailablePort().toString()],
|
|
11
|
-
* });
|
|
12
|
-
*
|
|
13
|
-
* // ...
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* @module
|
|
17
|
-
*/
|
|
18
|
-
export * from "./get_available_port.js";
|
|
19
|
-
export * from "./get_network_address.js";
|
|
20
|
-
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/net/1.0.2/mod.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC"}
|
package/types/push.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Command } from "./deps.js";
|
|
2
|
-
declare const command: Command<void, void, void, [((import("./deps/jsr.io/@windmill-labs/cliffy-command/1.0.0-rc.5/mod.js").StringType & string) | undefined)?], void, {
|
|
3
|
-
number: number;
|
|
4
|
-
integer: number;
|
|
5
|
-
string: string;
|
|
6
|
-
boolean: boolean;
|
|
7
|
-
file: string;
|
|
8
|
-
}, void, undefined>;
|
|
9
|
-
export default command;
|
|
10
|
-
//# sourceMappingURL=push.d.ts.map
|
package/types/push.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../src/push.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,OAAO,EAAO,MAAM,WAAW,CAAC;AAWjD,QAAA,MAAM,OAAO;;;;;;mBAGS,CAAC;AAEvB,eAAe,OAAO,CAAC"}
|