commandkit 0.1.11-dev.20250407135241 → 0.1.11-dev.20250408053600
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +23 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5489,9 +5489,8 @@ var init_CommandKit = __esm({
|
|
|
5489
5489
|
var _a;
|
|
5490
5490
|
return (_a = plugin.onBeforeClientLogin) == null ? void 0 : _a.call(plugin, ctx);
|
|
5491
5491
|
});
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
);
|
|
5492
|
+
const botToken = token ?? this.options.client.token ?? process.env.TOKEN ?? process.env.DISCORD_TOKEN;
|
|
5493
|
+
await this.options.client.login(botToken);
|
|
5495
5494
|
await this.plugins.execute((ctx, plugin) => {
|
|
5496
5495
|
var _a;
|
|
5497
5496
|
return (_a = plugin.onAfterClientLogin) == null ? void 0 : _a.call(plugin, ctx);
|
|
@@ -5695,16 +5694,26 @@ var init_version = __esm({
|
|
|
5695
5694
|
"use strict";
|
|
5696
5695
|
init_cjs_shims();
|
|
5697
5696
|
version = /* @__MACRO__ $version */
|
|
5698
|
-
"0.1.11-dev.
|
|
5697
|
+
"0.1.11-dev.20250408053600";
|
|
5699
5698
|
}
|
|
5700
5699
|
});
|
|
5701
5700
|
|
|
5702
5701
|
// src/cli/env.ts
|
|
5703
|
-
function DevEnv() {
|
|
5704
|
-
|
|
5702
|
+
function DevEnv(_static = false) {
|
|
5703
|
+
const common = {
|
|
5705
5704
|
NODE_ENV: "development",
|
|
5706
5705
|
COMMANDKIT_IS_DEV: "true"
|
|
5707
|
-
}
|
|
5706
|
+
};
|
|
5707
|
+
if (_static) return Object.assign({}, common);
|
|
5708
|
+
return Object.assign({}, process.env, common);
|
|
5709
|
+
}
|
|
5710
|
+
function ProdEnv(_static = false) {
|
|
5711
|
+
const common = {
|
|
5712
|
+
NODE_ENV: "production",
|
|
5713
|
+
COMMANDKIT_IS_DEV: "false"
|
|
5714
|
+
};
|
|
5715
|
+
if (_static) return Object.assign({}, common);
|
|
5716
|
+
return Object.assign({}, process.env, common);
|
|
5708
5717
|
}
|
|
5709
5718
|
var CommonEnvFiles, DevEnvFiles, ProdEnvFiles, devEnvFileArgs, prodEnvFileArgs;
|
|
5710
5719
|
var init_env = __esm({
|
|
@@ -5712,17 +5721,10 @@ var init_env = __esm({
|
|
|
5712
5721
|
"use strict";
|
|
5713
5722
|
init_cjs_shims();
|
|
5714
5723
|
__name(DevEnv, "DevEnv");
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
".env.local"
|
|
5720
|
-
];
|
|
5721
|
-
ProdEnvFiles = [
|
|
5722
|
-
".env.production",
|
|
5723
|
-
".env.production.local",
|
|
5724
|
-
".env.local"
|
|
5725
|
-
];
|
|
5724
|
+
__name(ProdEnv, "ProdEnv");
|
|
5725
|
+
CommonEnvFiles = [".env", ".env.local"];
|
|
5726
|
+
DevEnvFiles = [".env.development", ".env.development.local"];
|
|
5727
|
+
ProdEnvFiles = [".env.production", ".env.production.local"];
|
|
5726
5728
|
devEnvFileArgs = [...CommonEnvFiles, ...DevEnvFiles];
|
|
5727
5729
|
prodEnvFileArgs = [...CommonEnvFiles, ...ProdEnvFiles];
|
|
5728
5730
|
}
|
|
@@ -5751,7 +5753,7 @@ function createAppProcess(fileName, cwd, isDev) {
|
|
|
5751
5753
|
{
|
|
5752
5754
|
cwd,
|
|
5753
5755
|
windowsHide: true,
|
|
5754
|
-
env: DevEnv(),
|
|
5756
|
+
env: isDev ? DevEnv() : ProdEnv(),
|
|
5755
5757
|
stdio
|
|
5756
5758
|
}
|
|
5757
5759
|
);
|
|
@@ -5927,6 +5929,7 @@ async function buildApplication({
|
|
|
5927
5929
|
sourcemap: true,
|
|
5928
5930
|
target: "node16",
|
|
5929
5931
|
outDir: dest,
|
|
5932
|
+
env: isDev ? DevEnv(true) : ProdEnv(true),
|
|
5930
5933
|
entry: [
|
|
5931
5934
|
"src",
|
|
5932
5935
|
`!${config.distDir}`,
|
|
@@ -6263,7 +6266,7 @@ async function bootstrapProductionServer(configPath) {
|
|
|
6263
6266
|
`Could not locate the entrypoint. Did you forget to build the application? Run 'commandkit build' to build the application first.`
|
|
6264
6267
|
);
|
|
6265
6268
|
}
|
|
6266
|
-
return createAppProcess(mainFile, cwd,
|
|
6269
|
+
return createAppProcess(mainFile, cwd, false);
|
|
6267
6270
|
}
|
|
6268
6271
|
async function createProductionBuild(configPath) {
|
|
6269
6272
|
process.env.COMMANDKIT_BOOTSTRAP_MODE = "production";
|