@nitrogenbuilder/connector-payload 0.1.39 → 0.1.41
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/components/LockedJsonField.js +1 -1
- package/dist/components/NitrogenComponentInventoryClient.d.ts +3 -2
- package/dist/components/NitrogenComponentInventoryClient.js +370 -63
- package/dist/components/NitrogenComponentInventoryField.js +15 -5
- package/dist/components/NitrogenComponentInventoryView.js +15 -5
- package/dist/components/NitrogenDataViewer.js +1 -1
- package/dist/components/NitrogenEditButton.js +2 -2
- package/dist/components/NitrogenEditButtonRuntime.js +21 -5
- package/dist/components/NitrogenViewButton.js +2 -2
- package/dist/components/NitrogenViewButtonRuntime.js +7 -3
- package/dist/editor/NitrogenEditorPage.js +12 -29
- package/dist/editor/index.d.ts +3 -3
- package/dist/editor/index.js +3 -3
- package/dist/endpoints/all.js +2 -2
- package/dist/endpoints/batch.js +2 -2
- package/dist/endpoints/collection-endpoints.js +1 -1
- package/dist/endpoints/component-inventory.d.ts +1 -1
- package/dist/endpoints/component-inventory.js +275 -2
- package/dist/endpoints/helpers.d.ts +5 -5
- package/dist/endpoints/helpers.js +1 -1
- package/dist/endpoints/media.js +1 -1
- package/dist/endpoints/nitrogen-settings.js +1 -1
- package/dist/endpoints/templates.js +2 -2
- package/dist/frontend/NitrogenWrapper.js +2 -2
- package/dist/frontend/index.d.ts +5 -5
- package/dist/frontend/index.js +3 -3
- package/dist/globals/NitrogenSettings.js +46 -11
- package/dist/index.d.ts +7 -7
- package/dist/index.js +22 -22
- package/dist/inventory/indexing.d.ts +2 -2
- package/dist/inventory/indexing.js +1 -1
- package/dist/types.d.ts +6 -1
- package/package.json +1 -1
|
@@ -28,19 +28,54 @@ export const NitrogenSettings = {
|
|
|
28
28
|
admin: { description: 'Connector token for server communication' },
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
type: 'row',
|
|
32
|
+
fields: [
|
|
33
|
+
{
|
|
34
|
+
name: 'nitrogenEditorUrl',
|
|
35
|
+
label: 'Nitrogen Editor Url',
|
|
36
|
+
type: 'text',
|
|
37
|
+
defaultValue: 'https://stbackend.siteservice.net',
|
|
38
|
+
admin: {
|
|
39
|
+
description: 'Production Nitrogen editor URL',
|
|
40
|
+
width: '50%',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'nitrogenEditorDevUrl',
|
|
45
|
+
label: 'Nitrogen Editor Dev Url',
|
|
46
|
+
type: 'text',
|
|
47
|
+
defaultValue: 'http://localhost:5173',
|
|
48
|
+
admin: {
|
|
49
|
+
description: 'Local Nitrogen editor development URL',
|
|
50
|
+
width: '50%',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
39
54
|
},
|
|
40
55
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
56
|
+
type: 'row',
|
|
57
|
+
fields: [
|
|
58
|
+
{
|
|
59
|
+
name: 'frontendUrl',
|
|
60
|
+
label: 'Frontend Url',
|
|
61
|
+
type: 'text',
|
|
62
|
+
defaultValue: 'https://stfrontend.siteservice.net',
|
|
63
|
+
admin: {
|
|
64
|
+
description: 'Production frontend URL',
|
|
65
|
+
width: '50%',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'frontendDevUrl',
|
|
70
|
+
label: 'Frontend Dev Url',
|
|
71
|
+
type: 'text',
|
|
72
|
+
defaultValue: 'http://localhost:4321',
|
|
73
|
+
admin: {
|
|
74
|
+
description: 'Local frontend development URL',
|
|
75
|
+
width: '50%',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
44
79
|
},
|
|
45
80
|
{
|
|
46
81
|
name: 'nitrogenConfig',
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NitrogenComponentManifestInput } from './inventory/manifest';
|
|
1
|
+
import type { NitrogenComponentManifestInput } from './inventory/manifest.js';
|
|
2
2
|
export interface NitrogenConnectorPluginOptions {
|
|
3
3
|
/** Disable the plugin without removing it from config */
|
|
4
4
|
disabled?: boolean;
|
|
@@ -30,11 +30,11 @@ export interface NitrogenConnectorPluginOptions {
|
|
|
30
30
|
indexCollections?: string[];
|
|
31
31
|
}
|
|
32
32
|
export declare const nitrogenConnectorPlugin: (options?: NitrogenConnectorPluginOptions) => any;
|
|
33
|
-
export { NitrogenTemplates } from "./collections/NitrogenTemplates";
|
|
34
|
-
export { NitrogenSettings } from "./globals/NitrogenSettings";
|
|
35
|
-
export { NitrogenEditButton } from "./components/NitrogenEditButton";
|
|
36
|
-
export { NitrogenViewButton } from "./components/NitrogenViewButton";
|
|
37
|
-
export { buildDynamicData, getNitrogenSettings } from "./endpoints/helpers";
|
|
38
|
-
export { createCollectionEndpoints } from "./endpoints/collection-endpoints";
|
|
33
|
+
export { NitrogenTemplates } from "./collections/NitrogenTemplates.js";
|
|
34
|
+
export { NitrogenSettings } from "./globals/NitrogenSettings.js";
|
|
35
|
+
export { NitrogenEditButton } from "./components/NitrogenEditButton.js";
|
|
36
|
+
export { NitrogenViewButton } from "./components/NitrogenViewButton.js";
|
|
37
|
+
export { buildDynamicData, getNitrogenSettings } from "./endpoints/helpers.js";
|
|
38
|
+
export { createCollectionEndpoints } from "./endpoints/collection-endpoints.js";
|
|
39
39
|
export { nitrogen } from "@nitrogenbuilder/client-core";
|
|
40
40
|
export type { ComponentSettings, ComponentSettingsToProps, } from "@nitrogenbuilder/types";
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { NitrogenTemplates } from "./collections/NitrogenTemplates";
|
|
2
|
-
import { NitrogenComponentCatalog } from './collections/NitrogenComponentCatalog';
|
|
3
|
-
import { NitrogenComponentUsage } from './collections/NitrogenComponentUsage';
|
|
4
|
-
import { NitrogenSettings } from "./globals/NitrogenSettings";
|
|
5
|
-
import { NitrogenComponents } from './globals/NitrogenComponents';
|
|
6
|
-
import { templatesEndpoints } from "./endpoints/templates";
|
|
7
|
-
import { mediaEndpoints } from "./endpoints/media";
|
|
8
|
-
import { nitrogenSettingsEndpoints } from "./endpoints/nitrogen-settings";
|
|
9
|
-
import { allEndpoints } from "./endpoints/all";
|
|
10
|
-
import { collectionsEndpoints } from "./endpoints/collections";
|
|
11
|
-
import { menuEndpoints } from "./endpoints/menu";
|
|
12
|
-
import { createCollectionEndpoints } from "./endpoints/collection-endpoints";
|
|
13
|
-
import { createComponentInventoryEndpoints } from './endpoints/component-inventory';
|
|
14
|
-
import { batchEndpoints } from "./endpoints/batch";
|
|
15
|
-
import { registerCollection } from "./collection-registry";
|
|
16
|
-
import { deleteDocumentUsage, reindexDocumentUsage, syncComponentCatalog, } from './inventory/indexing';
|
|
1
|
+
import { NitrogenTemplates } from "./collections/NitrogenTemplates.js";
|
|
2
|
+
import { NitrogenComponentCatalog } from './collections/NitrogenComponentCatalog.js';
|
|
3
|
+
import { NitrogenComponentUsage } from './collections/NitrogenComponentUsage.js';
|
|
4
|
+
import { NitrogenSettings } from "./globals/NitrogenSettings.js";
|
|
5
|
+
import { NitrogenComponents } from './globals/NitrogenComponents.js';
|
|
6
|
+
import { templatesEndpoints } from "./endpoints/templates.js";
|
|
7
|
+
import { mediaEndpoints } from "./endpoints/media.js";
|
|
8
|
+
import { nitrogenSettingsEndpoints } from "./endpoints/nitrogen-settings.js";
|
|
9
|
+
import { allEndpoints } from "./endpoints/all.js";
|
|
10
|
+
import { collectionsEndpoints } from "./endpoints/collections.js";
|
|
11
|
+
import { menuEndpoints } from "./endpoints/menu.js";
|
|
12
|
+
import { createCollectionEndpoints } from "./endpoints/collection-endpoints.js";
|
|
13
|
+
import { createComponentInventoryEndpoints } from './endpoints/component-inventory.js';
|
|
14
|
+
import { batchEndpoints } from "./endpoints/batch.js";
|
|
15
|
+
import { registerCollection } from "./collection-registry.js";
|
|
16
|
+
import { deleteDocumentUsage, reindexDocumentUsage, syncComponentCatalog, } from './inventory/indexing.js';
|
|
17
17
|
/** Fields required by Nitrogen that will be injected into collections if missing */
|
|
18
18
|
const nitrogenRequiredFields = [
|
|
19
19
|
{
|
|
@@ -227,14 +227,14 @@ export const nitrogenConnectorPlugin = (options = {}) => (incomingConfig) => {
|
|
|
227
227
|
return config;
|
|
228
228
|
};
|
|
229
229
|
// Re-export for consumers who need direct access
|
|
230
|
-
export { NitrogenTemplates } from "./collections/NitrogenTemplates";
|
|
231
|
-
export { NitrogenSettings } from "./globals/NitrogenSettings";
|
|
230
|
+
export { NitrogenTemplates } from "./collections/NitrogenTemplates.js";
|
|
231
|
+
export { NitrogenSettings } from "./globals/NitrogenSettings.js";
|
|
232
232
|
// Editor exports
|
|
233
|
-
export { NitrogenEditButton } from "./components/NitrogenEditButton";
|
|
234
|
-
export { NitrogenViewButton } from "./components/NitrogenViewButton";
|
|
233
|
+
export { NitrogenEditButton } from "./components/NitrogenEditButton.js";
|
|
234
|
+
export { NitrogenViewButton } from "./components/NitrogenViewButton.js";
|
|
235
235
|
// Helper exports for consumers building custom frontend routes
|
|
236
|
-
export { buildDynamicData, getNitrogenSettings } from "./endpoints/helpers";
|
|
236
|
+
export { buildDynamicData, getNitrogenSettings } from "./endpoints/helpers.js";
|
|
237
237
|
// Collection endpoint factory for consumers who need custom endpoint generation
|
|
238
|
-
export { createCollectionEndpoints } from "./endpoints/collection-endpoints";
|
|
238
|
+
export { createCollectionEndpoints } from "./endpoints/collection-endpoints.js";
|
|
239
239
|
// Re-export @nitrogenbuilder packages for convenience
|
|
240
240
|
export { nitrogen } from "@nitrogenbuilder/client-core";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentManifestEntry } from '@nitrogenbuilder/types';
|
|
2
2
|
import type { Payload, Where } from 'payload';
|
|
3
|
-
import type { NitrogenInventorySourceDoc } from '../types';
|
|
4
|
-
import { type NitrogenComponentManifestInput } from './manifest';
|
|
3
|
+
import type { NitrogenInventorySourceDoc } from '../types.js';
|
|
4
|
+
import { type NitrogenComponentManifestInput } from './manifest.js';
|
|
5
5
|
export declare const NITROGEN_COMPONENT_CATALOG_COLLECTION = "nitrogen-component-catalog";
|
|
6
6
|
export declare const NITROGEN_COMPONENT_USAGE_COLLECTION = "nitrogen-component-usage";
|
|
7
7
|
type ComponentUsageRecord = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponentManifest, } from './manifest';
|
|
1
|
+
import { resolveComponentManifest, } from './manifest.js';
|
|
2
2
|
export const NITROGEN_COMPONENT_CATALOG_COLLECTION = 'nitrogen-component-catalog';
|
|
3
3
|
export const NITROGEN_COMPONENT_USAGE_COLLECTION = 'nitrogen-component-usage';
|
|
4
4
|
function moduleNameFromNode(node) {
|
package/dist/types.d.ts
CHANGED
|
@@ -33,8 +33,13 @@ export interface NitrogenTemplateDoc extends NitrogenDocBase {
|
|
|
33
33
|
export interface NitrogenSettingsGlobal {
|
|
34
34
|
licenseKey?: string;
|
|
35
35
|
connectorToken?: string;
|
|
36
|
-
|
|
36
|
+
nitrogenEditorUrl?: string;
|
|
37
|
+
nitrogenEditorDevUrl?: string;
|
|
37
38
|
frontendUrl?: string;
|
|
39
|
+
frontendDevUrl?: string;
|
|
40
|
+
/** @deprecated Use nitrogenEditorDevUrl. */
|
|
41
|
+
instanceUrl?: string;
|
|
42
|
+
/** @deprecated Use frontendDevUrl. */
|
|
38
43
|
developmentUrl?: string;
|
|
39
44
|
editorCdnVersion?: string;
|
|
40
45
|
nitrogenConfig?: NitrogenConfig;
|
package/package.json
CHANGED