tetrons 2.3.65 → 2.3.67
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-X7AC43AX.browser.js +16991 -0
- package/dist/components/tetrons/EditorContent.tsx +5 -19
- 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 +11378 -10933
- package/dist/index.node.mjs +12593 -12150
- package/dist/index.nodeimpl-TWE53STQ.browser.js +38 -0
- package/package.json +3 -5
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EditorContent
|
|
3
|
+
} from "./chunk-X7AC43AX.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.67",
|
|
4
4
|
"description": "A Next.js project written in TypeScript",
|
|
5
5
|
"main": "./dist/index.node.cjs",
|
|
6
6
|
"module": "./dist/index.node.mjs",
|
|
@@ -78,10 +78,6 @@
|
|
|
78
78
|
"import": "./dist/index.node.mjs",
|
|
79
79
|
"require": "./dist/index.node.cjs"
|
|
80
80
|
},
|
|
81
|
-
"./node": {
|
|
82
|
-
"import": "./dist/index.node.mjs",
|
|
83
|
-
"require": "./dist/index.node.cjs"
|
|
84
|
-
},
|
|
85
81
|
"./browser": {
|
|
86
82
|
"import": "./dist/index.browser.js",
|
|
87
83
|
"require": "./dist/index.browser.js"
|
|
@@ -113,6 +109,8 @@
|
|
|
113
109
|
}
|
|
114
110
|
},
|
|
115
111
|
"browser": {
|
|
112
|
+
"./dist/index.node.mjs": "./dist/index.browser.js",
|
|
113
|
+
"./dist/index.node.cjs": "./dist/index.browser.js",
|
|
116
114
|
"./dist/licenseUtils.server.js": false
|
|
117
115
|
},
|
|
118
116
|
"files": [
|