@valbuild/init 0.51.0 → 0.52.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/bin.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ require("./init");
@@ -0,0 +1,2 @@
1
+ export * from "../../dist/declarations/src/main";
2
+ //# sourceMappingURL=valbuild-init-main.cjs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valbuild-init-main.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/main.d.ts"],"names":[],"mappings":"AAAA"}
@@ -463,23 +463,20 @@ function transformNextAppRouterValProvider(fileInfo, api, options) {
463
463
 
464
464
  var packageJson = {
465
465
  name: "@valbuild/init",
466
- version: "0.51.0",
467
- description: "",
468
- main: "dist/valbuild-init.cjs.js",
469
- module: "dist/valbuild-init.esm.js",
466
+ version: "0.52.0",
467
+ description: "Initialize a new val.build project",
470
468
  exports: {
471
- ".": {
472
- module: "./dist/valbuild-init.esm.js",
473
- "default": "./dist/valbuild-init.cjs.js"
469
+ "./main": {
470
+ module: "./main/dist/valbuild-init-main.esm.js",
471
+ "default": "./main/dist/valbuild-init-main.cjs.js"
474
472
  },
475
473
  "./package.json": "./package.json"
476
474
  },
477
475
  scripts: {
478
- test: "jest",
479
- build: "ncc build ./src/index.ts -o ./out/ --minify --no-cache --no-source-map-register"
476
+ test: "jest"
480
477
  },
481
478
  bin: {
482
- "@valbuild/init": "./out/index.js"
479
+ "@valbuild/init": "./bin.js"
483
480
  },
484
481
  dependencies: {
485
482
  "@inquirer/confirm": "^2.0.15",
@@ -503,16 +500,14 @@ var packageJson = {
503
500
  },
504
501
  preconstruct: {
505
502
  entrypoints: [
506
- "./index.ts"
507
- ],
508
- exports: true
503
+ "main.ts"
504
+ ]
509
505
  },
510
506
  devDependencies: {
511
507
  "@babel/preset-env": "^7.23.8",
512
508
  "@babel/preset-typescript": "^7.23.3",
513
509
  "@types/jest": "^29.5.11",
514
510
  "@types/jscodeshift": "^0.11.11",
515
- "@vercel/ncc": "^0.38.1",
516
511
  jest: "^29.7.0"
517
512
  }
518
513
  };
@@ -1183,7 +1178,7 @@ function _plan() {
1183
1178
  }
1184
1179
 
1185
1180
  // Patches:
1186
- NO_PATCH_WARNING = "Remember to manually patch your pages/_app.tsx file to use Val Provider.\n";
1181
+ NO_PATCH_WARNING = "Remember to add the ValProvider in your root app/layout.tsx or pages/_app.tsx file.\n";
1187
1182
  if (!analysis.appRouterLayoutPath) {
1188
1183
  _context3.next = 185;
1189
1184
  break;
@@ -1338,7 +1333,7 @@ function _main() {
1338
1333
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1339
1334
  while (1) switch (_context.prev = _context.next) {
1340
1335
  case 0:
1341
- _meow = meow__default["default"]("\n Usage\n $ npx @valbuild/init\n Commands\n Initialize Val in a project\n\n Options\n --help Show this message\n --root [root], -r [root] Set project root directory (default process.cwd())\n --yes [yes], -y [yes] Accept all prompts with defaults.\n ", {
1336
+ _meow = meow__default["default"]("\n Usage\n $ npx @valbuild/init\n Description\n Initialize Val in a project\n\n Options\n --help Show this message\n --root [root], -r [root] Set project root directory (default process.cwd())\n --yes [yes], -y [yes] Accept all prompts with defaults.\n ", {
1342
1337
  flags: {
1343
1338
  root: {
1344
1339
  type: "string",
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./valbuild-init-main.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./valbuild-init-main.cjs.dev.js");
7
+ }
@@ -463,23 +463,20 @@ function transformNextAppRouterValProvider(fileInfo, api, options) {
463
463
 
464
464
  var packageJson = {
465
465
  name: "@valbuild/init",
466
- version: "0.51.0",
467
- description: "",
468
- main: "dist/valbuild-init.cjs.js",
469
- module: "dist/valbuild-init.esm.js",
466
+ version: "0.52.0",
467
+ description: "Initialize a new val.build project",
470
468
  exports: {
471
- ".": {
472
- module: "./dist/valbuild-init.esm.js",
473
- "default": "./dist/valbuild-init.cjs.js"
469
+ "./main": {
470
+ module: "./main/dist/valbuild-init-main.esm.js",
471
+ "default": "./main/dist/valbuild-init-main.cjs.js"
474
472
  },
475
473
  "./package.json": "./package.json"
476
474
  },
477
475
  scripts: {
478
- test: "jest",
479
- build: "ncc build ./src/index.ts -o ./out/ --minify --no-cache --no-source-map-register"
476
+ test: "jest"
480
477
  },
481
478
  bin: {
482
- "@valbuild/init": "./out/index.js"
479
+ "@valbuild/init": "./bin.js"
483
480
  },
484
481
  dependencies: {
485
482
  "@inquirer/confirm": "^2.0.15",
@@ -503,16 +500,14 @@ var packageJson = {
503
500
  },
504
501
  preconstruct: {
505
502
  entrypoints: [
506
- "./index.ts"
507
- ],
508
- exports: true
503
+ "main.ts"
504
+ ]
509
505
  },
510
506
  devDependencies: {
511
507
  "@babel/preset-env": "^7.23.8",
512
508
  "@babel/preset-typescript": "^7.23.3",
513
509
  "@types/jest": "^29.5.11",
514
510
  "@types/jscodeshift": "^0.11.11",
515
- "@vercel/ncc": "^0.38.1",
516
511
  jest: "^29.7.0"
517
512
  }
518
513
  };
@@ -1183,7 +1178,7 @@ function _plan() {
1183
1178
  }
1184
1179
 
1185
1180
  // Patches:
1186
- NO_PATCH_WARNING = "Remember to manually patch your pages/_app.tsx file to use Val Provider.\n";
1181
+ NO_PATCH_WARNING = "Remember to add the ValProvider in your root app/layout.tsx or pages/_app.tsx file.\n";
1187
1182
  if (!analysis.appRouterLayoutPath) {
1188
1183
  _context3.next = 185;
1189
1184
  break;
@@ -1338,7 +1333,7 @@ function _main() {
1338
1333
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1339
1334
  while (1) switch (_context.prev = _context.next) {
1340
1335
  case 0:
1341
- _meow = meow__default["default"]("\n Usage\n $ npx @valbuild/init\n Commands\n Initialize Val in a project\n\n Options\n --help Show this message\n --root [root], -r [root] Set project root directory (default process.cwd())\n --yes [yes], -y [yes] Accept all prompts with defaults.\n ", {
1336
+ _meow = meow__default["default"]("\n Usage\n $ npx @valbuild/init\n Description\n Initialize Val in a project\n\n Options\n --help Show this message\n --root [root], -r [root] Set project root directory (default process.cwd())\n --yes [yes], -y [yes] Accept all prompts with defaults.\n ", {
1342
1337
  flags: {
1343
1338
  root: {
1344
1339
  type: "string",
@@ -451,23 +451,20 @@ function transformNextAppRouterValProvider(fileInfo, api, options) {
451
451
 
452
452
  var packageJson = {
453
453
  name: "@valbuild/init",
454
- version: "0.51.0",
455
- description: "",
456
- main: "dist/valbuild-init.cjs.js",
457
- module: "dist/valbuild-init.esm.js",
454
+ version: "0.52.0",
455
+ description: "Initialize a new val.build project",
458
456
  exports: {
459
- ".": {
460
- module: "./dist/valbuild-init.esm.js",
461
- "default": "./dist/valbuild-init.cjs.js"
457
+ "./main": {
458
+ module: "./main/dist/valbuild-init-main.esm.js",
459
+ "default": "./main/dist/valbuild-init-main.cjs.js"
462
460
  },
463
461
  "./package.json": "./package.json"
464
462
  },
465
463
  scripts: {
466
- test: "jest",
467
- build: "ncc build ./src/index.ts -o ./out/ --minify --no-cache --no-source-map-register"
464
+ test: "jest"
468
465
  },
469
466
  bin: {
470
- "@valbuild/init": "./out/index.js"
467
+ "@valbuild/init": "./bin.js"
471
468
  },
472
469
  dependencies: {
473
470
  "@inquirer/confirm": "^2.0.15",
@@ -491,16 +488,14 @@ var packageJson = {
491
488
  },
492
489
  preconstruct: {
493
490
  entrypoints: [
494
- "./index.ts"
495
- ],
496
- exports: true
491
+ "main.ts"
492
+ ]
497
493
  },
498
494
  devDependencies: {
499
495
  "@babel/preset-env": "^7.23.8",
500
496
  "@babel/preset-typescript": "^7.23.3",
501
497
  "@types/jest": "^29.5.11",
502
498
  "@types/jscodeshift": "^0.11.11",
503
- "@vercel/ncc": "^0.38.1",
504
499
  jest: "^29.7.0"
505
500
  }
506
501
  };
@@ -1171,7 +1166,7 @@ function _plan() {
1171
1166
  }
1172
1167
 
1173
1168
  // Patches:
1174
- NO_PATCH_WARNING = "Remember to manually patch your pages/_app.tsx file to use Val Provider.\n";
1169
+ NO_PATCH_WARNING = "Remember to add the ValProvider in your root app/layout.tsx or pages/_app.tsx file.\n";
1175
1170
  if (!analysis.appRouterLayoutPath) {
1176
1171
  _context3.next = 185;
1177
1172
  break;
@@ -1326,7 +1321,7 @@ function _main() {
1326
1321
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1327
1322
  while (1) switch (_context.prev = _context.next) {
1328
1323
  case 0:
1329
- _meow = meow("\n Usage\n $ npx @valbuild/init\n Commands\n Initialize Val in a project\n\n Options\n --help Show this message\n --root [root], -r [root] Set project root directory (default process.cwd())\n --yes [yes], -y [yes] Accept all prompts with defaults.\n ", {
1324
+ _meow = meow("\n Usage\n $ npx @valbuild/init\n Description\n Initialize Val in a project\n\n Options\n --help Show this message\n --root [root], -r [root] Set project root directory (default process.cwd())\n --yes [yes], -y [yes] Accept all prompts with defaults.\n ", {
1330
1325
  flags: {
1331
1326
  root: {
1332
1327
  type: "string",
@@ -0,0 +1,4 @@
1
+ {
2
+ "main": "dist/valbuild-init-main.cjs.js",
3
+ "module": "dist/valbuild-init-main.esm.js"
4
+ }
package/package.json CHANGED
@@ -1,22 +1,19 @@
1
1
  {
2
2
  "name": "@valbuild/init",
3
- "version": "0.51.0",
4
- "description": "",
5
- "main": "dist/valbuild-init.cjs.js",
6
- "module": "dist/valbuild-init.esm.js",
3
+ "version": "0.52.0",
4
+ "description": "Initialize a new val.build project",
7
5
  "exports": {
8
- ".": {
9
- "module": "./dist/valbuild-init.esm.js",
10
- "default": "./dist/valbuild-init.cjs.js"
6
+ "./main": {
7
+ "module": "./main/dist/valbuild-init-main.esm.js",
8
+ "default": "./main/dist/valbuild-init-main.cjs.js"
11
9
  },
12
10
  "./package.json": "./package.json"
13
11
  },
14
12
  "scripts": {
15
- "test": "jest",
16
- "build": "ncc build ./src/index.ts -o ./out/ --minify --no-cache --no-source-map-register"
13
+ "test": "jest"
17
14
  },
18
15
  "bin": {
19
- "@valbuild/init": "./out/index.js"
16
+ "@valbuild/init": "./bin.js"
20
17
  },
21
18
  "dependencies": {
22
19
  "@inquirer/confirm": "^2.0.15",
@@ -40,16 +37,14 @@
40
37
  },
41
38
  "preconstruct": {
42
39
  "entrypoints": [
43
- "./index.ts"
44
- ],
45
- "exports": true
40
+ "main.ts"
41
+ ]
46
42
  },
47
43
  "devDependencies": {
48
44
  "@babel/preset-env": "^7.23.8",
49
45
  "@babel/preset-typescript": "^7.23.3",
50
46
  "@types/jest": "^29.5.11",
51
47
  "@types/jscodeshift": "^0.11.11",
52
- "@vercel/ncc": "^0.38.1",
53
48
  "jest": "^29.7.0"
54
49
  }
55
50
  }
package/src/init.ts CHANGED
@@ -508,7 +508,7 @@ async function plan(
508
508
  // Patches:
509
509
 
510
510
  const NO_PATCH_WARNING =
511
- "Remember to manually patch your pages/_app.tsx file to use Val Provider.\n";
511
+ "Remember to add the ValProvider in your root app/layout.tsx or pages/_app.tsx file.\n";
512
512
  if (analysis.appRouterLayoutPath) {
513
513
  if (!analysis.appRouterLayoutFile) {
514
514
  logger.error("Failed to read app router layout file");
@@ -7,7 +7,7 @@ async function main() {
7
7
  `
8
8
  Usage
9
9
  $ npx @valbuild/init
10
- Commands
10
+ Description
11
11
  Initialize Val in a project
12
12
 
13
13
  Options
@@ -1,2 +0,0 @@
1
- export * from "./declarations/src/index";
2
- //# sourceMappingURL=valbuild-init.cjs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"valbuild-init.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./valbuild-init.cjs.prod.js");
5
- } else {
6
- module.exports = require("./valbuild-init.cjs.dev.js");
7
- }