@lumy-pack/syncpoint 0.0.4 → 0.0.6

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.
@@ -1,3 +1,4 @@
1
+ # yaml-language-server: $schema=https://cdn.jsdelivr.net/npm/@lumy-pack/syncpoint/assets/schemas/config.schema.json
1
2
  # ──────────────────────────────────────────
2
3
  # Syncpoint Configuration
3
4
  # ──────────────────────────────────────────
@@ -23,17 +24,24 @@ backup:
23
24
  # - Glob: "**/*.swp", "**/.DS_Store", "**/node_modules/**"
24
25
  # - Regex: "/\\.bak$/", "/\\.tmp$/", "/\\.(cache|log)$/"
25
26
  exclude:
26
- - "**/*.swp"
27
- - "**/.DS_Store"
28
- - "**/.Trash/**"
29
- - "**/Library/**"
30
- - "**/.cache/**"
31
- - "**/node_modules/**"
27
+ - '**/*.swp'
28
+ - '**/.DS_Store'
29
+ - '**/.Trash/**'
30
+ - '**/Library/**'
31
+ - '**/.cache/**'
32
+ - '**/node_modules/**'
32
33
  # Example regex: "/\\.bak$/" (excludes all .bak files)
33
34
 
35
+ # (Optional) Include sensitive files (SSH keys, certificates, etc.) in backup.
36
+ # When false (default), files matching sensitive patterns (id_rsa, id_ed25519,
37
+ # *.pem, *.key) are automatically excluded with a warning.
38
+ # Set to true for a complete snapshot including all credentials.
39
+ # WARNING: Enable only if you trust your backup storage security.
40
+ includeSensitiveFiles: false
41
+
34
42
  # (Required) Backup archive filename pattern.
35
43
  # Available variables: {hostname}, {datetime}
36
- filename: "{hostname}_{datetime}"
44
+ filename: '{hostname}_{datetime}'
37
45
 
38
46
  # (Optional) Backup archive destination path. Default: ~/.syncpoint/backups/
