@hybridly/vite 0.1.0-alpha.3 → 0.1.0-alpha.4

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.cjs CHANGED
@@ -306,10 +306,11 @@ function getRunOptions(options) {
306
306
  {
307
307
  name: "Generate TypeScript types",
308
308
  run: ["php", "artisan", "hybridly:types"],
309
+ build: false,
309
310
  pattern: [
310
- "(app|src)/**/*Data.php",
311
- "(app|src)/**/Enums/*.php",
312
- "(app|src)/**/Middlewrare/HandleHybridRequests.php"
311
+ "+(app|src)/**/*Data.php",
312
+ "+(app|src)/**/Enums/*.php",
313
+ "+(app|src)/**/Middlewrare/HandleHybridRequests.php"
313
314
  ]
314
315
  },
315
316
  {
@@ -331,7 +332,6 @@ function getLaravelOptions(options, config) {
331
332
  const HybridlyImports = {
332
333
  "hybridly/vue": [
333
334
  "useProperty",
334
- "useTypedProperty",
335
335
  "useProperties",
336
336
  "useBackForward",
337
337
  "useContext",
@@ -361,7 +361,11 @@ function getAutoImportsOptions(options, config) {
361
361
  dts: ".hybridly/auto-imports.d.ts",
362
362
  dirs: [
363
363
  `${config.root}/utils`,
364
- `${config.root}/composables`
364
+ `${config.root}/composables`,
365
+ ...config.domains ? [
366
+ `${config.root}/${config.domains}/**/utils`,
367
+ `${config.root}/${config.domains}/**/composables`
368
+ ] : []
365
369
  ],
366
370
  imports: [
367
371
  "vue",
@@ -541,6 +545,27 @@ function generateVueShims(options) {
541
545
  }`;
542
546
  write(shims, "vue-shims.d.ts");
543
547
  }
548
+ function generateLaravelIdeaHelper(config) {
549
+ const ideJson = {
550
+ $schema: "https://laravel-ide.com/schema/laravel-ide-v2.json",
551
+ completions: [
552
+ ...config.domains ? [] : [{
553
+ complete: "directoryFiles",
554
+ options: {
555
+ directory: `/${config.root}/${config.pages}`,
556
+ suffixToClear: ".vue"
557
+ },
558
+ condition: [
559
+ {
560
+ functionNames: ["hybridly"],
561
+ parameters: [1]
562
+ }
563
+ ]
564
+ }]
565
+ ]
566
+ };
567
+ write(JSON.stringify(ideJson, null, 2), "ide.json");
568
+ }
544
569
  function write(data, filename) {
545
570
  const hybridlyPath = path__default.resolve(process.cwd(), ".hybridly");
546
571
  if (!fs__default.existsSync(hybridlyPath)) {
@@ -555,6 +580,7 @@ async function plugin(options = {}) {
555
580
  const config$1 = await config.loadHybridlyConfig();
556
581
  generateTsConfig(options, config$1);
557
582
  generateVueShims(options);
583
+ generateLaravelIdeaHelper(config$1);
558
584
  return [
559
585
  initialize(options, config$1),
560
586
  layout(options, config$1),
package/dist/index.mjs CHANGED
@@ -288,10 +288,11 @@ function getRunOptions(options) {
288
288
  {
289
289
  name: "Generate TypeScript types",
290
290
  run: ["php", "artisan", "hybridly:types"],
291
+ build: false,
291
292
  pattern: [
292
- "(app|src)/**/*Data.php",
293
- "(app|src)/**/Enums/*.php",
294
- "(app|src)/**/Middlewrare/HandleHybridRequests.php"
293
+ "+(app|src)/**/*Data.php",
294
+ "+(app|src)/**/Enums/*.php",
295
+ "+(app|src)/**/Middlewrare/HandleHybridRequests.php"
295
296
  ]
296
297
  },
297
298
  {
@@ -313,7 +314,6 @@ function getLaravelOptions(options, config) {
313
314
  const HybridlyImports = {
314
315
  "hybridly/vue": [
315
316
  "useProperty",
316
- "useTypedProperty",
317
317
  "useProperties",
318
318
  "useBackForward",
319
319
  "useContext",
@@ -343,7 +343,11 @@ function getAutoImportsOptions(options, config) {
343
343
  dts: ".hybridly/auto-imports.d.ts",
344
344
  dirs: [
345
345
  `${config.root}/utils`,
346
- `${config.root}/composables`
346
+ `${config.root}/composables`,
347
+ ...config.domains ? [
348
+ `${config.root}/${config.domains}/**/utils`,
349
+ `${config.root}/${config.domains}/**/composables`
350
+ ] : []
347
351
  ],
348
352
  imports: [
349
353
  "vue",
@@ -523,6 +527,27 @@ function generateVueShims(options) {
523
527
  }`;
524
528
  write(shims, "vue-shims.d.ts");
525
529
  }
530
+ function generateLaravelIdeaHelper(config) {
531
+ const ideJson = {
532
+ $schema: "https://laravel-ide.com/schema/laravel-ide-v2.json",
533
+ completions: [
534
+ ...config.domains ? [] : [{
535
+ complete: "directoryFiles",
536
+ options: {
537
+ directory: `/${config.root}/${config.pages}`,
538
+ suffixToClear: ".vue"
539
+ },
540
+ condition: [
541
+ {
542
+ functionNames: ["hybridly"],
543
+ parameters: [1]
544
+ }
545
+ ]
546
+ }]
547
+ ]
548
+ };
549
+ write(JSON.stringify(ideJson, null, 2), "ide.json");
550
+ }
526
551
  function write(data, filename) {
527
552
  const hybridlyPath = path.resolve(process.cwd(), ".hybridly");
528
553
  if (!fs.existsSync(hybridlyPath)) {
@@ -537,6 +562,7 @@ async function plugin(options = {}) {
537
562
  const config = await loadHybridlyConfig();
538
563
  generateTsConfig(options, config);
539
564
  generateVueShims(options);
565
+ generateLaravelIdeaHelper(config);
540
566
  return [
541
567
  initialize(options, config),
542
568
  layout(options, config),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybridly/vite",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.4",
4
4
  "description": "Vite plugin for Hybridly",
5
5
  "keywords": [
6
6
  "hybridly",
@@ -48,7 +48,7 @@
48
48
  "unplugin-icons": "^0.15.3",
49
49
  "unplugin-vue-components": "^0.24.0",
50
50
  "vite-plugin-run": "^0.4.0",
51
- "@hybridly/core": "0.1.0-alpha.3"
51
+ "@hybridly/core": "0.1.0-alpha.4"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@iconify/json": "^2.2.24",