create-cloudflare 0.0.0-5c17db1c → 0.0.0-5fde2251

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.
Files changed (2) hide show
  1. package/dist/cli.js +34 -51
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -58802,7 +58802,7 @@ var Yargs = YargsFactory(esm_default);
58802
58802
  var yargs_default = Yargs;
58803
58803
 
58804
58804
  // package.json
58805
- var version = "0.0.0-5c17db1c";
58805
+ var version = "0.0.0-5fde2251";
58806
58806
  var devDependencies = {
58807
58807
  "@babel/parser": "^7.21.3",
58808
58808
  "@babel/types": "^7.21.4",
@@ -62536,6 +62536,39 @@ var templateMap = {
62536
62536
  };
62537
62537
 
62538
62538
  // src/helpers/args.ts
62539
+ var parseArgs = async (argv) => {
62540
+ const doubleDashesIdx = argv.indexOf("--");
62541
+ const c3Args = argv.slice(
62542
+ 0,
62543
+ doubleDashesIdx < 0 ? void 0 : doubleDashesIdx
62544
+ );
62545
+ const additionalArgs = doubleDashesIdx < 0 ? [] : argv.slice(doubleDashesIdx + 1);
62546
+ const yargsObj = yargs_default(hideBin(c3Args)).scriptName("create-cloudflare").usage("$0 [args]").positional("name", { type: "string" }).option("type", { type: "string" }).option("framework", { type: "string" }).option("deploy", { type: "boolean" }).option("ts", { type: "boolean" }).option("git", { type: "boolean" }).option("open", {
62547
+ type: "boolean",
62548
+ default: true,
62549
+ description: "opens your browser after your deployment, set --no-open to disable"
62550
+ }).option("existing-script", {
62551
+ type: "string",
62552
+ hidden: templateMap["pre-existing"].hidden
62553
+ }).option("accept-defaults", {
62554
+ alias: "y",
62555
+ type: "boolean"
62556
+ }).option("wrangler-defaults", { type: "boolean", hidden: true }).version(version).strictOptions().alias("h", "help").help();
62557
+ const args = await yargsObj.argv;
62558
+ const positionalArgs = args._;
62559
+ if (positionalArgs.length > 1) {
62560
+ yargsObj.showHelp();
62561
+ console.error("\nToo many positional arguments provided");
62562
+ process.exit(1);
62563
+ }
62564
+ return {
62565
+ ...args.wranglerDefaults && WRANGLER_DEFAULTS,
62566
+ ...args.acceptDefaults && C3_DEFAULTS,
62567
+ projectName: positionalArgs[0],
62568
+ additionalArgs,
62569
+ ...args
62570
+ };
62571
+ };
62539
62572
  var processArgument = async (args, name2, promptConfig) => {
62540
62573
  let value = args[name2];
62541
62574
  const renderSubmitted = getRenderers(promptConfig).submit;
@@ -62622,56 +62655,6 @@ var printBanner = () => {
62622
62655
  `));
62623
62656
  startSection(`Create an application with Cloudflare`, "Step 1 of 3");
62624
62657
  };
62625
- var parseArgs = async (argv) => {
62626
- const doubleDashesIdx = argv.indexOf("--");
62627
- const c3Args = argv.slice(
62628
- 0,
62629
- doubleDashesIdx < 0 ? void 0 : doubleDashesIdx
62630
- );
62631
- const additionalArgs = doubleDashesIdx < 0 ? [] : argv.slice(doubleDashesIdx + 1);
62632
- const args = await yargs_default(hideBin(c3Args)).scriptName("create-cloudflare").usage("$0 [args]").positional("name", {
62633
- type: "string",
62634
- description: "The name of your application. Will be used as the directory name"
62635
- }).option("type", {
62636
- type: "string",
62637
- description: `The base template to use when scaffolding your application`
62638
- }).option("framework", {
62639
- type: "string",
62640
- description: "When using the `webApp` template, specifies the desired framework"
62641
- }).option("deploy", {
62642
- type: "boolean",
62643
- description: "Deploy your application to Cloudflare after scaffolding"
62644
- }).option("auto-update", {
62645
- type: "boolean",
62646
- default: C3_DEFAULTS.autoUpdate,
62647
- description: "Automatically uses the latest version of `create-cloudflare`. Set --no-auto-update to disable"
62648
- }).option("ts", {
62649
- type: "boolean",
62650
- description: "Adds typescript support to your application"
62651
- }).option("git", {
62652
- type: "boolean",
62653
- description: "Initializes a git repository after scaffolding"
62654
- }).option("open", {
62655
- type: "boolean",
62656
- default: true,
62657
- description: "Opens your browser after your deployment, set --no-open to disable"
62658
- }).option("existing-script", {
62659
- type: "string",
62660
- description: "An existing workers script to initialize an application from",
62661
- hidden: templateMap["pre-existing"].hidden
62662
- }).option("accept-defaults", {
62663
- alias: "y",
62664
- description: "Accept all defaults and bypass interactive prompts",
62665
- type: "boolean"
62666
- }).option("wrangler-defaults", { type: "boolean", hidden: true }).version(version).help().argv;
62667
- return {
62668
- ...args.wranglerDefaults && WRANGLER_DEFAULTS,
62669
- ...args.acceptDefaults && C3_DEFAULTS,
62670
- projectName: args._[0],
62671
- additionalArgs,
62672
- ...args
62673
- };
62674
- };
62675
62658
  main(process.argv).catch((e) => crash(e));
62676
62659
  // Annotate the CommonJS export names for ESM import in node:
62677
62660
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "0.0.0-5c17db1c",
3
+ "version": "0.0.0-5fde2251",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",