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
package/dist/api/uploads.mjs
CHANGED
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "../chunk-TO5AFLVQ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getCachedNextly
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-OBHXYVIM.mjs";
|
|
7
|
+
import "../chunk-SY36QW6I.mjs";
|
|
8
|
+
import "../chunk-SKPLPSPW.mjs";
|
|
9
|
+
import "../chunk-JOPBSHFS.mjs";
|
|
10
10
|
import "../chunk-X23WKS3Z.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getService,
|
|
13
13
|
isServicesRegistered
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-OUEDTT6F.mjs";
|
|
15
|
+
import "../chunk-KGOPBE5W.mjs";
|
|
16
16
|
import "../chunk-FQULBZ53.mjs";
|
|
17
17
|
import "../chunk-67GXH6PR.mjs";
|
|
18
18
|
import "../chunk-2TFX4ND3.mjs";
|
|
@@ -20,20 +20,20 @@ import "../chunk-W4MGXIRR.mjs";
|
|
|
20
20
|
import {
|
|
21
21
|
UploadService,
|
|
22
22
|
clampLimit2 as clampLimit
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-3PG4GF6L.mjs";
|
|
24
24
|
import "../chunk-3FA7FKAV.mjs";
|
|
25
25
|
import "../chunk-AGJ6F2T3.mjs";
|
|
26
26
|
import "../chunk-KIMNCZGV.mjs";
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-IU7BK3OH.mjs";
|
|
28
28
|
import "../chunk-INV7QKLG.mjs";
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-JWAH6ROD.mjs";
|
|
30
|
+
import "../chunk-J4KHGYOM.mjs";
|
|
31
31
|
import "../chunk-RJLLGGPG.mjs";
|
|
32
32
|
import "../chunk-V4EQTOA4.mjs";
|
|
33
33
|
import "../chunk-I4JMR3UR.mjs";
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-LP2CDTCR.mjs";
|
|
35
|
+
import "../chunk-UB4CALU5.mjs";
|
|
36
|
+
import "../chunk-L5FA2FAY.mjs";
|
|
37
37
|
import "../chunk-5HMZ644B.mjs";
|
|
38
38
|
import "../chunk-W5KKPZT5.mjs";
|
|
39
39
|
import "../chunk-56WO4WX7.mjs";
|
|
@@ -27,16 +27,16 @@ import {
|
|
|
27
27
|
getProductionNotifier,
|
|
28
28
|
noopMigrationJournal,
|
|
29
29
|
noopPreRenameExecutor
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-IU7BK3OH.mjs";
|
|
31
31
|
import {
|
|
32
32
|
previewDesiredSchema
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-JWAH6ROD.mjs";
|
|
34
34
|
import {
|
|
35
35
|
RealClassifier,
|
|
36
36
|
RegexRenameDetector,
|
|
37
37
|
countNulls,
|
|
38
38
|
countRows
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-J4KHGYOM.mjs";
|
|
40
40
|
import {
|
|
41
41
|
ComponentSchemaService
|
|
42
42
|
} from "./chunk-V4EQTOA4.mjs";
|
|
@@ -46,10 +46,10 @@ import {
|
|
|
46
46
|
import {
|
|
47
47
|
DynamicCollectionSchemaService,
|
|
48
48
|
DynamicCollectionValidationService
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-LP2CDTCR.mjs";
|
|
50
50
|
import {
|
|
51
51
|
generateRuntimeSchema
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-UB4CALU5.mjs";
|
|
53
53
|
import {
|
|
54
54
|
calculateSchemaHash
|
|
55
55
|
} from "./chunk-5HMZ644B.mjs";
|
|
@@ -288,7 +288,7 @@ var AuthService = class extends BaseService {
|
|
|
288
288
|
}
|
|
289
289
|
let newUser;
|
|
290
290
|
try {
|
|
291
|
-
const userService = new (await import("./users-
|
|
291
|
+
const userService = new (await import("./users-2PU5TXOG.mjs")).UsersService(this.adapter, this.logger);
|
|
292
292
|
newUser = await userService.createLocalUser({
|
|
293
293
|
email: userData.email,
|
|
294
294
|
name: userData.name ?? "User",
|
|
@@ -3524,7 +3524,8 @@ var DynamicCollectionService = class extends BaseService {
|
|
|
3524
3524
|
const schemaCode = this.schemaService.generateSchemaCode(
|
|
3525
3525
|
tableName,
|
|
3526
3526
|
normalizedName,
|
|
3527
|
-
userDefinedFields
|
|
3527
|
+
userDefinedFields,
|
|
3528
|
+
{ hasStatus: data.status === true }
|
|
3528
3529
|
);
|
|
3529
3530
|
const schemaHash = this.generateSchemaHash(userDefinedFields);
|
|
3530
3531
|
const metadata = {
|
|
@@ -3643,7 +3644,8 @@ var DynamicCollectionService = class extends BaseService {
|
|
|
3643
3644
|
schemaCode = this.schemaService.generateSchemaCode(
|
|
3644
3645
|
collection.tableName,
|
|
3645
3646
|
collectionName,
|
|
3646
|
-
userDefinedFields
|
|
3647
|
+
userDefinedFields,
|
|
3648
|
+
{ hasStatus }
|
|
3647
3649
|
);
|
|
3648
3650
|
schemaFileName = `${collectionName}.ts`;
|
|
3649
3651
|
metadataUpdates.fields = userDefinedFields;
|
|
@@ -7719,7 +7721,7 @@ var CollectionMetadataService = class extends BaseService {
|
|
|
7719
7721
|
*/
|
|
7720
7722
|
async registerRuntimeSchema(tableName, fields, options) {
|
|
7721
7723
|
try {
|
|
7722
|
-
const { generateRuntimeSchema: generateRuntimeSchema2 } = await import("./runtime-schema-generator-
|
|
7724
|
+
const { generateRuntimeSchema: generateRuntimeSchema2 } = await import("./runtime-schema-generator-MOPQWGJP.mjs");
|
|
7723
7725
|
const dialect = this.adapter.getCapabilities().dialect;
|
|
7724
7726
|
const { table } = generateRuntimeSchema2(tableName, fields, dialect, {
|
|
7725
7727
|
status: options?.hasStatus === true
|
|
@@ -19809,9 +19811,7 @@ function shouldLogF14HintReceipt(hints) {
|
|
|
19809
19811
|
function formatToastSummary(summary) {
|
|
19810
19812
|
const parts = [];
|
|
19811
19813
|
if (summary.added) {
|
|
19812
|
-
parts.push(
|
|
19813
|
-
`${summary.added} field${summary.added === 1 ? "" : "s"} added`
|
|
19814
|
-
);
|
|
19814
|
+
parts.push(`${summary.added} field${summary.added === 1 ? "" : "s"} added`);
|
|
19815
19815
|
}
|
|
19816
19816
|
if (summary.renamed) parts.push(`${summary.renamed} renamed`);
|
|
19817
19817
|
if (summary.changed) parts.push(`${summary.changed} changed`);
|
|
@@ -19888,7 +19888,9 @@ var COLLECTIONS_METHODS = {
|
|
|
19888
19888
|
// Bare doc body (no { data } wrapper).
|
|
19889
19889
|
execute: async (svc, p) => {
|
|
19890
19890
|
requireParam(p, "collectionName");
|
|
19891
|
-
const result = await svc.getCollection({
|
|
19891
|
+
const result = await svc.getCollection({
|
|
19892
|
+
collectionName: p.collectionName
|
|
19893
|
+
});
|
|
19892
19894
|
const collection = unwrapServiceResult(result, {
|
|
19893
19895
|
slug: p.collectionName
|
|
19894
19896
|
});
|
|
@@ -19957,7 +19959,10 @@ var COLLECTIONS_METHODS = {
|
|
|
19957
19959
|
desired.collections[p.collectionName] = {
|
|
19958
19960
|
slug: p.collectionName,
|
|
19959
19961
|
tableName,
|
|
19960
|
-
fields
|
|
19962
|
+
fields,
|
|
19963
|
+
// Carry the Draft/Published flag so previewDesiredSchema injects
|
|
19964
|
+
// the `status` column into the desired snapshot.
|
|
19965
|
+
status: collection.status === true
|
|
19961
19966
|
};
|
|
19962
19967
|
const pipelinePreview = await previewDesiredSchema({
|
|
19963
19968
|
desired,
|
|
@@ -20039,7 +20044,10 @@ var COLLECTIONS_METHODS = {
|
|
|
20039
20044
|
desired.collections[p.collectionName] = {
|
|
20040
20045
|
slug: p.collectionName,
|
|
20041
20046
|
tableName,
|
|
20042
|
-
fields
|
|
20047
|
+
fields,
|
|
20048
|
+
// Mirror previewSchemaChanges so apply diffs against the same
|
|
20049
|
+
// desired schema preview classified.
|
|
20050
|
+
status: collection.status === true
|
|
20043
20051
|
};
|
|
20044
20052
|
const adapter = getAdapterFromDI();
|
|
20045
20053
|
if (!adapter) {
|
|
@@ -20146,7 +20154,7 @@ var COLLECTIONS_METHODS = {
|
|
|
20146
20154
|
);
|
|
20147
20155
|
}
|
|
20148
20156
|
try {
|
|
20149
|
-
const { bumpSchemaVersion } = await import("./routeHandler-
|
|
20157
|
+
const { bumpSchemaVersion } = await import("./routeHandler-DH34YZMY.mjs");
|
|
20150
20158
|
bumpSchemaVersion();
|
|
20151
20159
|
} catch {
|
|
20152
20160
|
}
|
|
@@ -20169,7 +20177,7 @@ var COLLECTIONS_METHODS = {
|
|
|
20169
20177
|
sort = sortOrder === "desc" ? `-${p.sortBy}` : String(p.sortBy);
|
|
20170
20178
|
}
|
|
20171
20179
|
const rawLimit = p.limit;
|
|
20172
|
-
const status = p.status === "all" || p.status === "draft" || p.status === "published" ? p.status :
|
|
20180
|
+
const status = p.status === "all" || p.status === "draft" || p.status === "published" ? p.status : "all";
|
|
20173
20181
|
const result = await svc.listEntries({
|
|
20174
20182
|
collectionName: p.collectionName,
|
|
20175
20183
|
page: p.page !== void 0 ? parseInt(String(p.page), 10) : void 0,
|
|
@@ -20193,7 +20201,7 @@ var COLLECTIONS_METHODS = {
|
|
|
20193
20201
|
// `{ totalDocs }` internally; we translate at the boundary.
|
|
20194
20202
|
execute: async (svc, p) => {
|
|
20195
20203
|
requireParam(p, "collectionName");
|
|
20196
|
-
const status = p.status === "all" || p.status === "draft" || p.status === "published" ? p.status :
|
|
20204
|
+
const status = p.status === "all" || p.status === "draft" || p.status === "published" ? p.status : "all";
|
|
20197
20205
|
const result = await svc.countEntries({
|
|
20198
20206
|
collectionName: p.collectionName,
|
|
20199
20207
|
search: p.search,
|
|
@@ -20233,7 +20241,7 @@ var COLLECTIONS_METHODS = {
|
|
|
20233
20241
|
if (!p.collectionName || !p.entryId) {
|
|
20234
20242
|
throw new Error("collectionName and entryId parameters are required");
|
|
20235
20243
|
}
|
|
20236
|
-
const status = p.status === "all" || p.status === "draft" || p.status === "published" ? p.status :
|
|
20244
|
+
const status = p.status === "all" || p.status === "draft" || p.status === "published" ? p.status : "all";
|
|
20237
20245
|
const result = await svc.getEntry({
|
|
20238
20246
|
collectionName: p.collectionName,
|
|
20239
20247
|
entryId: p.entryId,
|
|
@@ -21208,7 +21216,7 @@ var SINGLES_METHODS = {
|
|
|
21208
21216
|
if (tableExists) {
|
|
21209
21217
|
migrationStatus = "applied";
|
|
21210
21218
|
try {
|
|
21211
|
-
const { generateRuntimeSchema: generateRuntimeSchema2 } = await import("./runtime-schema-generator-
|
|
21219
|
+
const { generateRuntimeSchema: generateRuntimeSchema2 } = await import("./runtime-schema-generator-MOPQWGJP.mjs");
|
|
21212
21220
|
const dialect = adapter.getCapabilities().dialect;
|
|
21213
21221
|
const { table: runtimeTable } = generateRuntimeSchema2(
|
|
21214
21222
|
tableName,
|
|
@@ -21281,7 +21289,7 @@ var SINGLES_METHODS = {
|
|
|
21281
21289
|
execute: async (svc, p) => {
|
|
21282
21290
|
const slug = requireParam(p, "slug", "Single slug");
|
|
21283
21291
|
const richTextFormat = parseRichTextFormat(p.richTextFormat);
|
|
21284
|
-
const status = p.status === "all" || p.status === "draft" || p.status === "published" ? p.status :
|
|
21292
|
+
const status = p.status === "all" || p.status === "draft" || p.status === "published" ? p.status : "all";
|
|
21285
21293
|
const result = await svc.entry.get(slug, {
|
|
21286
21294
|
depth: toNumber(p.depth),
|
|
21287
21295
|
locale: p.locale,
|
|
@@ -21486,7 +21494,7 @@ var SINGLES_METHODS = {
|
|
|
21486
21494
|
if (tableExistsAfter) {
|
|
21487
21495
|
migrationStatus = "applied";
|
|
21488
21496
|
try {
|
|
21489
|
-
const { generateRuntimeSchema: generateRuntimeSchema2 } = await import("./runtime-schema-generator-
|
|
21497
|
+
const { generateRuntimeSchema: generateRuntimeSchema2 } = await import("./runtime-schema-generator-MOPQWGJP.mjs");
|
|
21490
21498
|
const dialect = adapter.getCapabilities().dialect;
|
|
21491
21499
|
const { table: runtimeTable } = generateRuntimeSchema2(
|
|
21492
21500
|
tableName,
|
|
@@ -21548,16 +21556,26 @@ var SINGLES_METHODS = {
|
|
|
21548
21556
|
desired.singles[slug] = {
|
|
21549
21557
|
slug,
|
|
21550
21558
|
tableName,
|
|
21551
|
-
fields
|
|
21559
|
+
fields,
|
|
21560
|
+
// Carry the Draft/Published flag so previewDesiredSchema injects
|
|
21561
|
+
// the `status` column into the desired snapshot.
|
|
21562
|
+
status: single.status === true
|
|
21552
21563
|
};
|
|
21553
|
-
const pipelinePreview = await previewDesiredSchema({
|
|
21554
|
-
|
|
21555
|
-
tableName,
|
|
21556
|
-
currentFields,
|
|
21557
|
-
newFields: fields,
|
|
21564
|
+
const pipelinePreview = await previewDesiredSchema({
|
|
21565
|
+
desired,
|
|
21558
21566
|
db,
|
|
21559
21567
|
dialect
|
|
21560
21568
|
});
|
|
21569
|
+
const legacyShape = await translatePipelinePreviewToLegacy(
|
|
21570
|
+
pipelinePreview,
|
|
21571
|
+
{
|
|
21572
|
+
tableName,
|
|
21573
|
+
currentFields,
|
|
21574
|
+
newFields: fields,
|
|
21575
|
+
db,
|
|
21576
|
+
dialect
|
|
21577
|
+
}
|
|
21578
|
+
);
|
|
21561
21579
|
const renamed = pipelinePreview.candidates.map((c) => ({
|
|
21562
21580
|
table: c.tableName,
|
|
21563
21581
|
from: c.fromColumn,
|
|
@@ -21607,7 +21625,10 @@ var SINGLES_METHODS = {
|
|
|
21607
21625
|
desired.singles[slug] = {
|
|
21608
21626
|
slug,
|
|
21609
21627
|
tableName,
|
|
21610
|
-
fields
|
|
21628
|
+
fields,
|
|
21629
|
+
// Mirror previewSingleSchemaChanges so apply diffs against the
|
|
21630
|
+
// same desired schema.
|
|
21631
|
+
status: single.status === true
|
|
21611
21632
|
};
|
|
21612
21633
|
const promptDispatcher = new BrowserPromptDispatcher(
|
|
21613
21634
|
renameResolutions ?? [],
|
|
@@ -21635,7 +21656,9 @@ var SINGLES_METHODS = {
|
|
|
21635
21656
|
uiTargetSlug: slug
|
|
21636
21657
|
});
|
|
21637
21658
|
if (!result.success) {
|
|
21638
|
-
throw new Error(
|
|
21659
|
+
throw new Error(
|
|
21660
|
+
result.error?.message ?? "Failed to apply schema changes"
|
|
21661
|
+
);
|
|
21639
21662
|
}
|
|
21640
21663
|
try {
|
|
21641
21664
|
await adapter.update(
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-A3WPLSDT.mjs";
|
|
4
4
|
import {
|
|
5
5
|
POST
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-N7PVYYDZ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
readJsonBody
|
|
9
9
|
} from "./chunk-VQJQHVEV.mjs";
|
|
10
10
|
import {
|
|
11
11
|
POST as POST2
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FKWMNTP6.mjs";
|
|
13
13
|
import {
|
|
14
14
|
createJsonErrorResponse,
|
|
15
15
|
isErrorResponse,
|
|
@@ -45,12 +45,12 @@ import {
|
|
|
45
45
|
import {
|
|
46
46
|
ensureHmrListener,
|
|
47
47
|
getCachedNextly
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-OBHXYVIM.mjs";
|
|
49
49
|
import {
|
|
50
50
|
getService,
|
|
51
51
|
isServicesRegistered,
|
|
52
52
|
registerServices
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-OUEDTT6F.mjs";
|
|
54
54
|
import {
|
|
55
55
|
readOrGenerateRequestId
|
|
56
56
|
} from "./chunk-67GXH6PR.mjs";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
ImageSizeService,
|
|
62
62
|
ServiceDispatcher,
|
|
63
63
|
parseWhereQuery
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-3PG4GF6L.mjs";
|
|
65
65
|
import {
|
|
66
66
|
containsSuperAdminRole,
|
|
67
67
|
hasSuperAdminExcluding,
|
|
@@ -2154,8 +2154,8 @@ function buildAuthRouterDeps(getService2) {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
},
|
|
2156
2156
|
createSuperAdmin: async (data) => {
|
|
2157
|
-
const { seedPermissions } = await import("./permissions-
|
|
2158
|
-
const { seedSuperAdmin } = await import("./super-admin-
|
|
2157
|
+
const { seedPermissions } = await import("./permissions-IFAVOLEW.mjs");
|
|
2158
|
+
const { seedSuperAdmin } = await import("./super-admin-J34XLBI5.mjs");
|
|
2159
2159
|
const adapter = getService2("adapter");
|
|
2160
2160
|
await seedPermissions(adapter, { silent: true });
|
|
2161
2161
|
const result = await seedSuperAdmin(adapter, {
|
|
@@ -2180,7 +2180,7 @@ function buildAuthRouterDeps(getService2) {
|
|
|
2180
2180
|
};
|
|
2181
2181
|
},
|
|
2182
2182
|
seedPermissions: async () => {
|
|
2183
|
-
const { seedPermissions } = await import("./permissions-
|
|
2183
|
+
const { seedPermissions } = await import("./permissions-IFAVOLEW.mjs");
|
|
2184
2184
|
const adapter = getService2("adapter");
|
|
2185
2185
|
await seedPermissions(adapter, { silent: true });
|
|
2186
2186
|
},
|
|
@@ -2392,7 +2392,7 @@ async function ensureServicesInitialized() {
|
|
|
2392
2392
|
} else {
|
|
2393
2393
|
console.log("[Auth Handler] Services auto-initialized with defaults");
|
|
2394
2394
|
}
|
|
2395
|
-
const { runBootTimeApplyIfDev } = await import("./boot-apply-
|
|
2395
|
+
const { runBootTimeApplyIfDev } = await import("./boot-apply-AGRBPOCX.mjs");
|
|
2396
2396
|
await runBootTimeApplyIfDev({ caller: "auth-handler" });
|
|
2397
2397
|
ensureHmrListener();
|
|
2398
2398
|
}
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
countRows,
|
|
6
6
|
diffSnapshots,
|
|
7
7
|
introspectLiveSnapshot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-J4KHGYOM.mjs";
|
|
9
9
|
import {
|
|
10
10
|
ComponentSchemaService
|
|
11
11
|
} from "./chunk-V4EQTOA4.mjs";
|
|
12
12
|
import {
|
|
13
13
|
generateRuntimeSchema
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UB4CALU5.mjs";
|
|
15
15
|
import {
|
|
16
16
|
getDialectTables
|
|
17
17
|
} from "./chunk-TS7GHTG2.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getColumnDescriptor,
|
|
3
3
|
getSystemColumnDescriptors
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-L5FA2FAY.mjs";
|
|
5
5
|
|
|
6
6
|
// src/domains/schema/pipeline/classifier/count-helpers.ts
|
|
7
7
|
import { sql } from "drizzle-orm";
|
|
@@ -236,7 +236,9 @@ function buildDesiredTableFromFields(tableName, fields, dialect, options = {}) {
|
|
|
236
236
|
name: reserved.name,
|
|
237
237
|
type: reserved.dialectType,
|
|
238
238
|
nullable: reserved.nullable,
|
|
239
|
-
default
|
|
239
|
+
// Forward descriptor default so the classifier doesn't flag status as
|
|
240
|
+
// `add_required_field_no_default` and require TTY confirmation.
|
|
241
|
+
default: reserved.default
|
|
240
242
|
});
|
|
241
243
|
}
|
|
242
244
|
for (const field of fields) {
|
|
@@ -261,26 +263,116 @@ function buildDesiredTableFromFields(tableName, fields, dialect, options = {}) {
|
|
|
261
263
|
function buildDesiredTableFromComponentFields(tableName, fields, dialect) {
|
|
262
264
|
const columns = [];
|
|
263
265
|
if (dialect === "postgresql") {
|
|
264
|
-
columns.push({
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
266
|
+
columns.push({
|
|
267
|
+
name: "id",
|
|
268
|
+
type: "text",
|
|
269
|
+
nullable: false,
|
|
270
|
+
default: void 0
|
|
271
|
+
});
|
|
272
|
+
columns.push({
|
|
273
|
+
name: "_parent_id",
|
|
274
|
+
type: "text",
|
|
275
|
+
nullable: false,
|
|
276
|
+
default: void 0
|
|
277
|
+
});
|
|
278
|
+
columns.push({
|
|
279
|
+
name: "_parent_table",
|
|
280
|
+
type: "varchar",
|
|
281
|
+
nullable: false,
|
|
282
|
+
default: void 0
|
|
283
|
+
});
|
|
284
|
+
columns.push({
|
|
285
|
+
name: "_parent_field",
|
|
286
|
+
type: "varchar",
|
|
287
|
+
nullable: false,
|
|
288
|
+
default: void 0
|
|
289
|
+
});
|
|
290
|
+
columns.push({
|
|
291
|
+
name: "_order",
|
|
292
|
+
type: "int4",
|
|
293
|
+
nullable: true,
|
|
294
|
+
default: void 0
|
|
295
|
+
});
|
|
296
|
+
columns.push({
|
|
297
|
+
name: "_component_type",
|
|
298
|
+
type: "varchar",
|
|
299
|
+
nullable: true,
|
|
300
|
+
default: void 0
|
|
301
|
+
});
|
|
270
302
|
} else if (dialect === "mysql") {
|
|
271
|
-
columns.push({
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
303
|
+
columns.push({
|
|
304
|
+
name: "id",
|
|
305
|
+
type: "varchar(36)",
|
|
306
|
+
nullable: false,
|
|
307
|
+
default: void 0
|
|
308
|
+
});
|
|
309
|
+
columns.push({
|
|
310
|
+
name: "_parent_id",
|
|
311
|
+
type: "varchar(36)",
|
|
312
|
+
nullable: false,
|
|
313
|
+
default: void 0
|
|
314
|
+
});
|
|
315
|
+
columns.push({
|
|
316
|
+
name: "_parent_table",
|
|
317
|
+
type: "varchar(255)",
|
|
318
|
+
nullable: false,
|
|
319
|
+
default: void 0
|
|
320
|
+
});
|
|
321
|
+
columns.push({
|
|
322
|
+
name: "_parent_field",
|
|
323
|
+
type: "varchar(255)",
|
|
324
|
+
nullable: false,
|
|
325
|
+
default: void 0
|
|
326
|
+
});
|
|
327
|
+
columns.push({
|
|
328
|
+
name: "_order",
|
|
329
|
+
type: "int(11)",
|
|
330
|
+
nullable: true,
|
|
331
|
+
default: void 0
|
|
332
|
+
});
|
|
333
|
+
columns.push({
|
|
334
|
+
name: "_component_type",
|
|
335
|
+
type: "varchar(255)",
|
|
336
|
+
nullable: true,
|
|
337
|
+
default: void 0
|
|
338
|
+
});
|
|
277
339
|
} else {
|
|
278
|
-
columns.push({
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
340
|
+
columns.push({
|
|
341
|
+
name: "id",
|
|
342
|
+
type: "text",
|
|
343
|
+
nullable: false,
|
|
344
|
+
default: void 0
|
|
345
|
+
});
|
|
346
|
+
columns.push({
|
|
347
|
+
name: "_parent_id",
|
|
348
|
+
type: "text",
|
|
349
|
+
nullable: false,
|
|
350
|
+
default: void 0
|
|
351
|
+
});
|
|
352
|
+
columns.push({
|
|
353
|
+
name: "_parent_table",
|
|
354
|
+
type: "text",
|
|
355
|
+
nullable: false,
|
|
356
|
+
default: void 0
|
|
357
|
+
});
|
|
358
|
+
columns.push({
|
|
359
|
+
name: "_parent_field",
|
|
360
|
+
type: "text",
|
|
361
|
+
nullable: false,
|
|
362
|
+
default: void 0
|
|
363
|
+
});
|
|
364
|
+
columns.push({
|
|
365
|
+
name: "_order",
|
|
366
|
+
type: "integer",
|
|
367
|
+
nullable: true,
|
|
368
|
+
default: void 0
|
|
369
|
+
});
|
|
370
|
+
columns.push({
|
|
371
|
+
name: "_component_type",
|
|
372
|
+
type: "text",
|
|
373
|
+
nullable: true,
|
|
374
|
+
default: void 0
|
|
375
|
+
});
|
|
284
376
|
}
|
|
285
377
|
for (const field of fields) {
|
|
286
378
|
const desc = getColumnDescriptor(
|
|
@@ -296,14 +388,44 @@ function buildDesiredTableFromComponentFields(tableName, fields, dialect) {
|
|
|
296
388
|
});
|
|
297
389
|
}
|
|
298
390
|
if (dialect === "postgresql") {
|
|
299
|
-
columns.push({
|
|
300
|
-
|
|
391
|
+
columns.push({
|
|
392
|
+
name: "created_at",
|
|
393
|
+
type: "timestamp",
|
|
394
|
+
nullable: false,
|
|
395
|
+
default: void 0
|
|
396
|
+
});
|
|
397
|
+
columns.push({
|
|
398
|
+
name: "updated_at",
|
|
399
|
+
type: "timestamp",
|
|
400
|
+
nullable: false,
|
|
401
|
+
default: void 0
|
|
402
|
+
});
|
|
301
403
|
} else if (dialect === "mysql") {
|
|
302
|
-
columns.push({
|
|
303
|
-
|
|
404
|
+
columns.push({
|
|
405
|
+
name: "created_at",
|
|
406
|
+
type: "datetime",
|
|
407
|
+
nullable: false,
|
|
408
|
+
default: void 0
|
|
409
|
+
});
|
|
410
|
+
columns.push({
|
|
411
|
+
name: "updated_at",
|
|
412
|
+
type: "datetime",
|
|
413
|
+
nullable: false,
|
|
414
|
+
default: void 0
|
|
415
|
+
});
|
|
304
416
|
} else {
|
|
305
|
-
columns.push({
|
|
306
|
-
|
|
417
|
+
columns.push({
|
|
418
|
+
name: "created_at",
|
|
419
|
+
type: "integer",
|
|
420
|
+
nullable: false,
|
|
421
|
+
default: void 0
|
|
422
|
+
});
|
|
423
|
+
columns.push({
|
|
424
|
+
name: "updated_at",
|
|
425
|
+
type: "integer",
|
|
426
|
+
nullable: false,
|
|
427
|
+
default: void 0
|
|
428
|
+
});
|
|
307
429
|
}
|
|
308
430
|
return { name: tableName, columns };
|
|
309
431
|
}
|
|
@@ -5,7 +5,7 @@ async function runBootTimeApplyIfDev(opts) {
|
|
|
5
5
|
if (process.env.NEXTLY_DISABLE_BOOT_APPLY === "1") return;
|
|
6
6
|
const label = callerLabel(opts?.caller);
|
|
7
7
|
try {
|
|
8
|
-
const { reloadNextlyConfig } = await import("./reload-config-
|
|
8
|
+
const { reloadNextlyConfig } = await import("./reload-config-YEZU77NI.mjs");
|
|
9
9
|
await reloadNextlyConfig();
|
|
10
10
|
} catch (err) {
|
|
11
11
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
countRows,
|
|
8
8
|
diffSnapshots,
|
|
9
9
|
introspectLiveSnapshot
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-J4KHGYOM.mjs";
|
|
11
11
|
|
|
12
12
|
// src/domains/schema/pipeline/preview.ts
|
|
13
13
|
async function previewDesiredSchema(args, deps = {}) {
|
|
@@ -25,14 +25,16 @@ async function previewDesiredSchema(args, deps = {}) {
|
|
|
25
25
|
(c) => buildDesiredTableFromFields(
|
|
26
26
|
c.tableName,
|
|
27
27
|
c.fields,
|
|
28
|
-
dialect
|
|
28
|
+
dialect,
|
|
29
|
+
{ hasStatus: c.status === true }
|
|
29
30
|
)
|
|
30
31
|
);
|
|
31
32
|
const singleTables = Object.values(desired.singles).map(
|
|
32
33
|
(s) => buildDesiredTableFromFields(
|
|
33
34
|
s.tableName,
|
|
34
35
|
s.fields,
|
|
35
|
-
dialect
|
|
36
|
+
dialect,
|
|
37
|
+
{ hasStatus: s.status === true }
|
|
36
38
|
)
|
|
37
39
|
);
|
|
38
40
|
const componentTables = Object.values(desired.components).map(
|