39
47
  # destination: /path/to/custom/backups
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Syncpoint Config",
4
+ "description": "Configuration for syncpoint backup tool",
5
+ "type": "object",
6
+ "required": [
7
+ "backup"
8
+ ],
9
+ "properties": {
10
+ "backup": {
11
+ "type": "object",
12
+ "description": "Backup configuration",
13
+ "required": [
14
+ "targets",
15
+ "exclude",
16
+ "filename"
17
+ ],
18
+ "properties": {
19
+ "targets": {
20
+ "type": "array",
21
+ "description": "List of files/directories to backup. Supports literal paths (e.g. ~/.zshrc), glob patterns (e.g. ~/.config/*.conf), and regex patterns (e.g. /\\.conf$/).",
22
+ "items": {
23
+ "type": "string",
24
+ "validPattern": true
25
+ }
26
+ },
27
+ "exclude": {
28
+ "type": "array",
29
+ "description": "List of patterns to exclude from backup. Supports glob (e.g. **/*.swp) and regex (e.g. /\\.bak$/) patterns.",
30
+ "items": {
31
+ "type": "string",
32
+ "validPattern": true
33
+ }
34
+ },
35
+ "filename": {
36
+ "type": "string",
37
+ "description": "Backup archive filename pattern. Available variables: {hostname}, {datetime}.",
38
+ "minLength": 1
39
+ },
40
+ "destination": {
41
+ "type": "string",
42
+ "description": "Backup archive destination path. Default: ~/.syncpoint/backups/"
43
+ },
44
+ "includeSensitiveFiles": {
45
+ "type": "boolean",
46
+ "description": "Include sensitive files (SSH keys, certificates, etc.) in backup. When false (default), files matching sensitive patterns (id_rsa, id_ed25519, *.pem, *.key) are automatically excluded."
47
+ }
48
+ },
49
+ "additionalProperties": false
50
+ },
51
+ "scripts": {
52
+ "type": "object",
53
+ "description": "Scripts configuration",
54
+ "properties": {
55
+ "includeInBackup": {
56
+ "type": "boolean",
57
+ "description": "Whether to include scripts/ directory in backup. Default: true."
58
+ }
59
+ },
60
+ "additionalProperties": false
61
+ },
62
+ "yaml-language-server": {
63
+ "type": "string",
64
+ "description": "Editor directive for schema association; ignored at runtime."
65
+ }
66
+ },
67
+ "additionalProperties": false
68
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Syncpoint Backup Metadata",
4
+ "description": "Metadata stored inside backup archives as _metadata.json",
5
+ "type": "object",
6
+ "required": [
7
+ "version",
8
+ "toolVersion",
9
+ "createdAt",
10
+ "hostname",
11
+ "system",
12
+ "config",
13
+ "files",
14
+ "summary"
15
+ ],
16
+ "properties": {
17
+ "version": {
18
+ "type": "string",
19
+ "description": "Metadata schema version."
20
+ },
21
+ "toolVersion": {
22
+ "type": "string",
23
+ "description": "Syncpoint tool version used to create the backup."
24
+ },
25
+ "createdAt": {
26
+ "type": "string",
27
+ "description": "ISO 8601 timestamp of backup creation."
28
+ },
29
+ "hostname": {
30
+ "type": "string",
31
+ "description": "Hostname of the machine where the backup was created."
32
+ },
33
+ "system": {
34
+ "type": "object",
35
+ "description": "System information at backup time.",
36
+ "required": ["platform", "release", "arch"],
37
+ "properties": {
38
+ "platform": {
39
+ "type": "string",
40
+ "description": "Operating system platform (e.g. darwin, linux)."
41
+ },
42
+ "release": {
43
+ "type": "string",
44
+ "description": "OS kernel release version."
45
+ },
46
+ "arch": {
47
+ "type": "string",
48
+ "description": "CPU architecture (e.g. arm64, x64)."
49
+ }
50
+ },
51
+ "additionalProperties": false
52
+ },
53
+ "config": {
54
+ "type": "object",
55
+ "description": "Backup configuration snapshot.",
56
+ "required": ["filename"],
57
+ "properties": {
58
+ "filename": {
59
+ "type": "string",
60
+ "description": "Filename pattern used for the backup."
61
+ },
62
+ "destination": {
63
+ "type": "string",
64
+ "description": "Custom destination path, if configured."
65
+ }
66
+ },
67
+ "additionalProperties": false
68
+ },
69
+ "files": {
70
+ "type": "array",
71
+ "description": "List of files included in the backup.",
72
+ "items": {
73
+ "type": "object",
74
+ "required": ["path", "absolutePath", "size", "hash"],
75
+ "properties": {
76
+ "path": {
77
+ "type": "string",
78
+ "description": "Display path (e.g. ~/.zshrc)."
79
+ },
80
+ "absolutePath": {
81
+ "type": "string",
82
+ "description": "Full filesystem path."
83
+ },
84
+ "size": {
85
+ "type": "number",
86
+ "description": "File size in bytes.",
87
+ "minimum": 0
88
+ },
89
+ "hash": {
90
+ "type": "string",
91
+ "description": "SHA-256 hash of file contents."
92
+ },
93
+ "type": {
94
+ "type": "string",
95
+ "description": "File type (e.g. symlink, directory)."
96
+ }
97
+ },
98
+ "additionalProperties": false
99
+ }
100
+ },
101
+ "summary": {
102
+ "type": "object",
103
+ "description": "Backup summary statistics.",
104
+ "required": ["fileCount", "totalSize"],
105
+ "properties": {
106
+ "fileCount": {
107
+ "type": "integer",
108
+ "description": "Total number of files in the backup.",
109
+ "minimum": 0
110
+ },
111
+ "totalSize": {
112
+ "type": "number",
113
+ "description": "Total size of all files in bytes.",
114
+ "minimum": 0
115
+ }
116
+ },
117
+ "additionalProperties": false
118
+ }
119
+ },
120
+ "additionalProperties": false
121
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Syncpoint Template",
4
+ "description": "Provisioning template for syncpoint",
5
+ "type": "object",
6
+ "required": ["name", "steps"],
7
+ "properties": {
8
+ "name": {
9
+ "type": "string",
10
+ "description": "Template name.",
11
+ "minLength": 1
12
+ },
13
+ "description": {
14
+ "type": "string",
15
+ "description": "Template description."
16
+ },
17
+ "backup": {
18
+ "type": "string",
19
+ "description": "Backup name to restore automatically after provisioning."
20
+ },
21
+ "sudo": {
22
+ "type": "boolean",
23
+ "description": "Whether sudo privilege is required. If true, requests sudo authentication before execution."
24
+ },
25
+ "steps": {
26
+ "type": "array",
27
+ "description": "List of provisioning steps. At least 1 step required.",
28
+ "minItems": 1,
29
+ "items": {
30
+ "type": "object",
31
+ "required": ["name", "command"],
32
+ "properties": {
33
+ "name": {
34
+ "type": "string",
35
+ "description": "Step name.",
36
+ "minLength": 1
37
+ },
38
+ "description": {
39
+ "type": "string",
40
+ "description": "Step description."
41
+ },
42
+ "command": {
43
+ "type": "string",
44
+ "description": "Shell command to execute.",
45
+ "minLength": 1
46
+ },
47
+ "skip_if": {
48
+ "type": "string",
49
+ "description": "Skip this step if this command exits with code 0."
50
+ },
51
+ "continue_on_error": {
52
+ "type": "boolean",
53
+ "description": "Continue to next step even if this fails. Default: false."
54
+ }
55
+ },
56
+ "additionalProperties": false
57
+ }
58
+ }
59
+ },
60
+ "additionalProperties": false
61
+ }
@@ -1,3 +1,4 @@
1
+ # yaml-language-server: $schema=https://cdn.jsdelivr.net/npm/@lumy-pack/syncpoint/assets/schemas/template.schema.json
1
2
  # ──────────────────────────────────────────
2
3
  # Syncpoint Provisioning Template
3
4
  # ──────────────────────────────────────────
@@ -18,11 +19,11 @@ description: Example provisioning template
18
19
 
19
20
  # (Required) List of provisioning steps. At least 1 step required.
20
21
  steps:
21
- - name: Check Node.js # (Required) Step name
22
- description: Verify Node.js # (Optional) Step description
23
- command: node --version # (Required) Shell command to execute
24
- skip_if: which node # (Optional) Skip this step if this command exits with code 0
25
- continue_on_error: true # (Optional) Continue to next step even if this fails. Default: false
22
+ - name: Check Node.js # (Required) Step name
23
+ description: Verify Node.js # (Optional) Step description
24
+ command: node --version # (Required) Shell command to execute
25
+ skip_if: which node # (Optional) Skip this step if this command exits with code 0
26
+ continue_on_error: true # (Optional) Continue to next step even if this fails. Default: false
26
27
 
27
28
  - name: Hello World
28
29
  command: echo "Hello from syncpoint!"