@memberjunction/integration-engine-base 0.0.1 → 5.10.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.
@@ -0,0 +1,90 @@
1
+ import { BaseEngine, IMetadataProvider, UserInfo } from '@memberjunction/core';
2
+ import type { MJIntegrationEntity, MJIntegrationSourceTypeEntity, MJCompanyIntegrationEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationSyncWatermarkEntity, MJIntegrationObjectEntity, MJIntegrationObjectFieldEntity } from '@memberjunction/core-entities';
3
+ /**
4
+ * IntegrationEngineBase provides cached metadata for the MJ integration subsystem.
5
+ *
6
+ * It extends BaseEngine to load and auto-refresh all integration-related entities
7
+ * (Integrations, CompanyIntegrations, EntityMaps, FieldMaps, Watermarks, SourceTypes).
8
+ *
9
+ * This class is safe to use in both client (Angular) and server contexts.
10
+ * For server-side orchestration (sync execution), use the full IntegrationEngine
11
+ * from @memberjunction/integration-engine which wraps this base via composition.
12
+ */
13
+ export declare class IntegrationEngineBase extends BaseEngine<IntegrationEngineBase> {
14
+ private _integrations;
15
+ private _sourceTypes;
16
+ private _companyIntegrations;
17
+ private _entityMaps;
18
+ private _fieldMaps;
19
+ private _watermarks;
20
+ private _integrationObjects;
21
+ private _integrationObjectFields;
22
+ Config(forceRefresh?: boolean, contextUser?: UserInfo, provider?: IMetadataProvider): Promise<void>;
23
+ /**
24
+ * After all entities are loaded, wire up cross-references so callers
25
+ * can navigate the object graph without extra lookups.
26
+ */
27
+ protected AdditionalLoading(contextUser?: UserInfo): Promise<void>;
28
+ /** All Integration definitions (e.g. YourMembership, HubSpot). */
29
+ get Integrations(): MJIntegrationEntity[];
30
+ /** All Integration Source Type definitions. */
31
+ get SourceTypes(): MJIntegrationSourceTypeEntity[];
32
+ /** All CompanyIntegration records (company + integration + credentials). */
33
+ get CompanyIntegrations(): MJCompanyIntegrationEntity[];
34
+ /** All entity-level mapping configurations. */
35
+ get EntityMaps(): MJCompanyIntegrationEntityMapEntity[];
36
+ /** All field-level mapping configurations. */
37
+ get FieldMaps(): MJCompanyIntegrationFieldMapEntity[];
38
+ /** All sync watermark records. */
39
+ get Watermarks(): MJCompanyIntegrationSyncWatermarkEntity[];
40
+ /** All integration object definitions (external objects/endpoints per integration). */
41
+ get IntegrationObjects(): MJIntegrationObjectEntity[];
42
+ /** All integration object field definitions. */
43
+ get IntegrationObjectFields(): MJIntegrationObjectFieldEntity[];
44
+ /** Get a specific Integration by ID. */
45
+ GetIntegrationByID(integrationID: string): MJIntegrationEntity | undefined;
46
+ /** Get a specific Integration by name (case-insensitive). */
47
+ GetIntegrationByName(name: string): MJIntegrationEntity | undefined;
48
+ /** Get a specific CompanyIntegration by ID. */
49
+ GetCompanyIntegrationByID(companyIntegrationID: string): MJCompanyIntegrationEntity | undefined;
50
+ /** Get all CompanyIntegrations for a given Integration ID. */
51
+ GetCompanyIntegrationsByIntegrationID(integrationID: string): MJCompanyIntegrationEntity[];
52
+ /** Get all entity maps for a given CompanyIntegration ID. */
53
+ GetEntityMapsForCompanyIntegration(companyIntegrationID: string): MJCompanyIntegrationEntityMapEntity[];
54
+ /** Get all field maps for a given EntityMap ID. */
55
+ GetFieldMapsForEntityMap(entityMapID: string): MJCompanyIntegrationFieldMapEntity[];
56
+ /** Get the watermark for a given EntityMap ID and direction. */
57
+ GetWatermark(entityMapID: string, direction: 'Pull' | 'Push'): MJCompanyIntegrationSyncWatermarkEntity | undefined;
58
+ /** Get all enabled entity maps for a CompanyIntegration, sorted by Priority. */
59
+ GetEnabledEntityMaps(companyIntegrationID: string): MJCompanyIntegrationEntityMapEntity[];
60
+ /**
61
+ * Get the Integration record associated with a CompanyIntegration.
62
+ * Useful for resolving the connector class name, etc.
63
+ */
64
+ GetIntegrationForCompanyIntegration(companyIntegrationID: string): MJIntegrationEntity | undefined;
65
+ /** Get all IntegrationObjects for a given Integration ID. */
66
+ GetIntegrationObjectsByIntegrationID(integrationID: string): MJIntegrationObjectEntity[];
67
+ /** Get a specific IntegrationObject by integration ID and object name. */
68
+ GetIntegrationObject(integrationID: string, objectName: string): MJIntegrationObjectEntity | undefined;
69
+ /** Get a specific IntegrationObject by its ID. */
70
+ GetIntegrationObjectByID(objectID: string): MJIntegrationObjectEntity | undefined;
71
+ /** Get all fields for a given IntegrationObject ID. */
72
+ GetIntegrationObjectFields(objectID: string): MJIntegrationObjectFieldEntity[];
73
+ /** Get active IntegrationObjects for an integration, sorted by Sequence. */
74
+ GetActiveIntegrationObjects(integrationID: string): MJIntegrationObjectEntity[];
75
+ /**
76
+ * Builds a topologically-sorted processing order for integration objects
77
+ * based on FK relationships between objects (RelatedIntegrationObjectID on fields).
78
+ * Objects with no dependencies come first; objects depending on others come after their parents.
79
+ *
80
+ * @param integrationID - The integration to build the DAG for
81
+ * @returns Objects sorted in dependency order (parents before children)
82
+ */
83
+ GetObjectsInDependencyOrder(integrationID: string): MJIntegrationObjectEntity[];
84
+ /**
85
+ * Kahn's algorithm: iteratively remove nodes with no remaining dependencies.
86
+ */
87
+ private topologicalSort;
88
+ static get Instance(): IntegrationEngineBase;
89
+ }
90
+ //# sourceMappingURL=IntegrationEngineBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationEngineBase.d.ts","sourceRoot":"","sources":["../src/IntegrationEngineBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA4B,iBAAiB,EAAE,QAAQ,EAAsB,MAAM,sBAAsB,CAAC;AAE7H,OAAO,KAAK,EACR,mBAAmB,EACnB,6BAA6B,EAC7B,0BAA0B,EAC1B,mCAAmC,EACnC,kCAAkC,EAClC,uCAAuC,EACvC,yBAAyB,EACzB,8BAA8B,EACjC,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;GASG;AACH,qBACa,qBAAsB,SAAQ,UAAU,CAAC,qBAAqB,CAAC;IAExE,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,YAAY,CAAuC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C,oBAAoB,EAAE,MAAM,GAAG,mCAAmC,EAAE;IAI9G,mDAAmD;IAC5C,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,kCAAkC,EAAE;IAI1F,gEAAgE;IACzD,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,uCAAuC,GAAG,SAAS;IAMzH,gFAAgF;IACzE,oBAAoB,CAAC,oBAAoB,EAAE,MAAM,GAAG,mCAAmC,EAAE;IAMhG;;;OAGG;IACI,mCAAmC,CAAC,oBAAoB,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAQzG,6DAA6D;IACtD,oCAAoC,CAAC,aAAa,EAAE,MAAM,GAAG,yBAAyB,EAAE;IAI/F,0EAA0E;IACnE,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,yBAAyB,GAAG,SAAS;IAM7G,kDAAkD;IAC3C,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,yBAAyB,GAAG,SAAS;IAIxF,uDAAuD;IAChD,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,8BAA8B,EAAE;IAIrF,4EAA4E;IACrE,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,yBAAyB,EAAE;IAMtF;;;;;;;OAOG;IACI,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,yBAAyB,EAAE;IAyBtF;;OAEG;IACH,OAAO,CAAC,eAAe;IAgDvB,WAAkB,QAAQ,IAAI,qBAAqB,CAElD;CACJ"}
@@ -0,0 +1,271 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { BaseEngine, RegisterForStartup } from '@memberjunction/core';
8
+ import { UUIDsEqual } from '@memberjunction/global';
9
+ /**
10
+ * IntegrationEngineBase provides cached metadata for the MJ integration subsystem.
11
+ *
12
+ * It extends BaseEngine to load and auto-refresh all integration-related entities
13
+ * (Integrations, CompanyIntegrations, EntityMaps, FieldMaps, Watermarks, SourceTypes).
14
+ *
15
+ * This class is safe to use in both client (Angular) and server contexts.
16
+ * For server-side orchestration (sync execution), use the full IntegrationEngine
17
+ * from @memberjunction/integration-engine which wraps this base via composition.
18
+ */
19
+ let IntegrationEngineBase = class IntegrationEngineBase extends BaseEngine {
20
+ constructor() {
21
+ super(...arguments);
22
+ // ── Cached entity arrays ──────────────────────────────────────────
23
+ this._integrations = [];
24
+ this._sourceTypes = [];
25
+ this._companyIntegrations = [];
26
+ this._entityMaps = [];
27
+ this._fieldMaps = [];
28
+ this._watermarks = [];
29
+ this._integrationObjects = [];
30
+ this._integrationObjectFields = [];
31
+ }
32
+ // ── BaseEngine Config ─────────────────────────────────────────────
33
+ async Config(forceRefresh, contextUser, provider) {
34
+ const params = [
35
+ {
36
+ PropertyName: '_integrations',
37
+ EntityName: 'MJ: Integrations',
38
+ CacheLocal: true,
39
+ },
40
+ {
41
+ PropertyName: '_sourceTypes',
42
+ EntityName: 'MJ: Integration Source Types',
43
+ CacheLocal: true,
44
+ },
45
+ {
46
+ PropertyName: '_companyIntegrations',
47
+ EntityName: 'MJ: Company Integrations',
48
+ CacheLocal: true,
49
+ },
50
+ {
51
+ PropertyName: '_entityMaps',
52
+ EntityName: 'MJ: Company Integration Entity Maps',
53
+ CacheLocal: true,
54
+ },
55
+ {
56
+ PropertyName: '_fieldMaps',
57
+ EntityName: 'MJ: Company Integration Field Maps',
58
+ CacheLocal: true,
59
+ },
60
+ {
61
+ PropertyName: '_watermarks',
62
+ EntityName: 'MJ: Company Integration Sync Watermarks',
63
+ CacheLocal: true,
64
+ },
65
+ {
66
+ PropertyName: '_integrationObjects',
67
+ EntityName: 'MJ: Integration Objects',
68
+ CacheLocal: true,
69
+ },
70
+ {
71
+ PropertyName: '_integrationObjectFields',
72
+ EntityName: 'MJ: Integration Object Fields',
73
+ CacheLocal: true,
74
+ },
75
+ ];
76
+ return await this.Load(params, provider, forceRefresh, contextUser);
77
+ }
78
+ /**
79
+ * After all entities are loaded, wire up cross-references so callers
80
+ * can navigate the object graph without extra lookups.
81
+ */
82
+ async AdditionalLoading(contextUser) {
83
+ // Nothing to wire up yet — the getter helpers below handle
84
+ // filtering on-demand. If we add extended entity classes with
85
+ // child arrays (like AIEngineBase does with agent.Actions), we
86
+ // would populate them here.
87
+ }
88
+ // ── Public Accessors ──────────────────────────────────────────────
89
+ /** All Integration definitions (e.g. YourMembership, HubSpot). */
90
+ get Integrations() {
91
+ return this._integrations;
92
+ }
93
+ /** All Integration Source Type definitions. */
94
+ get SourceTypes() {
95
+ return this._sourceTypes;
96
+ }
97
+ /** All CompanyIntegration records (company + integration + credentials). */
98
+ get CompanyIntegrations() {
99
+ return this._companyIntegrations;
100
+ }
101
+ /** All entity-level mapping configurations. */
102
+ get EntityMaps() {
103
+ return this._entityMaps;
104
+ }
105
+ /** All field-level mapping configurations. */
106
+ get FieldMaps() {
107
+ return this._fieldMaps;
108
+ }
109
+ /** All sync watermark records. */
110
+ get Watermarks() {
111
+ return this._watermarks;
112
+ }
113
+ /** All integration object definitions (external objects/endpoints per integration). */
114
+ get IntegrationObjects() {
115
+ return this._integrationObjects;
116
+ }
117
+ /** All integration object field definitions. */
118
+ get IntegrationObjectFields() {
119
+ return this._integrationObjectFields;
120
+ }
121
+ // ── Convenience Lookup Methods ────────────────────────────────────
122
+ /** Get a specific Integration by ID. */
123
+ GetIntegrationByID(integrationID) {
124
+ return this._integrations.find(i => UUIDsEqual(i.ID, integrationID));
125
+ }
126
+ /** Get a specific Integration by name (case-insensitive). */
127
+ GetIntegrationByName(name) {
128
+ const lower = name.trim().toLowerCase();
129
+ return this._integrations.find(i => i.Name.trim().toLowerCase() === lower);
130
+ }
131
+ /** Get a specific CompanyIntegration by ID. */
132
+ GetCompanyIntegrationByID(companyIntegrationID) {
133
+ return this._companyIntegrations.find(ci => UUIDsEqual(ci.ID, companyIntegrationID));
134
+ }
135
+ /** Get all CompanyIntegrations for a given Integration ID. */
136
+ GetCompanyIntegrationsByIntegrationID(integrationID) {
137
+ return this._companyIntegrations.filter(ci => UUIDsEqual(ci.IntegrationID, integrationID));
138
+ }
139
+ /** Get all entity maps for a given CompanyIntegration ID. */
140
+ GetEntityMapsForCompanyIntegration(companyIntegrationID) {
141
+ return this._entityMaps.filter(em => UUIDsEqual(em.CompanyIntegrationID, companyIntegrationID));
142
+ }
143
+ /** Get all field maps for a given EntityMap ID. */
144
+ GetFieldMapsForEntityMap(entityMapID) {
145
+ return this._fieldMaps.filter(fm => UUIDsEqual(fm.EntityMapID, entityMapID));
146
+ }
147
+ /** Get the watermark for a given EntityMap ID and direction. */
148
+ GetWatermark(entityMapID, direction) {
149
+ return this._watermarks.find(w => UUIDsEqual(w.EntityMapID, entityMapID) && w.Direction === direction);
150
+ }
151
+ /** Get all enabled entity maps for a CompanyIntegration, sorted by Priority. */
152
+ GetEnabledEntityMaps(companyIntegrationID) {
153
+ return this.GetEntityMapsForCompanyIntegration(companyIntegrationID)
154
+ .filter(em => em.SyncEnabled && em.Status === 'Active')
155
+ .sort((a, b) => a.Priority - b.Priority);
156
+ }
157
+ /**
158
+ * Get the Integration record associated with a CompanyIntegration.
159
+ * Useful for resolving the connector class name, etc.
160
+ */
161
+ GetIntegrationForCompanyIntegration(companyIntegrationID) {
162
+ const ci = this.GetCompanyIntegrationByID(companyIntegrationID);
163
+ if (!ci)
164
+ return undefined;
165
+ return this.GetIntegrationByID(ci.IntegrationID);
166
+ }
167
+ // ── Integration Object Lookups ──────────────────────────────────
168
+ /** Get all IntegrationObjects for a given Integration ID. */
169
+ GetIntegrationObjectsByIntegrationID(integrationID) {
170
+ return this._integrationObjects.filter(o => UUIDsEqual(o.IntegrationID, integrationID));
171
+ }
172
+ /** Get a specific IntegrationObject by integration ID and object name. */
173
+ GetIntegrationObject(integrationID, objectName) {
174
+ return this._integrationObjects.find(o => UUIDsEqual(o.IntegrationID, integrationID) && o.Name === objectName);
175
+ }
176
+ /** Get a specific IntegrationObject by its ID. */
177
+ GetIntegrationObjectByID(objectID) {
178
+ return this._integrationObjects.find(o => UUIDsEqual(o.ID, objectID));
179
+ }
180
+ /** Get all fields for a given IntegrationObject ID. */
181
+ GetIntegrationObjectFields(objectID) {
182
+ return this._integrationObjectFields.filter(f => UUIDsEqual(f.IntegrationObjectID, objectID));
183
+ }
184
+ /** Get active IntegrationObjects for an integration, sorted by Sequence. */
185
+ GetActiveIntegrationObjects(integrationID) {
186
+ return this.GetIntegrationObjectsByIntegrationID(integrationID)
187
+ .filter(o => o.Status === 'Active')
188
+ .sort((a, b) => a.Sequence - b.Sequence);
189
+ }
190
+ /**
191
+ * Builds a topologically-sorted processing order for integration objects
192
+ * based on FK relationships between objects (RelatedIntegrationObjectID on fields).
193
+ * Objects with no dependencies come first; objects depending on others come after their parents.
194
+ *
195
+ * @param integrationID - The integration to build the DAG for
196
+ * @returns Objects sorted in dependency order (parents before children)
197
+ */
198
+ GetObjectsInDependencyOrder(integrationID) {
199
+ const objects = this.GetActiveIntegrationObjects(integrationID);
200
+ const objectMap = new Map(objects.map(o => [o.ID.toUpperCase(), o]));
201
+ // Build adjacency: object → set of object IDs it depends on
202
+ const deps = new Map();
203
+ for (const obj of objects) {
204
+ const key = obj.ID.toUpperCase();
205
+ deps.set(key, new Set());
206
+ }
207
+ for (const field of this._integrationObjectFields) {
208
+ if (!field.RelatedIntegrationObjectID)
209
+ continue;
210
+ const parentKey = field.IntegrationObjectID.toUpperCase();
211
+ const depKey = field.RelatedIntegrationObjectID.toUpperCase();
212
+ // Only track deps for objects in this integration
213
+ if (deps.has(parentKey) && objectMap.has(depKey) && parentKey !== depKey) {
214
+ deps.get(parentKey).add(depKey);
215
+ }
216
+ }
217
+ // Kahn's algorithm for topological sort
218
+ return this.topologicalSort(objects, deps);
219
+ }
220
+ /**
221
+ * Kahn's algorithm: iteratively remove nodes with no remaining dependencies.
222
+ */
223
+ topologicalSort(objects, deps) {
224
+ const sorted = [];
225
+ const objectMap = new Map(objects.map(o => [o.ID.toUpperCase(), o]));
226
+ const remaining = new Map(deps);
227
+ while (remaining.size > 0) {
228
+ // Find all objects with no remaining dependencies
229
+ const ready = [];
230
+ for (const [key, depSet] of remaining) {
231
+ if (depSet.size === 0)
232
+ ready.push(key);
233
+ }
234
+ if (ready.length === 0) {
235
+ // Circular dependency — add remaining objects in Sequence order
236
+ const leftover = [...remaining.keys()]
237
+ .map(k => objectMap.get(k))
238
+ .filter(Boolean)
239
+ .sort((a, b) => a.Sequence - b.Sequence);
240
+ sorted.push(...leftover);
241
+ break;
242
+ }
243
+ // Sort ready nodes by Sequence for stable ordering
244
+ ready.sort((a, b) => {
245
+ const objA = objectMap.get(a);
246
+ const objB = objectMap.get(b);
247
+ return (objA?.Sequence ?? 0) - (objB?.Sequence ?? 0);
248
+ });
249
+ for (const key of ready) {
250
+ const obj = objectMap.get(key);
251
+ if (obj)
252
+ sorted.push(obj);
253
+ remaining.delete(key);
254
+ // Remove this object from other objects' dependency sets
255
+ for (const depSet of remaining.values()) {
256
+ depSet.delete(key);
257
+ }
258
+ }
259
+ }
260
+ return sorted;
261
+ }
262
+ // ── Singleton ─────────────────────────────────────────────────────
263
+ static get Instance() {
264
+ return super.getInstance();
265
+ }
266
+ };
267
+ IntegrationEngineBase = __decorate([
268
+ RegisterForStartup()
269
+ ], IntegrationEngineBase);
270
+ export { IntegrationEngineBase };
271
+ //# sourceMappingURL=IntegrationEngineBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationEngineBase.js","sourceRoot":"","sources":["../src/IntegrationEngineBase.ts"],"names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} from './IntegrationEngineBase.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { IntegrationEngineBase } from './IntegrationEngineBase.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,32 @@
1
1
  {
2
2
  "name": "@memberjunction/integration-engine-base",
3
- "version": "0.0.1",
4
- "description": "OIDC trusted publishing setup package for @memberjunction/integration-engine-base",
5
- "keywords": [
6
- "oidc",
7
- "trusted-publishing",
8
- "setup"
9
- ]
3
+ "type": "module",
4
+ "version": "5.10.0",
5
+ "description": "MemberJunction: Base Integration Engine - metadata caching for integrations, usable anywhere (client and server).",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "/dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "tsc && tsc-alias -f",
13
+ "test": "vitest run",
14
+ "test:watch": "vitest"
15
+ },
16
+ "dependencies": {
17
+ "@memberjunction/core": "5.10.0",
18
+ "@memberjunction/core-entities": "5.10.0",
19
+ "@memberjunction/global": "5.10.0"
20
+ },
21
+ "devDependencies": {
22
+ "typescript": "^5.9.3",
23
+ "tsc-alias": "^1.8.16",
24
+ "vitest": "^4.0.18"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/MemberJunction/MJ"
29
+ },
30
+ "author": "MemberJunction.com",
31
+ "license": "ISC"
10
32
  }
