create-absolutejs 0.2.2 → 0.3.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.
Files changed (70) hide show
  1. package/dist/commands/formatProject.d.ts +6 -0
  2. package/dist/commands/installDependencies.d.ts +6 -0
  3. package/dist/constants.d.ts +4 -0
  4. package/dist/data.d.ts +15 -0
  5. package/dist/generators/configurations/addConfigurationFiles.d.ts +7 -0
  6. package/dist/generators/configurations/generateDrizzleConfig.d.ts +7 -0
  7. package/dist/generators/configurations/generatePackageJson.d.ts +7 -0
  8. package/dist/generators/configurations/generatePrettierrc.d.ts +2 -0
  9. package/dist/generators/configurations/initializeRoot.d.ts +5 -0
  10. package/dist/generators/db/scaffoldDatabase.d.ts +9 -0
  11. package/dist/generators/html/scaffoldHTML.d.ts +6 -0
  12. package/dist/generators/htmx/scaffoldHTMX.d.ts +2 -0
  13. package/dist/generators/project/generateMarkupCSS.d.ts +1 -0
  14. package/dist/generators/project/generateServer.d.ts +7 -0
  15. package/dist/generators/project/scaffoldFrontends.d.ts +8 -0
  16. package/dist/generators/react/scaffoldReact.d.ts +2 -0
  17. package/dist/generators/svelte/scaffoldSvelte.d.ts +2 -0
  18. package/dist/generators/vue/scaffoldVue.d.ts +4 -0
  19. package/dist/index.d.ts +2 -0
  20. package/dist/index.js +390 -447
  21. package/dist/messages.d.ts +14 -0
  22. package/dist/prompt.d.ts +2 -0
  23. package/dist/questions/authProvider.d.ts +1 -0
  24. package/dist/questions/codeQualityTool.d.ts +1 -0
  25. package/dist/questions/configurationType.d.ts +1 -0
  26. package/dist/questions/databaseEngine.d.ts +1 -0
  27. package/dist/questions/databaseHost.d.ts +2 -0
  28. package/dist/questions/directoryConfiguration.d.ts +14 -0
  29. package/dist/questions/frontendDirectoryConfigurations.d.ts +2 -0
  30. package/dist/questions/frontends.d.ts +1 -0
  31. package/dist/questions/htmlScriptingOption.d.ts +1 -0
  32. package/dist/questions/initializeGitNow.d.ts +1 -0
  33. package/dist/questions/installDependenciesNow.d.ts +1 -0
  34. package/dist/questions/orm.d.ts +1 -0
  35. package/dist/questions/plugins.d.ts +1 -0
  36. package/dist/questions/projectName.d.ts +1 -0
  37. package/dist/questions/useTailwind.d.ts +1 -0
  38. package/dist/scaffold.d.ts +8 -0
  39. package/dist/templates/assets/ico/favicon.ico +0 -0
  40. package/dist/templates/assets/png/absolutejs-temp.png +0 -0
  41. package/dist/templates/assets/svg/HTML5_Badge.svg +7 -0
  42. package/dist/templates/assets/svg/htmx-logo-black.svg +9 -0
  43. package/dist/templates/assets/svg/htmx-logo-white.svg +9 -0
  44. package/dist/templates/assets/svg/svelte-logo.svg +1 -0
  45. package/dist/templates/assets/svg/vue-logo.svg +4 -0
  46. package/dist/templates/html/pages/HTMLExample.html +66 -0
  47. package/dist/templates/html/scripts/typescript-example.ts +21 -0
  48. package/dist/templates/htmx/pages/HTMXExample.html +92 -0
  49. package/dist/templates/react/components/App.tsx +52 -0
  50. package/dist/templates/react/components/Dropdown.tsx +23 -0
  51. package/dist/templates/react/components/Head.tsx +34 -0
  52. package/dist/templates/react/pages/ReactExample.tsx +18 -0
  53. package/dist/templates/styles/colors.ts +11 -0
  54. package/dist/templates/styles/reset.css +84 -0
  55. package/dist/templates/svelte/components/Counter.svelte +19 -0
  56. package/dist/templates/svelte/composables/counter.svelte.ts +14 -0
  57. package/dist/templates/svelte/pages/SvelteExample.svelte +215 -0
  58. package/dist/templates/vue/components/CountButton.vue +39 -0
  59. package/dist/templates/vue/composables/useCount.ts +14 -0
  60. package/dist/templates/vue/pages/VueExample.vue +266 -0
  61. package/dist/typeGuards.d.ts +8 -0
  62. package/dist/types.d.ts +128 -0
  63. package/dist/utils/abort.d.ts +1 -0
  64. package/dist/utils/commandMaps.d.ts +2 -0
  65. package/dist/utils/getPackageVersion.d.ts +1 -0
  66. package/dist/utils/parseCommandLineOptions.d.ts +7 -0
  67. package/dist/utils/t3-utils.d.ts +7 -0
  68. package/package.json +7 -6
  69. package/dist/templates/react/hooks/useMediaQuery.ts +0 -54
  70. package/dist/templates/react/styles/defaultStyles.ts +0 -28
