cabloy 5.1.22 → 5.1.28

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 (135) hide show
  1. package/lerna.json +24 -0
  2. package/package.json +3 -2
  3. package/scripts/init.ts +4 -2
  4. package/vona/package.original.json +0 -2
  5. package/vona/packages-cli/cabloy-cli/src/lib/local.template.ts +2 -2
  6. package/vona/packages-cli/cabloy-cli/src/types/argv.ts +0 -1
  7. package/vona/packages-cli/cli-set-api/cli/templates/tools/crudBasic/snippets/2-meta.index.ts +1 -1
  8. package/vona/packages-cli/cli-set-api/cli/templates/tools/crudBasic/snippets/2-meta.version.ts +0 -1
  9. package/vona/packages-cli/cli-set-api/cli/templates/tools/crudBasic/snippets/3-en-us.ts +1 -1
  10. package/vona/packages-cli/cli-set-api/cli/templates/tools/crudStart/snippets/2-meta.index.ts +1 -1
  11. package/vona/packages-cli/cli-set-api/cli/templates/tools/crudStart/snippets/2-meta.version.ts +0 -1
  12. package/vona/packages-cli/cli-set-api/cli/templates/tools/crudStart/snippets/3-en-us.ts +1 -1
  13. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.create.bean.ts +0 -2
  14. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.create.module.ts +0 -2
  15. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.create.suite.ts +0 -2
  16. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.create.test.ts +0 -2
  17. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.appMonkey.ts +0 -2
  18. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.asset.ts +0 -2
  19. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.config.ts +0 -2
  20. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.constant.ts +0 -2
  21. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.error.ts +0 -2
  22. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.lib.ts +0 -2
  23. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.locale.ts +0 -2
  24. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.main.ts +0 -2
  25. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.monkey.ts +0 -2
  26. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.static.ts +0 -2
  27. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.init.types.ts +0 -2
  28. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.tools.crud.ts +0 -2
  29. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.tools.crudBasic.ts +0 -2
  30. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.tools.crudStart.ts +0 -2
  31. package/{zova/packages-utils/quasar-app-extension-zova → vona/packages-utils/lint}/LICENSE +1 -1
  32. package/vona/packages-utils/lint/package.json +2 -3
  33. package/vona/packages-utils/lint/src/oxc/lint.ts +0 -22
  34. package/vona/packages-utils/lint/src/oxc/lintVue.ts +0 -22
  35. package/zova/env/{.env.ssr.cabloyBasicAdmin.production → .env.cabloyBasicAdmin} +11 -1
  36. package/zova/env/.env.cabloyBasicWeb +18 -0
  37. package/zova/env/.env.ssr.admin +0 -1
  38. package/zova/package.original.json +2 -5
  39. package/zova/packages-cli/cli/package.json +2 -2
  40. package/zova/packages-cli/cli-set-front/package.json +1 -1
  41. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.create.module.ts +0 -2
  42. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.create.suite.ts +0 -2
  43. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.init.asset.ts +0 -2
  44. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.tools.metadata.ts +0 -2
  45. package/zova/packages-utils/logger/package.json +2 -2
  46. package/zova/packages-utils/zova-jsx/package.json +3 -3
  47. package/zova/packages-zova/zova/package.json +4 -4
  48. package/zova/packages-zova/zova-core/package.json +3 -3
  49. package/zova/pnpm-lock.yaml +58 -71
  50. package/zova/src/suite-vendor/a-zova/modules/a-logger/package.json +3 -3
  51. package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +3 -3
  52. package/zova/src/suite-vendor/a-zova/package.json +4 -4
  53. package/zova/env/.env.production.githubpages +0 -8
  54. package/zova/env/.env.ssr.cabloyBasicAdmin +0 -5
  55. package/zova/packages-utils/quasar-app-extension-zova/dist/index.d.ts +0 -3
  56. package/zova/packages-utils/quasar-app-extension-zova/dist/index.d.ts.map +0 -1
  57. package/zova/packages-utils/quasar-app-extension-zova/dist/index.js +0 -3
  58. package/zova/packages-utils/quasar-app-extension-zova/dist/index.js.map +0 -1
  59. package/zova/packages-utils/quasar-app-extension-zova/dist/install.d.ts +0 -7
  60. package/zova/packages-utils/quasar-app-extension-zova/dist/install.d.ts.map +0 -1
  61. package/zova/packages-utils/quasar-app-extension-zova/dist/install.js +0 -9
  62. package/zova/packages-utils/quasar-app-extension-zova/dist/install.js.map +0 -1
  63. package/zova/packages-utils/quasar-app-extension-zova/dist/prompts.d.ts +0 -42
  64. package/zova/packages-utils/quasar-app-extension-zova/dist/prompts.d.ts.map +0 -1
  65. package/zova/packages-utils/quasar-app-extension-zova/dist/prompts.js +0 -44
  66. package/zova/packages-utils/quasar-app-extension-zova/dist/prompts.js.map +0 -1
  67. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendAfterBuild.d.ts +0 -4
  68. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendAfterBuild.d.ts.map +0 -1
  69. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendAfterBuild.js +0 -32
  70. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendAfterBuild.js.map +0 -1
  71. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendFiles.d.ts +0 -6
  72. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendFiles.d.ts.map +0 -1
  73. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendFiles.js +0 -161
  74. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendFiles.js.map +0 -1
  75. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendQuasarConf.d.ts +0 -5
  76. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendQuasarConf.d.ts.map +0 -1
  77. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendQuasarConf.js +0 -71
  78. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendQuasarConf.js.map +0 -1
  79. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendSSRWebserverConf.d.ts +0 -5
  80. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendSSRWebserverConf.d.ts.map +0 -1
  81. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendSSRWebserverConf.js +0 -41
  82. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendSSRWebserverConf.js.map +0 -1
  83. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendViteConf.d.ts +0 -3
  84. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendViteConf.d.ts.map +0 -1
  85. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendViteConf.js +0 -133
  86. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/extendViteConf.js.map +0 -1
  87. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/index.d.ts +0 -9
  88. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/index.d.ts.map +0 -1
  89. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/index.js +0 -44
  90. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/index.js.map +0 -1
  91. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/printBanner.d.ts +0 -4
  92. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/printBanner.d.ts.map +0 -1
  93. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/printBanner.js +0 -29
  94. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/printBanner.js.map +0 -1
  95. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/types.d.ts +0 -10
  96. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/types.d.ts.map +0 -1
  97. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/types.js +0 -2
  98. package/zova/packages-utils/quasar-app-extension-zova/dist/quasar/types.js.map +0 -1
  99. package/zova/packages-utils/quasar-app-extension-zova/dist/uninstall.d.ts +0 -7
  100. package/zova/packages-utils/quasar-app-extension-zova/dist/uninstall.d.ts.map +0 -1
  101. package/zova/packages-utils/quasar-app-extension-zova/dist/uninstall.js +0 -9
  102. package/zova/packages-utils/quasar-app-extension-zova/dist/uninstall.js.map +0 -1
  103. package/zova/packages-utils/quasar-app-extension-zova/dist/utils.d.ts +0 -4
  104. package/zova/packages-utils/quasar-app-extension-zova/dist/utils.d.ts.map +0 -1
  105. package/zova/packages-utils/quasar-app-extension-zova/dist/utils.js +0 -13
  106. package/zova/packages-utils/quasar-app-extension-zova/dist/utils.js.map +0 -1
  107. package/zova/packages-utils/quasar-app-extension-zova/package.json +0 -55
  108. package/zova/packages-utils/quasar-app-extension-zova/src/index.ts +0 -3
  109. package/zova/packages-utils/quasar-app-extension-zova/src/install.ts +0 -9
  110. package/zova/packages-utils/quasar-app-extension-zova/src/prompts.ts +0 -44
  111. package/zova/packages-utils/quasar-app-extension-zova/src/quasar/extendAfterBuild.ts +0 -41
  112. package/zova/packages-utils/quasar-app-extension-zova/src/quasar/extendFiles.ts +0 -190
  113. package/zova/packages-utils/quasar-app-extension-zova/src/quasar/extendQuasarConf.ts +0 -79
  114. package/zova/packages-utils/quasar-app-extension-zova/src/quasar/extendSSRWebserverConf.ts +0 -45
  115. package/zova/packages-utils/quasar-app-extension-zova/src/quasar/extendViteConf.ts +0 -143
  116. package/zova/packages-utils/quasar-app-extension-zova/src/quasar/index.ts +0 -50
  117. package/zova/packages-utils/quasar-app-extension-zova/src/quasar/printBanner.ts +0 -33
  118. package/zova/packages-utils/quasar-app-extension-zova/src/quasar/types.ts +0 -11
  119. package/zova/packages-utils/quasar-app-extension-zova/src/uninstall.ts +0 -9
  120. package/zova/packages-utils/quasar-app-extension-zova/src/utils.ts +0 -15
  121. package/zova/packages-utils/quasar-app-extension-zova/templates/entry/-app.js_ +0 -81
  122. package/zova/packages-utils/quasar-app-extension-zova/templates/entry/-client-entry.js_ +0 -215
  123. package/zova/packages-utils/quasar-app-extension-zova/templates/entry/-server-entry.js_ +0 -84
  124. package/zova/packages-utils/quasar-app-extension-zova/templates/entry/-ssr-devserver.js_ +0 -456
  125. package/zova/packages-utils/quasar-app-extension-zova/templates/entry/ssr-prod-handler.js_ +0 -5
  126. package/zova/packages-utils/quasar-app-extension-zova/templates/entry/ssr-prod-webserver.js_ +0 -123
  127. package/zova/packages-utils/quasar-app-extension-zova/templates/env/.env.ssr.admin +0 -4
  128. package/zova/packages-utils/quasar-app-extension-zova/templates/env/.env.ssr.production +0 -1
  129. package/zova/packages-utils/quasar-app-extension-zova/templates/env/.env.ssr.web +0 -6
  130. package/zova/packages-utils/quasar-app-extension-zova/templates/modes/ssr/middlewares/.gitkeep +0 -0
  131. package/zova/packages-utils/quasar-app-extension-zova/templates/vuetify/composables/hydration.js +0 -26
  132. package/zova/packages-utils/quasar-app-extension-zova/templates/vuetify/composables/ssrBoot.js +0 -36
  133. package/zova/packages-utils/quasar-app-extension-zova/tsconfig.json +0 -10
  134. package/zova/src/front/config/config/config.admin.ts +0 -10
  135. package/zova/src/front/config/config/config.web.ts +0 -10
