@byteplus-iga-pages/cli 1.1.16 → 1.2.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/README.md +35 -2
- package/dist/functions-runtime.js +491 -9
- package/dist/index.js +35 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,31 @@
|
|
|
6
6
|
|
|
7
7
|
<br/>
|
|
8
8
|
|
|
9
|
+
## Pages and Agent project compatibility
|
|
10
|
+
|
|
11
|
+
Use `bp-iga pages` for Pages projects and `iga agents` for new Agent projects. Existing Pages projects can continue using the Agent and Blob SDKs with `bp-iga pages dev/deploy`; no migration is required.
|
|
12
|
+
|
|
13
|
+
The CLI uses `.iga/project.json` to identify the associated project: `appType: "agent"` selects Agent, and a missing `appType` selects Pages. Using the other command group reports an error and points to the original project's commands. `link` changes the local association to another project; it does not migrate the remote project.
|
|
14
|
+
|
|
15
|
+
A directory without `projectId` is only unlinked. After a fresh checkout, use `bp-iga pages link --project <id-or-name>` to restore an existing Pages association, including projects using Agent or Blob SDKs. Creating a new Pages project with these SDKs is blocked; use `iga agents` for new projects instead.
|
|
16
|
+
|
|
17
|
+
When `pages init` selects a template tagged as `agent`, it stops before downloading and directs you to `iga agents init --list --json`. Select a template ID from that list to initialize an Agent project.
|
|
18
|
+
|
|
19
|
+
## Agent AI Gateway integrations
|
|
20
|
+
|
|
21
|
+
`iga agents integration list/link/unlink` manages AI Gateway bindings for an Agent project.
|
|
22
|
+
Agent integrations only support `aigateway`; Supabase integration remains available under `pages`.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
iga agents integration list --format=json
|
|
26
|
+
iga agents integration link aigateway --resource <gateway-id>
|
|
27
|
+
iga agents integration unlink aigateway --resource <gateway-id> --yes
|
|
28
|
+
iga agents env pull
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Omitting the integration name selects `aigateway`. Region, branch and prefix options are not supported.
|
|
32
|
+
Binding changes apply on the next deployment; `env pull` refreshes local configuration.
|
|
33
|
+
|
|
9
34
|
## Overview
|
|
10
35
|
|
|
11
36
|
BytePlus IGA Pages is a full-stack development and deployment platform powered by BytePlus IGA. It supports static sites, server-side rendering, and serverless functions, delivering projects to a global edge network with zero infrastructure management.
|
|
@@ -51,7 +76,7 @@ bp-iga login --accessKey <AK> --secretKey <SK> # AK/SK for automation
|
|
|
51
76
|
|
|
52
77
|
---
|
|
53
78
|
|
|
54
|
-
### `bp-iga pages init`
|
|
79
|
+
### `bp-iga pages init` / `iga agents init`
|
|
55
80
|
|
|
56
81
|
```bash
|
|
57
82
|
bp-iga pages init --list --json
|
|
@@ -59,7 +84,9 @@ bp-iga pages init my-agent --template <template-id>
|
|
|
59
84
|
bp-iga pages init my-agent --template <template-id> --name my-remote-project
|
|
60
85
|
```
|
|
61
86
|
|
|
62
|
-
|
|
87
|
+
Use `iga agents init my-agent --template <template-id> --sandbox` to create and link a remote Agent with Sandbox enabled, including templates without model configuration. `--sandbox` is Agent-only and cannot be combined with `--list`. Without this flag, Agent initialization follows the template’s `ProjectParam.Context.Sandbox.Enable` setting; missing configuration uses the backend default (disabled). Templates without model configuration do not create an AI Gateway.
|
|
88
|
+
|
|
89
|
+
Download a template into a new or empty directory. Use `iga agents init` for Agent projects and templates that directly depend on the Agent or Blob SDK. AI templates also create a remote project, bind an AI Gateway, and write `.env.local`. Use `--name` to override the directory-based project name. Install dependencies, then run `iga agents dev` or `bp-iga pages dev` for the corresponding project type.
|
|
63
90
|
|
|
64
91
|
---
|
|
65
92
|
|
|
@@ -106,6 +133,8 @@ bp-iga pages deploy # deploy current project
|
|
|
106
133
|
bp-iga pages deploy --logs # stream complete build logs
|
|
107
134
|
```
|
|
108
135
|
|
|
136
|
+
Agent projects support `iga agents deploy --sandbox`. For a new Agent, Sandbox is enabled during creation. For an existing Agent, the CLI enables Sandbox and waits for the configuration to become ready before deploying. Omitting `--sandbox` preserves the existing Sandbox configuration. Pages deployments do not accept this flag.
|
|
137
|
+
|
|
109
138
|
By default, show deployment progress and full logs on failure. Use `--logs` to stream all build logs.
|
|
110
139
|
|
|
111
140
|
---
|
|
@@ -290,3 +319,7 @@ bp-iga whoami
|
|
|
290
319
|
## License
|
|
291
320
|
|
|
292
321
|
MIT © BytePlus Pte. Ltd.
|
|
322
|
+
|
|
323
|
+
Agent creation without deployment supports `iga agents link --name my-agent --sandbox --yes`.
|
|
324
|
+
This enables Sandbox during creation for both Git and upload projects. `--sandbox` requires
|
|
325
|
+
`--name`, cannot be combined with `--project`, and is not available under `pages link`.
|
|
@@ -2667,6 +2667,198 @@ var __webpack_modules__ = {
|
|
|
2667
2667
|
]
|
|
2668
2668
|
};
|
|
2669
2669
|
},
|
|
2670
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2671
|
+
"use strict";
|
|
2672
|
+
const cp = __webpack_require__("child_process");
|
|
2673
|
+
const parse = __webpack_require__("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js");
|
|
2674
|
+
const enoent = __webpack_require__("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js");
|
|
2675
|
+
function spawn(command, args, options) {
|
|
2676
|
+
const parsed = parse(command, args, options);
|
|
2677
|
+
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
2678
|
+
enoent.hookChildProcess(spawned, parsed);
|
|
2679
|
+
return spawned;
|
|
2680
|
+
}
|
|
2681
|
+
function spawnSync(command, args, options) {
|
|
2682
|
+
const parsed = parse(command, args, options);
|
|
2683
|
+
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
2684
|
+
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
2685
|
+
return result;
|
|
2686
|
+
}
|
|
2687
|
+
module.exports = spawn;
|
|
2688
|
+
module.exports.spawn = spawn;
|
|
2689
|
+
module.exports.sync = spawnSync;
|
|
2690
|
+
module.exports._parse = parse;
|
|
2691
|
+
module.exports._enoent = enoent;
|
|
2692
|
+
},
|
|
2693
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js" (module) {
|
|
2694
|
+
"use strict";
|
|
2695
|
+
const isWin = 'win32' === process.platform;
|
|
2696
|
+
function notFoundError(original, syscall) {
|
|
2697
|
+
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
2698
|
+
code: 'ENOENT',
|
|
2699
|
+
errno: 'ENOENT',
|
|
2700
|
+
syscall: `${syscall} ${original.command}`,
|
|
2701
|
+
path: original.command,
|
|
2702
|
+
spawnargs: original.args
|
|
2703
|
+
});
|
|
2704
|
+
}
|
|
2705
|
+
function hookChildProcess(cp, parsed) {
|
|
2706
|
+
if (!isWin) return;
|
|
2707
|
+
const originalEmit = cp.emit;
|
|
2708
|
+
cp.emit = function(name, arg1) {
|
|
2709
|
+
if ('exit' === name) {
|
|
2710
|
+
const err = verifyENOENT(arg1, parsed);
|
|
2711
|
+
if (err) return originalEmit.call(cp, 'error', err);
|
|
2712
|
+
}
|
|
2713
|
+
return originalEmit.apply(cp, arguments);
|
|
2714
|
+
};
|
|
2715
|
+
}
|
|
2716
|
+
function verifyENOENT(status, parsed) {
|
|
2717
|
+
if (isWin && 1 === status && !parsed.file) return notFoundError(parsed.original, 'spawn');
|
|
2718
|
+
return null;
|
|
2719
|
+
}
|
|
2720
|
+
function verifyENOENTSync(status, parsed) {
|
|
2721
|
+
if (isWin && 1 === status && !parsed.file) return notFoundError(parsed.original, 'spawnSync');
|
|
2722
|
+
return null;
|
|
2723
|
+
}
|
|
2724
|
+
module.exports = {
|
|
2725
|
+
hookChildProcess,
|
|
2726
|
+
verifyENOENT,
|
|
2727
|
+
verifyENOENTSync,
|
|
2728
|
+
notFoundError
|
|
2729
|
+
};
|
|
2730
|
+
},
|
|
2731
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2732
|
+
"use strict";
|
|
2733
|
+
const path = __webpack_require__("path");
|
|
2734
|
+
const resolveCommand = __webpack_require__("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js");
|
|
2735
|
+
const escape = __webpack_require__("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js");
|
|
2736
|
+
const readShebang = __webpack_require__("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js");
|
|
2737
|
+
const isWin = 'win32' === process.platform;
|
|
2738
|
+
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
2739
|
+
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
2740
|
+
function detectShebang(parsed) {
|
|
2741
|
+
parsed.file = resolveCommand(parsed);
|
|
2742
|
+
const shebang = parsed.file && readShebang(parsed.file);
|
|
2743
|
+
if (shebang) {
|
|
2744
|
+
parsed.args.unshift(parsed.file);
|
|
2745
|
+
parsed.command = shebang;
|
|
2746
|
+
return resolveCommand(parsed);
|
|
2747
|
+
}
|
|
2748
|
+
return parsed.file;
|
|
2749
|
+
}
|
|
2750
|
+
function parseNonShell(parsed) {
|
|
2751
|
+
if (!isWin) return parsed;
|
|
2752
|
+
const commandFile = detectShebang(parsed);
|
|
2753
|
+
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
2754
|
+
if (parsed.options.forceShell || needsShell) {
|
|
2755
|
+
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
2756
|
+
parsed.command = path.normalize(parsed.command);
|
|
2757
|
+
parsed.command = escape.command(parsed.command);
|
|
2758
|
+
parsed.args = parsed.args.map((arg)=>escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
2759
|
+
const shellCommand = [
|
|
2760
|
+
parsed.command
|
|
2761
|
+
].concat(parsed.args).join(' ');
|
|
2762
|
+
parsed.args = [
|
|
2763
|
+
'/d',
|
|
2764
|
+
'/s',
|
|
2765
|
+
'/c',
|
|
2766
|
+
`"${shellCommand}"`
|
|
2767
|
+
];
|
|
2768
|
+
parsed.command = process.env.comspec || 'cmd.exe';
|
|
2769
|
+
parsed.options.windowsVerbatimArguments = true;
|
|
2770
|
+
}
|
|
2771
|
+
return parsed;
|
|
2772
|
+
}
|
|
2773
|
+
function parse(command, args, options) {
|
|
2774
|
+
if (args && !Array.isArray(args)) {
|
|
2775
|
+
options = args;
|
|
2776
|
+
args = null;
|
|
2777
|
+
}
|
|
2778
|
+
args = args ? args.slice(0) : [];
|
|
2779
|
+
options = Object.assign({}, options);
|
|
2780
|
+
const parsed = {
|
|
2781
|
+
command,
|
|
2782
|
+
args,
|
|
2783
|
+
options,
|
|
2784
|
+
file: void 0,
|
|
2785
|
+
original: {
|
|
2786
|
+
command,
|
|
2787
|
+
args
|
|
2788
|
+
}
|
|
2789
|
+
};
|
|
2790
|
+
return options.shell ? parsed : parseNonShell(parsed);
|
|
2791
|
+
}
|
|
2792
|
+
module.exports = parse;
|
|
2793
|
+
},
|
|
2794
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js" (module) {
|
|
2795
|
+
"use strict";
|
|
2796
|
+
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
2797
|
+
function escapeCommand(arg) {
|
|
2798
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
2799
|
+
return arg;
|
|
2800
|
+
}
|
|
2801
|
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
2802
|
+
arg = `${arg}`;
|
|
2803
|
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
|
|
2804
|
+
arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1');
|
|
2805
|
+
arg = `"${arg}"`;
|
|
2806
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
2807
|
+
if (doubleEscapeMetaChars) arg = arg.replace(metaCharsRegExp, '^$1');
|
|
2808
|
+
return arg;
|
|
2809
|
+
}
|
|
2810
|
+
module.exports.command = escapeCommand;
|
|
2811
|
+
module.exports.argument = escapeArgument;
|
|
2812
|
+
},
|
|
2813
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2814
|
+
"use strict";
|
|
2815
|
+
const fs = __webpack_require__("fs");
|
|
2816
|
+
const shebangCommand = __webpack_require__("../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js");
|
|
2817
|
+
function readShebang(command) {
|
|
2818
|
+
const size = 150;
|
|
2819
|
+
const buffer = Buffer.alloc(size);
|
|
2820
|
+
let fd;
|
|
2821
|
+
try {
|
|
2822
|
+
fd = fs.openSync(command, 'r');
|
|
2823
|
+
fs.readSync(fd, buffer, 0, size, 0);
|
|
2824
|
+
fs.closeSync(fd);
|
|
2825
|
+
} catch (e) {}
|
|
2826
|
+
return shebangCommand(buffer.toString());
|
|
2827
|
+
}
|
|
2828
|
+
module.exports = readShebang;
|
|
2829
|
+
},
|
|
2830
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2831
|
+
"use strict";
|
|
2832
|
+
const path = __webpack_require__("path");
|
|
2833
|
+
const which = __webpack_require__("../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js");
|
|
2834
|
+
const getPathKey = __webpack_require__("../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js");
|
|
2835
|
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
2836
|
+
const env = parsed.options.env || process.env;
|
|
2837
|
+
const cwd = process.cwd();
|
|
2838
|
+
const hasCustomCwd = null != parsed.options.cwd;
|
|
2839
|
+
const shouldSwitchCwd = hasCustomCwd && void 0 !== process.chdir && !process.chdir.disabled;
|
|
2840
|
+
if (shouldSwitchCwd) try {
|
|
2841
|
+
process.chdir(parsed.options.cwd);
|
|
2842
|
+
} catch (err) {}
|
|
2843
|
+
let resolved;
|
|
2844
|
+
try {
|
|
2845
|
+
resolved = which.sync(parsed.command, {
|
|
2846
|
+
path: env[getPathKey({
|
|
2847
|
+
env
|
|
2848
|
+
})],
|
|
2849
|
+
pathExt: withoutPathExt ? path.delimiter : void 0
|
|
2850
|
+
});
|
|
2851
|
+
} catch (e) {} finally{
|
|
2852
|
+
if (shouldSwitchCwd) process.chdir(cwd);
|
|
2853
|
+
}
|
|
2854
|
+
if (resolved) resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
|
|
2855
|
+
return resolved;
|
|
2856
|
+
}
|
|
2857
|
+
function resolveCommand(parsed) {
|
|
2858
|
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
2859
|
+
}
|
|
2860
|
+
module.exports = resolveCommand;
|
|
2861
|
+
},
|
|
2670
2862
|
"../../node_modules/.pnpm/defaults@1.0.4/node_modules/defaults/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2671
2863
|
var clone = __webpack_require__("../../node_modules/.pnpm/clone@1.0.4/node_modules/clone/clone.js");
|
|
2672
2864
|
module.exports = function(options, defaults) {
|
|
@@ -4775,6 +4967,102 @@ var __webpack_modules__ = {
|
|
|
4775
4967
|
return Boolean(process.env.CI) || Boolean(process.env.WT_SESSION) || 'vscode' === process.env.TERM_PROGRAM || 'xterm-256color' === process.env.TERM || 'alacritty' === process.env.TERM;
|
|
4776
4968
|
};
|
|
4777
4969
|
},
|
|
4970
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
4971
|
+
__webpack_require__("fs");
|
|
4972
|
+
var core;
|
|
4973
|
+
core = 'win32' === process.platform || global.TESTING_WINDOWS ? __webpack_require__("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js") : __webpack_require__("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js");
|
|
4974
|
+
module.exports = isexe;
|
|
4975
|
+
isexe.sync = sync;
|
|
4976
|
+
function isexe(path, options, cb) {
|
|
4977
|
+
if ('function' == typeof options) {
|
|
4978
|
+
cb = options;
|
|
4979
|
+
options = {};
|
|
4980
|
+
}
|
|
4981
|
+
if (!cb) {
|
|
4982
|
+
if ('function' != typeof Promise) throw new TypeError('callback not provided');
|
|
4983
|
+
return new Promise(function(resolve, reject) {
|
|
4984
|
+
isexe(path, options || {}, function(er, is) {
|
|
4985
|
+
if (er) reject(er);
|
|
4986
|
+
else resolve(is);
|
|
4987
|
+
});
|
|
4988
|
+
});
|
|
4989
|
+
}
|
|
4990
|
+
core(path, options || {}, function(er, is) {
|
|
4991
|
+
if (er) {
|
|
4992
|
+
if ('EACCES' === er.code || options && options.ignoreErrors) {
|
|
4993
|
+
er = null;
|
|
4994
|
+
is = false;
|
|
4995
|
+
}
|
|
4996
|
+
}
|
|
4997
|
+
cb(er, is);
|
|
4998
|
+
});
|
|
4999
|
+
}
|
|
5000
|
+
function sync(path, options) {
|
|
5001
|
+
try {
|
|
5002
|
+
return core.sync(path, options || {});
|
|
5003
|
+
} catch (er) {
|
|
5004
|
+
if (options && options.ignoreErrors || 'EACCES' === er.code) return false;
|
|
5005
|
+
throw er;
|
|
5006
|
+
}
|
|
5007
|
+
}
|
|
5008
|
+
},
|
|
5009
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
5010
|
+
module.exports = isexe;
|
|
5011
|
+
isexe.sync = sync;
|
|
5012
|
+
var fs = __webpack_require__("fs");
|
|
5013
|
+
function isexe(path, options, cb) {
|
|
5014
|
+
fs.stat(path, function(er, stat) {
|
|
5015
|
+
cb(er, er ? false : checkStat(stat, options));
|
|
5016
|
+
});
|
|
5017
|
+
}
|
|
5018
|
+
function sync(path, options) {
|
|
5019
|
+
return checkStat(fs.statSync(path), options);
|
|
5020
|
+
}
|
|
5021
|
+
function checkStat(stat, options) {
|
|
5022
|
+
return stat.isFile() && checkMode(stat, options);
|
|
5023
|
+
}
|
|
5024
|
+
function checkMode(stat, options) {
|
|
5025
|
+
var mod = stat.mode;
|
|
5026
|
+
var uid = stat.uid;
|
|
5027
|
+
var gid = stat.gid;
|
|
5028
|
+
var myUid = void 0 !== options.uid ? options.uid : process.getuid && process.getuid();
|
|
5029
|
+
var myGid = void 0 !== options.gid ? options.gid : process.getgid && process.getgid();
|
|
5030
|
+
var u = parseInt('100', 8);
|
|
5031
|
+
var g = parseInt('010', 8);
|
|
5032
|
+
var o = parseInt('001', 8);
|
|
5033
|
+
var ug = u | g;
|
|
5034
|
+
var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && 0 === myUid;
|
|
5035
|
+
return ret;
|
|
5036
|
+
}
|
|
5037
|
+
},
|
|
5038
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
5039
|
+
module.exports = isexe;
|
|
5040
|
+
isexe.sync = sync;
|
|
5041
|
+
var fs = __webpack_require__("fs");
|
|
5042
|
+
function checkPathExt(path, options) {
|
|
5043
|
+
var pathext = void 0 !== options.pathExt ? options.pathExt : process.env.PATHEXT;
|
|
5044
|
+
if (!pathext) return true;
|
|
5045
|
+
pathext = pathext.split(';');
|
|
5046
|
+
if (-1 !== pathext.indexOf('')) return true;
|
|
5047
|
+
for(var i = 0; i < pathext.length; i++){
|
|
5048
|
+
var p = pathext[i].toLowerCase();
|
|
5049
|
+
if (p && path.substr(-p.length).toLowerCase() === p) return true;
|
|
5050
|
+
}
|
|
5051
|
+
return false;
|
|
5052
|
+
}
|
|
5053
|
+
function checkStat(stat, path, options) {
|
|
5054
|
+
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
5055
|
+
return checkPathExt(path, options);
|
|
5056
|
+
}
|
|
5057
|
+
function isexe(path, options, cb) {
|
|
5058
|
+
fs.stat(path, function(er, stat) {
|
|
5059
|
+
cb(er, er ? false : checkStat(stat, path, options));
|
|
5060
|
+
});
|
|
5061
|
+
}
|
|
5062
|
+
function sync(path, options) {
|
|
5063
|
+
return checkStat(fs.statSync(path), path, options);
|
|
5064
|
+
}
|
|
5065
|
+
},
|
|
4778
5066
|
"../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
4779
5067
|
let _fs;
|
|
4780
5068
|
try {
|
|
@@ -5180,6 +5468,17 @@ var __webpack_modules__ = {
|
|
|
5180
5468
|
return spinner;
|
|
5181
5469
|
};
|
|
5182
5470
|
},
|
|
5471
|
+
"../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js" (module) {
|
|
5472
|
+
"use strict";
|
|
5473
|
+
const pathKey = (options = {})=>{
|
|
5474
|
+
const environment = options.env || process.env;
|
|
5475
|
+
const platform = options.platform || process.platform;
|
|
5476
|
+
if ('win32' !== platform) return 'PATH';
|
|
5477
|
+
return Object.keys(environment).reverse().find((key)=>'PATH' === key.toUpperCase()) || 'Path';
|
|
5478
|
+
};
|
|
5479
|
+
module.exports = pathKey;
|
|
5480
|
+
module.exports["default"] = pathKey;
|
|
5481
|
+
},
|
|
5183
5482
|
"../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors.js" (module) {
|
|
5184
5483
|
"use strict";
|
|
5185
5484
|
const codes = {};
|
|
@@ -8707,6 +9006,22 @@ var __webpack_modules__ = {
|
|
|
8707
9006
|
};
|
|
8708
9007
|
module.exports = validRange;
|
|
8709
9008
|
},
|
|
9009
|
+
"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
9010
|
+
"use strict";
|
|
9011
|
+
const shebangRegex = __webpack_require__("../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js");
|
|
9012
|
+
module.exports = (string = '')=>{
|
|
9013
|
+
const match = string.match(shebangRegex);
|
|
9014
|
+
if (!match) return null;
|
|
9015
|
+
const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
|
|
9016
|
+
const binary = path.split('/').pop();
|
|
9017
|
+
if ('env' === binary) return argument;
|
|
9018
|
+
return argument ? `${binary} ${argument}` : binary;
|
|
9019
|
+
};
|
|
9020
|
+
},
|
|
9021
|
+
"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js" (module) {
|
|
9022
|
+
"use strict";
|
|
9023
|
+
module.exports = /^#!(.*)/;
|
|
9024
|
+
},
|
|
8710
9025
|
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
8711
9026
|
var process1 = global.process;
|
|
8712
9027
|
const processOk = function(process1) {
|
|
@@ -9774,6 +10089,93 @@ var __webpack_modules__ = {
|
|
|
9774
10089
|
return false;
|
|
9775
10090
|
}
|
|
9776
10091
|
},
|
|
10092
|
+
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
10093
|
+
const isWindows = 'win32' === process.platform || 'cygwin' === process.env.OSTYPE || 'msys' === process.env.OSTYPE;
|
|
10094
|
+
const path = __webpack_require__("path");
|
|
10095
|
+
const COLON = isWindows ? ';' : ':';
|
|
10096
|
+
const isexe = __webpack_require__("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js");
|
|
10097
|
+
const getNotFoundError = (cmd)=>Object.assign(new Error(`not found: ${cmd}`), {
|
|
10098
|
+
code: 'ENOENT'
|
|
10099
|
+
});
|
|
10100
|
+
const getPathInfo = (cmd, opt)=>{
|
|
10101
|
+
const colon = opt.colon || COLON;
|
|
10102
|
+
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [
|
|
10103
|
+
''
|
|
10104
|
+
] : [
|
|
10105
|
+
...isWindows ? [
|
|
10106
|
+
process.cwd()
|
|
10107
|
+
] : [],
|
|
10108
|
+
...(opt.path || process.env.PATH || '').split(colon)
|
|
10109
|
+
];
|
|
10110
|
+
const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM' : '';
|
|
10111
|
+
const pathExt = isWindows ? pathExtExe.split(colon) : [
|
|
10112
|
+
''
|
|
10113
|
+
];
|
|
10114
|
+
if (isWindows) {
|
|
10115
|
+
if (-1 !== cmd.indexOf('.') && '' !== pathExt[0]) pathExt.unshift('');
|
|
10116
|
+
}
|
|
10117
|
+
return {
|
|
10118
|
+
pathEnv,
|
|
10119
|
+
pathExt,
|
|
10120
|
+
pathExtExe
|
|
10121
|
+
};
|
|
10122
|
+
};
|
|
10123
|
+
const which = (cmd, opt, cb)=>{
|
|
10124
|
+
if ('function' == typeof opt) {
|
|
10125
|
+
cb = opt;
|
|
10126
|
+
opt = {};
|
|
10127
|
+
}
|
|
10128
|
+
if (!opt) opt = {};
|
|
10129
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
10130
|
+
const found = [];
|
|
10131
|
+
const step = (i)=>new Promise((resolve, reject)=>{
|
|
10132
|
+
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
10133
|
+
const ppRaw = pathEnv[i];
|
|
10134
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
10135
|
+
const pCmd = path.join(pathPart, cmd);
|
|
10136
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
10137
|
+
resolve(subStep(p, i, 0));
|
|
10138
|
+
});
|
|
10139
|
+
const subStep = (p, i, ii)=>new Promise((resolve, reject)=>{
|
|
10140
|
+
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
10141
|
+
const ext = pathExt[ii];
|
|
10142
|
+
isexe(p + ext, {
|
|
10143
|
+
pathExt: pathExtExe
|
|
10144
|
+
}, (er, is)=>{
|
|
10145
|
+
if (!er && is) if (!opt.all) return resolve(p + ext);
|
|
10146
|
+
else found.push(p + ext);
|
|
10147
|
+
return resolve(subStep(p, i, ii + 1));
|
|
10148
|
+
});
|
|
10149
|
+
});
|
|
10150
|
+
return cb ? step(0).then((res)=>cb(null, res), cb) : step(0);
|
|
10151
|
+
};
|
|
10152
|
+
const whichSync = (cmd, opt)=>{
|
|
10153
|
+
opt = opt || {};
|
|
10154
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
10155
|
+
const found = [];
|
|
10156
|
+
for(let i = 0; i < pathEnv.length; i++){
|
|
10157
|
+
const ppRaw = pathEnv[i];
|
|
10158
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
10159
|
+
const pCmd = path.join(pathPart, cmd);
|
|
10160
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
10161
|
+
for(let j = 0; j < pathExt.length; j++){
|
|
10162
|
+
const cur = p + pathExt[j];
|
|
10163
|
+
try {
|
|
10164
|
+
const is = isexe.sync(cur, {
|
|
10165
|
+
pathExt: pathExtExe
|
|
10166
|
+
});
|
|
10167
|
+
if (is) if (!opt.all) return cur;
|
|
10168
|
+
else found.push(cur);
|
|
10169
|
+
} catch (ex) {}
|
|
10170
|
+
}
|
|
10171
|
+
}
|
|
10172
|
+
if (opt.all && found.length) return found;
|
|
10173
|
+
if (opt.nothrow) return null;
|
|
10174
|
+
throw getNotFoundError(cmd);
|
|
10175
|
+
};
|
|
10176
|
+
module.exports = which;
|
|
10177
|
+
which.sync = whichSync;
|
|
10178
|
+
},
|
|
9777
10179
|
"../build-utils/dist/config.js" (__unused_rspack_module, exports1, __webpack_require__) {
|
|
9778
10180
|
"use strict";
|
|
9779
10181
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -9908,8 +10310,8 @@ var __webpack_modules__ = {
|
|
|
9908
10310
|
}
|
|
9909
10311
|
return validatedConfig;
|
|
9910
10312
|
}
|
|
9911
|
-
function resolveRootDirectory(
|
|
9912
|
-
return _async_to_generator(function*() {
|
|
10313
|
+
function resolveRootDirectory(_0) {
|
|
10314
|
+
return _async_to_generator(function*(cwd, options = {}) {
|
|
9913
10315
|
const envConfig = readEnvConfig();
|
|
9914
10316
|
const rootDirectory = envConfig.rootDirectory || "";
|
|
9915
10317
|
if (!rootDirectory) return {
|
|
@@ -9922,12 +10324,12 @@ var __webpack_modules__ = {
|
|
|
9922
10324
|
if (!(yield fs.pathExists(resolved))) throw new Error(`Root directory "${rootDirectory}" does not exist (resolved to ${resolved})`);
|
|
9923
10325
|
const stat = yield fs.stat(resolved);
|
|
9924
10326
|
if (!stat.isDirectory()) throw new Error(`Root directory "${rootDirectory}" is not a directory`);
|
|
9925
|
-
logger_1.logger.log(` Root directory: ${rootDirectory}`);
|
|
10327
|
+
if (!options.quiet) logger_1.logger.log(` Root directory: ${rootDirectory}`);
|
|
9926
10328
|
return {
|
|
9927
10329
|
workPath: resolved,
|
|
9928
10330
|
rootDirectory
|
|
9929
10331
|
};
|
|
9930
|
-
})();
|
|
10332
|
+
}).apply(this, arguments);
|
|
9931
10333
|
}
|
|
9932
10334
|
function resolveBuildCommand(workPath, igaConfig, framework) {
|
|
9933
10335
|
return _async_to_generator(function*() {
|
|
@@ -11349,22 +11751,102 @@ export function installFaasInstanceNameResponseHeader() {
|
|
|
11349
11751
|
},
|
|
11350
11752
|
"../build-utils/dist/spawn-command.js" (__unused_rspack_module, exports1, __webpack_require__) {
|
|
11351
11753
|
"use strict";
|
|
11754
|
+
function _define_property(obj, key, value) {
|
|
11755
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
11756
|
+
value: value,
|
|
11757
|
+
enumerable: true,
|
|
11758
|
+
configurable: true,
|
|
11759
|
+
writable: true
|
|
11760
|
+
});
|
|
11761
|
+
else obj[key] = value;
|
|
11762
|
+
return obj;
|
|
11763
|
+
}
|
|
11764
|
+
function _object_spread(target) {
|
|
11765
|
+
for(var i = 1; i < arguments.length; i++){
|
|
11766
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
11767
|
+
var ownKeys = Object.keys(source);
|
|
11768
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
11769
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
11770
|
+
}));
|
|
11771
|
+
ownKeys.forEach(function(key) {
|
|
11772
|
+
_define_property(target, key, source[key]);
|
|
11773
|
+
});
|
|
11774
|
+
}
|
|
11775
|
+
return target;
|
|
11776
|
+
}
|
|
11777
|
+
function ownKeys(object, enumerableOnly) {
|
|
11778
|
+
var keys = Object.keys(object);
|
|
11779
|
+
if (Object.getOwnPropertySymbols) {
|
|
11780
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
11781
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
11782
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
11783
|
+
});
|
|
11784
|
+
keys.push.apply(keys, symbols);
|
|
11785
|
+
}
|
|
11786
|
+
return keys;
|
|
11787
|
+
}
|
|
11788
|
+
function _object_spread_props(target, source) {
|
|
11789
|
+
source = null != source ? source : {};
|
|
11790
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
11791
|
+
else ownKeys(Object(source)).forEach(function(key) {
|
|
11792
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
11793
|
+
});
|
|
11794
|
+
return target;
|
|
11795
|
+
}
|
|
11352
11796
|
Object.defineProperty(exports1, "__esModule", {
|
|
11353
11797
|
value: true
|
|
11354
11798
|
});
|
|
11355
11799
|
exports1.spawnCommand = spawnCommand;
|
|
11800
|
+
exports1.terminateProcessTree = terminateProcessTree;
|
|
11356
11801
|
exports1.cloneEnv = cloneEnv;
|
|
11357
11802
|
exports1.execCommand = execCommand;
|
|
11358
11803
|
const child_process_1 = __webpack_require__("child_process");
|
|
11359
|
-
|
|
11804
|
+
const crossSpawn = __webpack_require__("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js");
|
|
11805
|
+
function spawnCommand(command, argsOrOptions = {}, options = {}) {
|
|
11806
|
+
if (Array.isArray(argsOrOptions)) {
|
|
11807
|
+
if ([
|
|
11808
|
+
command,
|
|
11809
|
+
...argsOrOptions
|
|
11810
|
+
].some((value)=>/[\r\n]/.test(value))) throw new Error("Command and arguments must not contain newlines");
|
|
11811
|
+
if (options.shell) throw new Error("Argument-array commands must not use shell");
|
|
11812
|
+
return crossSpawn(command, argsOrOptions, _object_spread_props(_object_spread({}, options), {
|
|
11813
|
+
shell: false
|
|
11814
|
+
}));
|
|
11815
|
+
}
|
|
11360
11816
|
if ("win32" === process.platform) return (0, child_process_1.spawn)("cmd.exe", [
|
|
11361
|
-
"/
|
|
11362
|
-
|
|
11363
|
-
|
|
11817
|
+
"/d",
|
|
11818
|
+
"/s",
|
|
11819
|
+
"/c",
|
|
11820
|
+
`"${command}"`
|
|
11821
|
+
], _object_spread_props(_object_spread({}, argsOrOptions), {
|
|
11822
|
+
windowsVerbatimArguments: true
|
|
11823
|
+
}));
|
|
11364
11824
|
return (0, child_process_1.spawn)("sh", [
|
|
11365
11825
|
"-c",
|
|
11366
11826
|
command
|
|
11367
|
-
],
|
|
11827
|
+
], argsOrOptions);
|
|
11828
|
+
}
|
|
11829
|
+
function terminateProcessTree(child) {
|
|
11830
|
+
if (null != child.exitCode || null != child.signalCode) return Promise.resolve();
|
|
11831
|
+
if ("win32" !== process.platform) {
|
|
11832
|
+
child.kill();
|
|
11833
|
+
return Promise.resolve();
|
|
11834
|
+
}
|
|
11835
|
+
if (!Number.isSafeInteger(child.pid) || child.pid <= 0) return Promise.resolve();
|
|
11836
|
+
return new Promise((resolve, reject)=>{
|
|
11837
|
+
(0, child_process_1.execFile)("taskkill.exe", [
|
|
11838
|
+
"/pid",
|
|
11839
|
+
String(child.pid),
|
|
11840
|
+
"/T",
|
|
11841
|
+
"/F"
|
|
11842
|
+
], {
|
|
11843
|
+
windowsHide: true,
|
|
11844
|
+
timeout: 5000
|
|
11845
|
+
}, (error)=>{
|
|
11846
|
+
if (error && null == child.exitCode && null == child.signalCode) reject(error);
|
|
11847
|
+
else resolve();
|
|
11848
|
+
});
|
|
11849
|
+
});
|
|
11368
11850
|
}
|
|
11369
11851
|
const hasProp = Object.prototype.hasOwnProperty;
|
|
11370
11852
|
function cloneEnv(...envs) {
|