package/README.md DELETED
@@ -1,45 +0,0 @@
1
- # @memberjunction/integration-engine-base
2
-
3
- ## ⚠️ IMPORTANT NOTICE ⚠️
4
-
5
- **This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
6
-
7
- This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
8
-
9
- ## Purpose
10
-
11
- This package exists to:
12
- 1. Configure OIDC trusted publishing for the package name `@memberjunction/integration-engine-base`
13
- 2. Enable secure, token-less publishing from CI/CD workflows
14
- 3. Establish provenance for packages published under this name
15
-
16
- ## What is OIDC Trusted Publishing?
17
-
18
- OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
19
-
20
- ## Setup Instructions
21
-
22
- To properly configure OIDC trusted publishing for this package:
23
-
24
- 1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
25
- 2. Configure the trusted publisher (e.g., GitHub Actions)
26
- 3. Specify the repository and workflow that should be allowed to publish
27
- 4. Use the configured workflow to publish your actual package
28
-
29
- ## DO NOT USE THIS PACKAGE
30
-
31
- This package is a placeholder for OIDC configuration only. It:
32
- - Contains no executable code
33
- - Provides no functionality
34
- - Should not be installed as a dependency
35
- - Exists only for administrative purposes
36
-
37
- ## More Information
38
-
39
- For more details about npm's trusted publishing feature, see:
40
- - [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
41
- - [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
42
-
43
- ---
44
-
45
- **Maintained for OIDC setup purposes only**