nextly 0.0.2-alpha.1 → 0.0.2-alpha.3
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/_dts-chunks/{collections-handler.d-DjgO74Wt.d.ts → collections-handler.d-nXHXeVJG.d.ts} +7 -2
- package/dist/_dts-chunks/{config.d-DNwsDnjs.d.ts → config.d-CWOwFVLW.d.ts} +1 -1
- package/dist/_dts-chunks/{define-component.d-BUgTHmt3.d.ts → define-component.d-DptZZAGj.d.ts} +2 -2
- package/dist/_dts-chunks/{index.d-axCAzZ7m.d.ts → index.d-DutLjyet.d.ts} +1 -1
- package/dist/actions/index.mjs +7 -7
- package/dist/api/auth-state.mjs +13 -13
- package/dist/api/collections-schema-detail.mjs +13 -13
- package/dist/api/collections-schema-export.mjs +13 -13
- package/dist/api/collections-schema.mjs +13 -13
- package/dist/api/components-detail.mjs +13 -13
- package/dist/api/components.mjs +13 -13
- package/dist/api/email-providers-default.mjs +13 -13
- package/dist/api/email-providers-detail.mjs +13 -13
- package/dist/api/email-providers-test.mjs +13 -13
- package/dist/api/email-providers.mjs +13 -13
- package/dist/api/email-send-template.mjs +14 -14
- package/dist/api/email-send.mjs +14 -14
- package/dist/api/email-templates-detail.mjs +13 -13
- package/dist/api/email-templates-layout.mjs +13 -13
- package/dist/api/email-templates-preview.mjs +13 -13
- package/dist/api/email-templates.mjs +13 -13
- package/dist/api/media-bulk.mjs +9 -9
- package/dist/api/media-folders.mjs +13 -13
- package/dist/api/media-handlers.d.ts +2 -2
- package/dist/api/media-handlers.mjs +13 -13
- package/dist/api/media.mjs +13 -13
- package/dist/api/singles-detail.mjs +13 -13
- package/dist/api/singles-schema-detail.mjs +13 -13
- package/dist/api/singles.mjs +13 -13
- package/dist/api/storage-upload-url.mjs +13 -13
- package/dist/api/uploads.mjs +13 -13
- package/dist/{boot-apply-PQSYLDIN.mjs → boot-apply-AGRBPOCX.mjs} +1 -1
- package/dist/{chunk-NSEFNNU4.mjs → chunk-3PG4GF6L.mjs} +53 -30
- package/dist/{chunk-UOP63Q54.mjs → chunk-3YGV6SIX.mjs} +1 -1
- package/dist/{chunk-O3QHXMOX.mjs → chunk-BFBOJBIG.mjs} +9 -9
- package/dist/{chunk-LDKCUMHK.mjs → chunk-FKWMNTP6.mjs} +1 -1
- package/dist/{chunk-AK6Z23OX.mjs → chunk-IU7BK3OH.mjs} +2 -2
- package/dist/{chunk-SBACDPNX.mjs → chunk-J4KHGYOM.mjs} +148 -26
- package/dist/{chunk-R6JJQHFC.mjs → chunk-JOPBSHFS.mjs} +1 -1
- package/dist/{chunk-GZ6DCQKC.mjs → chunk-JWAH6ROD.mjs} +5 -3
- package/dist/{chunk-YZNBLFIW.mjs → chunk-KGOPBE5W.mjs} +1 -1
- package/dist/{chunk-DNNG377Z.mjs → chunk-L5FA2FAY.mjs} +76 -13
- package/dist/{chunk-XZKLBMN6.mjs → chunk-LP2CDTCR.mjs} +43 -15
- package/dist/{chunk-YV4Y7SDL.mjs → chunk-N7PVYYDZ.mjs} +1 -1
- package/dist/{chunk-XGI4EMS3.mjs → chunk-NYUB4YDK.mjs} +3 -3
- package/dist/{chunk-P7NH2OSC.mjs → chunk-OBHXYVIM.mjs} +6 -6
- package/dist/{chunk-X7TXCYYN.mjs → chunk-OUEDTT6F.mjs} +10 -10
- package/dist/{chunk-VJ66NCL4.mjs → chunk-SKPLPSPW.mjs} +1 -1
- package/dist/{chunk-2OALJTK6.mjs → chunk-SY36QW6I.mjs} +5 -5
- package/dist/{chunk-B2GV2BWH.mjs → chunk-TJ5XDDI3.mjs} +2 -2
- package/dist/{chunk-PKMABBB5.mjs → chunk-TVYXUMZ3.mjs} +1 -1
- package/dist/{chunk-IZWPRDC3.mjs → chunk-UB4CALU5.mjs} +1 -1
- package/dist/cli/nextly.mjs +1 -1
- package/dist/cli/utils/index.d.ts +2 -2
- package/dist/config.d.ts +3 -3
- package/dist/database/index.d.ts +2 -2
- package/dist/database/seeders/index.mjs +10 -10
- package/dist/{dynamic-collection-schema-service-IEXTPIZ7.mjs → dynamic-collection-schema-service-KMOP5PGD.mjs} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +14 -14
- package/dist/{permissions-3DZZQZMI.mjs → permissions-IFAVOLEW.mjs} +8 -8
- package/dist/{pipeline-YOML7SWF.mjs → pipeline-M2RINZTN.mjs} +6 -6
- package/dist/{preview-ZZTR3QGS.mjs → preview-H6CJBMCP.mjs} +3 -3
- package/dist/{program-PW6UB2ZC.mjs → program-62XXW6TM.mjs} +14 -14
- package/dist/{register-SF6E6FVU.mjs → register-LJP2F5MR.mjs} +9 -9
- package/dist/{reload-config-HWQ4G5MM.mjs → reload-config-YEZU77NI.mjs} +6 -6
- package/dist/{routeHandler-UNMMJIBM.mjs → routeHandler-DH34YZMY.mjs} +16 -16
- package/dist/{runtime-schema-generator-NRA6A6Z6.mjs → runtime-schema-generator-MOPQWGJP.mjs} +2 -2
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.mjs +16 -16
- package/dist/{super-admin-G5ZK5F4T.mjs → super-admin-J34XLBI5.mjs} +8 -8
- package/dist/{users-7KELGRYJ.mjs → users-2PU5TXOG.mjs} +7 -7
- package/package.json +8 -8
|
@@ -122,17 +122,48 @@ function lengthForKind(kind) {
|
|
|
122
122
|
function getSystemColumnDescriptors(dialect, opts) {
|
|
123
123
|
const cols = [];
|
|
124
124
|
if (dialect === "postgresql") {
|
|
125
|
-
cols.push({
|
|
125
|
+
cols.push({
|
|
126
|
+
name: "id",
|
|
127
|
+
dialectType: "text",
|
|
128
|
+
nullable: false,
|
|
129
|
+
primaryKey: true
|
|
130
|
+
});
|
|
126
131
|
if (!opts.hasTitleField) {
|
|
127
|
-
cols.push({
|
|
132
|
+
cols.push({
|
|
133
|
+
name: "title",
|
|
134
|
+
dialectType: "text",
|
|
135
|
+
nullable: false,
|
|
136
|
+
primaryKey: false
|
|
137
|
+
});
|
|
128
138
|
}
|
|
129
139
|
if (!opts.hasSlugField) {
|
|
130
|
-
cols.push({
|
|
140
|
+
cols.push({
|
|
141
|
+
name: "slug",
|
|
142
|
+
dialectType: "text",
|
|
143
|
+
nullable: false,
|
|
144
|
+
primaryKey: false
|
|
145
|
+
});
|
|
131
146
|
}
|
|
132
|
-
cols.push({
|
|
133
|
-
|
|
147
|
+
cols.push({
|
|
148
|
+
name: "created_at",
|
|
149
|
+
dialectType: "timestamp",
|
|
150
|
+
nullable: true,
|
|
151
|
+
primaryKey: false
|
|
152
|
+
});
|
|
153
|
+
cols.push({
|
|
154
|
+
name: "updated_at",
|
|
155
|
+
dialectType: "timestamp",
|
|
156
|
+
nullable: true,
|
|
157
|
+
primaryKey: false
|
|
158
|
+
});
|
|
134
159
|
if (opts.hasStatus) {
|
|
135
|
-
cols.push({
|
|
160
|
+
cols.push({
|
|
161
|
+
name: "status",
|
|
162
|
+
dialectType: "text",
|
|
163
|
+
nullable: false,
|
|
164
|
+
primaryKey: false,
|
|
165
|
+
default: "'draft'"
|
|
166
|
+
});
|
|
136
167
|
}
|
|
137
168
|
} else if (dialect === "mysql") {
|
|
138
169
|
cols.push({
|
|
@@ -178,21 +209,53 @@ function getSystemColumnDescriptors(dialect, opts) {
|
|
|
178
209
|
dialectType: "varchar(20)",
|
|
179
210
|
length: 20,
|
|
180
211
|
nullable: false,
|
|
181
|
-
primaryKey: false
|
|
212
|
+
primaryKey: false,
|
|
213
|
+
default: "'draft'"
|
|
182
214
|
});
|
|
183
215
|
}
|
|
184
216
|
} else {
|
|
185
|
-
cols.push({
|
|
217
|
+
cols.push({
|
|
218
|
+
name: "id",
|
|
219
|
+
dialectType: "text",
|
|
220
|
+
nullable: false,
|
|
221
|
+
primaryKey: true
|
|
222
|
+
});
|
|
186
223
|
if (!opts.hasTitleField) {
|
|
187
|
-
cols.push({
|
|
224
|
+
cols.push({
|
|
225
|
+
name: "title",
|
|
226
|
+
dialectType: "text",
|
|
227
|
+
nullable: false,
|
|
228
|
+
primaryKey: false
|
|
229
|
+
});
|
|
188
230
|
}
|
|
189
231
|
if (!opts.hasSlugField) {
|
|
190
|
-
cols.push({
|
|
232
|
+
cols.push({
|
|
233
|
+
name: "slug",
|
|
234
|
+
dialectType: "text",
|
|
235
|
+
nullable: false,
|
|
236
|
+
primaryKey: false
|
|
237
|
+
});
|
|
191
238
|
}
|
|
192
|
-
cols.push({
|
|
193
|
-
|
|
239
|
+
cols.push({
|
|
240
|
+
name: "created_at",
|
|
241
|
+
dialectType: "integer",
|
|
242
|
+
nullable: true,
|
|
243
|
+
primaryKey: false
|
|
244
|
+
});
|
|
245
|
+
cols.push({
|
|
246
|
+
name: "updated_at",
|
|
247
|
+
dialectType: "integer",
|
|
248
|
+
nullable: true,
|
|
249
|
+
primaryKey: false
|
|
250
|
+
});
|
|
194
251
|
if (opts.hasStatus) {
|
|
195
|
-
cols.push({
|
|
252
|
+
cols.push({
|
|
253
|
+
name: "status",
|
|
254
|
+
dialectType: "text",
|
|
255
|
+
nullable: false,
|
|
256
|
+
primaryKey: false,
|
|
257
|
+
default: "'draft'"
|
|
258
|
+
});
|
|
196
259
|
}
|
|
197
260
|
}
|
|
198
261
|
return cols;
|
|
@@ -336,14 +336,20 @@ var DynamicCollectionSchemaService = class {
|
|
|
336
336
|
}).filter(Boolean).join(",\n");
|
|
337
337
|
const allColumnDefs = [];
|
|
338
338
|
if (this.dialect === "mysql") {
|
|
339
|
-
allColumnDefs.push(
|
|
339
|
+
allColumnDefs.push(
|
|
340
|
+
` ${this.quoteIdentifier("id")} varchar(36) PRIMARY KEY NOT NULL`
|
|
341
|
+
);
|
|
340
342
|
} else {
|
|
341
|
-
allColumnDefs.push(
|
|
343
|
+
allColumnDefs.push(
|
|
344
|
+
` ${this.quoteIdentifier("id")} text PRIMARY KEY NOT NULL`
|
|
345
|
+
);
|
|
342
346
|
}
|
|
343
347
|
const hasTitleField = fields.some((f) => f.name === "title");
|
|
344
348
|
if (!hasTitleField) {
|
|
345
349
|
if (this.dialect === "mysql") {
|
|
346
|
-
allColumnDefs.push(
|
|
350
|
+
allColumnDefs.push(
|
|
351
|
+
` ${this.quoteIdentifier("title")} varchar(255) NOT NULL`
|
|
352
|
+
);
|
|
347
353
|
} else {
|
|
348
354
|
allColumnDefs.push(` ${this.quoteIdentifier("title")} text NOT NULL`);
|
|
349
355
|
}
|
|
@@ -351,7 +357,9 @@ var DynamicCollectionSchemaService = class {
|
|
|
351
357
|
const hasSlugField = fields.some((f) => f.name === "slug");
|
|
352
358
|
if (!hasSlugField) {
|
|
353
359
|
if (this.dialect === "mysql") {
|
|
354
|
-
allColumnDefs.push(
|
|
360
|
+
allColumnDefs.push(
|
|
361
|
+
` ${this.quoteIdentifier("slug")} varchar(255) NOT NULL`
|
|
362
|
+
);
|
|
355
363
|
} else {
|
|
356
364
|
allColumnDefs.push(` ${this.quoteIdentifier("slug")} text NOT NULL`);
|
|
357
365
|
}
|
|
@@ -375,20 +383,34 @@ var DynamicCollectionSchemaService = class {
|
|
|
375
383
|
}
|
|
376
384
|
}
|
|
377
385
|
if (checks.length > 0) {
|
|
378
|
-
allColumnDefs.push(
|
|
386
|
+
allColumnDefs.push(
|
|
387
|
+
` CONSTRAINT ${this.quoteIdentifier(`chk_${tableName}_validation`)} CHECK (${checks.join(" AND ")})`
|
|
388
|
+
);
|
|
379
389
|
}
|
|
380
390
|
for (const c of constraints) {
|
|
381
391
|
allColumnDefs.push(c);
|
|
382
392
|
}
|
|
383
393
|
if (this.dialect === "sqlite") {
|
|
384
|
-
allColumnDefs.push(
|
|
385
|
-
|
|
394
|
+
allColumnDefs.push(
|
|
395
|
+
` ${this.quoteIdentifier("created_at")} integer DEFAULT (strftime('%s', 'now')) NOT NULL`
|
|
396
|
+
);
|
|
397
|
+
allColumnDefs.push(
|
|
398
|
+
` ${this.quoteIdentifier("updated_at")} integer DEFAULT (strftime('%s', 'now')) NOT NULL`
|
|
399
|
+
);
|
|
386
400
|
} else if (this.dialect === "mysql") {
|
|
387
|
-
allColumnDefs.push(
|
|
388
|
-
|
|
401
|
+
allColumnDefs.push(
|
|
402
|
+
` ${this.quoteIdentifier("created_at")} timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL`
|
|
403
|
+
);
|
|
404
|
+
allColumnDefs.push(
|
|
405
|
+
` ${this.quoteIdentifier("updated_at")} timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL`
|
|
406
|
+
);
|
|
389
407
|
} else {
|
|
390
|
-
allColumnDefs.push(
|
|
391
|
-
|
|
408
|
+
allColumnDefs.push(
|
|
409
|
+
` ${this.quoteIdentifier("created_at")} timestamp DEFAULT now() NOT NULL`
|
|
410
|
+
);
|
|
411
|
+
allColumnDefs.push(
|
|
412
|
+
` ${this.quoteIdentifier("updated_at")} timestamp DEFAULT now() NOT NULL`
|
|
413
|
+
);
|
|
392
414
|
}
|
|
393
415
|
let sql = `-- Create dynamic collection: ${tableName}
|
|
394
416
|
CREATE TABLE IF NOT EXISTS ${this.quoteIdentifier(tableName)} (
|
|
@@ -478,7 +500,7 @@ ${allColumnDefs.join(",\n")}
|
|
|
478
500
|
statements.push(
|
|
479
501
|
`ALTER TABLE ${this.quoteIdentifier(tableName)} ADD COLUMN ${this.quoteIdentifier("status")} ${statusType} DEFAULT 'draft' NOT NULL;`
|
|
480
502
|
);
|
|
481
|
-
} else if (wasStatus &&
|
|
503
|
+
} else if (wasStatus && options?.hasStatus === false) {
|
|
482
504
|
statements.push(
|
|
483
505
|
`ALTER TABLE ${this.quoteIdentifier(tableName)} DROP COLUMN ${this.quoteIdentifier("status")};`
|
|
484
506
|
);
|
|
@@ -679,9 +701,12 @@ ${allColumnDefs.join(",\n")}
|
|
|
679
701
|
return true;
|
|
680
702
|
}
|
|
681
703
|
/**
|
|
682
|
-
* Generate TypeScript/Drizzle schema code for a collection
|
|
704
|
+
* Generate TypeScript/Drizzle schema code for a collection. Pass
|
|
705
|
+
* `hasStatus: true` for Draft/Published collections so the generated
|
|
706
|
+
* file includes the `status` column — without it, `drizzle-kit
|
|
707
|
+
* pushSchema` later sees the live `status` column as extra and drops it.
|
|
683
708
|
*/
|
|
684
|
-
generateSchemaCode(tableName, collectionName, fields) {
|
|
709
|
+
generateSchemaCode(tableName, collectionName, fields, options) {
|
|
685
710
|
const dialectConfig = this.getDialectConfig();
|
|
686
711
|
const jsonbFieldTypes = [
|
|
687
712
|
"json",
|
|
@@ -750,6 +775,9 @@ import { relations } from 'drizzle-orm';`;
|
|
|
750
775
|
const allIndexes = fieldIndexes ? ` createdAtIdx: index('idx_${tableName}_created_at').on(table.createdAt),
|
|
751
776
|
${fieldIndexes}` : ` createdAtIdx: index('idx_${tableName}_created_at').on(table.createdAt),`;
|
|
752
777
|
const timestampColumns = this.generateTimestampColumnsForDialect();
|
|
778
|
+
const statusColumn = options?.hasStatus ? this.dialect === "sqlite" ? ` status: text('status').notNull().default('draft'),
|
|
779
|
+
` : ` status: varchar('status', { length: 20 }).notNull().default('draft'),
|
|
780
|
+
` : "";
|
|
753
781
|
return `${imports}
|
|
754
782
|
|
|
755
783
|
/**
|
|
@@ -761,7 +789,7 @@ export const ${tableName} = ${dialectConfig.tableFunction}('${tableName}', {
|
|
|
761
789
|
title: text('title').notNull(),
|
|
762
790
|
slug: text('slug').notNull(),
|
|
763
791
|
${columns}
|
|
764
|
-
${timestampColumns}
|
|
792
|
+
${statusColumn}${timestampColumns}
|
|
765
793
|
}, (table) => ({
|
|
766
794
|
slugIdx: uniqueIndex('idx_${tableName}_slug').on(table.slug),
|
|
767
795
|
${allIndexes}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClackTerminalPromptDispatcher
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SKPLPSPW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getAdapterFromDI,
|
|
6
6
|
getCollectionRegistryFromDI,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
getProductionNotifier,
|
|
15
15
|
noopMigrationJournal,
|
|
16
16
|
noopPreRenameExecutor
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IU7BK3OH.mjs";
|
|
18
18
|
import {
|
|
19
19
|
RealClassifier,
|
|
20
20
|
RegexRenameDetector
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-J4KHGYOM.mjs";
|
|
22
22
|
|
|
23
23
|
// src/domains/schema/pipeline/snapshot.ts
|
|
24
24
|
function buildDesiredSchemaFromRegistry(registry, overrides) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
reloadNextlyConfig,
|
|
3
3
|
resolveCollectionTableName
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SY36QW6I.mjs";
|
|
5
5
|
import {
|
|
6
6
|
runBootTimeApplyIfDev
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JOPBSHFS.mjs";
|
|
8
8
|
import {
|
|
9
9
|
buildClaims,
|
|
10
10
|
signAccessToken
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
isServicesRegistered,
|
|
15
15
|
registerServices,
|
|
16
16
|
shutdownServices
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OUEDTT6F.mjs";
|
|
18
18
|
import {
|
|
19
19
|
AuthService,
|
|
20
20
|
PermissionService,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
RoleService,
|
|
23
23
|
UserAccountService,
|
|
24
24
|
transformRichTextFields
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-3PG4GF6L.mjs";
|
|
26
26
|
import {
|
|
27
27
|
env
|
|
28
28
|
} from "./chunk-UJ2IMJ4W.mjs";
|
|
@@ -2279,7 +2279,7 @@ async function resolveDeps(injected) {
|
|
|
2279
2279
|
if (injected?.previewDesiredSchema) {
|
|
2280
2280
|
return injected;
|
|
2281
2281
|
}
|
|
2282
|
-
const { previewDesiredSchema } = await import("./preview-
|
|
2282
|
+
const { previewDesiredSchema } = await import("./preview-H6CJBMCP.mjs");
|
|
2283
2283
|
return {
|
|
2284
2284
|
previewDesiredSchema: injected?.previewDesiredSchema ?? previewDesiredSchema
|
|
2285
2285
|
};
|
|
@@ -2359,7 +2359,7 @@ function ensureHmrListener() {
|
|
|
2359
2359
|
if (!(g.__nextly_hmrReload instanceof Promise)) {
|
|
2360
2360
|
const reload = (async () => {
|
|
2361
2361
|
try {
|
|
2362
|
-
const { reloadNextlyConfig: reloadNextlyConfig2 } = await import("./reload-config-
|
|
2362
|
+
const { reloadNextlyConfig: reloadNextlyConfig2 } = await import("./reload-config-YEZU77NI.mjs");
|
|
2363
2363
|
await reloadNextlyConfig2();
|
|
2364
2364
|
} catch {
|
|
2365
2365
|
}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ComponentRegistryService,
|
|
3
3
|
PermissionSeedService,
|
|
4
4
|
SingleRegistryService
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KGOPBE5W.mjs";
|
|
6
6
|
import {
|
|
7
7
|
AccessControlService,
|
|
8
8
|
ApiKeyService,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
keysToSnakeCase,
|
|
32
32
|
resolveStatusFilter,
|
|
33
33
|
sanitizeEntryData
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-3PG4GF6L.mjs";
|
|
35
35
|
import {
|
|
36
36
|
CollectionRegistryService
|
|
37
37
|
} from "./chunk-3FA7FKAV.mjs";
|
|
@@ -5919,7 +5919,7 @@ async function initializeSchemaRegistry(adapter) {
|
|
|
5919
5919
|
adapter,
|
|
5920
5920
|
"dynamic_collections",
|
|
5921
5921
|
async (tableName, fields, hasStatus) => {
|
|
5922
|
-
const { generateRuntimeSchema } = await import("./runtime-schema-generator-
|
|
5922
|
+
const { generateRuntimeSchema } = await import("./runtime-schema-generator-MOPQWGJP.mjs");
|
|
5923
5923
|
const { table } = generateRuntimeSchema(
|
|
5924
5924
|
tableName,
|
|
5925
5925
|
fields,
|
|
@@ -5933,7 +5933,7 @@ async function initializeSchemaRegistry(adapter) {
|
|
|
5933
5933
|
adapter,
|
|
5934
5934
|
"dynamic_singles",
|
|
5935
5935
|
async (tableName, fields, hasStatus) => {
|
|
5936
|
-
const { generateRuntimeSchema } = await import("./runtime-schema-generator-
|
|
5936
|
+
const { generateRuntimeSchema } = await import("./runtime-schema-generator-MOPQWGJP.mjs");
|
|
5937
5937
|
const { table } = generateRuntimeSchema(
|
|
5938
5938
|
tableName,
|
|
5939
5939
|
fields,
|
|
@@ -5972,7 +5972,7 @@ async function registerConfigTablesInResolver(registry, config, adapter, logger)
|
|
|
5972
5972
|
const baseTableName = dbName ?? slug.replace(/-/g, "_");
|
|
5973
5973
|
const tableName = baseTableName.startsWith("dc_") ? baseTableName : `dc_${baseTableName}`;
|
|
5974
5974
|
const hasStatus = collection.status === true;
|
|
5975
|
-
const { generateRuntimeSchema } = await import("./runtime-schema-generator-
|
|
5975
|
+
const { generateRuntimeSchema } = await import("./runtime-schema-generator-MOPQWGJP.mjs");
|
|
5976
5976
|
const { table } = generateRuntimeSchema(
|
|
5977
5977
|
tableName,
|
|
5978
5978
|
fields,
|
|
@@ -5995,7 +5995,7 @@ async function registerConfigTablesInResolver(registry, config, adapter, logger)
|
|
|
5995
5995
|
if (!slug || !Array.isArray(fields) || fields.length === 0) continue;
|
|
5996
5996
|
const tableName = resolveSingleTableName({ slug, dbName });
|
|
5997
5997
|
const hasStatus = single.status === true;
|
|
5998
|
-
const { generateRuntimeSchema } = await import("./runtime-schema-generator-
|
|
5998
|
+
const { generateRuntimeSchema } = await import("./runtime-schema-generator-MOPQWGJP.mjs");
|
|
5999
5999
|
const { table } = generateRuntimeSchema(
|
|
6000
6000
|
tableName,
|
|
6001
6001
|
fields,
|
|
@@ -6101,8 +6101,8 @@ ${errorDetails}`);
|
|
|
6101
6101
|
`Auto-syncing ${collectionsNeedingTableSync.length} collection table(s)...`
|
|
6102
6102
|
);
|
|
6103
6103
|
try {
|
|
6104
|
-
const { applyDesiredSchema } = await import("./pipeline-
|
|
6105
|
-
const { generateRuntimeSchema } = await import("./runtime-schema-generator-
|
|
6104
|
+
const { applyDesiredSchema } = await import("./pipeline-M2RINZTN.mjs");
|
|
6105
|
+
const { generateRuntimeSchema } = await import("./runtime-schema-generator-MOPQWGJP.mjs");
|
|
6106
6106
|
const collectionsToSyncSet = new Set(collectionsNeedingTableSync);
|
|
6107
6107
|
const desiredCollections = {};
|
|
6108
6108
|
const slugsAfterFilter = [];
|
|
@@ -6324,7 +6324,7 @@ async function syncCodeFirstSingles(adapter, logger, transformedConfig) {
|
|
|
6324
6324
|
async function reconcileSingleTablesForBoot(adapter, logger, transformedConfig) {
|
|
6325
6325
|
try {
|
|
6326
6326
|
const { reconcileSingleTables } = await import("./reconcile-single-tables-7ENVXJGB.mjs");
|
|
6327
|
-
const { DynamicCollectionSchemaService } = await import("./dynamic-collection-schema-service-
|
|
6327
|
+
const { DynamicCollectionSchemaService } = await import("./dynamic-collection-schema-service-KMOP5PGD.mjs");
|
|
6328
6328
|
const schemaService = new DynamicCollectionSchemaService();
|
|
6329
6329
|
const singleRegistry = container.get(
|
|
6330
6330
|
"singleRegistryService"
|
|
@@ -6374,7 +6374,7 @@ async function reconcileSingleTablesForBoot(adapter, logger, transformedConfig)
|
|
|
6374
6374
|
if (tableExists) {
|
|
6375
6375
|
try {
|
|
6376
6376
|
const dialect = adapter.getCapabilities().dialect;
|
|
6377
|
-
const { generateRuntimeSchema: genRt } = await import("./runtime-schema-generator-
|
|
6377
|
+
const { generateRuntimeSchema: genRt } = await import("./runtime-schema-generator-MOPQWGJP.mjs");
|
|
6378
6378
|
const { table } = genRt(single.tableName, fields, dialect, {
|
|
6379
6379
|
status: hasStatus
|
|
6380
6380
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClackTerminalPromptDispatcher
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SKPLPSPW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
extractDatabaseNameFromUrl
|
|
6
6
|
} from "./chunk-KIMNCZGV.mjs";
|
|
@@ -12,17 +12,17 @@ import {
|
|
|
12
12
|
getProductionNotifier,
|
|
13
13
|
noopMigrationJournal,
|
|
14
14
|
noopPreRenameExecutor
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IU7BK3OH.mjs";
|
|
16
16
|
import {
|
|
17
17
|
RealClassifier,
|
|
18
18
|
RegexRenameDetector,
|
|
19
19
|
buildDesiredTableFromFields,
|
|
20
20
|
diffSnapshots,
|
|
21
21
|
introspectLiveSnapshot
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-J4KHGYOM.mjs";
|
|
23
23
|
import {
|
|
24
24
|
generateRuntimeSchema
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-UB4CALU5.mjs";
|
|
26
26
|
|
|
27
27
|
// src/domains/schema/utils/resolve-table-name.ts
|
|
28
28
|
function resolveCollectionTableName(slug, dbName) {
|
|
@@ -33,7 +33,7 @@ function resolveCollectionTableName(slug, dbName) {
|
|
|
33
33
|
|
|
34
34
|
// src/init/reload-config.ts
|
|
35
35
|
async function defaultResolver(name) {
|
|
36
|
-
const { getService } = await import("./register-
|
|
36
|
+
const { getService } = await import("./register-LJP2F5MR.mjs");
|
|
37
37
|
return getService(name);
|
|
38
38
|
}
|
|
39
39
|
async function reloadNextlyConfig(opts) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seedPermissions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3YGV6SIX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
seedSuperAdmin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TVYXUMZ3.mjs";
|
|
7
7
|
|
|
8
8
|
// src/database/seeders/index.ts
|
|
9
9
|
async function seedAll(adapter, options) {
|
package/dist/cli/nextly.mjs
CHANGED
|
@@ -9,7 +9,7 @@ if (existsSync(envPath)) {
|
|
|
9
9
|
config({ path: envPath });
|
|
10
10
|
}
|
|
11
11
|
async function main() {
|
|
12
|
-
const { createProgram } = await import("../program-
|
|
12
|
+
const { createProgram } = await import("../program-62XXW6TM.mjs");
|
|
13
13
|
const { createLogger } = await import("../logger-NU46DXNY.mjs");
|
|
14
14
|
const { NextlyError } = await import("../errors/index.mjs");
|
|
15
15
|
const telemetry = await import("../dist-M2NOU37V.mjs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SanitizedNextlyConfig } from '../../_dts-chunks/config.d-
|
|
2
|
-
import '../../_dts-chunks/collections-handler.d-
|
|
1
|
+
import { S as SanitizedNextlyConfig } from '../../_dts-chunks/config.d-CWOwFVLW.d.ts';
|
|
2
|
+
import '../../_dts-chunks/collections-handler.d-nXHXeVJG.d.ts';
|
|
3
3
|
import '@nextlyhq/adapter-drizzle';
|
|
4
4
|
import '@nextlyhq/adapter-drizzle/types';
|
|
5
5
|
import 'drizzle-orm/pg-core';
|
package/dist/config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { A as ALL_FIELD_TYPES, a as AccessFunction, B as BaseFieldConfig, C as CellComponentProps, b as CheckboxFieldAdminOptions, c as CheckboxFieldConfig, d as CheckboxFieldValue, e as ChipsFieldAdminOptions, f as ChipsFieldConfig, g as ChipsFieldValue, h as CodeEditorOptions, i as CodeFieldAdminOptions, j as CodeFieldConfig, k as CodeFieldValue, l as CodeLanguage, m as CollectionAccessControl, n as CollectionAdminOptions, o as CollectionConfig, p as CollectionHooks, q as CollectionLabels, r as CollectionPagination, s as ComponentAdminOptions, t as ComponentConfig, u as ComponentFieldConfig, v as ComponentLabel, w as CustomEndpoint, D as DATA_FIELD_TYPES, x as DataFieldConfig, y as DataFieldType, z as DateFieldAdminOptions, E as DateFieldConfig, F as DateFieldValue, G as DatePickerAppearance, H as DatePickerOptions, I as EmailFieldAdminOptions, J as EmailFieldConfig, K as EmailFieldValue, L as FieldAccess, M as FieldAdminOptions, N as FieldComponentProps, O as FieldCondition, P as FieldConfig, Q as FieldHooks, R as FieldType, S as FieldValidation, T as FilterComponentProps, U as FilterOptionsArgs, V as FilterOptionsFunction, W as GroupFieldAdminOptions, X as GroupFieldConfig, Y as GroupFieldConfig_FieldConfig, Z as GroupFieldValue, _ as HookContext, $ as HookHandler, a0 as HttpMethod, a1 as JSONEditorOptions, a2 as JSONFieldAdminOptions, a3 as JSONFieldConfig, a4 as JSONFieldValue, a5 as JSONSchemaDefinition, a6 as JSONSchemaProperty, a7 as JSONSchemaType, a8 as JoinFieldAdminOptions, a9 as JoinFieldConfig, aa as JoinFieldWhere, ab as NumberFieldAdminOptions, ac as NumberFieldConfig, ad as NumberFieldValue, ae as NumberFilterOperator, af as PasswordFieldAdminOptions, ag as PasswordFieldConfig, ah as PasswordFieldValue, ai as RadioFieldAdminOptions, aj as RadioFieldConfig, ak as RadioFieldValue, al as RadioLayout, am as RelationshipAppearance, an as RelationshipFieldAdminOptions, ao as RelationshipFieldConfig, ap as RelationshipFieldValue, aq as RelationshipFilterOptions, ar as RelationshipFilterOptionsArgs, as as RelationshipFilterOptionsFunction, at as RelationshipFilterQuery, au as RelationshipPolymorphicValue, av as RelationshipSingleValue, aw as RelationshipSortOptions, ax as RepeaterFieldAdminOptions, ay as RepeaterFieldConfig, az as RepeaterFieldLabels, aA as RepeaterFieldValue, aB as RepeaterRowLabelProps, aC as RepeaterRowValue, aD as RequestContext, aE as RichTextFeature, aF as RichTextFieldAdminOptions, aG as RichTextFieldConfig, aH as RichTextFieldValue, aI as RichTextNode, aJ as RichTextValue, aK as SelectFieldAdminOptions, aL as SelectFieldConfig, aM as SelectFieldValue, aN as SelectOption, aO as SingleAccessControl, aP as SingleAdminOptions, aQ as SingleConfig, aR as SingleHooks, aS as SingleLabel, aT as StringFilterOperator, aU as TextFieldAdminOptions, aV as TextFieldConfig, aW as TextFieldValue, aX as TextareaFieldAdminOptions, aY as TextareaFieldConfig, aZ as TextareaFieldValue, a_ as UploadFieldAdminOptions, a$ as UploadFieldConfig, b0 as UploadFieldValue, b1 as UploadFilterOptions, b2 as UploadFilterOptionsArgs, b3 as UploadFilterOptionsFunction, b4 as UploadFilterQuery, b5 as UploadPolymorphicValue, b6 as UploadSingleValue, b7 as VIRTUAL_FIELD_TYPES, b8 as VirtualFieldConfig, b9 as VirtualFieldType, ba as defineCollection } from './_dts-chunks/collections-handler.d-
|
|
2
|
-
export { a as array, c as checkbox, b as chips, d as code, e as component, f as date, g as defineComponent, h as defineConfig, i as defineSingle, j as email, k as group, l as hasNestedFields, m as isCheckboxField, n as isChipsField, o as isCodeField, p as isComponentField, q as isDataField, r as isDateField, s as isEmailField, t as isGroupField, u as isJSONField, v as isNumberField, w as isPasswordField, x as isRadioField, y as isRelationalField, z as isRelationshipField, A as isRepeaterField, B as isRichTextField, C as isSelectField, D as isTextField, E as isTextareaField, F as isUploadField, G as json, H as number, I as option, J as password, K as radio, L as relationship, M as repeater, N as richText, O as select, P as text, Q as textarea, R as upload } from './_dts-chunks/define-component.d-
|
|
1
|
+
export { A as ALL_FIELD_TYPES, a as AccessFunction, B as BaseFieldConfig, C as CellComponentProps, b as CheckboxFieldAdminOptions, c as CheckboxFieldConfig, d as CheckboxFieldValue, e as ChipsFieldAdminOptions, f as ChipsFieldConfig, g as ChipsFieldValue, h as CodeEditorOptions, i as CodeFieldAdminOptions, j as CodeFieldConfig, k as CodeFieldValue, l as CodeLanguage, m as CollectionAccessControl, n as CollectionAdminOptions, o as CollectionConfig, p as CollectionHooks, q as CollectionLabels, r as CollectionPagination, s as ComponentAdminOptions, t as ComponentConfig, u as ComponentFieldConfig, v as ComponentLabel, w as CustomEndpoint, D as DATA_FIELD_TYPES, x as DataFieldConfig, y as DataFieldType, z as DateFieldAdminOptions, E as DateFieldConfig, F as DateFieldValue, G as DatePickerAppearance, H as DatePickerOptions, I as EmailFieldAdminOptions, J as EmailFieldConfig, K as EmailFieldValue, L as FieldAccess, M as FieldAdminOptions, N as FieldComponentProps, O as FieldCondition, P as FieldConfig, Q as FieldHooks, R as FieldType, S as FieldValidation, T as FilterComponentProps, U as FilterOptionsArgs, V as FilterOptionsFunction, W as GroupFieldAdminOptions, X as GroupFieldConfig, Y as GroupFieldConfig_FieldConfig, Z as GroupFieldValue, _ as HookContext, $ as HookHandler, a0 as HttpMethod, a1 as JSONEditorOptions, a2 as JSONFieldAdminOptions, a3 as JSONFieldConfig, a4 as JSONFieldValue, a5 as JSONSchemaDefinition, a6 as JSONSchemaProperty, a7 as JSONSchemaType, a8 as JoinFieldAdminOptions, a9 as JoinFieldConfig, aa as JoinFieldWhere, ab as NumberFieldAdminOptions, ac as NumberFieldConfig, ad as NumberFieldValue, ae as NumberFilterOperator, af as PasswordFieldAdminOptions, ag as PasswordFieldConfig, ah as PasswordFieldValue, ai as RadioFieldAdminOptions, aj as RadioFieldConfig, ak as RadioFieldValue, al as RadioLayout, am as RelationshipAppearance, an as RelationshipFieldAdminOptions, ao as RelationshipFieldConfig, ap as RelationshipFieldValue, aq as RelationshipFilterOptions, ar as RelationshipFilterOptionsArgs, as as RelationshipFilterOptionsFunction, at as RelationshipFilterQuery, au as RelationshipPolymorphicValue, av as RelationshipSingleValue, aw as RelationshipSortOptions, ax as RepeaterFieldAdminOptions, ay as RepeaterFieldConfig, az as RepeaterFieldLabels, aA as RepeaterFieldValue, aB as RepeaterRowLabelProps, aC as RepeaterRowValue, aD as RequestContext, aE as RichTextFeature, aF as RichTextFieldAdminOptions, aG as RichTextFieldConfig, aH as RichTextFieldValue, aI as RichTextNode, aJ as RichTextValue, aK as SelectFieldAdminOptions, aL as SelectFieldConfig, aM as SelectFieldValue, aN as SelectOption, aO as SingleAccessControl, aP as SingleAdminOptions, aQ as SingleConfig, aR as SingleHooks, aS as SingleLabel, aT as StringFilterOperator, aU as TextFieldAdminOptions, aV as TextFieldConfig, aW as TextFieldValue, aX as TextareaFieldAdminOptions, aY as TextareaFieldConfig, aZ as TextareaFieldValue, a_ as UploadFieldAdminOptions, a$ as UploadFieldConfig, b0 as UploadFieldValue, b1 as UploadFilterOptions, b2 as UploadFilterOptionsArgs, b3 as UploadFilterOptionsFunction, b4 as UploadFilterQuery, b5 as UploadPolymorphicValue, b6 as UploadSingleValue, b7 as VIRTUAL_FIELD_TYPES, b8 as VirtualFieldConfig, b9 as VirtualFieldType, ba as defineCollection } from './_dts-chunks/collections-handler.d-nXHXeVJG.d.ts';
|
|
2
|
+
export { a as array, c as checkbox, b as chips, d as code, e as component, f as date, g as defineComponent, h as defineConfig, i as defineSingle, j as email, k as group, l as hasNestedFields, m as isCheckboxField, n as isChipsField, o as isCodeField, p as isComponentField, q as isDataField, r as isDateField, s as isEmailField, t as isGroupField, u as isJSONField, v as isNumberField, w as isPasswordField, x as isRadioField, y as isRelationalField, z as isRelationshipField, A as isRepeaterField, B as isRichTextField, C as isSelectField, D as isTextField, E as isTextareaField, F as isUploadField, G as json, H as number, I as option, J as password, K as radio, L as relationship, M as repeater, N as richText, O as select, P as text, Q as textarea, R as upload } from './_dts-chunks/define-component.d-DptZZAGj.d.ts';
|
|
3
3
|
export { C as CollectionStorageConfig, a as CollectionStorageMap, S as StoragePlugin, b as StoragePluginConfig } from './_dts-chunks/image-processor.d-OO1PmMrv.d.ts';
|
|
4
|
-
export { D as DatabaseConfig, N as NextlyConfig, R as RateLimitRecord, a as RateLimitStore, b as RateLimitingConfig, S as SanitizedNextlyConfig, c as SanitizedRateLimitingConfig, T as TypeScriptConfig, s as sanitizeConfig } from './_dts-chunks/config.d-
|
|
4
|
+
export { D as DatabaseConfig, N as NextlyConfig, R as RateLimitRecord, a as RateLimitStore, b as RateLimitingConfig, S as SanitizedNextlyConfig, c as SanitizedRateLimitingConfig, T as TypeScriptConfig, s as sanitizeConfig } from './_dts-chunks/config.d-CWOwFVLW.d.ts';
|
|
5
5
|
import '@nextlyhq/adapter-drizzle';
|
|
6
6
|
import '@nextlyhq/adapter-drizzle/types';
|
|
7
7
|
import 'drizzle-orm/pg-core';
|
package/dist/database/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { A as AdapterConfig, a as AdapterType, D as DbError, b as DbErrorKind, H as HealthCheckResult, i as checkAdapterHealth, j as createAdapter, k as createAdapterFromEnv, o as env, p as getDialectTables, q as healthCheck, r as isDbError, s as schema, t as toDbError, v as validateDatabaseEnv, w as withDbErrors } from '../_dts-chunks/index.d-
|
|
1
|
+
export { A as AdapterConfig, a as AdapterType, D as DbError, b as DbErrorKind, H as HealthCheckResult, i as checkAdapterHealth, j as createAdapter, k as createAdapterFromEnv, o as env, p as getDialectTables, q as healthCheck, r as isDbError, s as schema, t as toDbError, v as validateDatabaseEnv, w as withDbErrors } from '../_dts-chunks/index.d-DutLjyet.d.ts';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
3
|
import 'drizzle-orm/pg-core';
|
|
4
|
-
import '../_dts-chunks/collections-handler.d-
|
|
4
|
+
import '../_dts-chunks/collections-handler.d-nXHXeVJG.d.ts';
|
|
5
5
|
import '@nextlyhq/adapter-drizzle';
|
|
6
6
|
import '@nextlyhq/adapter-drizzle/types';
|
|
7
7
|
import 'react';
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seedAll
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-TJ5XDDI3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
seedPermissions
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-3YGV6SIX.mjs";
|
|
7
7
|
import {
|
|
8
8
|
seedSuperAdmin
|
|
9
|
-
} from "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
} from "../../chunk-TVYXUMZ3.mjs";
|
|
10
|
+
import "../../chunk-3PG4GF6L.mjs";
|
|
11
11
|
import "../../chunk-3FA7FKAV.mjs";
|
|
12
12
|
import "../../chunk-AGJ6F2T3.mjs";
|
|
13
13
|
import "../../chunk-KIMNCZGV.mjs";
|
|
14
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-IU7BK3OH.mjs";
|
|
15
15
|
import "../../chunk-INV7QKLG.mjs";
|
|
16
|
-
import "../../chunk-
|
|
17
|
-
import "../../chunk-
|
|
16
|
+
import "../../chunk-JWAH6ROD.mjs";
|
|
17
|
+
import "../../chunk-J4KHGYOM.mjs";
|
|
18
18
|
import "../../chunk-RJLLGGPG.mjs";
|
|
19
19
|
import "../../chunk-V4EQTOA4.mjs";
|
|
20
20
|
import "../../chunk-I4JMR3UR.mjs";
|
|
21
|
-
import "../../chunk-
|
|
22
|
-
import "../../chunk-
|
|
23
|
-
import "../../chunk-
|
|
21
|
+
import "../../chunk-LP2CDTCR.mjs";
|
|
22
|
+
import "../../chunk-UB4CALU5.mjs";
|
|
23
|
+
import "../../chunk-L5FA2FAY.mjs";
|
|
24
24
|
import "../../chunk-5HMZ644B.mjs";
|
|
25
25
|
import "../../chunk-W5KKPZT5.mjs";
|
|
26
26
|
import "../../chunk-56WO4WX7.mjs";
|