postgresdk 0.9.1 → 0.9.2
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/cli.js +16 -12
- package/dist/index.js +16 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4159,18 +4159,6 @@ async function generate(configPath) {
|
|
|
4159
4159
|
content: emitHonoRouter(Object.values(model.tables), !!normalizedAuth?.strategy && normalizedAuth.strategy !== "none", cfg.useJsExtensions)
|
|
4160
4160
|
});
|
|
4161
4161
|
}
|
|
4162
|
-
const clientFiles = files.filter((f) => {
|
|
4163
|
-
return f.path.includes(clientDir);
|
|
4164
|
-
});
|
|
4165
|
-
files.push({
|
|
4166
|
-
path: join(serverDir, "sdk-bundle.ts"),
|
|
4167
|
-
content: emitSdkBundle(clientFiles, clientDir)
|
|
4168
|
-
});
|
|
4169
|
-
const contractCode = emitUnifiedContract(model, cfg);
|
|
4170
|
-
files.push({
|
|
4171
|
-
path: join(serverDir, "contract.ts"),
|
|
4172
|
-
content: contractCode
|
|
4173
|
-
});
|
|
4174
4162
|
const { generateUnifiedContract: generateUnifiedContract2, generateUnifiedContractMarkdown: generateUnifiedContractMarkdown2 } = await Promise.resolve().then(() => (init_emit_sdk_contract(), exports_emit_sdk_contract));
|
|
4175
4163
|
if (process.env.SDK_DEBUG) {
|
|
4176
4164
|
console.log(`[Index] Model has ${Object.keys(model.tables || {}).length} tables before contract generation`);
|
|
@@ -4180,6 +4168,22 @@ async function generate(configPath) {
|
|
|
4180
4168
|
path: join(serverDir, "CONTRACT.md"),
|
|
4181
4169
|
content: generateUnifiedContractMarkdown2(contract)
|
|
4182
4170
|
});
|
|
4171
|
+
files.push({
|
|
4172
|
+
path: join(clientDir, "CONTRACT.md"),
|
|
4173
|
+
content: generateUnifiedContractMarkdown2(contract)
|
|
4174
|
+
});
|
|
4175
|
+
const contractCode = emitUnifiedContract(model, cfg, graph);
|
|
4176
|
+
files.push({
|
|
4177
|
+
path: join(serverDir, "contract.ts"),
|
|
4178
|
+
content: contractCode
|
|
4179
|
+
});
|
|
4180
|
+
const clientFiles = files.filter((f) => {
|
|
4181
|
+
return f.path.includes(clientDir);
|
|
4182
|
+
});
|
|
4183
|
+
files.push({
|
|
4184
|
+
path: join(serverDir, "sdk-bundle.ts"),
|
|
4185
|
+
content: emitSdkBundle(clientFiles, clientDir)
|
|
4186
|
+
});
|
|
4183
4187
|
if (generateTests) {
|
|
4184
4188
|
console.log("\uD83E\uDDEA Generating tests...");
|
|
4185
4189
|
const relativeClientPath = relative(testDir, clientDir);
|
package/dist/index.js
CHANGED
|
@@ -3896,18 +3896,6 @@ async function generate(configPath) {
|
|
|
3896
3896
|
content: emitHonoRouter(Object.values(model.tables), !!normalizedAuth?.strategy && normalizedAuth.strategy !== "none", cfg.useJsExtensions)
|
|
3897
3897
|
});
|
|
3898
3898
|
}
|
|
3899
|
-
const clientFiles = files.filter((f) => {
|
|
3900
|
-
return f.path.includes(clientDir);
|
|
3901
|
-
});
|
|
3902
|
-
files.push({
|
|
3903
|
-
path: join(serverDir, "sdk-bundle.ts"),
|
|
3904
|
-
content: emitSdkBundle(clientFiles, clientDir)
|
|
3905
|
-
});
|
|
3906
|
-
const contractCode = emitUnifiedContract(model, cfg);
|
|
3907
|
-
files.push({
|
|
3908
|
-
path: join(serverDir, "contract.ts"),
|
|
3909
|
-
content: contractCode
|
|
3910
|
-
});
|
|
3911
3899
|
const { generateUnifiedContract: generateUnifiedContract2, generateUnifiedContractMarkdown: generateUnifiedContractMarkdown2 } = await Promise.resolve().then(() => (init_emit_sdk_contract(), exports_emit_sdk_contract));
|
|
3912
3900
|
if (process.env.SDK_DEBUG) {
|
|
3913
3901
|
console.log(`[Index] Model has ${Object.keys(model.tables || {}).length} tables before contract generation`);
|
|
@@ -3917,6 +3905,22 @@ async function generate(configPath) {
|
|
|
3917
3905
|
path: join(serverDir, "CONTRACT.md"),
|
|
3918
3906
|
content: generateUnifiedContractMarkdown2(contract)
|
|
3919
3907
|
});
|
|
3908
|
+
files.push({
|
|
3909
|
+
path: join(clientDir, "CONTRACT.md"),
|
|
3910
|
+
content: generateUnifiedContractMarkdown2(contract)
|
|
3911
|
+
});
|
|
3912
|
+
const contractCode = emitUnifiedContract(model, cfg, graph);
|
|
3913
|
+
files.push({
|
|
3914
|
+
path: join(serverDir, "contract.ts"),
|
|
3915
|
+
content: contractCode
|
|
3916
|
+
});
|
|
3917
|
+
const clientFiles = files.filter((f) => {
|
|
3918
|
+
return f.path.includes(clientDir);
|
|
3919
|
+
});
|
|
3920
|
+
files.push({
|
|
3921
|
+
path: join(serverDir, "sdk-bundle.ts"),
|
|
3922
|
+
content: emitSdkBundle(clientFiles, clientDir)
|
|
3923
|
+
});
|
|
3920
3924
|
if (generateTests) {
|
|
3921
3925
|
console.log("\uD83E\uDDEA Generating tests...");
|
|
3922
3926
|
const relativeClientPath = relative(testDir, clientDir);
|