@vxil/cli 0.31.0 → 0.32.0
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/vxil-main.js +11 -7
- package/package.json +3 -3
package/dist/vxil-main.js
CHANGED
|
@@ -5672,9 +5672,9 @@ function lowerAllTriggerBindings(def, name) {
|
|
|
5672
5672
|
return bindings;
|
|
5673
5673
|
}
|
|
5674
5674
|
var CONFIG_FILENAMES = ["vxil.config.ts", "vxil.config.mjs", "vxil.config.js"];
|
|
5675
|
-
var VXIL_CONFIG_PKG_VERSION = "0.
|
|
5676
|
-
var VXIL_SDK_PKG_VERSION = "0.
|
|
5677
|
-
var VXIL_CLI_PKG_VERSION = "0.
|
|
5675
|
+
var VXIL_CONFIG_PKG_VERSION = "0.24.0";
|
|
5676
|
+
var VXIL_SDK_PKG_VERSION = "0.31.0";
|
|
5677
|
+
var VXIL_CLI_PKG_VERSION = "0.32.0";
|
|
5678
5678
|
function ensureScaffoldPackageJson(cwd, opts = {}) {
|
|
5679
5679
|
const file = resolve(cwd, "package.json");
|
|
5680
5680
|
const wanted = {
|
|
@@ -13312,7 +13312,7 @@ var TOOLS = [
|
|
|
13312
13312
|
{
|
|
13313
13313
|
name: "notifications_send",
|
|
13314
13314
|
feature: "notifications",
|
|
13315
|
-
description: 'Send a transactional email to an end-user by ID. Returns a delivery_id immediately (202); delivery is asynchronous. Templates: magic-link (data: url, expires_minutes), otp-code (data: code, expires_minutes), welcome (data: app_name, first_name?), transactional (data: subject, paragraph, cta_label?, cta_url?, unsubscribe_url?). unsubscribe_url is a link value only (http/https/mailto/tel, anything else becomes #): write the labelled <a href="{{unsubscribe_url}}"> in your own template override; the built-in body adds nothing for it.',
|
|
13315
|
+
description: 'Send a transactional email to an end-user by ID. Returns a delivery_id immediately (202); delivery is asynchronous. Templates: magic-link (data: url, expires_minutes), otp-code (data: code, expires_minutes, url? \u2014 an optional sign-in link appended under the code), welcome (data: app_name, first_name?), transactional (data: subject, paragraph, cta_label?, cta_url?, unsubscribe_url?). unsubscribe_url is a link value only (http/https/mailto/tel, anything else becomes #): write the labelled <a href="{{unsubscribe_url}}"> in your own template override; the built-in body adds nothing for it.',
|
|
13316
13316
|
inputSchema: {
|
|
13317
13317
|
type: "object",
|
|
13318
13318
|
properties: {
|
|
@@ -16928,6 +16928,9 @@ function quickstartConfigSrc(features, slug) {
|
|
|
16928
16928
|
function quickstartTemplateSrc(configSrc, slug) {
|
|
16929
16929
|
return configSrc.replaceAll("fromEmail: 'noreply@example.com'", `fromEmail: '${quickstartFromEmail(slug)}'`);
|
|
16930
16930
|
}
|
|
16931
|
+
function scaffoldsStarterFunction(configSrc) {
|
|
16932
|
+
return configSrc.includes("./functions/hello.ts");
|
|
16933
|
+
}
|
|
16931
16934
|
|
|
16932
16935
|
// src/verbHelp.ts
|
|
16933
16936
|
var SELF_HELP_VERBS = /* @__PURE__ */ new Set(["keys", "account", "members", "api", "migrate"]);
|
|
@@ -24751,11 +24754,12 @@ export default defineConfig({
|
|
|
24751
24754
|
function scaffoldProject(configSrc, fns) {
|
|
24752
24755
|
const cwd = process.cwd();
|
|
24753
24756
|
writeFileSync6(resolve7(cwd, "vxil.config.ts"), configSrc);
|
|
24754
|
-
mkdirSync5(resolve7(cwd, "functions"), { recursive: true });
|
|
24755
24757
|
const entries = Object.entries(fns ?? {});
|
|
24756
24758
|
if (entries.length > 0) {
|
|
24759
|
+
mkdirSync5(resolve7(cwd, "functions"), { recursive: true });
|
|
24757
24760
|
for (const [file, src] of entries) writeFileSync6(resolve7(cwd, "functions", file), src);
|
|
24758
|
-
} else if (!existsSync8(resolve7(cwd, "functions/hello.ts"))) {
|
|
24761
|
+
} else if (scaffoldsStarterFunction(configSrc) && !existsSync8(resolve7(cwd, "functions/hello.ts"))) {
|
|
24762
|
+
mkdirSync5(resolve7(cwd, "functions"), { recursive: true });
|
|
24759
24763
|
writeFileSync6(resolve7(cwd, "functions/hello.ts"), STARTER_FN);
|
|
24760
24764
|
}
|
|
24761
24765
|
mkdirSync5(resolve7(cwd, ".vxil"), { recursive: true });
|
|
@@ -24791,7 +24795,7 @@ function initProject(opts = {}) {
|
|
|
24791
24795
|
console.log(` # collections: ${tpl.collections.join(", ")} \xB7 features: ${tpl.features.join(", ")}`);
|
|
24792
24796
|
const fnFiles = Object.keys(tpl.functions ?? {});
|
|
24793
24797
|
if (fnFiles.length > 0) for (const f of fnFiles) console.log(` functions/${f.padEnd(8)} # the template's function`);
|
|
24794
|
-
else console.log(" functions/hello.ts # a starter function");
|
|
24798
|
+
else if (scaffoldsStarterFunction(tpl.configSrc)) console.log(" functions/hello.ts # a starter function");
|
|
24795
24799
|
console.log(" .vxil/ # project binding (gitignored)");
|
|
24796
24800
|
if (pkgRes.action === "created" || pkgRes.action === "added") {
|
|
24797
24801
|
const sdk = Object.values(tpl.functions ?? {}).some((src) => src.includes("from '@vxil/sdk'"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxil/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The vxil CLI — init, quickstart, push, gen, secrets, keys, migrate, doctor, diff, functions, payments; installs the `vxil` command (npm i -g @vxil/cli).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@vxil/config": "0.
|
|
49
|
-
"@vxil/feature-configs": "0.
|
|
48
|
+
"@vxil/config": "0.24.0",
|
|
49
|
+
"@vxil/feature-configs": "0.22.0",
|
|
50
50
|
"@vxil/runtime": "0.0.1",
|
|
51
51
|
"@vxil/types": "0.0.1",
|
|
52
52
|
"miniflare": "^4.20260730.0"
|