tetrons 2.3.64 → 2.3.66
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/dist/chunk-IHAH6ILP.browser.js +16997 -0
- package/dist/components/tetrons/EditorContent.tsx +11 -13
- package/dist/index.browser.js +16 -17009
- package/dist/index.browserimpl-E7NZTX57.browser.js +18 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.node.cjs +11530 -11079
- package/dist/index.node.mjs +12650 -12201
- package/dist/index.nodeimpl-U3BMCE2Y.browser.js +38 -0
- package/package.json +14 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EditorContent
|
|
3
|
+
} from "./chunk-IHAH6ILP.browser.js";
|
|
4
|
+
|
|
5
|
+
// src/index.nodeimpl.ts
|
|
6
|
+
import fs from "fs";
|
|
7
|
+
import path from "path";
|
|
8
|
+
var USAGE_FILE = path.join(process.cwd(), ".tetrons-usage.json");
|
|
9
|
+
async function getOrCreateInstallDate() {
|
|
10
|
+
try {
|
|
11
|
+
if (fs.existsSync(USAGE_FILE)) {
|
|
12
|
+
const raw = fs.readFileSync(USAGE_FILE, "utf-8");
|
|
13
|
+
try {
|
|
14
|
+
const data = JSON.parse(raw);
|
|
15
|
+
if (typeof data.installedAt === "string") {
|
|
16
|
+
return new Date(data.installedAt);
|
|
17
|
+
}
|
|
18
|
+
} catch {
|
|
19
|
+
console.warn(
|
|
20
|
+
"[TETRONS] Malformed .tetrons-usage.json. Reinitializing..."
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
25
|
+
fs.writeFileSync(USAGE_FILE, JSON.stringify({ installedAt: now }), {
|
|
26
|
+
encoding: "utf-8",
|
|
27
|
+
flag: "w"
|
|
28
|
+
});
|
|
29
|
+
return new Date(now);
|
|
30
|
+
} catch (err) {
|
|
31
|
+
console.error("[TETRONS] Failed to read/write install date:", err);
|
|
32
|
+
throw new Error("Failed to access local usage record.");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
EditorContent,
|
|
37
|
+
getOrCreateInstallDate
|
|
38
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tetrons",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.66",
|
|
4
4
|
"description": "A Next.js project written in TypeScript",
|
|
5
5
|
"main": "./dist/index.node.cjs",
|
|
6
6
|
"module": "./dist/index.node.mjs",
|
|
@@ -74,9 +74,17 @@
|
|
|
74
74
|
"author": "Swastik Jha <swastik.jha@finapsys.co.in>",
|
|
75
75
|
"license": "MIT",
|
|
76
76
|
"exports": {
|
|
77
|
-
"
|
|
78
|
-
"import":
|
|
79
|
-
|
|
77
|
+
".": {
|
|
78
|
+
"import": {
|
|
79
|
+
"node": "./dist/index.node.mjs",
|
|
80
|
+
"browser": "./dist/index.browser.js",
|
|
81
|
+
"default": "./dist/index.node.mjs"
|
|
82
|
+
},
|
|
83
|
+
"require": {
|
|
84
|
+
"node": "./dist/index.node.cjs",
|
|
85
|
+
"browser": "./dist/index.browser.js",
|
|
86
|
+
"default": "./dist/index.node.cjs"
|
|
87
|
+
}
|
|
80
88
|
},
|
|
81
89
|
"./browser": {
|
|
82
90
|
"import": "./dist/index.browser.js",
|
|
@@ -109,6 +117,8 @@
|
|
|
109
117
|
}
|
|
110
118
|
},
|
|
111
119
|
"browser": {
|
|
120
|
+
"./dist/index.node.mjs": "./dist/index.browser.js",
|
|
121
|
+
"./dist/index.node.cjs": "./dist/index.browser.js",
|
|
112
122
|
"./dist/licenseUtils.server.js": false
|
|
113
123
|
},
|
|
114
124
|
"files": [
|