@tailor-platform/sdk 1.25.3 → 1.25.4
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/CHANGELOG.md +36 -0
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/lib.mjs +4 -24
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/{query-BpppEOzu.mjs → query-kb_4EQp4.mjs} +2 -3
- package/dist/{query-BpppEOzu.mjs.map → query-kb_4EQp4.mjs.map} +1 -1
- package/package.json +7 -7
- package/postinstall.mjs +14 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/sdk",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.4",
|
|
4
4
|
"description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"pgsql-ast-parser": "12.0.2",
|
|
115
115
|
"pkg-types": "2.3.0",
|
|
116
116
|
"politty": "0.4.9",
|
|
117
|
-
"rolldown": "1.0.0-rc.
|
|
117
|
+
"rolldown": "1.0.0-rc.9",
|
|
118
118
|
"serve": "14.2.6",
|
|
119
119
|
"std-env": "3.10.0",
|
|
120
120
|
"table": "6.9.0",
|
|
@@ -130,18 +130,18 @@
|
|
|
130
130
|
"@tailor-platform/function-types": "0.8.2",
|
|
131
131
|
"@types/madge": "5.0.3",
|
|
132
132
|
"@types/mime-types": "3.0.1",
|
|
133
|
-
"@types/node": "24.
|
|
133
|
+
"@types/node": "24.12.0",
|
|
134
134
|
"@typescript/native-preview": "7.0.0-dev.20260308.1",
|
|
135
135
|
"@vitest/coverage-v8": "4.0.18",
|
|
136
136
|
"eslint": "9.39.4",
|
|
137
137
|
"eslint-plugin-jsdoc": "62.7.1",
|
|
138
138
|
"eslint-plugin-oxlint": "1.39.0",
|
|
139
139
|
"oxlint": "1.39.0",
|
|
140
|
-
"oxlint-tsgolint": "0.
|
|
141
|
-
"sonda": "0.
|
|
142
|
-
"tsdown": "0.21.
|
|
140
|
+
"oxlint-tsgolint": "0.16.0",
|
|
141
|
+
"sonda": "0.11.1",
|
|
142
|
+
"tsdown": "0.21.2",
|
|
143
143
|
"typescript": "5.9.3",
|
|
144
|
-
"typescript-eslint": "8.
|
|
144
|
+
"typescript-eslint": "8.57.0",
|
|
145
145
|
"vitest": "4.0.18",
|
|
146
146
|
"zinfer": "0.1.7"
|
|
147
147
|
},
|
package/postinstall.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { existsSync
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
import { register } from "node:module";
|
|
@@ -26,48 +26,23 @@ async function install() {
|
|
|
26
26
|
? resolve(cwd, process.env.TAILOR_PLATFORM_SDK_CONFIG_PATH)
|
|
27
27
|
: findUpSync(DEFAULT_CONFIG_FILENAME, { cwd });
|
|
28
28
|
|
|
29
|
-
if (configPath
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
process.chdir(configDir);
|
|
33
|
-
register("tsx", import.meta.url, { data: {} });
|
|
34
|
-
|
|
35
|
-
const { generateUserTypes, loadConfig } = await import(
|
|
36
|
-
pathToFileURL(resolve(__dirname, "dist", "cli", "lib.mjs")).href
|
|
37
|
-
);
|
|
38
|
-
const { config } = await loadConfig(configPath);
|
|
39
|
-
await generateUserTypes({ config, configPath });
|
|
40
|
-
return;
|
|
41
|
-
} catch (error) {
|
|
42
|
-
console.warn("⚠️ Failed to generate types from config:", error.message);
|
|
43
|
-
// Fall through to create empty type definition
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Create empty type definition file as fallback (in cwd, next to where config would be)
|
|
48
|
-
const pluginTypesPath = resolve(cwd, "tailor.d.ts");
|
|
49
|
-
const initialContent = `// This file is auto-generated by @tailor-platform/sdk
|
|
50
|
-
// Do not edit this file manually
|
|
51
|
-
// Regenerated automatically when running 'tailor-sdk apply' or 'tailor-sdk generate'
|
|
52
|
-
|
|
53
|
-
declare module "@tailor-platform/sdk" {
|
|
54
|
-
interface AttributeMap {}
|
|
55
|
-
interface AttributeList {
|
|
56
|
-
__tuple: string[];
|
|
29
|
+
if (!configPath || !existsSync(configPath)) {
|
|
30
|
+
console.log("⚠️ No tailor.config.ts found, skipping type generation");
|
|
31
|
+
return;
|
|
57
32
|
}
|
|
58
|
-
interface Env {}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export {};
|
|
62
|
-
`;
|
|
63
33
|
|
|
64
34
|
try {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
35
|
+
const configDir = dirname(configPath);
|
|
36
|
+
process.chdir(configDir);
|
|
37
|
+
register("tsx", import.meta.url, { data: {} });
|
|
38
|
+
|
|
39
|
+
const { generateUserTypes, loadConfig } = await import(
|
|
40
|
+
pathToFileURL(resolve(__dirname, "dist", "cli", "lib.mjs")).href
|
|
41
|
+
);
|
|
42
|
+
const { config } = await loadConfig(configPath);
|
|
43
|
+
await generateUserTypes({ config, configPath });
|
|
68
44
|
} catch (error) {
|
|
69
|
-
console.
|
|
70
|
-
// Don't exit with error - this shouldn't break the installation
|
|
45
|
+
console.warn("⚠️ Failed to generate types from config:", error.message);
|
|
71
46
|
}
|
|
72
47
|
}
|
|
73
48
|
|