@srafis/zsync 0.1.7 → 0.1.8
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/LICENCE +9 -0
- package/README.md +3 -3
- package/dist/zsync.js +2 -2
- package/package.json +41 -41
package/LICENCE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# MIT Licence
|
|
2
|
+
|
|
3
|
+
Copyright 2026 Kamaljot Singh
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -129,7 +129,7 @@ Use the prompts in this order:
|
|
|
129
129
|
5. Review the create, update, job creation, and delete counts.
|
|
130
130
|
6. Choose Yes to write the changes.
|
|
131
131
|
|
|
132
|
-
New, changed, and deleted entries start selected. Unchanged entries that zsync already synced are not selected. Changed entries show `[
|
|
132
|
+
New, changed, and deleted entries start selected. Unchanged entries that zsync already synced are not selected. Changed entries show `[U]` before the description. Deleted entries show `[D]`.
|
|
133
133
|
|
|
134
134
|
The final prompt defaults to Yes when it only creates or updates entries. It defaults to No when it includes a deletion. zsync makes no Zoho changes before this final confirmation. It may save project mappings before you confirm.
|
|
135
135
|
|
|
@@ -157,13 +157,13 @@ An entry belongs to the local date of its start time. If an entry crosses midnig
|
|
|
157
157
|
|
|
158
158
|
zsync writes readable source metadata and a marker such as `[zsync-source:...]` in each Zoho log description. It uses this data to find the log that belongs to a Clockify entry. Keep the metadata and marker in the description. All Clockify tags remain in the metadata even when only one tag selects the Zoho job.
|
|
159
159
|
|
|
160
|
-
If a Clockify entry or its tags changed, select its `[
|
|
160
|
+
If a Clockify entry or its tags changed, select its `[U]` row. zsync then writes the current Clockify values and selected Zoho project and job to the matching Zoho log. A Zoho log that you entered by hand has no source metadata, so zsync does not treat it as a match. If you delete a synced Zoho log, its Clockify entry appears as new on the next run.
|
|
161
161
|
|
|
162
162
|
Before each write, zsync checks both services again. It verifies the result after the write. A run can finish with both successful and failed entries. If a result is uncertain, inspect Zoho People before you retry it.
|
|
163
163
|
|
|
164
164
|
## Review deleted entries
|
|
165
165
|
|
|
166
|
-
Before it shows the selection table, zsync checks synced Zoho logs in the selected date range. If the source entry no longer exists in Clockify, the Zoho log appears with `[
|
|
166
|
+
Before it shows the selection table, zsync checks synced Zoho logs in the selected date range. If the source entry no longer exists in Clockify, the Zoho log appears with `[D]` and is selected by default.
|
|
167
167
|
|
|
168
168
|
You can clear a deletion to keep the Zoho log. zsync checks each selected deletion and its Clockify source again before it deletes the log. It does not offer an entry that still exists in Clockify, even if the entry moved to another date. It also excludes manual, locked, and ambiguous Zoho logs.
|
|
169
169
|
|
package/dist/zsync.js
CHANGED
|
@@ -8306,7 +8306,7 @@ function entryTable(rows, columns) {
|
|
|
8306
8306
|
if (columns >= 110)
|
|
8307
8307
|
fields.push({ title: "Tags", size: 14, value: (row) => row.entry.tags.join("/") || "—" });
|
|
8308
8308
|
const used = fields.reduce((sum, field) => sum + field.size + 3, 0);
|
|
8309
|
-
fields.push({ title: "Description", size: Math.max(1, available - used), value: (row) => `${row.status === "changed" || row.status === "deleted" ? `[${row.status === "changed" ? "
|
|
8309
|
+
fields.push({ title: "Description", size: Math.max(1, available - used), value: (row) => `${row.status === "changed" || row.status === "deleted" ? `[${row.status === "changed" ? "U" : "D"}] ` : ""}${row.entry.description || "—"}` });
|
|
8310
8310
|
const line = (cells) => fitCell(cells.join(" │ "), available).trimEnd();
|
|
8311
8311
|
return {
|
|
8312
8312
|
header: line(fields.map((field) => fitCell(field.title, field.size))),
|
|
@@ -8315,7 +8315,7 @@ function entryTable(rows, columns) {
|
|
|
8315
8315
|
};
|
|
8316
8316
|
}
|
|
8317
8317
|
function colorEntryLabel(label, dim = false) {
|
|
8318
|
-
return label.split(/(\[
|
|
8318
|
+
return label.split(/(\[U\]|\[D\])/).map((part) => part === "[U]" ? styleText3(["bold", "yellow"], part) : part === "[D]" ? styleText3(["bold", "red"], part) : dim ? styleText3("dim", part) : part).join("");
|
|
8319
8319
|
}
|
|
8320
8320
|
function pickEntries(rows) {
|
|
8321
8321
|
return new a({
|
package/package.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
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
|
-
|
|
2
|
+
"name": "@srafis/zsync",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"devDependencies": {
|
|
5
|
+
"@types/bun": "latest",
|
|
6
|
+
"@types/node": "^22.20.2",
|
|
7
|
+
"typescript": "^7.0.2"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@clack/core": "1.5.0",
|
|
11
|
+
"@clack/prompts": "^1.8.0",
|
|
12
|
+
"@js-temporal/polyfill": "^0.5.1",
|
|
13
|
+
"fast-string-width": "3.0.2"
|
|
14
|
+
},
|
|
15
|
+
"version": "0.1.8",
|
|
16
|
+
"description": "Interactively sync Clockify entries to Zoho People",
|
|
17
|
+
"bin": {
|
|
18
|
+
"zsync": "dist/zsync.js"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist/zsync.js",
|
|
22
|
+
"README.md",
|
|
23
|
+
"docs"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=22"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"dev": "bun app.ts",
|
|
30
|
+
"build": "bun build app.ts --target=node --outfile=dist/zsync.js",
|
|
31
|
+
"test": "bun test",
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"prepack": "bun run build"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public",
|
|
37
|
+
"registry": "https://registry.npmjs.org/"
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/srafis/zoho-clockify-sync.git"
|
|
42
|
+
}
|
|
43
43
|
}
|