@@ -0,0 +1,6 @@
1
+ type FormatProjectProps = {
2
+ projectName: string;
3
+ packageManager: string;
4
+ };
5
+ export declare const formatProject: ({ projectName, packageManager }: FormatProjectProps) => void;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ type InstallDependenciesProps = {
2
+ projectName: string;
3
+ packageManager: string;
4
+ };
5
+ export declare const installDependencies: ({ projectName, packageManager }: InstallDependenciesProps) => Promise<void>;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const UNFOUND_INDEX = -1;
2
+ export declare const DEFAULT_ARG_LENGTH = 2;
3
+ export declare const TWO_THIRDS: number;
4
+ export declare const HOURS_IN_DAY = 24;
package/dist/data.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ import type { FrontendLabels, AvailableDependency } from './types';
2
+ export declare const availableFrontends: readonly ["react", "html", "svelte", "vue", "htmx"];
3
+ export declare const availableAuthProviders: readonly ["absoluteAuth", "none"];
4
+ export declare const availableDatabaseEngines: readonly ["postgresql", "mysql", "sqlite", "mongodb", "redis", "singlestore", "cockroachdb", "mssql", "none"];
5
+ export declare const availableDirectoryConfigurations: readonly ["default", "custom"];
6
+ export declare const availableORMs: readonly ["drizzle", "prisma", "none"];
7
+ export declare const availableDatabaseHosts: readonly ["neon", "planetscale", "supabase", "turso", "vercel", "upstash", "atlas", "none"];
8
+ export declare const availableCodeQualityTools: readonly ["eslint+prettier", "biome"];
9
+ export declare const frontendLabels: FrontendLabels;
10
+ export declare const availablePlugins: AvailableDependency[];
11
+ export declare const absoluteAuthPlugin: AvailableDependency;
12
+ export declare const scopedStatePlugin: AvailableDependency;
13
+ export declare const eslintAndPrettierDependencies: AvailableDependency[];
14
+ export declare const defaultDependencies: AvailableDependency[];
15
+ export declare const defaultPlugins: AvailableDependency[];
@@ -0,0 +1,7 @@
1
+ import type { CreateConfiguration } from '../../types';
2
+ type AddConfigurationProps = Pick<CreateConfiguration, 'tailwind' | 'initializeGitNow' | 'codeQualityTool' | 'frontends'> & {
3
+ templatesDirectory: string;
4
+ projectName: string;
5
+ };
6
+ export declare const addConfigurationFiles: ({ tailwind, templatesDirectory, codeQualityTool, frontends, initializeGitNow, projectName }: AddConfigurationProps) => void;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { DatabaseEngine } from '../../types';
2
+ type CreateDrizzleConfigProps = {
3
+ projectName: string;
4
+ databaseEngine: DatabaseEngine;
5
+ };
6
+ export declare const createDrizzleConfig: ({ projectName, databaseEngine }: CreateDrizzleConfigProps) => void;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { CreateConfiguration } from '../../types';
2
+ type CreatePackageJsonProps = Pick<CreateConfiguration, 'authProvider' | 'useTailwind' | 'plugins' | 'frontendDirectories' | 'codeQualityTool'> & {
3
+ projectName: string;
4
+ latest: boolean;
5
+ };
6
+ export declare const createPackageJson: ({ projectName, authProvider, plugins, useTailwind, latest, frontendDirectories, codeQualityTool }: CreatePackageJsonProps) => void;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { Frontend } from '../../types';
2
+ export declare const generatePrettierrc: (frontends: Frontend[]) => string;
@@ -0,0 +1,5 @@
1
+ export declare const initalizeRoot: (projectName: string, templatesDirectory: string) => {
2
+ backendDirectory: string;
3
+ frontendDirectory: string;
4
+ projectAssetsDirectory: string;
5
+ };
@@ -0,0 +1,9 @@
1
+ import type { DatabaseEngine, ORM } from '../../types';
2
+ type ScaffoldDatabaseProps = {
3
+ projectName: string;
4
+ orm: ORM;
5
+ databaseEngine: DatabaseEngine;
6
+ databaseDirectory: string;
7
+ };
8
+ export declare const scaffoldDatabase: ({ projectName, databaseEngine, databaseDirectory, orm }: ScaffoldDatabaseProps) => void;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ScaffoldFrontendProps } from '../../types';
2
+ type ScaffoldHTMLProps = ScaffoldFrontendProps & {
3
+ useHTMLScripts: boolean;
4
+ };
5
+ export declare const scaffoldHTML: ({ isSingleFrontend, targetDirectory, useHTMLScripts, templatesDirectory, projectAssetsDirectory }: ScaffoldHTMLProps) => void;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ScaffoldFrontendProps } from '../../types';
2
+ export declare const scaffoldHTMX: ({ targetDirectory, templatesDirectory, projectAssetsDirectory, isSingleFrontend }: ScaffoldFrontendProps) => void;
@@ -0,0 +1 @@
1
+ export declare const generateMarkupCSS: (isSingleFrontend: boolean) => string;
@@ -0,0 +1,7 @@
1
+ import type { AvailableDependency, CreateConfiguration } from '../../types';
2
+ type CreateServerFileProps = Pick<CreateConfiguration, 'tailwind' | 'authProvider' | 'plugins' | 'buildDirectory' | 'assetsDirectory' | 'frontendDirectories'> & {
3
+ availablePlugins: AvailableDependency[];
4
+ serverFilePath: string;
5
+ };
6
+ export declare const createServerFile: ({ tailwind, frontendDirectories, serverFilePath, authProvider, availablePlugins, buildDirectory, assetsDirectory, plugins }: CreateServerFileProps) => void;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { CreateConfiguration } from '../../types';
2
+ type ScaffoldFrontendsProps = Pick<CreateConfiguration, 'useHTMLScripts' | 'frontendDirectories'> & {
3
+ frontendDirectory: string;
4
+ templatesDirectory: string;
5
+ projectAssetsDirectory: string;
6
+ };
7
+ export declare const scaffoldFrontends: ({ frontendDirectory, templatesDirectory, projectAssetsDirectory, useHTMLScripts, frontendDirectories }: ScaffoldFrontendsProps) => void;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ScaffoldFrontendProps } from '../../types';
2
+ export declare const scaffoldReact: ({ isSingleFrontend, targetDirectory, templatesDirectory, projectAssetsDirectory }: ScaffoldFrontendProps) => void;
@@ -0,0 +1,2 @@
1
+ import { ScaffoldFrontendProps } from '../../types';
2
+ export declare const scaffoldSvelte: ({ isSingleFrontend, targetDirectory, templatesDirectory, projectAssetsDirectory }: ScaffoldFrontendProps) => void;
@@ -0,0 +1,4 @@
1
+ import { ScaffoldFrontendProps } from '../../types';
2
+ type ScaffoldVueProps = Omit<ScaffoldFrontendProps, 'isSingleFrontend'>;
3
+ export declare const scaffoldVue: ({ targetDirectory, templatesDirectory, projectAssetsDirectory }: ScaffoldVueProps) => void;
4
+ export {};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ export {};