@memberjunction/metadata-sync 3.3.0 → 4.0.0
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/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +17 -27
- package/dist/config.js.map +1 -1
- package/dist/constants/metadata-keywords.d.ts +1 -0
- package/dist/constants/metadata-keywords.d.ts.map +1 -0
- package/dist/constants/metadata-keywords.js +31 -42
- package/dist/constants/metadata-keywords.js.map +1 -1
- package/dist/index.d.ts +39 -37
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -62
- package/dist/index.js.map +1 -1
- package/dist/lib/EntityPropertyExtractor.d.ts +1 -0
- package/dist/lib/EntityPropertyExtractor.d.ts.map +1 -0
- package/dist/lib/EntityPropertyExtractor.js +1 -5
- package/dist/lib/EntityPropertyExtractor.js.map +1 -1
- package/dist/lib/FieldExternalizer.d.ts +1 -0
- package/dist/lib/FieldExternalizer.d.ts.map +1 -0
- package/dist/lib/FieldExternalizer.js +14 -21
- package/dist/lib/FieldExternalizer.js.map +1 -1
- package/dist/lib/RecordProcessor.d.ts +3 -2
- package/dist/lib/RecordProcessor.d.ts.map +1 -0
- package/dist/lib/RecordProcessor.js +16 -25
- package/dist/lib/RecordProcessor.js.map +1 -1
- package/dist/lib/RelatedEntityHandler.d.ts +3 -2
- package/dist/lib/RelatedEntityHandler.d.ts.map +1 -0
- package/dist/lib/RelatedEntityHandler.js +3 -9
- package/dist/lib/RelatedEntityHandler.js.map +1 -1
- package/dist/lib/config-manager.d.ts +2 -1
- package/dist/lib/config-manager.d.ts.map +1 -0
- package/dist/lib/config-manager.js +10 -15
- package/dist/lib/config-manager.js.map +1 -1
- package/dist/lib/database-reference-scanner.d.ts +3 -2
- package/dist/lib/database-reference-scanner.d.ts.map +1 -0
- package/dist/lib/database-reference-scanner.js +7 -13
- package/dist/lib/database-reference-scanner.js.map +1 -1
- package/dist/lib/deletion-auditor.d.ts +3 -2
- package/dist/lib/deletion-auditor.d.ts.map +1 -0
- package/dist/lib/deletion-auditor.js +9 -15
- package/dist/lib/deletion-auditor.js.map +1 -1
- package/dist/lib/deletion-report-generator.d.ts +2 -1
- package/dist/lib/deletion-report-generator.d.ts.map +1 -0
- package/dist/lib/deletion-report-generator.js +1 -5
- package/dist/lib/deletion-report-generator.js.map +1 -1
- package/dist/lib/entity-foreign-key-helper.d.ts +1 -0
- package/dist/lib/entity-foreign-key-helper.d.ts.map +1 -0
- package/dist/lib/entity-foreign-key-helper.js +1 -5
- package/dist/lib/entity-foreign-key-helper.js.map +1 -1
- package/dist/lib/file-backup-manager.d.ts +1 -0
- package/dist/lib/file-backup-manager.d.ts.map +1 -0
- package/dist/lib/file-backup-manager.js +22 -27
- package/dist/lib/file-backup-manager.js.map +1 -1
- package/dist/lib/file-write-batch.d.ts +2 -1
- package/dist/lib/file-write-batch.d.ts.map +1 -0
- package/dist/lib/file-write-batch.js +16 -21
- package/dist/lib/file-write-batch.js.map +1 -1
- package/dist/lib/json-preprocessor.d.ts +1 -0
- package/dist/lib/json-preprocessor.d.ts.map +1 -0
- package/dist/lib/json-preprocessor.js +21 -26
- package/dist/lib/json-preprocessor.js.map +1 -1
- package/dist/lib/json-write-helper.d.ts +2 -1
- package/dist/lib/json-write-helper.d.ts.map +1 -0
- package/dist/lib/json-write-helper.js +4 -11
- package/dist/lib/json-write-helper.js.map +1 -1
- package/dist/lib/provider-utils.d.ts +2 -1
- package/dist/lib/provider-utils.d.ts.map +1 -0
- package/dist/lib/provider-utils.js +15 -46
- package/dist/lib/provider-utils.js.map +1 -1
- package/dist/lib/record-dependency-analyzer.d.ts +2 -1
- package/dist/lib/record-dependency-analyzer.d.ts.map +1 -0
- package/dist/lib/record-dependency-analyzer.js +26 -31
- package/dist/lib/record-dependency-analyzer.js.map +1 -1
- package/dist/lib/singleton-manager.d.ts +2 -1
- package/dist/lib/singleton-manager.d.ts.map +1 -0
- package/dist/lib/singleton-manager.js +4 -9
- package/dist/lib/singleton-manager.js.map +1 -1
- package/dist/lib/sql-logger.d.ts +2 -1
- package/dist/lib/sql-logger.d.ts.map +1 -0
- package/dist/lib/sql-logger.js +8 -16
- package/dist/lib/sql-logger.js.map +1 -1
- package/dist/lib/sync-engine.d.ts +2 -1
- package/dist/lib/sync-engine.d.ts.map +1 -0
- package/dist/lib/sync-engine.js +58 -76
- package/dist/lib/sync-engine.js.map +1 -1
- package/dist/lib/transaction-manager.d.ts +2 -1
- package/dist/lib/transaction-manager.d.ts.map +1 -0
- package/dist/lib/transaction-manager.js +6 -11
- package/dist/lib/transaction-manager.js.map +1 -1
- package/dist/services/FileResetService.d.ts +1 -0
- package/dist/services/FileResetService.d.ts.map +1 -0
- package/dist/services/FileResetService.js +17 -24
- package/dist/services/FileResetService.js.map +1 -1
- package/dist/services/FormattingService.d.ts +2 -1
- package/dist/services/FormattingService.d.ts.map +1 -0
- package/dist/services/FormattingService.js +68 -73
- package/dist/services/FormattingService.js.map +1 -1
- package/dist/services/InitService.d.ts +1 -0
- package/dist/services/InitService.d.ts.map +1 -0
- package/dist/services/InitService.js +12 -19
- package/dist/services/InitService.js.map +1 -1
- package/dist/services/PullService.d.ts +2 -1
- package/dist/services/PullService.d.ts.map +1 -0
- package/dist/services/PullService.js +49 -60
- package/dist/services/PullService.js.map +1 -1
- package/dist/services/PushService.d.ts +2 -1
- package/dist/services/PushService.d.ts.map +1 -0
- package/dist/services/PushService.js +59 -68
- package/dist/services/PushService.js.map +1 -1
- package/dist/services/StatusService.d.ts +2 -1
- package/dist/services/StatusService.d.ts.map +1 -0
- package/dist/services/StatusService.js +14 -22
- package/dist/services/StatusService.js.map +1 -1
- package/dist/services/ValidationService.d.ts +2 -1
- package/dist/services/ValidationService.d.ts.map +1 -0
- package/dist/services/ValidationService.js +41 -71
- package/dist/services/ValidationService.js.map +1 -1
- package/dist/services/WatchService.d.ts +4 -3
- package/dist/services/WatchService.d.ts.map +1 -0
- package/dist/services/WatchService.js +35 -43
- package/dist/services/WatchService.js.map +1 -1
- package/dist/services/index.d.ts +9 -8
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +8 -19
- package/dist/services/index.js.map +1 -1
- package/dist/types/validation.d.ts +2 -1
- package/dist/types/validation.d.ts.map +1 -0
- package/dist/types/validation.js +2 -23
- package/dist/types/validation.js.map +1 -1
- package/package.json +23 -21
package/dist/config.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,iCAAiC;IACjC,IAAI,CAAC,EAAE;QACL,6DAA6D;QAC7D,kBA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;;;;GAeG;AACH,wBAAgB,YAAY,IAAI,QAAQ,GAAG,IAAI,CAE9C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAa5E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAehF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAahF"}
|
package/dist/config.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* @fileoverview Configuration types and loaders for MetadataSync
|
|
4
3
|
* @module config
|
|
@@ -10,14 +9,9 @@
|
|
|
10
9
|
* - Entity-specific configuration (.mj-sync.json with entity field)
|
|
11
10
|
* - Folder-level defaults (.mj-folder.json)
|
|
12
11
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.loadFolderConfig = exports.loadEntityConfig = exports.loadSyncConfig = exports.loadMJConfig = void 0;
|
|
18
|
-
const path_1 = __importDefault(require("path"));
|
|
19
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
20
|
-
const config_manager_1 = require("./lib/config-manager");
|
|
12
|
+
import path from 'path';
|
|
13
|
+
import fs from 'fs-extra';
|
|
14
|
+
import { configManager } from './lib/config-manager.js';
|
|
21
15
|
/**
|
|
22
16
|
* Load MemberJunction configuration from the filesystem
|
|
23
17
|
*
|
|
@@ -34,10 +28,9 @@ const config_manager_1 = require("./lib/config-manager");
|
|
|
34
28
|
* }
|
|
35
29
|
* ```
|
|
36
30
|
*/
|
|
37
|
-
function loadMJConfig() {
|
|
38
|
-
return
|
|
31
|
+
export function loadMJConfig() {
|
|
32
|
+
return configManager.loadMJConfig();
|
|
39
33
|
}
|
|
40
|
-
exports.loadMJConfig = loadMJConfig;
|
|
41
34
|
/**
|
|
42
35
|
* Load sync configuration from a directory
|
|
43
36
|
*
|
|
@@ -56,11 +49,11 @@ exports.loadMJConfig = loadMJConfig;
|
|
|
56
49
|
* }
|
|
57
50
|
* ```
|
|
58
51
|
*/
|
|
59
|
-
async function loadSyncConfig(dir) {
|
|
60
|
-
const configPath =
|
|
61
|
-
if (await
|
|
52
|
+
export async function loadSyncConfig(dir) {
|
|
53
|
+
const configPath = path.join(dir, '.mj-sync.json');
|
|
54
|
+
if (await fs.pathExists(configPath)) {
|
|
62
55
|
try {
|
|
63
|
-
return await
|
|
56
|
+
return await fs.readJson(configPath);
|
|
64
57
|
}
|
|
65
58
|
catch (error) {
|
|
66
59
|
console.error('Error loading sync config:', error);
|
|
@@ -69,7 +62,6 @@ async function loadSyncConfig(dir) {
|
|
|
69
62
|
}
|
|
70
63
|
return null;
|
|
71
64
|
}
|
|
72
|
-
exports.loadSyncConfig = loadSyncConfig;
|
|
73
65
|
/**
|
|
74
66
|
* Load entity-specific configuration from a directory
|
|
75
67
|
*
|
|
@@ -88,11 +80,11 @@ exports.loadSyncConfig = loadSyncConfig;
|
|
|
88
80
|
* }
|
|
89
81
|
* ```
|
|
90
82
|
*/
|
|
91
|
-
async function loadEntityConfig(dir) {
|
|
92
|
-
const configPath =
|
|
93
|
-
if (await
|
|
83
|
+
export async function loadEntityConfig(dir) {
|
|
84
|
+
const configPath = path.join(dir, '.mj-sync.json');
|
|
85
|
+
if (await fs.pathExists(configPath)) {
|
|
94
86
|
try {
|
|
95
|
-
const config = await
|
|
87
|
+
const config = await fs.readJson(configPath);
|
|
96
88
|
if (config.entity) {
|
|
97
89
|
return config;
|
|
98
90
|
}
|
|
@@ -103,7 +95,6 @@ async function loadEntityConfig(dir) {
|
|
|
103
95
|
}
|
|
104
96
|
return null;
|
|
105
97
|
}
|
|
106
|
-
exports.loadEntityConfig = loadEntityConfig;
|
|
107
98
|
/**
|
|
108
99
|
* Load folder-level configuration
|
|
109
100
|
*
|
|
@@ -122,11 +113,11 @@ exports.loadEntityConfig = loadEntityConfig;
|
|
|
122
113
|
* }
|
|
123
114
|
* ```
|
|
124
115
|
*/
|
|
125
|
-
async function loadFolderConfig(dir) {
|
|
126
|
-
const configPath =
|
|
127
|
-
if (await
|
|
116
|
+
export async function loadFolderConfig(dir) {
|
|
117
|
+
const configPath = path.join(dir, '.mj-folder.json');
|
|
118
|
+
if (await fs.pathExists(configPath)) {
|
|
128
119
|
try {
|
|
129
|
-
return await
|
|
120
|
+
return await fs.readJson(configPath);
|
|
130
121
|
}
|
|
131
122
|
catch (error) {
|
|
132
123
|
console.error('Error loading folder config:', error);
|
|
@@ -135,5 +126,4 @@ async function loadFolderConfig(dir) {
|
|
|
135
126
|
}
|
|
136
127
|
return null;
|
|
137
128
|
}
|
|
138
|
-
exports.loadFolderConfig = loadFolderConfig;
|
|
139
129
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAGH,gDAAwB;AACxB,wDAA0B;AAC1B,yDAAqD;AAgRrD;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,YAAY;IAC1B,OAAO,8BAAa,CAAC,YAAY,EAAE,CAAC;AACtC,CAAC;AAFD,oCAEC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACI,KAAK,UAAU,cAAc,CAAC,GAAW;IAC9C,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;IAEnD,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACpC,IAAI,CAAC;YACH,OAA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QACd,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAbD,4CAaC","sourcesContent":["/**\n * @fileoverview Configuration types and loaders for MetadataSync\n * @module config\n * \n * This module defines configuration interfaces and provides utilities for loading\n * various configuration files used by the MetadataSync tool. It supports:\n * - MemberJunction database configuration (mj.config.cjs)\n * - Sync configuration (.mj-sync.json)\n * - Entity-specific configuration (.mj-sync.json with entity field)\n * - Folder-level defaults (.mj-folder.json)\n */\n\nimport { cosmiconfigSync } from 'cosmiconfig';\nimport path from 'path';\nimport fs from 'fs-extra';\nimport { configManager } from './lib/config-manager';\n\n/**\n * MemberJunction database configuration\n * \n * Defines connection parameters and settings for connecting to the MemberJunction\n * database. Typically loaded from mj.config.cjs in the project root.\n */\nexport interface MJConfig {\n /** Database server hostname or IP address */\n dbHost: string;\n /** Database server port (defaults to 1433 for SQL Server) */\n dbPort?: number;\n /** Database name to connect to */\n dbDatabase: string;\n /** Database authentication username */\n dbUsername: string;\n /** Database authentication password */\n dbPassword: string;\n /** Whether to trust the server certificate (Y/N) */\n dbTrustServerCertificate?: string;\n /** Whether to encrypt the connection (Y/N, auto-detected for Azure SQL) */\n dbEncrypt?: string;\n /** SQL Server instance name (for named instances) */\n dbInstanceName?: string;\n /** Schema name for MemberJunction core tables (defaults to __mj) */\n mjCoreSchema?: string;\n /** Allow additional properties for extensibility */\n [key: string]: any;\n}\n\n/**\n * Global sync configuration\n * \n * Defines settings that apply to the entire sync process, including push/pull\n * behaviors and watch mode configuration. Stored in .mj-sync.json at the root.\n */\nexport interface SyncConfig {\n /** Version of the sync configuration format */\n version: string;\n /** Glob pattern for finding data files (defaults to \"*.json\") */\n filePattern?: string;\n /** \n * Directory processing order (only applies to root-level config, not inherited by subdirectories)\n * Specifies the order in which subdirectories should be processed to handle dependencies.\n * Directories not listed in this array will be processed after the ordered ones in alphabetical order.\n */\n directoryOrder?: string[];\n /** \n * Directories to ignore during processing\n * Can be directory names or glob patterns relative to the location of the .mj-sync.json file\n * Cumulative: subdirectories inherit and add to parent ignoreDirectories\n * Examples: [\"output\", \"examples\", \"temp\"]\n */\n ignoreDirectories?: string[];\n /** Push command configuration */\n push?: {\n /** Whether to validate records before pushing to database */\n validateBeforePush?: boolean;\n /** Whether to require user confirmation before push */\n requireConfirmation?: boolean;\n /** \n * Whether to automatically create new records when a primaryKey exists but record is not found\n * Defaults to false - will warn instead of creating\n */\n autoCreateMissingRecords?: boolean;\n /** \n * When true, forces all records to be saved to database regardless of dirty state.\n * This bypasses dirty checking and always performs database updates.\n * Useful for ensuring complete synchronization or when dirty detection may miss changes.\n * Defaults to false.\n */\n alwaysPush?: boolean;\n };\n /** SQL logging configuration (only applies to root-level config, not inherited by subdirectories) */\n sqlLogging?: {\n /** Whether to enable SQL logging during push operations */\n enabled?: boolean;\n /** Directory to output SQL log files (relative to command execution directory, defaults to './sql_logging') */\n outputDirectory?: string;\n /** Whether to format SQL as migration-ready files with Flyway schema placeholders */\n formatAsMigration?: boolean;\n /**\n * Array of patterns to filter SQL statements.\n * Supports both regex strings and simple wildcard patterns:\n * - Regex: \"/spCreate.*Run/i\" (must start with \"/\" and optionally end with flags)\n * - Simple: \"*spCreateAIPromptRun*\" (uses * as wildcard, case-insensitive by default)\n * Examples: [\"*AIPrompt*\", \"/^EXEC sp_/i\", \"*EntityFieldValue*\"]\n */\n filterPatterns?: string[];\n /**\n * Determines how filterPatterns are applied:\n * - 'exclude': If ANY pattern matches, the SQL is NOT logged (default)\n * - 'include': If ANY pattern matches, the SQL IS logged\n */\n filterType?: 'exclude' | 'include';\n /** Whether to output verbose debug information to console (default: false) */\n verboseOutput?: boolean;\n };\n /** Watch command configuration */\n watch?: {\n /** Milliseconds to wait before processing file changes */\n debounceMs?: number;\n /** File patterns to ignore during watch */\n ignorePatterns?: string[];\n };\n /** User role validation configuration */\n userRoleValidation?: {\n /** Whether to enable user role validation for UserID fields */\n enabled?: boolean;\n /** List of role names that are allowed to be referenced in metadata */\n allowedRoles?: string[];\n /** Whether to allow users without any roles (defaults to false) */\n allowUsersWithoutRoles?: boolean;\n };\n /**\n * Whether to emit __mj_sync_notes in record files during push operations.\n * When enabled, resolution information for @lookup and @parent references is written to files.\n * Defaults to false. Entity-level .mj-sync.json files can override this setting.\n */\n emitSyncNotes?: boolean;\n}\n\n/**\n * Configuration for related entity synchronization\n * \n * Defines how to pull and push related entities that have foreign key relationships\n * with a parent entity. Supports nested relationships for deep object graphs.\n * NEW: Supports automatic recursive patterns for self-referencing entities.\n */\nexport interface RelatedEntityConfig {\n /** Name of the related entity to sync */\n entity: string;\n /** Field name that contains the foreign key reference to parent (e.g., \"PromptID\") */\n foreignKey: string;\n /** Optional SQL filter to apply when pulling related records */\n filter?: string;\n /** \n * Enable recursive fetching for self-referencing entities\n * When true, automatically fetches all levels of the hierarchy until no more children found\n */\n recursive?: boolean;\n /** \n * Maximum depth for recursive fetching (optional, defaults to 10)\n * Prevents infinite loops and controls memory usage\n * Only applies when recursive is true\n */\n maxDepth?: number;\n /** Fields to externalize to separate files for this related entity */\n externalizeFields?: string[] | {\n [fieldName: string]: {\n /** File extension to use (e.g., \".md\", \".txt\", \".html\") */\n extension?: string;\n }\n } | Array<{\n /** Field name to externalize */\n field: string;\n /** Pattern for the output file. Supports placeholders from the entity */\n pattern: string;\n }>;\n /** Fields to exclude from the pulled data for this related entity */\n excludeFields?: string[];\n /** Foreign key fields to convert to @lookup references for this related entity */\n lookupFields?: {\n [fieldName: string]: {\n entity: string;\n field: string;\n };\n };\n /** Nested related entities for deep object graphs */\n relatedEntities?: Record<string, RelatedEntityConfig>;\n}\n\n/**\n * Entity-specific configuration\n * \n * Defines settings for a specific entity type within a directory. Stored in\n * .mj-sync.json files that contain an \"entity\" field. Supports defaults,\n * file patterns, and related entity configuration.\n */\nexport interface EntityConfig {\n /** Name of the entity this directory contains */\n entity: string;\n /** Glob pattern for finding data files (defaults to \"*.json\") */\n filePattern?: string;\n /** Default field values applied to all records in this directory */\n defaults?: Record<string, any>;\n /** \n * Directories to ignore during processing\n * Can be directory names or glob patterns relative to the location of the .mj-sync.json file\n * Cumulative: subdirectories inherit and add to parent ignoreDirectories\n * Examples: [\"output\", \"examples\", \"temp\"]\n */\n ignoreDirectories?: string[];\n /** Pull command specific configuration */\n pull?: {\n /** Glob pattern for finding existing files to update (defaults to filePattern) */\n filePattern?: string;\n /** Whether to create new files for records not found locally */\n createNewFileIfNotFound?: boolean;\n /** Filename for new records when createNewFileIfNotFound is true */\n newFileName?: string;\n /** Whether to append multiple new records to a single file */\n appendRecordsToExistingFile?: boolean;\n /** Whether to update existing records found in local files */\n updateExistingRecords?: boolean;\n /** Fields to preserve during updates (never overwrite these) */\n preserveFields?: string[];\n /** Strategy for merging updates: \"overwrite\" | \"merge\" | \"skip\" */\n mergeStrategy?: 'overwrite' | 'merge' | 'skip';\n /** Create backup files before updating existing files */\n backupBeforeUpdate?: boolean;\n /** Directory name for backup files (defaults to \".backups\") */\n backupDirectory?: string;\n /** SQL filter to apply when pulling records from database */\n filter?: string;\n /** Configuration for pulling related entities */\n relatedEntities?: Record<string, RelatedEntityConfig>;\n /** Fields to externalize to separate files with optional configuration */\n externalizeFields?: string[] | {\n [fieldName: string]: {\n /** File extension to use (e.g., \".md\", \".txt\", \".html\") */\n extension?: string;\n }\n } | Array<{\n /** Field name to externalize */\n field: string;\n /** Pattern for the output file. Supports placeholders:\n * - {Name}: Entity's name field value\n * - {ID}: Entity's ID\n * - {FieldName}: The field being externalized\n * - Any other {FieldName} from the entity\n * Example: \"@file:templates/{Name}.template.md\"\n */\n pattern: string;\n }>;\n /** Fields to exclude from the pulled data (e.g., [\"TemplateID\"]) */\n excludeFields?: string[];\n /** Foreign key fields to convert to @lookup references */\n lookupFields?: {\n /** Field name in this entity (e.g., \"CategoryID\") */\n [fieldName: string]: {\n /** Target entity name (e.g., \"AI Prompt Categories\") */\n entity: string;\n /** Field in target entity to use for lookup (e.g., \"Name\") */\n field: string;\n };\n };\n /** Whether to ignore null field values during pull (defaults to false) */\n ignoreNullFields?: boolean;\n /** Whether to ignore virtual fields during pull (defaults to false) */\n ignoreVirtualFields?: boolean;\n };\n /**\n * Whether to emit __mj_sync_notes in record files during push operations.\n * When enabled, resolution information for @lookup and @parent references is written to files.\n * If not specified, inherits from root .mj-sync.json. Defaults to false if not set anywhere.\n */\n emitSyncNotes?: boolean;\n}\n\n/**\n * Folder-level configuration\n * \n * Defines default values that cascade down to all subdirectories. Stored in\n * .mj-folder.json files. Child folders can override parent defaults.\n */\nexport interface FolderConfig {\n /** Default field values that apply to all entities in this folder and subfolders */\n defaults: Record<string, any>;\n}\n\n/**\n * Load MemberJunction configuration from the filesystem\n * \n * Searches for mj.config.cjs starting from the current directory and walking up\n * the directory tree. Uses cosmiconfig for flexible configuration loading.\n * \n * @returns MJConfig object if found, null if not found or invalid\n * \n * @example\n * ```typescript\n * const config = loadMJConfig();\n * if (config) {\n * console.log(`Connecting to ${config.dbHost}:${config.dbPort || 1433}`);\n * }\n * ```\n */\nexport function loadMJConfig(): MJConfig | null {\n return configManager.loadMJConfig();\n}\n\n/**\n * Load sync configuration from a directory\n * \n * Loads .mj-sync.json file from the specified directory. This file can contain\n * either global sync configuration (no entity field) or entity-specific\n * configuration (with entity field).\n * \n * @param dir - Directory path to load configuration from\n * @returns Promise resolving to SyncConfig if found and valid, null otherwise\n * \n * @example\n * ```typescript\n * const syncConfig = await loadSyncConfig('/path/to/project');\n * if (syncConfig?.push?.requireConfirmation) {\n * // Show confirmation prompt\n * }\n * ```\n */\nexport async function loadSyncConfig(dir: string): Promise<SyncConfig | null> {\n const configPath = path.join(dir, '.mj-sync.json');\n \n if (await fs.pathExists(configPath)) {\n try {\n return await fs.readJson(configPath);\n } catch (error) {\n console.error('Error loading sync config:', error);\n return null;\n }\n }\n \n return null;\n}\n\n/**\n * Load entity-specific configuration from a directory\n * \n * Loads .mj-sync.json file that contains an \"entity\" field, indicating this\n * directory contains data for a specific entity type. Returns null if the\n * file doesn't exist or doesn't contain an entity field.\n * \n * @param dir - Directory path to load configuration from\n * @returns Promise resolving to EntityConfig if found and valid, null otherwise\n * \n * @example\n * ```typescript\n * const entityConfig = await loadEntityConfig('./ai-prompts');\n * if (entityConfig) {\n * console.log(`Directory contains ${entityConfig.entity} records`);\n * }\n * ```\n */\nexport async function loadEntityConfig(dir: string): Promise<EntityConfig | null> {\n const configPath = path.join(dir, '.mj-sync.json');\n \n if (await fs.pathExists(configPath)) {\n try {\n const config = await fs.readJson(configPath);\n if (config.entity) {\n return config;\n }\n } catch (error) {\n console.error('Error loading entity config:', error);\n }\n }\n \n return null;\n}\n\n/**\n * Load folder-level configuration\n * \n * Loads .mj-folder.json file that contains default values to be applied to\n * all entities in this folder and its subfolders. Used for cascading defaults\n * in deep directory structures.\n * \n * @param dir - Directory path to load configuration from\n * @returns Promise resolving to FolderConfig if found and valid, null otherwise\n * \n * @example\n * ```typescript\n * const folderConfig = await loadFolderConfig('./templates');\n * if (folderConfig?.defaults) {\n * // Apply folder defaults to records\n * }\n * ```\n */\nexport async function loadFolderConfig(dir: string): Promise<FolderConfig | null> {\n const configPath = path.join(dir, '.mj-folder.json');\n \n if (await fs.pathExists(configPath)) {\n try {\n return await fs.readJson(configPath);\n } catch (error) {\n console.error('Error loading folder config:', error);\n return null;\n }\n }\n \n return null;\n}"]}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAgRrD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,aAAa,CAAC,YAAY,EAAE,CAAC;AACtC,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,GAAW;IAC9C,MAAM,UAAU,GAAG,IAAI,C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AAC;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;YACrD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -280,3 +280,4 @@ export declare function isExternalReferenceKeyword(keyword: string): boolean;
|
|
|
280
280
|
* createKeywordReference('parent', 'ID') // '@parent:ID'
|
|
281
281
|
*/
|
|
282
282
|
export declare function createKeywordReference(type: MetadataKeywordType, value: string): string;
|
|
283
|
+
//# sourceMappingURL=metadata-keywords.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-keywords.d.ts","sourceRoot":"","sources":["../../src/constants/metadata-keywords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAC5B;;;;;;;;;;OAUG;;IAGH;;;;;;;;;;;OAWG;;IAGH;;;;;;;;;;OAUG;;IAGH;;;;;;;;;OASG;;IAGH;;;;;;;;;OASG;;IAGH;;;;;;;;;OASG;;IAGH;;;;;;;;OAQG;;IAGH;;;;;;;;;;OAUG;;CAEK,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,iBAAiB,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjH;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,aAAa,CAAC,MAAM,CAAoC,CAAC;AAEjG;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAMjE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAoBhF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAElE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAI5D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA6BhE;AAED;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,iCAG7B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,2BAA2B,4CAI9B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,eAAe,uBAElB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,gBAAgB,oBAEnB,CAAC;AAEX;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAavF"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* Centralized metadata keyword constants for MemberJunction MetadataSync package.
|
|
4
3
|
*
|
|
@@ -25,13 +24,11 @@
|
|
|
25
24
|
* "PromptID": "@parent:ID"
|
|
26
25
|
* }
|
|
27
26
|
*/
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.createKeywordReference = exports.isExternalReferenceKeyword = exports.isContextDependentKeyword = exports.RUNTIME_KEYWORDS = exports.LOOKUP_KEYWORDS = exports.EXTERNAL_REFERENCE_KEYWORDS = exports.CONTEXT_DEPENDENT_KEYWORDS = exports.extractKeywordValue = exports.isNonKeywordAtSymbol = exports.hasMetadataKeyword = exports.getMetadataKeywordType = exports.isMetadataKeyword = exports.METADATA_KEYWORD_PREFIXES = exports.METADATA_KEYWORDS = void 0;
|
|
30
27
|
/**
|
|
31
28
|
* Metadata keyword constants.
|
|
32
29
|
* These are the special @ prefixes recognized by MetadataSync for field value processing.
|
|
33
30
|
*/
|
|
34
|
-
|
|
31
|
+
export const METADATA_KEYWORDS = {
|
|
35
32
|
/**
|
|
36
33
|
* @file: - Loads content from an external file
|
|
37
34
|
*
|
|
@@ -129,7 +126,7 @@ exports.METADATA_KEYWORDS = {
|
|
|
129
126
|
* Array of all metadata keyword prefixes for iteration.
|
|
130
127
|
* This array maintains the order of keywords for consistent processing.
|
|
131
128
|
*/
|
|
132
|
-
|
|
129
|
+
export const METADATA_KEYWORD_PREFIXES = Object.values(METADATA_KEYWORDS);
|
|
133
130
|
/**
|
|
134
131
|
* Checks if a value is a string that starts with any recognized metadata keyword.
|
|
135
132
|
*
|
|
@@ -148,13 +145,12 @@ exports.METADATA_KEYWORD_PREFIXES = Object.values(exports.METADATA_KEYWORDS);
|
|
|
148
145
|
* isMetadataKeyword(null) // false
|
|
149
146
|
* isMetadataKeyword('@unknown:value') // false
|
|
150
147
|
*/
|
|
151
|
-
function isMetadataKeyword(value) {
|
|
148
|
+
export function isMetadataKeyword(value) {
|
|
152
149
|
if (typeof value !== 'string') {
|
|
153
150
|
return false;
|
|
154
151
|
}
|
|
155
|
-
return
|
|
152
|
+
return METADATA_KEYWORD_PREFIXES.some(prefix => value.startsWith(prefix));
|
|
156
153
|
}
|
|
157
|
-
exports.isMetadataKeyword = isMetadataKeyword;
|
|
158
154
|
/**
|
|
159
155
|
* Determines which metadata keyword type a string value uses.
|
|
160
156
|
*
|
|
@@ -172,16 +168,16 @@ exports.isMetadataKeyword = isMetadataKeyword;
|
|
|
172
168
|
* getMetadataKeywordType('regular string') // null
|
|
173
169
|
* getMetadataKeywordType('@unknown:value') // null
|
|
174
170
|
*/
|
|
175
|
-
function getMetadataKeywordType(value) {
|
|
171
|
+
export function getMetadataKeywordType(value) {
|
|
176
172
|
if (typeof value !== 'string') {
|
|
177
173
|
return null;
|
|
178
174
|
}
|
|
179
175
|
// Special handling for @include which doesn't require a colon
|
|
180
|
-
if (value ===
|
|
176
|
+
if (value === METADATA_KEYWORDS.INCLUDE || value.startsWith(`${METADATA_KEYWORDS.INCLUDE}.`)) {
|
|
181
177
|
return 'include';
|
|
182
178
|
}
|
|
183
179
|
// Check all other keywords
|
|
184
|
-
for (const [key, prefix] of Object.entries(
|
|
180
|
+
for (const [key, prefix] of Object.entries(METADATA_KEYWORDS)) {
|
|
185
181
|
if (key === 'INCLUDE')
|
|
186
182
|
continue; // Already handled above
|
|
187
183
|
if (value.startsWith(prefix)) {
|
|
@@ -190,7 +186,6 @@ function getMetadataKeywordType(value) {
|
|
|
190
186
|
}
|
|
191
187
|
return null;
|
|
192
188
|
}
|
|
193
|
-
exports.getMetadataKeywordType = getMetadataKeywordType;
|
|
194
189
|
/**
|
|
195
190
|
* Type-safe check for metadata keywords that handles any value type.
|
|
196
191
|
*
|
|
@@ -207,10 +202,9 @@ exports.getMetadataKeywordType = getMetadataKeywordType;
|
|
|
207
202
|
* const type = getMetadataKeywordType(fieldValue);
|
|
208
203
|
* }
|
|
209
204
|
*/
|
|
210
|
-
function hasMetadataKeyword(value) {
|
|
205
|
+
export function hasMetadataKeyword(value) {
|
|
211
206
|
return isMetadataKeyword(value);
|
|
212
207
|
}
|
|
213
|
-
exports.hasMetadataKeyword = hasMetadataKeyword;
|
|
214
208
|
/**
|
|
215
209
|
* Checks if a string starts with @ but is NOT a metadata keyword.
|
|
216
210
|
*
|
|
@@ -226,12 +220,11 @@ exports.hasMetadataKeyword = hasMetadataKeyword;
|
|
|
226
220
|
* isNonKeywordAtSymbol('@file:template.md') // false
|
|
227
221
|
* isNonKeywordAtSymbol('regular string') // false
|
|
228
222
|
*/
|
|
229
|
-
function isNonKeywordAtSymbol(value) {
|
|
223
|
+
export function isNonKeywordAtSymbol(value) {
|
|
230
224
|
return typeof value === 'string' &&
|
|
231
225
|
value.startsWith('@') &&
|
|
232
226
|
!isMetadataKeyword(value);
|
|
233
227
|
}
|
|
234
|
-
exports.isNonKeywordAtSymbol = isNonKeywordAtSymbol;
|
|
235
228
|
/**
|
|
236
229
|
* Extracts the value portion after a metadata keyword prefix.
|
|
237
230
|
*
|
|
@@ -247,7 +240,7 @@ exports.isNonKeywordAtSymbol = isNonKeywordAtSymbol;
|
|
|
247
240
|
* extractKeywordValue('@parent:ID') // 'ID'
|
|
248
241
|
* extractKeywordValue('regular string') // null
|
|
249
242
|
*/
|
|
250
|
-
function extractKeywordValue(value) {
|
|
243
|
+
export function extractKeywordValue(value) {
|
|
251
244
|
if (typeof value !== 'string') {
|
|
252
245
|
return null;
|
|
253
246
|
}
|
|
@@ -257,52 +250,51 @@ function extractKeywordValue(value) {
|
|
|
257
250
|
}
|
|
258
251
|
// Special handling for @include
|
|
259
252
|
if (keywordType === 'include') {
|
|
260
|
-
if (value ===
|
|
253
|
+
if (value === METADATA_KEYWORDS.INCLUDE) {
|
|
261
254
|
return ''; // Just '@include' with no suffix
|
|
262
255
|
}
|
|
263
|
-
if (value.startsWith(`${
|
|
264
|
-
return value.substring(
|
|
256
|
+
if (value.startsWith(`${METADATA_KEYWORDS.INCLUDE}.`)) {
|
|
257
|
+
return value.substring(METADATA_KEYWORDS.INCLUDE.length + 1); // Remove '@include.'
|
|
265
258
|
}
|
|
266
259
|
return null;
|
|
267
260
|
}
|
|
268
261
|
// For all other keywords, find the matching prefix and remove it
|
|
269
|
-
for (const prefix of
|
|
262
|
+
for (const prefix of METADATA_KEYWORD_PREFIXES) {
|
|
270
263
|
if (value.startsWith(prefix)) {
|
|
271
264
|
return value.substring(prefix.length);
|
|
272
265
|
}
|
|
273
266
|
}
|
|
274
267
|
return null;
|
|
275
268
|
}
|
|
276
|
-
exports.extractKeywordValue = extractKeywordValue;
|
|
277
269
|
/**
|
|
278
270
|
* List of metadata keywords that require a parent context to function.
|
|
279
271
|
* These keywords cannot be used at the top level of metadata - they only work
|
|
280
272
|
* in nested/related entities where a parent record exists.
|
|
281
273
|
*/
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
274
|
+
export const CONTEXT_DEPENDENT_KEYWORDS = [
|
|
275
|
+
METADATA_KEYWORDS.PARENT,
|
|
276
|
+
METADATA_KEYWORDS.ROOT,
|
|
285
277
|
];
|
|
286
278
|
/**
|
|
287
279
|
* List of metadata keywords that reference external resources.
|
|
288
280
|
* These keywords load content from files, URLs, or other external sources.
|
|
289
281
|
*/
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
282
|
+
export const EXTERNAL_REFERENCE_KEYWORDS = [
|
|
283
|
+
METADATA_KEYWORDS.FILE,
|
|
284
|
+
METADATA_KEYWORDS.URL,
|
|
285
|
+
METADATA_KEYWORDS.TEMPLATE,
|
|
294
286
|
];
|
|
295
287
|
/**
|
|
296
288
|
* List of metadata keywords that perform database lookups.
|
|
297
289
|
*/
|
|
298
|
-
|
|
299
|
-
|
|
290
|
+
export const LOOKUP_KEYWORDS = [
|
|
291
|
+
METADATA_KEYWORDS.LOOKUP,
|
|
300
292
|
];
|
|
301
293
|
/**
|
|
302
294
|
* List of metadata keywords that access runtime configuration.
|
|
303
295
|
*/
|
|
304
|
-
|
|
305
|
-
|
|
296
|
+
export const RUNTIME_KEYWORDS = [
|
|
297
|
+
METADATA_KEYWORDS.ENV,
|
|
306
298
|
];
|
|
307
299
|
/**
|
|
308
300
|
* Checks if a keyword requires a parent/root context.
|
|
@@ -315,10 +307,9 @@ exports.RUNTIME_KEYWORDS = [
|
|
|
315
307
|
* isContextDependentKeyword('@root:') // true
|
|
316
308
|
* isContextDependentKeyword('@file:') // false
|
|
317
309
|
*/
|
|
318
|
-
function isContextDependentKeyword(keyword) {
|
|
319
|
-
return
|
|
310
|
+
export function isContextDependentKeyword(keyword) {
|
|
311
|
+
return CONTEXT_DEPENDENT_KEYWORDS.some(k => keyword.startsWith(k));
|
|
320
312
|
}
|
|
321
|
-
exports.isContextDependentKeyword = isContextDependentKeyword;
|
|
322
313
|
/**
|
|
323
314
|
* Checks if a keyword references an external resource.
|
|
324
315
|
*
|
|
@@ -330,10 +321,9 @@ exports.isContextDependentKeyword = isContextDependentKeyword;
|
|
|
330
321
|
* isExternalReferenceKeyword('@url:') // true
|
|
331
322
|
* isExternalReferenceKeyword('@lookup:') // false
|
|
332
323
|
*/
|
|
333
|
-
function isExternalReferenceKeyword(keyword) {
|
|
334
|
-
return
|
|
324
|
+
export function isExternalReferenceKeyword(keyword) {
|
|
325
|
+
return EXTERNAL_REFERENCE_KEYWORDS.some(k => keyword.startsWith(k));
|
|
335
326
|
}
|
|
336
|
-
exports.isExternalReferenceKeyword = isExternalReferenceKeyword;
|
|
337
327
|
/**
|
|
338
328
|
* Creates a metadata keyword reference string.
|
|
339
329
|
*
|
|
@@ -349,8 +339,8 @@ exports.isExternalReferenceKeyword = isExternalReferenceKeyword;
|
|
|
349
339
|
* createKeywordReference('lookup', 'Users.Email=test@example.com') // '@lookup:Users.Email=test@example.com'
|
|
350
340
|
* createKeywordReference('parent', 'ID') // '@parent:ID'
|
|
351
341
|
*/
|
|
352
|
-
function createKeywordReference(type, value) {
|
|
353
|
-
const keyword =
|
|
342
|
+
export function createKeywordReference(type, value) {
|
|
343
|
+
const keyword = METADATA_KEYWORDS[type.toUpperCase()];
|
|
354
344
|
if (!keyword) {
|
|
355
345
|
throw new Error(`Unknown metadata keyword type: ${type}`);
|
|
356
346
|
}
|
|
@@ -360,5 +350,4 @@ function createKeywordReference(type, value) {
|
|
|
360
350
|
}
|
|
361
351
|
return `${keyword}${value}`;
|
|
362
352
|
}
|
|
363
|
-
exports.createKeywordReference = createKeywordReference;
|
|
364
353
|
//# sourceMappingURL=metadata-keywords.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata-keywords.js","sourceRoot":"","sources":["../../src/constants/metadata-keywords.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;AAEH;;;GAGG;AACU,QAAA,iBAAiB,GAAG;IAC/B;;;;;;;;;;OAUG;IACH,IAAI,EAAE,QAAQ;IAEd;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,UAAU;IAElB;;;;;;;;;;OAUG;IACH,MAAM,EAAE,UAAU;IAElB;;;;;;;;;OASG;IACH,IAAI,EAAE,QAAQ;IAEd;;;;;;;;;OASG;IACH,GAAG,EAAE,OAAO;IAEZ;;;;;;;;;OASG;IACH,GAAG,EAAE,OAAO;IAEZ;;;;;;;;OAQG;IACH,QAAQ,EAAE,YAAY;IAEtB;;;;;;;;;;OAUG;IACH,OAAO,EAAE,UAAU;CACX,CAAC;AAYX;;;GAGG;AACU,QAAA,yBAAyB,GAA0B,MAAM,CAAC,MAAM,CAAC,yBAAiB,CAAC,CAAC;AAEjG;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,iBAAiB,CAAC,KAAc;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,iCAAyB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;AAC5E,CAAC;AAND,8CAMC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,sBAAsB,CAAC,KAAa;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8DAA8D;IAC9D,IAAI,KAAK,KAAK,yBAAiB,CAAC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,yBAAi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;AAFD,gEAEC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,sBAAsB,CAAC,IAAyB,EAAE,KAAa;IAC7E,MAAM,OAAO,GAAG,yBAAiB,CAAC,IAAI,CAAC,WAAW,EAAoC,CAAC,CAAC;IAExF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,kCAAkC,IAAI,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,gCAAgC;IAChC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACjD,CAAC;IAED,OAAO,GAAG,OAAO,GAAG,KAAK,EAAE,CAAC;AAC9B,CAAC;AAbD,wDAaC","sourcesContent":["/**\n * Centralized metadata keyword constants for MemberJunction MetadataSync package.\n *\n * These keywords are special prefixes used in metadata JSON files to reference external\n * content, perform lookups, access environment variables, and establish hierarchical relationships.\n *\n * @module metadata-keywords\n *\n * @example\n * // Using @file: to reference external content\n * {\n * \"Prompt\": \"@file:greeting.prompt.md\"\n * }\n *\n * @example\n * // Using @lookup: to find an entity by field value\n * {\n * \"CategoryID\": \"@lookup:AI Prompt Categories.Name=Examples\"\n * }\n *\n * @example\n * // Using @parent: to reference parent entity fields\n * {\n * \"PromptID\": \"@parent:ID\"\n * }\n */\n\n/**\n * Metadata keyword constants.\n * These are the special @ prefixes recognized by MetadataSync for field value processing.\n */\nexport const METADATA_KEYWORDS = {\n /**\n * @file: - Loads content from an external file\n *\n * Reads the contents of a file (relative to the JSON metadata file) and uses it as the field value.\n * Supports text files, markdown, JSON, and other formats.\n *\n * @example\n * \"@file:greeting.prompt.md\"\n * \"@file:./shared/common-prompt.md\"\n * \"@file:../templates/standard-header.md\"\n */\n FILE: '@file:',\n\n /**\n * @lookup: - Looks up an entity record by field value(s)\n *\n * Finds an entity record matching the specified criteria and uses its ID.\n * Supports single-field and multi-field lookups, with optional auto-creation.\n *\n * @example\n * \"@lookup:AI Prompt Types.Name=Chat\"\n * \"@lookup:Users.Email=john@example.com&Department=Sales\"\n * \"@lookup:Categories.Name=Examples?create\"\n * \"@lookup:Categories.Name=Examples?create&Description=Example prompts\"\n */\n LOOKUP: '@lookup:',\n\n /**\n * @parent: - References a field from the parent entity\n *\n * In nested/related entity structures, accesses a field value from the immediate parent record.\n * Only valid when processing nested entities that have a parent context.\n *\n * @example\n * \"@parent:ID\"\n * \"@parent:Name\"\n * \"@parent:CategoryID\"\n */\n PARENT: '@parent:',\n\n /**\n * @root: - References a field from the root entity\n *\n * In nested/related entity structures, accesses a field value from the top-level root record.\n * Only valid when processing nested entities that have a root context.\n *\n * @example\n * \"@root:ID\"\n * \"@root:Name\"\n */\n ROOT: '@root:',\n\n /**\n * @env: - Reads an environment variable\n *\n * Gets the value of an environment variable at runtime.\n * Useful for configuration values that differ between environments.\n *\n * @example\n * \"@env:VARIABLE_NAME\"\n * \"@env:NODE_ENV\"\n */\n ENV: '@env:',\n\n /**\n * @url: - Fetches content from a URL\n *\n * Downloads content from a remote URL and uses it as the field value.\n * Supports HTTP/HTTPS URLs and file:// URLs.\n *\n * @example\n * \"@url:https://example.com/prompts/greeting.md\"\n * \"@url:https://raw.githubusercontent.com/company/prompts/main/customer.md\"\n */\n URL: '@url:',\n\n /**\n * @template: - Loads a template JSON file\n *\n * Loads a JSON template file and uses its contents, replacing any template variables.\n * Useful for standardizing common configurations across multiple records.\n *\n * @example\n * \"@template:templates/standard-ai-models.json\"\n */\n TEMPLATE: '@template:',\n\n /**\n * @include or @include.* - Includes content from another file\n *\n * Special directive (not a field value) that merges content from external files.\n * Can be used in both objects and arrays. Supports spread and property modes.\n *\n * @example\n * { \"@include\": \"common-fields.json\" }\n * [ \"@include:items.json\" ]\n * { \"@include.models\": { \"file\": \"models.json\", \"mode\": \"property\" } }\n */\n INCLUDE: '@include',\n} as const;\n\n/**\n * Type representing all metadata keyword values.\n */\nexport type MetadataKeyword = typeof METADATA_KEYWORDS[keyof typeof METADATA_KEYWORDS];\n\n/**\n * Type representing metadata keyword types (without the colon for keywords that have it).\n */\nexport type MetadataKeywordType = 'file' | 'lookup' | 'parent' | 'root' | 'env' | 'url' | 'template' | 'include';\n\n/**\n * Array of all metadata keyword prefixes for iteration.\n * This array maintains the order of keywords for consistent processing.\n */\nexport const METADATA_KEYWORD_PREFIXES: ReadonlyArray<string> = Object.values(METADATA_KEYWORDS);\n\n/**\n * Checks if a value is a string that starts with any recognized metadata keyword.\n *\n * This is a type-safe check that handles non-string values gracefully.\n * Returns false for null, undefined, objects, numbers, etc.\n *\n * @param value - The value to check (can be any type)\n * @returns true if value is a string starting with a metadata keyword, false otherwise\n *\n * @example\n * isMetadataKeyword('@file:template.md') // true\n * isMetadataKeyword('@lookup:Users.Email=test@example.com') // true\n * isMetadataKeyword('@parent:ID') // true\n * isMetadataKeyword('regular string') // false\n * isMetadataKeyword(123) // false\n * isMetadataKeyword(null) // false\n * isMetadataKeyword('@unknown:value') // false\n */\nexport function isMetadataKeyword(value: unknown): value is string {\n if (typeof value !== 'string') {\n return false;\n }\n\n return METADATA_KEYWORD_PREFIXES.some(prefix => value.startsWith(prefix));\n}\n\n/**\n * Determines which metadata keyword type a string value uses.\n *\n * Examines the prefix of a string and returns the corresponding keyword type.\n * Returns null if the value doesn't use any recognized metadata keyword.\n *\n * @param value - The string value to analyze\n * @returns The keyword type ('file', 'lookup', etc.) or null if no keyword is found\n *\n * @example\n * getMetadataKeywordType('@file:template.md') // 'file'\n * getMetadataKeywordType('@lookup:Users.Name=John') // 'lookup'\n * getMetadataKeywordType('@parent:ID') // 'parent'\n * getMetadataKeywordType('@include') // 'include'\n * getMetadataKeywordType('regular string') // null\n * getMetadataKeywordType('@unknown:value') // null\n */\nexport function getMetadataKeywordType(value: string): MetadataKeywordType | null {\n if (typeof value !== 'string') {\n return null;\n }\n\n // Special handling for @include which doesn't require a colon\n if (value === METADATA_KEYWORDS.INCLUDE || value.startsWith(`${METADATA_KEYWORDS.INCLUDE}.`)) {\n return 'include';\n }\n\n // Check all other keywords\n for (const [key, prefix] of Object.entries(METADATA_KEYWORDS)) {\n if (key === 'INCLUDE') continue; // Already handled above\n\n if (value.startsWith(prefix)) {\n return key.toLowerCase() as MetadataKeywordType;\n }\n }\n\n return null;\n}\n\n/**\n * Type-safe check for metadata keywords that handles any value type.\n *\n * This is an alias for isMetadataKeyword() provided for semantic clarity\n * when you want to explicitly check if a value has a metadata keyword.\n *\n * @param value - Any value to check\n * @returns true if value is a string with a metadata keyword, false otherwise\n *\n * @example\n * const fieldValue = record.Get('SomeField');\n * if (hasMetadataKeyword(fieldValue)) {\n * // fieldValue is guaranteed to be a string with a metadata keyword\n * const type = getMetadataKeywordType(fieldValue);\n * }\n */\nexport function hasMetadataKeyword(value: unknown): value is string {\n return isMetadataKeyword(value);\n}\n\n/**\n * Checks if a string starts with @ but is NOT a metadata keyword.\n *\n * This is useful for filtering out @ strings that are not metadata keywords,\n * such as npm package names (@mui/material, @angular/core) or email addresses.\n *\n * @param value - The value to check\n * @returns true if value starts with @ but is not a metadata keyword\n *\n * @example\n * isNonKeywordAtSymbol('@mui/material') // true\n * isNonKeywordAtSymbol('@angular/core') // true\n * isNonKeywordAtSymbol('@file:template.md') // false\n * isNonKeywordAtSymbol('regular string') // false\n */\nexport function isNonKeywordAtSymbol(value: unknown): boolean {\n return typeof value === 'string' &&\n value.startsWith('@') &&\n !isMetadataKeyword(value);\n}\n\n/**\n * Extracts the value portion after a metadata keyword prefix.\n *\n * Removes the keyword prefix from a string and returns the remaining value.\n * Returns null if the string doesn't use a metadata keyword.\n *\n * @param value - The string containing a metadata keyword\n * @returns The value after the keyword prefix, or null if no keyword found\n *\n * @example\n * extractKeywordValue('@file:template.md') // 'template.md'\n * extractKeywordValue('@lookup:Users.Email=test@example.com') // 'Users.Email=test@example.com'\n * extractKeywordValue('@parent:ID') // 'ID'\n * extractKeywordValue('regular string') // null\n */\nexport function extractKeywordValue(value: string): string | null {\n if (typeof value !== 'string') {\n return null;\n }\n\n const keywordType = getMetadataKeywordType(value);\n if (!keywordType) {\n return null;\n }\n\n // Special handling for @include\n if (keywordType === 'include') {\n if (value === METADATA_KEYWORDS.INCLUDE) {\n return ''; // Just '@include' with no suffix\n }\n if (value.startsWith(`${METADATA_KEYWORDS.INCLUDE}.`)) {\n return value.substring(METADATA_KEYWORDS.INCLUDE.length + 1); // Remove '@include.'\n }\n return null;\n }\n\n // For all other keywords, find the matching prefix and remove it\n for (const prefix of METADATA_KEYWORD_PREFIXES) {\n if (value.startsWith(prefix)) {\n return value.substring(prefix.length);\n }\n }\n\n return null;\n}\n\n/**\n * List of metadata keywords that require a parent context to function.\n * These keywords cannot be used at the top level of metadata - they only work\n * in nested/related entities where a parent record exists.\n */\nexport const CONTEXT_DEPENDENT_KEYWORDS = [\n METADATA_KEYWORDS.PARENT,\n METADATA_KEYWORDS.ROOT,\n] as const;\n\n/**\n * List of metadata keywords that reference external resources.\n * These keywords load content from files, URLs, or other external sources.\n */\nexport const EXTERNAL_REFERENCE_KEYWORDS = [\n METADATA_KEYWORDS.FILE,\n METADATA_KEYWORDS.URL,\n METADATA_KEYWORDS.TEMPLATE,\n] as const;\n\n/**\n * List of metadata keywords that perform database lookups.\n */\nexport const LOOKUP_KEYWORDS = [\n METADATA_KEYWORDS.LOOKUP,\n] as const;\n\n/**\n * List of metadata keywords that access runtime configuration.\n */\nexport const RUNTIME_KEYWORDS = [\n METADATA_KEYWORDS.ENV,\n] as const;\n\n/**\n * Checks if a keyword requires a parent/root context.\n *\n * @param keyword - The keyword to check\n * @returns true if the keyword requires context (parent or root)\n *\n * @example\n * isContextDependentKeyword('@parent:') // true\n * isContextDependentKeyword('@root:') // true\n * isContextDependentKeyword('@file:') // false\n */\nexport function isContextDependentKeyword(keyword: string): boolean {\n return CONTEXT_DEPENDENT_KEYWORDS.some(k => keyword.startsWith(k));\n}\n\n/**\n * Checks if a keyword references an external resource.\n *\n * @param keyword - The keyword to check\n * @returns true if the keyword loads external content\n *\n * @example\n * isExternalReferenceKeyword('@file:') // true\n * isExternalReferenceKeyword('@url:') // true\n * isExternalReferenceKeyword('@lookup:') // false\n */\nexport function isExternalReferenceKeyword(keyword: string): boolean {\n return EXTERNAL_REFERENCE_KEYWORDS.some(k => keyword.startsWith(k));\n}\n\n/**\n * Creates a metadata keyword reference string.\n *\n * Helper function to construct properly formatted keyword references.\n * This ensures consistent formatting across the codebase.\n *\n * @param type - The keyword type\n * @param value - The value after the keyword\n * @returns Formatted keyword reference string\n *\n * @example\n * createKeywordReference('file', 'template.md') // '@file:template.md'\n * createKeywordReference('lookup', 'Users.Email=test@example.com') // '@lookup:Users.Email=test@example.com'\n * createKeywordReference('parent', 'ID') // '@parent:ID'\n */\nexport function createKeywordReference(type: MetadataKeywordType, value: string): string {\n const keyword = METADATA_KEYWORDS[type.toUpperCase() as keyof typeof METADATA_KEYWORDS];\n\n if (!keyword) {\n throw new Error(`Unknown metadata keyword type: ${type}`);\n }\n\n // Special handling for @include\n if (type === 'include') {\n return value ? `${keyword}.${value}` : keyword;\n }\n\n return `${keyword}${value}`;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"metadata-keywords.js","sourceRoot":"","sources":["../../src/constants/metadata-keywords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B;;;;;;;;;;OAUG;IACH,IAAI,EAAE,QAAQ;IAEd;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,UAAU;IAElB;;;;;;;;;;OAUG;IACH,MAAM,EAAE,UAAU;IAElB;;;;;;;;;OASG;IACH,IAAI,EAAE,QAAQ;IAEd;;;;;;;;;OASG;IACH,GAAG,EAAE,OAAO;IAEZ;;;;;;;;;OASG;IACH,GAAG,EAAE,OAAO;IAEZ;;;;;;;;OAQG;IACH,QAAQ,EAAE,YAAY;IAEtB;;;;;;;;;;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
|
-
export {
|
|
3
|
-
export
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export
|
|
12
|
-
export {
|
|
13
|
-
export
|
|
14
|
-
export {
|
|
15
|
-
export
|
|
16
|
-
export {
|
|
17
|
-
export
|
|
18
|
-
export {
|
|
19
|
-
export
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export
|
|
23
|
-
export {
|
|
24
|
-
export
|
|
25
|
-
export {
|
|
26
|
-
export
|
|
27
|
-
export {
|
|
28
|
-
export
|
|
29
|
-
export {
|
|
30
|
-
export
|
|
31
|
-
export {
|
|
32
|
-
export
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export
|
|
1
|
+
import '@memberjunction/server-bootstrap-lite/mj-class-registrations';
|
|
2
|
+
export { FileBackupManager } from './lib/file-backup-manager.js';
|
|
3
|
+
export { SyncEngine, DeferrableLookupError } from './lib/sync-engine.js';
|
|
4
|
+
export type { RecordData } from './lib/sync-engine.js';
|
|
5
|
+
export { ConfigManager, configManager } from './lib/config-manager.js';
|
|
6
|
+
export { getSyncEngine, resetSyncEngine } from './lib/singleton-manager.js';
|
|
7
|
+
export { SQLLogger } from './lib/sql-logger.js';
|
|
8
|
+
export { TransactionManager } from './lib/transaction-manager.js';
|
|
9
|
+
export { JsonWriteHelper } from './lib/json-write-helper.js';
|
|
10
|
+
export { FileWriteBatch } from './lib/file-write-batch.js';
|
|
11
|
+
export { JsonPreprocessor } from './lib/json-preprocessor.js';
|
|
12
|
+
export type { IncludeDirective } from './lib/json-preprocessor.js';
|
|
13
|
+
export { RecordDependencyAnalyzer } from './lib/record-dependency-analyzer.js';
|
|
14
|
+
export type { FlattenedRecord, ReverseDependency, DependencyAnalysisResult } from './lib/record-dependency-analyzer.js';
|
|
15
|
+
export { EntityForeignKeyHelper } from './lib/entity-foreign-key-helper.js';
|
|
16
|
+
export type { ReverseFKInfo } from './lib/entity-foreign-key-helper.js';
|
|
17
|
+
export { DatabaseReferenceScanner } from './lib/database-reference-scanner.js';
|
|
18
|
+
export type { DatabaseReference } from './lib/database-reference-scanner.js';
|
|
19
|
+
export { DeletionAuditor } from './lib/deletion-auditor.js';
|
|
20
|
+
export type { DeletionAudit } from './lib/deletion-auditor.js';
|
|
21
|
+
export { DeletionReportGenerator } from './lib/deletion-report-generator.js';
|
|
22
|
+
export { InitService } from './services/InitService.js';
|
|
23
|
+
export type { InitOptions, InitCallbacks } from './services/InitService.js';
|
|
24
|
+
export { PullService } from './services/PullService.js';
|
|
25
|
+
export type { PullOptions, PullCallbacks, PullResult } from './services/PullService.js';
|
|
26
|
+
export { PushService } from './services/PushService.js';
|
|
27
|
+
export type { PushOptions, PushCallbacks, PushResult } from './services/PushService.js';
|
|
28
|
+
export { StatusService } from './services/StatusService.js';
|
|
29
|
+
export type { StatusOptions, StatusCallbacks, StatusResult } from './services/StatusService.js';
|
|
30
|
+
export { FileResetService } from './services/FileResetService.js';
|
|
31
|
+
export type { FileResetOptions, FileResetCallbacks, FileResetResult } from './services/FileResetService.js';
|
|
32
|
+
export { WatchService } from './services/WatchService.js';
|
|
33
|
+
export type { WatchOptions, WatchCallbacks, WatchResult } from './services/WatchService.js';
|
|
34
|
+
export { ValidationService } from './services/ValidationService.js';
|
|
35
|
+
export { FormattingService } from './services/FormattingService.js';
|
|
36
|
+
export { loadMJConfig, loadSyncConfig, loadEntityConfig, loadFolderConfig, type EntityConfig, type FolderConfig, type RelatedEntityConfig } from './config.js';
|
|
37
|
+
export { initializeProvider, getSystemUser, findEntityDirectories, getDataProvider } from './lib/provider-utils.js';
|
|
38
|
+
export type { ValidationResult, ValidationError, ValidationWarning, EntityDependency, FileValidationResult, ValidationOptions, ReferenceType, ParsedReference } from './types/validation.js';
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1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