@@ -1,50 +0,0 @@
1
- /**
2
- * Quasar App Extension index/runner script
3
- * (runs on each dev/build)
4
- *
5
- * Docs: https://quasar.dev/app-extensions/development-guide/index-api
6
- */
7
-
8
- import type { IndexAPI } from '@quasar/app-vite';
9
-
10
- import { getFlavor } from 'zova-vite';
11
-
12
- import type { ConfigContext } from './types.js';
13
-
14
- import { extendAfterBuild } from './extendAfterBuild.js';
15
- import { extendFilesOne, extendFilesThree, extendFilesTwo } from './extendFiles.js';
16
- import { extendQuasarConf } from './extendQuasarConf.js';
17
- import { extendSSRWebserverConf } from './extendSSRWebserverConf.js';
18
- import { extendViteConf } from './extendViteConf.js';
19
- import { printBanner } from './printBanner.js';
20
-
21
- export async function quasar(api: IndexAPI) {
22
- // flavor
23
- const flavor = getFlavor();
24
- // files
25
- await extendFilesOne(api, flavor)();
26
- await extendFilesTwo(api, flavor)();
27
- // context
28
- const context = {
29
- configMeta: undefined,
30
- configOptions: undefined,
31
- zovaViteMeta: undefined,
32
- } as ConfigContext;
33
- // config
34
- api.extendQuasarConf(extendQuasarConf(context, flavor));
35
- api.extendViteConf(extendViteConf(context));
36
- api.extendSSRWebserverConf(extendSSRWebserverConf(context));
37
- // before dev
38
- api.beforeDev(async (api, { quasarConf }) => {
39
- printBanner(context, flavor, true)(quasarConf, api);
40
- });
41
- // before build
42
- api.beforeBuild(async (api, { quasarConf }) => {
43
- await extendFilesThree(quasarConf, api, flavor)();
44
- });
45
- // after build
46
- api.afterBuild(async (api, { quasarConf }) => {
47
- printBanner(context, flavor, false)(quasarConf, api);
48
- extendAfterBuild(context, flavor)(quasarConf, api);
49
- });
50
- }
@@ -1,33 +0,0 @@
1
- import type { IndexAPI } from '@quasar/app-vite';
2
-
3
- import chalk from 'chalk';
4
-
5
- import type { ConfigContext, QuasarConf } from './types.js';
6
-
7
- export function printBanner(_context: ConfigContext, flavor: string, delay: boolean) {
8
- return async function printBanner(_conf: QuasarConf, api: IndexAPI) {
9
- const mode = api.ctx.prod ? 'production' : 'development';
10
- const appMode = api.ctx.modeName;
11
- // log
12
- if (delay) {
13
- setTimeout(() => {
14
- _print(mode, appMode);
15
- }, 3000);
16
- } else {
17
- _print(mode, appMode);
18
- }
19
- };
20
-
21
- function _print(mode: string, appMode: string) {
22
- // eslint-disable-next-line
23
- console.log(chalk.yellow('\n============ Zova Meta ============'));
24
- // eslint-disable-next-line
25
- console.log(`vite mode ......... ${chalk.cyan(mode)}`);
26
- // eslint-disable-next-line
27
- console.log(`app mode .......... ${chalk.cyan(appMode)}`);
28
- // eslint-disable-next-line
29
- console.log(`flavor ............ ${chalk.cyan(flavor)}`);
30
- // eslint-disable-next-line
31
- console.log('\n');
32
- }
33
- }
@@ -1,11 +0,0 @@
1
- import type { ZovaConfigMeta } from '@cabloy/module-info';
2
- import type { defineConfig } from '@quasar/app-vite/wrappers';
3
- import type { ZovaViteConfigOptions, ZovaViteConfigResult } from 'zova-vite';
4
-
5
- export interface ConfigContext {
6
- configMeta?: ZovaConfigMeta;
7
- configOptions?: ZovaViteConfigOptions;
8
- zovaViteMeta?: ZovaViteConfigResult;
9
- }
10
-
11
- export type QuasarConf = Awaited<ReturnType<ReturnType<typeof defineConfig>>>;
@@ -1,9 +0,0 @@
1
- /**
2
- * Quasar App Extension uninstall script
3
- *
4
- * Docs: https://quasar.dev/app-extensions/development-guide/uninstall-api
5
- */
6
-
7
- export default function (_api) {
8
- //
9
- }
@@ -1,15 +0,0 @@
1
- import fse from 'fs-extra';
2
- import path from 'node:path';
3
-
4
- export function resolveTemplatePath(file: string) {
5
- return new URL(path.join('../templates', file), import.meta.url);
6
- }
7
-
8
- export async function loadJSONFile(fileName: string) {
9
- const pkgContent = (await fse.readFile(fileName)).toString();
10
- return JSON.parse(pkgContent);
11
- }
12
-
13
- export async function saveJSONFile(fileName: string, json: object) {
14
- await fse.writeFile(fileName, `${JSON.stringify(json, null, 2)}\n`);
15
- }
@@ -1,81 +0,0 @@
1
- /* eslint-disable */
2
- /**
3
- * THIS FILE IS GENERATED AUTOMATICALLY.
4
- * DO NOT EDIT.
5
- *
6
- * You are probably looking on adding startup/initialization code.
7
- * Use "quasar new boot <name>" and add it there.
8
- * One boot file per concern. Then reference the file(s) in quasar.config file > boot:
9
- * boot: ['file', ...] // do not add ".js" extension to it.
10
- *
11
- * Boot files are your "main.js"
12
- **/
13
-
14
- <% if (ctx.mode.capacitor) { %>
15
- <% if (metaConf.versions.capacitor <= 2) { %>
16
- import { Plugins } from '@capacitor/core'
17
- const { SplashScreen } = Plugins
18
- <% } else /* Capacitor v3+ */ { %>
19
- import '@capacitor/core'
20
- <% if (metaConf.versions.capacitorPluginApp) { %>
21
- // importing it so it can install itself (used by Quasar UI)
22
- import { App as CapApp } from '@capacitor/app'
23
- <% } %>
24
- <% if (metaConf.versions.capacitorPluginSplashscreen && capacitor.hideSplashscreen !== false) { %>
25
- import { SplashScreen } from '@capacitor/splash-screen'
26
- <% } %>
27
- <% } %>
28
- <% } %>
29
-
30
- import mainFn from 'boot/main'
31
- import { markRaw } from 'vue'
32
- import <%= metaConf.needsAppMountHook === true ? 'AppComponent' : 'RootComponent' %> from 'app/<%= sourceFiles.rootComponent %>'
33
-
34
- <% if (metaConf.needsAppMountHook === true) { %>
35
- import { defineComponent, h, onMounted<%= ctx.mode.ssr && ssr.manualPostHydrationTrigger !== true ? ', getCurrentInstance' : '' %> } from 'vue'
36
- const RootComponent = defineComponent({
37
- name: 'AppWrapper',
38
- setup (props) {
39
- onMounted(() => {
40
- <% if (ctx.mode.capacitor && metaConf.versions.capacitorPluginSplashscreen && capacitor.hideSplashscreen !== false) { %>
41
- SplashScreen.hide()
42
- <% } %>
43
-
44
- <% if (ctx.mode.ssr && ssr.manualPostHydrationTrigger !== true) { %>
45
- const { proxy: { $q } } = getCurrentInstance()
46
- $q.onSSRHydrated !== void 0 && $q.onSSRHydrated()
47
- <% } %>
48
- })
49
-
50
- return () => h(AppComponent, props)
51
- }
52
- })
53
- <% } %>
54
-
55
- <% if (ctx.mode.ssr && ctx.mode.pwa) { %>
56
- export const ssrIsRunningOnClientPWA = typeof window !== 'undefined' &&
57
- document.body.getAttribute('data-server-rendered') === null
58
- <% } %>
59
-
60
- export default async function (createAppFn<%= ctx.mode.ssr ? ', ssrContext' : '' %>) {
61
- // Create the app instance.
62
- // Here we inject into it the Quasar UI, the router & possibly the store.
63
- const app = createAppFn(RootComponent)
64
-
65
- <% if (metaConf.debugging) { %>
66
- app.config.performance = true
67
- <% } %>
68
-
69
- mainFn({app<%= ctx.mode.ssr ? ', ssrContext' : '' %>})
70
-
71
- <% if (ctx.mode.capacitor) { %>
72
- app.config.globalProperties.$q.capacitor = window.Capacitor
73
- <% } %>
74
-
75
- // Expose the app, the router and the store.
76
- // Note that we are not mounting the app here, since bootstrapping will be
77
- // different depending on whether we are in a browser or on the server.
78
- return {
79
- app,
80
- }
81
- }
@@ -1,215 +0,0 @@
1
- /* eslint-disable */
2
- /**
3
- * THIS FILE IS GENERATED AUTOMATICALLY.
4
- * DO NOT EDIT.
5
- *
6
- * You are probably looking on adding startup/initialization code.
7
- * Use "quasar new boot <name>" and add it there.
8
- * One boot file per concern. Then reference the file(s) in quasar.config file > boot:
9
- * boot: ['file', ...] // do not add ".js" extension to it.
10
- *
11
- * Boot files are your "main.js"
12
- **/
13
-
14
- <% if (ctx.mode.ssr && ctx.mode.pwa) { %>
15
- import { createSSRApp, createApp } from 'vue'
16
- <% } else { %>
17
- import { <%= ctx.mode.ssr ? 'createSSRApp' : 'createApp' %> } from 'vue'
18
- <% } %>
19
-
20
- <% if (ctx.mode.bex) { %>
21
- import { uid } from 'quasar'
22
- import BexBridge from './bex-bridge.js'
23
- <% } %>
24
-
25
- <% const bootEntries = boot.filter(asset => asset.client !== false) %>
26
-
27
- <% extras.length !== 0 && extras.filter(asset => asset).forEach(asset => { %>
28
- import '@quasar/extras/<%= asset %>/<%= asset %>.css'
29
- <% }) %>
30
-
31
- <% animations.length !== 0 && animations.filter(asset => asset).forEach(asset => { %>
32
- import '@quasar/extras/animate/<%= asset %>.css'
33
- <% }) %>
34
-
35
- <% if (framework.cssAddon) { %>
36
- // We add Quasar addons, if they were requested
37
- import 'quasar/src/css/flex-addon.sass'
38
- <% } %>
39
-
40
- <% css.length !== 0 && css.filter(asset => asset.client !== false).forEach(asset => { %>
41
- import '<%= asset.path %>'
42
- <% }) %>
43
-
44
- import createQuasarApp<% if (ctx.mode.ssr && ctx.mode.pwa) { %>, { ssrIsRunningOnClientPWA }<% } %> from './app.js'
45
-
46
- <% if (ctx.mode.pwa) { %>
47
- import 'app/<%= sourceFiles.pwaRegisterServiceWorker %>'
48
- <% } %>
49
-
50
- <% if (preFetch) { %>
51
- import { addPreFetchHooks } from './client-prefetch.js'
52
- <% } %>
53
-
54
- <% if (ctx.dev) { %>
55
- console.info('[Quasar] Running <%= ctx.modeName.toUpperCase() + (ctx.mode.ssr && ctx.mode.pwa ? ' + PWA' : '') %>.')
56
- <% } %>
57
-
58
- async function start ({
59
- app,
60
- }<%= bootEntries.length !== 0 ? ', bootFiles' : '' %>) {
61
-
62
- <% if (bootEntries.length !== 0) { %>
63
-
64
- for (let i = 0; i < bootFiles.length; i++) {
65
- await bootFiles[i]({
66
- app,
67
- })
68
- }
69
-
70
- <% } %>
71
-
72
- <% if (ctx.mode.ssr) { %>
73
- <% if (ctx.mode.pwa) { %>
74
- if (ssrIsRunningOnClientPWA === true) {
75
- <% if (preFetch) { %>
76
- addPreFetchHooks({ router, ssrIsRunningOnClientPWA<%= metaConf.hasStore ? ', store' : '' %> })
77
- <% } %>
78
- app.mount('#q-app')
79
- }
80
- else {
81
- <% } %>
82
- // wait until router has resolved all async before hooks
83
- // and async components...
84
- <% if (preFetch) { %>
85
- addPreFetchHooks({ router<%= metaConf.hasStore ? ', store' : '' %>, publicPath })
86
- <% } %>
87
- app.mount('#q-app')
88
- <% if (ctx.mode.pwa) { %>
89
- }
90
- <% } %>
91
-
92
- <% } else { // not SSR %>
93
-
94
- <% if (preFetch) { %>
95
- addPreFetchHooks({ router<%= metaConf.hasStore ? ', store' : '' %> })
96
- <% } %>
97
-
98
- <% if (ctx.mode.cordova) { %>
99
- document.addEventListener('deviceready', () => {
100
- app.config.globalProperties.$q.cordova = window.cordova
101
- app.mount('#q-app')
102
- }, false) // on deviceready
103
- <% } else if (!ctx.mode.bex) { %>
104
- app.mount('#q-app')
105
- <% } %>
106
-
107
- <% if (ctx.mode.bex) { %>
108
- function connect () {
109
- const buildConnection = (id, cb) => {
110
- const port = chrome.runtime.connect({
111
- name: 'app:' + id
112
- })
113
-
114
- let disconnected = false
115
- port.onDisconnect.addListener(() => {
116
- disconnected = true
117
- })
118
-
119
- let bridge = new BexBridge({
120
- listen (fn) {
121
- port.onMessage.addListener(fn)
122
- },
123
- send (data) {
124
- if (!disconnected) {
125
- port.postMessage(data)
126
- }
127
- }
128
- })
129
-
130
- cb(bridge)
131
- }
132
-
133
- const fallbackConnection = cb => {
134
- // If we're not in a proper web browser tab, generate an id so we have a unique connection to whatever it is.
135
- // this could be the popup window or the options window (As they don't have tab ids)
136
- // If dev tools is available, it means we're on it. Use that for the id.
137
- const tabId = chrome.devtools ? chrome.devtools.inspectedWindow.tabId : uid()
138
- buildConnection(tabId, cb)
139
- }
140
-
141
- const shellConnect = cb => {
142
- if (chrome.tabs && !chrome.devtools) {
143
- // If we're on a web browser tab, use the current tab id to connect to the app.
144
- chrome.tabs.getCurrent(tab => {
145
- if (tab && tab.id) {
146
- buildConnection(tab.id, cb)
147
- }
148
- else {
149
- fallbackConnection(cb)
150
- }
151
- })
152
- }
153
- else {
154
- fallbackConnection(cb)
155
- }
156
- }
157
-
158
- shellConnect(bridge => {
159
- window.QBexBridge = bridge
160
- app.config.globalProperties.$q.bex = window.QBexBridge
161
- app.mount('#q-app')
162
- })
163
- }
164
-
165
- if (chrome.runtime.id) {
166
- // Chrome ~73 introduced a change which requires the background connection to be
167
- // active before the client this makes sure the connection has had time before progressing.
168
- // Could also implement a ping pattern and connect when a valid response is received
169
- // but this way seems less overhead.
170
- setTimeout(() => {
171
- connect()
172
- }, 300)
173
- }
174
- <% } %>
175
-
176
- <% } // end of Non SSR %>
177
-
178
- }
179
-
180
- createQuasarApp(<%=
181
- ctx.mode.ssr
182
- ? (ctx.mode.pwa ? 'ssrIsRunningOnClientPWA ? createApp : createSSRApp' : 'createSSRApp')
183
- : 'createApp'
184
- %>)
185
- <% if (bootEntries.length !== 0) { %>
186
- .then(app => {
187
- // eventually remove this when Cordova/Capacitor/Electron support becomes old
188
- const [ method, mapFn ] = Promise.allSettled !== void 0
189
- ? [
190
- 'allSettled',
191
- bootFiles => bootFiles.map(result => {
192
- if (result.status === 'rejected') {
193
- console.error('[Quasar] boot error:', result.reason)
194
- return
195
- }
196
- return result.value.default
197
- })
198
- ]
199
- : [
200
- 'all',
201
- bootFiles => bootFiles.map(entry => entry.default)
202
- ]
203
-
204
- return Promise[ method ]([
205
- <% bootEntries.forEach((asset, index) => { %>
206
- import('<%= asset.path %>')<%= index < bootEntries.length - 1 ? ',' : '' %>
207
- <% }) %>
208
- ]).then(bootFiles => {
209
- const boot = mapFn(bootFiles).filter(entry => typeof entry === 'function')
210
- start(app, boot)
211
- })
212
- })
213
- <% } else { %>
214
- .then(start)
215
- <% } %>
@@ -1,84 +0,0 @@
1
- /* eslint-disable */
2
- /**
3
- * THIS FILE IS GENERATED AUTOMATICALLY.
4
- * DO NOT EDIT.
5
- *
6
- * You are probably looking on adding startup/initialization code.
7
- * Use "quasar new boot <name>" and add it there.
8
- * One boot file per concern. Then reference the file(s) in quasar.config file > boot:
9
- * boot: ['file', ...] // do not add ".js" extension to it.
10
- *
11
- * Boot files are your "main.js"
12
- **/
13
- import { sys } from 'zova';
14
- import { getPluginZovaOptions } from 'app/.zova/app/utils.js';
15
- import { createApp<%= metaConf.hasStore && ssr.manualStoreSsrContextInjection !== true ? ', unref' : '' %> } from 'vue'
16
-
17
- <% extras.length !== 0 && extras.filter(asset => asset).forEach(asset => { %>
18
- import '@quasar/extras/<%= asset %>/<%= asset %>.css'
19
- <% }) %>
20
-
21
- <% animations.length !== 0 && animations.filter(asset => asset).forEach(asset => { %>
22
- import '@quasar/extras/animate/<%= asset %>.css'
23
- <% }) %>
24
-
25
- <% if (framework.cssAddon) { %>
26
- // We add Quasar addons, if they were requested
27
- import 'quasar/src/css/flex-addon.sass'
28
- <% } %>
29
-
30
- <% css.length !== 0 && css.filter(asset => asset.server !== false).forEach(asset => { %>
31
- import '<%= asset.path %>'
32
- <% }) %>
33
-
34
- import createQuasarApp from './app.js'
35
-
36
- <% if (preFetch) { %>
37
- import App from 'app/<%= sourceFiles.rootComponent %>'
38
- const appPrefetch = typeof App.preFetch === 'function'
39
- ? App.preFetch
40
- : (
41
- // Class components return the component options (and the preFetch hook) inside __c property
42
- App.__c !== void 0 && typeof App.__c.preFetch === 'function'
43
- ? App.__c.preFetch
44
- : false
45
- )
46
- <% } %>
47
-
48
- // This is where we perform data-prefetching to determine the
49
- // state of our application before actually rendering it.
50
- // Since data fetching is async, this function is expected to
51
- // return a Promise that resolves to the app instance.
52
- export default async ssrContext => {
53
- const {
54
- app
55
- } = await createQuasarApp(createApp, ssrContext)
56
-
57
- <%
58
- const bootEntries = boot.filter(asset => asset.server !== false)
59
- if (bootEntries.length !== 0) { %>
60
- const bootFunctions = await Promise.all([
61
- <% bootEntries.forEach((asset, index) => { %>
62
- import('<%= asset.path %>')<%= index < bootEntries.length - 1 ? ',' : '' %>
63
- <% }) %>
64
- ]).then(bootFiles => bootFiles.map(entry => entry.default).filter(entry => typeof entry === 'function'))
65
- <% } %>
66
-
67
- <% if (bootEntries.length !== 0) { %>
68
-
69
- for (let i = 0; i < bootFunctions.length; i++) {
70
- await bootFunctions[i]({
71
- app,
72
- ssrContext,
73
- })
74
- }
75
-
76
- <% } %>
77
-
78
- return app;
79
- }
80
-
81
- export async function initialize(envRuntime) {
82
- await sys.initialize(getPluginZovaOptions(), envRuntime);
83
- return sys;
84
- }