@velsefy/cli 0.1.0 → 0.2.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/README.md +20 -6
- package/THEME-DEVELOPMENT.md +5 -1
- package/dist/commands/login.d.ts +2 -0
- package/dist/commands/login.js +38 -5
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/theme.js +411 -71
- package/dist/commands/theme.js.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts +30 -9
- package/dist/lib/api.js +147 -33
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/logger.js +1 -1
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/validate.d.ts +2 -2
- package/dist/lib/validate.js +42 -6
- package/dist/lib/validate.js.map +1 -1
- package/dist/types.d.ts +51 -2
- package/examples/default-theme/assets/theme.css +3 -0
- package/examples/default-theme/config/settings_schema.json +16 -0
- package/examples/default-theme/layout/theme.liquid +12 -0
- package/examples/default-theme/sections/hero.liquid +31 -0
- package/examples/default-theme/snippets/head.liquid +1 -0
- package/examples/default-theme/templates/index.json +22 -0
- package/examples/default-theme/velsefy.settings_schema.json +44 -0
- package/package.json +72 -62
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{% comment %} Sección de ejemplo: hero con título, color y bloques de texto {% endcomment %}
|
|
2
|
+
<section class="demo-hero" style="background: {{ section.settings.bg_color }}">
|
|
3
|
+
<h1>{{ section.settings.title }}</h1>
|
|
4
|
+
|
|
5
|
+
{% for block in section.blocks %}
|
|
6
|
+
<p>{{ block.settings.text }}</p>
|
|
7
|
+
{% endfor %}
|
|
8
|
+
</section>
|
|
9
|
+
|
|
10
|
+
{% schema %}
|
|
11
|
+
{
|
|
12
|
+
"name": "Hero",
|
|
13
|
+
"tag": "section",
|
|
14
|
+
"settings": [
|
|
15
|
+
{ "type": "text", "id": "title", "label": "Título", "default": "Bienvenido a mi tienda" },
|
|
16
|
+
{ "type": "color", "id": "bg_color", "label": "Color de fondo", "default": "#f7c05a" }
|
|
17
|
+
],
|
|
18
|
+
"blocks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "text",
|
|
21
|
+
"name": "Texto",
|
|
22
|
+
"settings": [
|
|
23
|
+
{ "type": "textarea", "id": "text", "label": "Texto" }
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"presets": [
|
|
28
|
+
{ "name": "Hero", "blocks": [{ "type": "text" }] }
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
{% endschema %}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sections": [
|
|
3
|
+
{
|
|
4
|
+
"id": "home-hero",
|
|
5
|
+
"area": "main",
|
|
6
|
+
"type": "hero",
|
|
7
|
+
"settings": {
|
|
8
|
+
"title": "Bienvenido a mi tienda",
|
|
9
|
+
"bg_color": "#f7c05a"
|
|
10
|
+
},
|
|
11
|
+
"blocks": [
|
|
12
|
+
{
|
|
13
|
+
"id": "home-hero-text-1",
|
|
14
|
+
"type": "text",
|
|
15
|
+
"settings": {
|
|
16
|
+
"text": "Edita este texto desde el editor de temas."
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "VELSEFY settings_schema.json",
|
|
4
|
+
"description": "Declaración de settings globales de un tema VELSEFY (config/settings_schema.json). Igual que Shopify: un array de grupos { name, settings }. El grupo theme_info lleva la versión (theme_version, semver).",
|
|
5
|
+
"type": "array",
|
|
6
|
+
"items": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["name", "settings"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"name": { "type": "string", "description": "Nombre del grupo (ej. 'Colores', 'theme_info')" },
|
|
11
|
+
"theme_name": { "type": "string" },
|
|
12
|
+
"theme_version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Versión semver del tema (Shopify-pura)" },
|
|
13
|
+
"theme_author": { "type": "string" },
|
|
14
|
+
"theme_documentation_url": { "type": "string", "format": "uri" },
|
|
15
|
+
"theme_support_url": { "type": "string", "format": "uri" },
|
|
16
|
+
"settings": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["type", "id", "label"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"type": {
|
|
23
|
+
"enum": ["color", "range", "number", "select", "text", "textarea", "checkbox", "image_picker", "richtext", "url"],
|
|
24
|
+
"description": "Tipos de setting que soporta el renderer de VELSEFY (subconjunto, no la lista completa de Shopify)"
|
|
25
|
+
},
|
|
26
|
+
"id": { "type": "string", "minLength": 1 },
|
|
27
|
+
"label": { "type": "string" },
|
|
28
|
+
"info": { "type": "string" },
|
|
29
|
+
"placeholder": { "type": "string" },
|
|
30
|
+
"unit": { "type": "string" },
|
|
31
|
+
"min": { "type": "number" },
|
|
32
|
+
"max": { "type": "number" },
|
|
33
|
+
"step": { "type": "number" },
|
|
34
|
+
"default": {},
|
|
35
|
+
"options": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "object", "required": ["value", "label"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/package.json
CHANGED
|
@@ -1,62 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@velsefy/cli",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "CLI cross-platform de VELSEFY para gestionar temas (eCommerce + POS multi-tenant).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"velsefy": "dist/bin/velsefy.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"examples",
|
|
14
|
+
"THEME-DEVELOPMENT.md"
|
|
15
|
+
],
|
|
16
|
+
"workspaces": [
|
|
17
|
+
"packages/*"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"prebuild": "npm run build --workspace @velsefy/theme-validate",
|
|
21
|
+
"build": "tsc -p tsconfig.json",
|
|
22
|
+
"pretypecheck": "npm run build --workspace @velsefy/theme-validate",
|
|
23
|
+
"typecheck": "tsc --noEmit",
|
|
24
|
+
"lint": "eslint .",
|
|
25
|
+
"prepublishOnly": "npm run build",
|
|
26
|
+
"prepack": "npm run build",
|
|
27
|
+
"prepare": "husky"
|
|
28
|
+
},
|
|
29
|
+
"lint-staged": {
|
|
30
|
+
"*.{ts,tsx}": [
|
|
31
|
+
"eslint --fix"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": "\u003e=18"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/fivepulsespa-spec/velsefy-cli.git"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/fivepulsespa-spec/velsefy-cli#readme",
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/fivepulsespa-spec/velsefy-cli/issues"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"velsefy",
|
|
47
|
+
"ecommerce",
|
|
48
|
+
"pos",
|
|
49
|
+
"themes",
|
|
50
|
+
"liquid",
|
|
51
|
+
"cli",
|
|
52
|
+
"shopify",
|
|
53
|
+
"multi-tenant"
|
|
54
|
+
],
|
|
55
|
+
"license": "MIT",
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@velsefy/theme-validate": "0.0.2",
|
|
61
|
+
"commander": "^13.0.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@types/node": "^22.0.0",
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
66
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
67
|
+
"eslint": "^9.0.0",
|
|
68
|
+
"husky": "^9.1.7",
|
|
69
|
+
"lint-staged": "^16.4.0",
|
|
70
|
+
"typescript": "^5.6.0"
|
|
71
|
+
}
|
|
72
|
+
}
|