@bagdock/cli 0.1.1 → 0.1.4
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/LICENSE +21 -0
- package/README.md +22 -4
- package/dist/bagdock.js +24 -26
- package/package.json +21 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-present Bagdock Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -5,7 +5,25 @@ Developer CLI for building, testing, and deploying apps and edges on the Bagdock
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
+
# npm
|
|
8
9
|
npm install -g @bagdock/cli
|
|
10
|
+
|
|
11
|
+
# yarn
|
|
12
|
+
yarn global add @bagdock/cli
|
|
13
|
+
|
|
14
|
+
# pnpm
|
|
15
|
+
pnpm add -g @bagdock/cli
|
|
16
|
+
|
|
17
|
+
# bun
|
|
18
|
+
bun add -g @bagdock/cli
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or run without installing:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx @bagdock/cli --help
|
|
25
|
+
bunx @bagdock/cli --help
|
|
26
|
+
pnpm dlx @bagdock/cli --help
|
|
9
27
|
```
|
|
10
28
|
|
|
11
29
|
## Quick start
|
|
@@ -26,11 +44,11 @@ bagdock deploy
|
|
|
26
44
|
|
|
27
45
|
## What are apps and edges?
|
|
28
46
|
|
|
29
|
-
**Edges** are backend workers that connect external APIs, handle webhooks, and sync data between platforms.
|
|
47
|
+
**Edges** are backend workers that connect external APIs, handle webhooks, and sync data between platforms.
|
|
30
48
|
|
|
31
|
-
**Apps** are UI extensions that add screens, panels,
|
|
49
|
+
**Apps** are UI extensions that add screens, panels, and drawers to the Bagdock operator dashboard.
|
|
32
50
|
|
|
33
|
-
Both deploy to
|
|
51
|
+
Both deploy to the Bagdock platform via the CLI. You don't need to manage any infrastructure.
|
|
34
52
|
|
|
35
53
|
## Commands
|
|
36
54
|
|
|
@@ -87,4 +105,4 @@ Each project uses a `bagdock.json` file. All config lives here — no `wrangler.
|
|
|
87
105
|
|
|
88
106
|
## License
|
|
89
107
|
|
|
90
|
-
|
|
108
|
+
MIT — see [LICENSE](LICENSE).
|
package/dist/bagdock.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
#!/usr/bin/env bun
|
|
3
|
-
// @bun
|
|
4
2
|
import { createRequire } from "node:module";
|
|
5
3
|
var __create = Object.create;
|
|
6
4
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -49,7 +47,7 @@ var __export = (target, all) => {
|
|
|
49
47
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
50
48
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
51
49
|
|
|
52
|
-
//
|
|
50
|
+
// node_modules/commander/lib/error.js
|
|
53
51
|
var require_error = __commonJS((exports) => {
|
|
54
52
|
class CommanderError extends Error {
|
|
55
53
|
constructor(exitCode, code, message) {
|
|
@@ -73,7 +71,7 @@ var require_error = __commonJS((exports) => {
|
|
|
73
71
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
74
72
|
});
|
|
75
73
|
|
|
76
|
-
//
|
|
74
|
+
// node_modules/commander/lib/argument.js
|
|
77
75
|
var require_argument = __commonJS((exports) => {
|
|
78
76
|
var { InvalidArgumentError } = require_error();
|
|
79
77
|
|
|
@@ -152,7 +150,7 @@ var require_argument = __commonJS((exports) => {
|
|
|
152
150
|
exports.humanReadableArgName = humanReadableArgName;
|
|
153
151
|
});
|
|
154
152
|
|
|
155
|
-
//
|
|
153
|
+
// node_modules/commander/lib/help.js
|
|
156
154
|
var require_help = __commonJS((exports) => {
|
|
157
155
|
var { humanReadableArgName } = require_argument();
|
|
158
156
|
|
|
@@ -502,7 +500,7 @@ ${itemIndentStr}`);
|
|
|
502
500
|
exports.stripColor = stripColor;
|
|
503
501
|
});
|
|
504
502
|
|
|
505
|
-
//
|
|
503
|
+
// node_modules/commander/lib/option.js
|
|
506
504
|
var require_option = __commonJS((exports) => {
|
|
507
505
|
var { InvalidArgumentError } = require_error();
|
|
508
506
|
|
|
@@ -680,7 +678,7 @@ var require_option = __commonJS((exports) => {
|
|
|
680
678
|
exports.DualOptions = DualOptions;
|
|
681
679
|
});
|
|
682
680
|
|
|
683
|
-
//
|
|
681
|
+
// node_modules/commander/lib/suggestSimilar.js
|
|
684
682
|
var require_suggestSimilar = __commonJS((exports) => {
|
|
685
683
|
var maxDistance = 3;
|
|
686
684
|
function editDistance(a, b) {
|
|
@@ -753,7 +751,7 @@ var require_suggestSimilar = __commonJS((exports) => {
|
|
|
753
751
|
exports.suggestSimilar = suggestSimilar;
|
|
754
752
|
});
|
|
755
753
|
|
|
756
|
-
//
|
|
754
|
+
// node_modules/commander/lib/command.js
|
|
757
755
|
var require_command = __commonJS((exports) => {
|
|
758
756
|
var EventEmitter = __require("node:events").EventEmitter;
|
|
759
757
|
var childProcess = __require("node:child_process");
|
|
@@ -2063,7 +2061,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2063
2061
|
exports.useColor = useColor;
|
|
2064
2062
|
});
|
|
2065
2063
|
|
|
2066
|
-
//
|
|
2064
|
+
// node_modules/commander/index.js
|
|
2067
2065
|
var require_commander = __commonJS((exports) => {
|
|
2068
2066
|
var { Argument } = require_argument();
|
|
2069
2067
|
var { Command } = require_command();
|
|
@@ -2131,7 +2129,7 @@ var init_config = __esm(() => {
|
|
|
2131
2129
|
DASHBOARD_BASE = process.env.BAGDOCK_DASHBOARD_URL ?? "https://dashboard.bagdock.com";
|
|
2132
2130
|
});
|
|
2133
2131
|
|
|
2134
|
-
//
|
|
2132
|
+
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
2135
2133
|
function assembleStyles() {
|
|
2136
2134
|
const codes = new Map;
|
|
2137
2135
|
for (const [groupName, group] of Object.entries(styles)) {
|
|
@@ -2307,7 +2305,7 @@ var init_ansi_styles = __esm(() => {
|
|
|
2307
2305
|
ansi_styles_default = ansiStyles;
|
|
2308
2306
|
});
|
|
2309
2307
|
|
|
2310
|
-
//
|
|
2308
|
+
// node_modules/chalk/source/vendor/supports-color/index.js
|
|
2311
2309
|
import process2 from "node:process";
|
|
2312
2310
|
import os from "node:os";
|
|
2313
2311
|
import tty from "node:tty";
|
|
@@ -2441,7 +2439,7 @@ var init_supports_color = __esm(() => {
|
|
|
2441
2439
|
supports_color_default = supportsColor;
|
|
2442
2440
|
});
|
|
2443
2441
|
|
|
2444
|
-
//
|
|
2442
|
+
// node_modules/chalk/source/utilities.js
|
|
2445
2443
|
function stringReplaceAll(string, substring, replacer) {
|
|
2446
2444
|
let index = string.indexOf(substring);
|
|
2447
2445
|
if (index === -1) {
|
|
@@ -2474,7 +2472,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
2474
2472
|
return returnValue;
|
|
2475
2473
|
}
|
|
2476
2474
|
|
|
2477
|
-
//
|
|
2475
|
+
// node_modules/chalk/source/index.js
|
|
2478
2476
|
function createChalk(options) {
|
|
2479
2477
|
return chalkFactory(options);
|
|
2480
2478
|
}
|
|
@@ -2620,7 +2618,7 @@ var init_source = __esm(() => {
|
|
|
2620
2618
|
source_default = chalk;
|
|
2621
2619
|
});
|
|
2622
2620
|
|
|
2623
|
-
//
|
|
2621
|
+
// node_modules/is-docker/index.js
|
|
2624
2622
|
import fs from "node:fs";
|
|
2625
2623
|
function hasDockerEnv() {
|
|
2626
2624
|
try {
|
|
@@ -2646,7 +2644,7 @@ function isDocker() {
|
|
|
2646
2644
|
var isDockerCached;
|
|
2647
2645
|
var init_is_docker = () => {};
|
|
2648
2646
|
|
|
2649
|
-
//
|
|
2647
|
+
// node_modules/is-inside-container/index.js
|
|
2650
2648
|
import fs2 from "node:fs";
|
|
2651
2649
|
function isInsideContainer() {
|
|
2652
2650
|
if (cachedResult === undefined) {
|
|
@@ -2666,7 +2664,7 @@ var init_is_inside_container = __esm(() => {
|
|
|
2666
2664
|
init_is_docker();
|
|
2667
2665
|
});
|
|
2668
2666
|
|
|
2669
|
-
//
|
|
2667
|
+
// node_modules/is-wsl/index.js
|
|
2670
2668
|
import process3 from "node:process";
|
|
2671
2669
|
import os2 from "node:os";
|
|
2672
2670
|
import fs3 from "node:fs";
|
|
@@ -2695,7 +2693,7 @@ var init_is_wsl = __esm(() => {
|
|
|
2695
2693
|
is_wsl_default = process3.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
2696
2694
|
});
|
|
2697
2695
|
|
|
2698
|
-
//
|
|
2696
|
+
// node_modules/wsl-utils/index.js
|
|
2699
2697
|
import process4 from "node:process";
|
|
2700
2698
|
import fs4, { constants as fsConstants } from "node:fs/promises";
|
|
2701
2699
|
var wslDrivesMountPoint, powerShellPathFromWsl = async () => {
|
|
@@ -2738,7 +2736,7 @@ var init_wsl_utils = __esm(() => {
|
|
|
2738
2736
|
})();
|
|
2739
2737
|
});
|
|
2740
2738
|
|
|
2741
|
-
//
|
|
2739
|
+
// node_modules/define-lazy-prop/index.js
|
|
2742
2740
|
function defineLazyProperty(object, propertyName, valueGetter) {
|
|
2743
2741
|
const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });
|
|
2744
2742
|
Object.defineProperty(object, propertyName, {
|
|
@@ -2756,7 +2754,7 @@ function defineLazyProperty(object, propertyName, valueGetter) {
|
|
|
2756
2754
|
return object;
|
|
2757
2755
|
}
|
|
2758
2756
|
|
|
2759
|
-
//
|
|
2757
|
+
// node_modules/default-browser-id/index.js
|
|
2760
2758
|
import { promisify } from "node:util";
|
|
2761
2759
|
import process5 from "node:process";
|
|
2762
2760
|
import { execFile } from "node:child_process";
|
|
@@ -2777,7 +2775,7 @@ var init_default_browser_id = __esm(() => {
|
|
|
2777
2775
|
execFileAsync = promisify(execFile);
|
|
2778
2776
|
});
|
|
2779
2777
|
|
|
2780
|
-
//
|
|
2778
|
+
// node_modules/run-applescript/index.js
|
|
2781
2779
|
import process6 from "node:process";
|
|
2782
2780
|
import { promisify as promisify2 } from "node:util";
|
|
2783
2781
|
import { execFile as execFile2, execFileSync } from "node:child_process";
|
|
@@ -2798,7 +2796,7 @@ var init_run_applescript = __esm(() => {
|
|
|
2798
2796
|
execFileAsync2 = promisify2(execFile2);
|
|
2799
2797
|
});
|
|
2800
2798
|
|
|
2801
|
-
//
|
|
2799
|
+
// node_modules/bundle-name/index.js
|
|
2802
2800
|
async function bundleName(bundleId) {
|
|
2803
2801
|
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
|
|
2804
2802
|
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
@@ -2807,7 +2805,7 @@ var init_bundle_name = __esm(() => {
|
|
|
2807
2805
|
init_run_applescript();
|
|
2808
2806
|
});
|
|
2809
2807
|
|
|
2810
|
-
//
|
|
2808
|
+
// node_modules/default-browser/windows.js
|
|
2811
2809
|
import { promisify as promisify3 } from "node:util";
|
|
2812
2810
|
import { execFile as execFile3 } from "node:child_process";
|
|
2813
2811
|
async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
@@ -2854,7 +2852,7 @@ var init_windows = __esm(() => {
|
|
|
2854
2852
|
};
|
|
2855
2853
|
});
|
|
2856
2854
|
|
|
2857
|
-
//
|
|
2855
|
+
// node_modules/default-browser/index.js
|
|
2858
2856
|
import { promisify as promisify4 } from "node:util";
|
|
2859
2857
|
import process7 from "node:process";
|
|
2860
2858
|
import { execFile as execFile4 } from "node:child_process";
|
|
@@ -2883,7 +2881,7 @@ var init_default_browser = __esm(() => {
|
|
|
2883
2881
|
execFileAsync4 = promisify4(execFile4);
|
|
2884
2882
|
});
|
|
2885
2883
|
|
|
2886
|
-
//
|
|
2884
|
+
// node_modules/open/index.js
|
|
2887
2885
|
var exports_open = {};
|
|
2888
2886
|
__export(exports_open, {
|
|
2889
2887
|
openApp: () => openApp,
|
|
@@ -3529,7 +3527,7 @@ var init_env_cmd = __esm(() => {
|
|
|
3529
3527
|
init_config();
|
|
3530
3528
|
});
|
|
3531
3529
|
|
|
3532
|
-
//
|
|
3530
|
+
// node_modules/commander/esm.mjs
|
|
3533
3531
|
var import__ = __toESM(require_commander(), 1);
|
|
3534
3532
|
var {
|
|
3535
3533
|
program,
|
|
@@ -3926,7 +3924,7 @@ program2.command("dev").description("Start local dev server").option("-p, --port
|
|
|
3926
3924
|
const { dev: dev2 } = await Promise.resolve().then(() => (init_dev(), exports_dev));
|
|
3927
3925
|
await dev2(opts);
|
|
3928
3926
|
});
|
|
3929
|
-
program2.command("deploy").description("Build locally and deploy via Bagdock API
|
|
3927
|
+
program2.command("deploy").description("Build locally and deploy via Bagdock API → CF Workers for Platforms").option("--env <environment>", "Target environment (preview, staging, production)", "staging").option("--preview", "Deploy an ephemeral preview ({slug}-{hash}.pre.bdok.dev)").option("--production", "Deploy to production ({slug}.bdok.dev)").option("-y, --yes", "Skip confirmation prompts").action(async (opts) => {
|
|
3930
3928
|
const { deploy: deploy2 } = await Promise.resolve().then(() => (init_deploy(), exports_deploy));
|
|
3931
3929
|
await deploy2(opts);
|
|
3932
3930
|
});
|
package/package.json
CHANGED
|
@@ -1,26 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bagdock/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Bagdock developer CLI — build, test, and deploy apps and edges on the Bagdock platform",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"bagdock",
|
|
7
|
+
"cli",
|
|
8
|
+
"self-storage",
|
|
9
|
+
"developer-tools",
|
|
10
|
+
"deploy",
|
|
11
|
+
"serverless",
|
|
12
|
+
"integrations",
|
|
13
|
+
"adapters"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
5
16
|
"repository": {
|
|
6
17
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/bagdock/bagdock.git"
|
|
8
|
-
|
|
18
|
+
"url": "git+https://github.com/bagdock/bagdock-cli.git"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/bagdock/bagdock-cli#readme",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/bagdock/bagdock-cli/issues"
|
|
9
23
|
},
|
|
10
24
|
"type": "module",
|
|
11
25
|
"bin": {
|
|
12
|
-
"bagdock": "
|
|
26
|
+
"bagdock": "dist/bagdock.js"
|
|
13
27
|
},
|
|
14
28
|
"files": [
|
|
15
29
|
"dist",
|
|
16
|
-
"README.md"
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE"
|
|
17
32
|
],
|
|
18
33
|
"publishConfig": {
|
|
19
34
|
"access": "public"
|
|
20
35
|
},
|
|
21
36
|
"scripts": {
|
|
22
37
|
"dev": "bun run bin/bagdock.ts",
|
|
23
|
-
"build": "bun build bin/bagdock.ts --outdir dist --target node && node -e \"const fs=require('fs');const f='dist/bagdock.js';fs.writeFileSync(f,'#!/usr/bin/env node\\n'+
|
|
38
|
+
"build": "bun build bin/bagdock.ts --outdir dist --target node --format esm && node -e \"const fs=require('fs');const f='dist/bagdock.js';let c=fs.readFileSync(f,'utf8');c=c.replace(/^#!.*\\n/,'').replace(/^\\/\\/ @bun\\n/,'');fs.writeFileSync(f,'#!/usr/bin/env node\\n'+c)\"",
|
|
24
39
|
"prepublishOnly": "bun run build",
|
|
25
40
|
"typecheck": "tsc --noEmit"
|
|
26
41
|
},
|