mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Add more defaults to frameworks
This commit is contained in:
@@ -24,7 +24,10 @@ return [
|
||||
'static-1'
|
||||
],
|
||||
'defaultBuildRuntime' => 'node-22',
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node')
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
|
||||
'defaultBuildCommand' => 'npm run build',
|
||||
'defaultInstallCommand' => 'npm install',
|
||||
'defaultOutputDirectory' => './build',
|
||||
],
|
||||
'nextjs' => [
|
||||
'key' => 'nextjs',
|
||||
@@ -34,7 +37,10 @@ return [
|
||||
'static-1'
|
||||
],
|
||||
'defaultBuildRuntime' => 'node-22',
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node')
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
|
||||
'defaultBuildCommand' => 'npm run build',
|
||||
'defaultInstallCommand' => 'npm install',
|
||||
'defaultOutputDirectory' => './out',
|
||||
],
|
||||
'nuxt' => [
|
||||
'key' => 'nuxt',
|
||||
@@ -44,7 +50,10 @@ return [
|
||||
'static-1'
|
||||
],
|
||||
'defaultBuildRuntime' => 'node-22',
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node')
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
|
||||
'defaultBuildCommand' => 'npm run generate',
|
||||
'defaultInstallCommand' => 'npm install',
|
||||
'defaultOutputDirectory' => './dist',
|
||||
],
|
||||
'angular' => [
|
||||
'key' => 'angular',
|
||||
@@ -54,7 +63,10 @@ return [
|
||||
'static-1'
|
||||
],
|
||||
'defaultBuildRuntime' => 'node-22',
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node')
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
|
||||
'defaultBuildCommand' => 'npm run build',
|
||||
'defaultInstallCommand' => 'npm install',
|
||||
'defaultOutputDirectory' => './dist/starter/browser',
|
||||
],
|
||||
'astro' => [
|
||||
'key' => 'astro',
|
||||
@@ -64,7 +76,10 @@ return [
|
||||
'static-1'
|
||||
],
|
||||
'defaultBuildRuntime' => 'node-22',
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node')
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
|
||||
'defaultBuildCommand' => 'npm run build',
|
||||
'defaultInstallCommand' => 'npm install',
|
||||
'defaultOutputDirectory' => './dist',
|
||||
],
|
||||
'remix' => [
|
||||
'key' => 'remix',
|
||||
@@ -74,7 +89,10 @@ return [
|
||||
'static-1'
|
||||
],
|
||||
'defaultBuildRuntime' => 'node-22',
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node')
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
|
||||
'defaultBuildCommand' => 'npm run build',
|
||||
'defaultInstallCommand' => 'npm install',
|
||||
'defaultOutputDirectory' => './build/client',
|
||||
],
|
||||
'static' => [
|
||||
'key' => 'static',
|
||||
@@ -84,6 +102,9 @@ return [
|
||||
'static-1'
|
||||
],
|
||||
'defaultBuildRuntime' => 'node-22',
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node')
|
||||
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
|
||||
'defaultBuildCommand' => 'npm run build',
|
||||
'defaultInstallCommand' => 'npm install',
|
||||
'defaultOutputDirectory' => './build',
|
||||
]
|
||||
];
|
||||
|
||||
@@ -25313,6 +25313,10 @@
|
||||
"enum": [
|
||||
"sveltekit",
|
||||
"nextjs",
|
||||
"nuxt",
|
||||
"angular",
|
||||
"astro",
|
||||
"remix",
|
||||
"static"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
@@ -25980,6 +25984,10 @@
|
||||
"enum": [
|
||||
"sveltekit",
|
||||
"nextjs",
|
||||
"nuxt",
|
||||
"angular",
|
||||
"astro",
|
||||
"remix",
|
||||
"static"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
@@ -38286,11 +38294,6 @@
|
||||
"description": "Name of the logo image.",
|
||||
"x-example": "sveltekit.png"
|
||||
},
|
||||
"defaultServeRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"serveRuntimes": {
|
||||
"type": "array",
|
||||
"description": "List of supported runtime versions.",
|
||||
@@ -38299,11 +38302,6 @@
|
||||
},
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"defaultBuildRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "node-22"
|
||||
},
|
||||
"buildRuntimes": {
|
||||
"type": "array",
|
||||
"description": "List of supported runtime versions.",
|
||||
@@ -38311,16 +38309,44 @@
|
||||
"type": "string"
|
||||
},
|
||||
"x-example": "node-21.0"
|
||||
},
|
||||
"defaultServeRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"defaultBuildRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "node-22"
|
||||
},
|
||||
"defaultInstallCommand": {
|
||||
"type": "string",
|
||||
"description": "Default command to download dependencies.",
|
||||
"x-example": "npm install"
|
||||
},
|
||||
"defaultBuildCommand": {
|
||||
"type": "string",
|
||||
"description": "Default command to build site into output directory.",
|
||||
"x-example": "npm run build"
|
||||
},
|
||||
"defaultOutputDirectory": {
|
||||
"type": "string",
|
||||
"description": "Default output directory of build.",
|
||||
"x-example": ".\/dist"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"name",
|
||||
"logo",
|
||||
"defaultServeRuntime",
|
||||
"serveRuntimes",
|
||||
"buildRuntimes",
|
||||
"defaultServeRuntime",
|
||||
"defaultBuildRuntime",
|
||||
"buildRuntimes"
|
||||
"defaultInstallCommand",
|
||||
"defaultBuildCommand",
|
||||
"defaultOutputDirectory"
|
||||
]
|
||||
},
|
||||
"deployment": {
|
||||
|
||||
@@ -17129,6 +17129,10 @@
|
||||
"enum": [
|
||||
"sveltekit",
|
||||
"nextjs",
|
||||
"nuxt",
|
||||
"angular",
|
||||
"astro",
|
||||
"remix",
|
||||
"static"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
@@ -17561,6 +17565,10 @@
|
||||
"enum": [
|
||||
"sveltekit",
|
||||
"nextjs",
|
||||
"nuxt",
|
||||
"angular",
|
||||
"astro",
|
||||
"remix",
|
||||
"static"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
@@ -28015,11 +28023,6 @@
|
||||
"description": "Name of the logo image.",
|
||||
"x-example": "sveltekit.png"
|
||||
},
|
||||
"defaultServeRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"serveRuntimes": {
|
||||
"type": "array",
|
||||
"description": "List of supported runtime versions.",
|
||||
@@ -28028,11 +28031,6 @@
|
||||
},
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"defaultBuildRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "node-22"
|
||||
},
|
||||
"buildRuntimes": {
|
||||
"type": "array",
|
||||
"description": "List of supported runtime versions.",
|
||||
@@ -28040,16 +28038,44 @@
|
||||
"type": "string"
|
||||
},
|
||||
"x-example": "node-21.0"
|
||||
},
|
||||
"defaultServeRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"defaultBuildRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "node-22"
|
||||
},
|
||||
"defaultInstallCommand": {
|
||||
"type": "string",
|
||||
"description": "Default command to download dependencies.",
|
||||
"x-example": "npm install"
|
||||
},
|
||||
"defaultBuildCommand": {
|
||||
"type": "string",
|
||||
"description": "Default command to build site into output directory.",
|
||||
"x-example": "npm run build"
|
||||
},
|
||||
"defaultOutputDirectory": {
|
||||
"type": "string",
|
||||
"description": "Default output directory of build.",
|
||||
"x-example": ".\/dist"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"name",
|
||||
"logo",
|
||||
"defaultServeRuntime",
|
||||
"serveRuntimes",
|
||||
"buildRuntimes",
|
||||
"defaultServeRuntime",
|
||||
"defaultBuildRuntime",
|
||||
"buildRuntimes"
|
||||
"defaultInstallCommand",
|
||||
"defaultBuildCommand",
|
||||
"defaultOutputDirectory"
|
||||
]
|
||||
},
|
||||
"deployment": {
|
||||
|
||||
@@ -25790,6 +25790,10 @@
|
||||
"enum": [
|
||||
"sveltekit",
|
||||
"nextjs",
|
||||
"nuxt",
|
||||
"angular",
|
||||
"astro",
|
||||
"remix",
|
||||
"static"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
@@ -26474,6 +26478,10 @@
|
||||
"enum": [
|
||||
"sveltekit",
|
||||
"nextjs",
|
||||
"nuxt",
|
||||
"angular",
|
||||
"astro",
|
||||
"remix",
|
||||
"static"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
@@ -38845,11 +38853,6 @@
|
||||
"description": "Name of the logo image.",
|
||||
"x-example": "sveltekit.png"
|
||||
},
|
||||
"defaultServeRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"serveRuntimes": {
|
||||
"type": "array",
|
||||
"description": "List of supported runtime versions.",
|
||||
@@ -38858,11 +38861,6 @@
|
||||
},
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"defaultBuildRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "node-22"
|
||||
},
|
||||
"buildRuntimes": {
|
||||
"type": "array",
|
||||
"description": "List of supported runtime versions.",
|
||||
@@ -38870,16 +38868,44 @@
|
||||
"type": "string"
|
||||
},
|
||||
"x-example": "node-21.0"
|
||||
},
|
||||
"defaultServeRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"defaultBuildRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "node-22"
|
||||
},
|
||||
"defaultInstallCommand": {
|
||||
"type": "string",
|
||||
"description": "Default command to download dependencies.",
|
||||
"x-example": "npm install"
|
||||
},
|
||||
"defaultBuildCommand": {
|
||||
"type": "string",
|
||||
"description": "Default command to build site into output directory.",
|
||||
"x-example": "npm run build"
|
||||
},
|
||||
"defaultOutputDirectory": {
|
||||
"type": "string",
|
||||
"description": "Default output directory of build.",
|
||||
"x-example": ".\/dist"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"name",
|
||||
"logo",
|
||||
"defaultServeRuntime",
|
||||
"serveRuntimes",
|
||||
"buildRuntimes",
|
||||
"defaultServeRuntime",
|
||||
"defaultBuildRuntime",
|
||||
"buildRuntimes"
|
||||
"defaultInstallCommand",
|
||||
"defaultBuildCommand",
|
||||
"defaultOutputDirectory"
|
||||
]
|
||||
},
|
||||
"deployment": {
|
||||
|
||||
@@ -17574,6 +17574,10 @@
|
||||
"enum": [
|
||||
"sveltekit",
|
||||
"nextjs",
|
||||
"nuxt",
|
||||
"angular",
|
||||
"astro",
|
||||
"remix",
|
||||
"static"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
@@ -18027,6 +18031,10 @@
|
||||
"enum": [
|
||||
"sveltekit",
|
||||
"nextjs",
|
||||
"nuxt",
|
||||
"angular",
|
||||
"astro",
|
||||
"remix",
|
||||
"static"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
@@ -28547,11 +28555,6 @@
|
||||
"description": "Name of the logo image.",
|
||||
"x-example": "sveltekit.png"
|
||||
},
|
||||
"defaultServeRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"serveRuntimes": {
|
||||
"type": "array",
|
||||
"description": "List of supported runtime versions.",
|
||||
@@ -28560,11 +28563,6 @@
|
||||
},
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"defaultBuildRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "node-22"
|
||||
},
|
||||
"buildRuntimes": {
|
||||
"type": "array",
|
||||
"description": "List of supported runtime versions.",
|
||||
@@ -28572,16 +28570,44 @@
|
||||
"type": "string"
|
||||
},
|
||||
"x-example": "node-21.0"
|
||||
},
|
||||
"defaultServeRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "static-1"
|
||||
},
|
||||
"defaultBuildRuntime": {
|
||||
"type": "string",
|
||||
"description": "Default runtime version.",
|
||||
"x-example": "node-22"
|
||||
},
|
||||
"defaultInstallCommand": {
|
||||
"type": "string",
|
||||
"description": "Default command to download dependencies.",
|
||||
"x-example": "npm install"
|
||||
},
|
||||
"defaultBuildCommand": {
|
||||
"type": "string",
|
||||
"description": "Default command to build site into output directory.",
|
||||
"x-example": "npm run build"
|
||||
},
|
||||
"defaultOutputDirectory": {
|
||||
"type": "string",
|
||||
"description": "Default output directory of build.",
|
||||
"x-example": ".\/dist"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"name",
|
||||
"logo",
|
||||
"defaultServeRuntime",
|
||||
"serveRuntimes",
|
||||
"buildRuntimes",
|
||||
"defaultServeRuntime",
|
||||
"defaultBuildRuntime",
|
||||
"buildRuntimes"
|
||||
"defaultInstallCommand",
|
||||
"defaultBuildCommand",
|
||||
"defaultOutputDirectory"
|
||||
]
|
||||
},
|
||||
"deployment": {
|
||||
|
||||
@@ -28,12 +28,6 @@ class Framework extends Model
|
||||
'default' => '',
|
||||
'example' => 'sveltekit.png',
|
||||
])
|
||||
->addRule('defaultServeRuntime', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Default runtime version.',
|
||||
'default' => '',
|
||||
'example' => 'static-1',
|
||||
])
|
||||
->addRule('serveRuntimes', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'List of supported runtime versions.',
|
||||
@@ -41,12 +35,6 @@ class Framework extends Model
|
||||
'example' => 'static-1',
|
||||
'array' => true,
|
||||
])
|
||||
->addRule('defaultBuildRuntime', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Default runtime version.',
|
||||
'default' => '',
|
||||
'example' => 'node-22',
|
||||
])
|
||||
->addRule('buildRuntimes', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'List of supported runtime versions.',
|
||||
@@ -54,6 +42,36 @@ class Framework extends Model
|
||||
'example' => 'node-21.0',
|
||||
'array' => true,
|
||||
])
|
||||
->addRule('defaultServeRuntime', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Default runtime version.',
|
||||
'default' => '',
|
||||
'example' => 'static-1',
|
||||
])
|
||||
->addRule('defaultBuildRuntime', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Default runtime version.',
|
||||
'default' => '',
|
||||
'example' => 'node-22',
|
||||
])
|
||||
->addRule('defaultInstallCommand', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Default command to download dependencies.',
|
||||
'default' => '',
|
||||
'example' => 'npm install',
|
||||
])
|
||||
->addRule('defaultBuildCommand', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Default command to build site into output directory.',
|
||||
'default' => '',
|
||||
'example' => 'npm run build',
|
||||
])
|
||||
->addRule('defaultOutputDirectory', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Default output directory of build.',
|
||||
'default' => '',
|
||||
'example' => './dist',
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,18 +10,18 @@ class TemplateFramework extends Model
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->addRule('key', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Parent framework key.',
|
||||
'default' => '',
|
||||
'example' => 'sveltekit',
|
||||
])
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Framework Name.',
|
||||
'default' => '',
|
||||
'example' => 'SvelteKit'
|
||||
])
|
||||
->addRule('key', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Parent framework key.',
|
||||
'default' => '',
|
||||
'example' => 'sveltekit',
|
||||
])
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Framework Name.',
|
||||
'default' => '',
|
||||
'example' => 'SvelteKit'
|
||||
])
|
||||
->addRule('installCommand', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'The install command used to install the dependencies.',
|
||||
|
||||
Reference in New Issue
Block a user