@memberjunction/testing-engine-base 0.0.1 → 2.119.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/TestEngineBase.d.ts +117 -0
- package/dist/TestEngineBase.d.ts.map +1 -0
- package/dist/TestEngineBase.js +210 -0
- package/dist/TestEngineBase.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/package.json +30 -7
- package/README.md +0 -45
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Base engine for test metadata management
|
|
3
|
+
* @module @memberjunction/testing-engine-base
|
|
4
|
+
*/
|
|
5
|
+
import { BaseEngine, IMetadataProvider, UserInfo } from '@memberjunction/core';
|
|
6
|
+
import { TestTypeEntity, TestEntity, TestSuiteEntity, TestRubricEntity, TestSuiteTestEntity } from '@memberjunction/core-entities';
|
|
7
|
+
/**
|
|
8
|
+
* Base engine for test framework metadata management.
|
|
9
|
+
*
|
|
10
|
+
* This class handles loading and caching test metadata (types, tests, suites, rubrics).
|
|
11
|
+
* It does NOT contain execution logic - that's in TestEngine.
|
|
12
|
+
* This separation allows the metadata to be safely used in UI contexts.
|
|
13
|
+
*
|
|
14
|
+
* Follows pattern from ActionEngineBase, SchedulingEngineBase.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const engine = TestEngineBase.Instance;
|
|
19
|
+
* await engine.Config(false, contextUser);
|
|
20
|
+
* const types = engine.TestTypes;
|
|
21
|
+
* const tests = engine.Tests;
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class TestEngineBase extends BaseEngine<TestEngineBase> {
|
|
25
|
+
private _testTypes;
|
|
26
|
+
private _tests;
|
|
27
|
+
private _testSuites;
|
|
28
|
+
private _testSuiteTests;
|
|
29
|
+
private _testRubrics;
|
|
30
|
+
/**
|
|
31
|
+
* Singleton instance accessor
|
|
32
|
+
*/
|
|
33
|
+
static get Instance(): TestEngineBase;
|
|
34
|
+
/**
|
|
35
|
+
* All loaded test types
|
|
36
|
+
*/
|
|
37
|
+
get TestTypes(): TestTypeEntity[];
|
|
38
|
+
/**
|
|
39
|
+
* All loaded tests
|
|
40
|
+
*/
|
|
41
|
+
get Tests(): TestEntity[];
|
|
42
|
+
/**
|
|
43
|
+
* All loaded test suites
|
|
44
|
+
*/
|
|
45
|
+
get TestSuites(): TestSuiteEntity[];
|
|
46
|
+
/**
|
|
47
|
+
* All loaded test suite tests
|
|
48
|
+
*/
|
|
49
|
+
get TestSuiteTests(): TestSuiteTestEntity[];
|
|
50
|
+
/**
|
|
51
|
+
* All loaded test rubrics
|
|
52
|
+
*/
|
|
53
|
+
get TestRubrics(): TestRubricEntity[];
|
|
54
|
+
/**
|
|
55
|
+
* Configure and load metadata
|
|
56
|
+
*
|
|
57
|
+
* @param forceRefresh - Force reload even if already loaded
|
|
58
|
+
* @param contextUser - User context for data access
|
|
59
|
+
* @param provider - Optional metadata provider
|
|
60
|
+
*/
|
|
61
|
+
Config(forceRefresh?: boolean, contextUser?: UserInfo, provider?: IMetadataProvider): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Get test type by ID
|
|
64
|
+
*/
|
|
65
|
+
GetTestTypeByID(id: string): TestTypeEntity | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Get test type by name
|
|
68
|
+
*/
|
|
69
|
+
GetTestTypeByName(name: string): TestTypeEntity | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Get test by ID
|
|
72
|
+
*/
|
|
73
|
+
GetTestByID(id: string): TestEntity | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Get test by name
|
|
76
|
+
*/
|
|
77
|
+
GetTestByName(name: string): TestEntity | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Get test suite by ID
|
|
80
|
+
*/
|
|
81
|
+
GetTestSuiteByID(id: string): TestSuiteEntity | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Get test suite by name
|
|
84
|
+
*/
|
|
85
|
+
GetTestSuiteByName(name: string): TestSuiteEntity | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Get test rubric by ID
|
|
88
|
+
*/
|
|
89
|
+
GetTestRubricByID(id: string): TestRubricEntity | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Get test rubric by name
|
|
92
|
+
*/
|
|
93
|
+
GetTestRubricByName(name: string): TestRubricEntity | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Get tests by type
|
|
96
|
+
*/
|
|
97
|
+
GetTestsByType(typeId: string): TestEntity[];
|
|
98
|
+
/**
|
|
99
|
+
* Get tests by tag
|
|
100
|
+
*/
|
|
101
|
+
GetTestsByTag(tag: string): TestEntity[];
|
|
102
|
+
/**
|
|
103
|
+
* Returns all of the tests associated with a given test suite, sorted by their sequence.
|
|
104
|
+
* @param suiteId
|
|
105
|
+
* @returns
|
|
106
|
+
*/
|
|
107
|
+
GetTestsForSuite(suiteId: string): TestEntity[];
|
|
108
|
+
/**
|
|
109
|
+
* Get active tests (Status = 'Active')
|
|
110
|
+
*/
|
|
111
|
+
GetActiveTests(): TestEntity[];
|
|
112
|
+
/**
|
|
113
|
+
* Get active test suites (Status = 'Active')
|
|
114
|
+
*/
|
|
115
|
+
GetActiveTestSuites(): TestSuiteEntity[];
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=TestEngineBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestEngineBase.d.ts","sourceRoot":"","sources":["../src/TestEngineBase.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACH,cAAc,EACd,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACtB,MAAM,+BAA+B,CAAC;AAEvC;;;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,SAAS;IAIlE;;OAEG;IACI,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAItE;;OAEG;IACI,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE;IAInD;;OAEG;IACI,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,EAAE;IAY/C;;;;OAIG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,EAAE;IAmBtD;;OAEG;IACI,cAAc,IAAI,UAAU,EAAE;IAIrC;;OAEG;IACI,mBAAmB,IAAI,eAAe,EAAE;CAGlD"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Base engine for test metadata management
|
|
4
|
+
* @module @memberjunction/testing-engine-base
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.TestEngineBase = void 0;
|
|
8
|
+
const core_1 = require("@memberjunction/core");
|
|
9
|
+
/**
|
|
10
|
+
* Base engine for test framework metadata management.
|
|
11
|
+
*
|
|
12
|
+
* This class handles loading and caching test metadata (types, tests, suites, rubrics).
|
|
13
|
+
* It does NOT contain execution logic - that's in TestEngine.
|
|
14
|
+
* This separation allows the metadata to be safely used in UI contexts.
|
|
15
|
+
*
|
|
16
|
+
* Follows pattern from ActionEngineBase, SchedulingEngineBase.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const engine = TestEngineBase.Instance;
|
|
21
|
+
* await engine.Config(false, contextUser);
|
|
22
|
+
* const types = engine.TestTypes;
|
|
23
|
+
* const tests = engine.Tests;
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
class TestEngineBase extends core_1.BaseEngine {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this._testTypes = [];
|
|
30
|
+
this._tests = [];
|
|
31
|
+
this._testSuites = [];
|
|
32
|
+
this._testSuiteTests = [];
|
|
33
|
+
this._testRubrics = [];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Singleton instance accessor
|
|
37
|
+
*/
|
|
38
|
+
static get Instance() {
|
|
39
|
+
return super.getInstance();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* All loaded test types
|
|
43
|
+
*/
|
|
44
|
+
get TestTypes() {
|
|
45
|
+
return this._testTypes;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* All loaded tests
|
|
49
|
+
*/
|
|
50
|
+
get Tests() {
|
|
51
|
+
return this._tests;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* All loaded test suites
|
|
55
|
+
*/
|
|
56
|
+
get TestSuites() {
|
|
57
|
+
return this._testSuites;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* All loaded test suite tests
|
|
61
|
+
*/
|
|
62
|
+
get TestSuiteTests() {
|
|
63
|
+
return this._testSuiteTests;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* All loaded test rubrics
|
|
67
|
+
*/
|
|
68
|
+
get TestRubrics() {
|
|
69
|
+
return this._testRubrics;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Configure and load metadata
|
|
73
|
+
*
|
|
74
|
+
* @param forceRefresh - Force reload even if already loaded
|
|
75
|
+
* @param contextUser - User context for data access
|
|
76
|
+
* @param provider - Optional metadata provider
|
|
77
|
+
*/
|
|
78
|
+
async Config(forceRefresh, contextUser, provider) {
|
|
79
|
+
const params = [
|
|
80
|
+
{
|
|
81
|
+
PropertyName: '_testTypes',
|
|
82
|
+
EntityName: 'MJ: Test Types'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
PropertyName: '_tests',
|
|
86
|
+
EntityName: 'MJ: Tests'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
PropertyName: '_testSuites',
|
|
90
|
+
EntityName: 'MJ: Test Suites'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
PropertyName: '_testRubrics',
|
|
94
|
+
EntityName: 'MJ: Test Rubrics'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
PropertyName: '_testSuiteTests',
|
|
98
|
+
EntityName: 'MJ: Test Suite Tests'
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
return await this.Load(params, provider, forceRefresh, contextUser);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Get test type by ID
|
|
105
|
+
*/
|
|
106
|
+
GetTestTypeByID(id) {
|
|
107
|
+
return this._testTypes.find(t => t.ID === id);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Get test type by name
|
|
111
|
+
*/
|
|
112
|
+
GetTestTypeByName(name) {
|
|
113
|
+
return this._testTypes.find(t => t.Name === name);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Get test by ID
|
|
117
|
+
*/
|
|
118
|
+
GetTestByID(id) {
|
|
119
|
+
return this._tests.find(t => t.ID === id);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get test by name
|
|
123
|
+
*/
|
|
124
|
+
GetTestByName(name) {
|
|
125
|
+
return this._tests.find(t => t.Name === name);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Get test suite by ID
|
|
129
|
+
*/
|
|
130
|
+
GetTestSuiteByID(id) {
|
|
131
|
+
return this._testSuites.find(s => s.ID === id);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Get test suite by name
|
|
135
|
+
*/
|
|
136
|
+
GetTestSuiteByName(name) {
|
|
137
|
+
return this._testSuites.find(s => s.Name === name);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get test rubric by ID
|
|
141
|
+
*/
|
|
142
|
+
GetTestRubricByID(id) {
|
|
143
|
+
return this._testRubrics.find(r => r.ID === id);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Get test rubric by name
|
|
147
|
+
*/
|
|
148
|
+
GetTestRubricByName(name) {
|
|
149
|
+
return this._testRubrics.find(r => r.Name === name);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Get tests by type
|
|
153
|
+
*/
|
|
154
|
+
GetTestsByType(typeId) {
|
|
155
|
+
return this._tests.filter(t => t.TypeID === typeId);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Get tests by tag
|
|
159
|
+
*/
|
|
160
|
+
GetTestsByTag(tag) {
|
|
161
|
+
return this._tests.filter(t => {
|
|
162
|
+
if (!t.Tags)
|
|
163
|
+
return false;
|
|
164
|
+
try {
|
|
165
|
+
const tags = JSON.parse(t.Tags);
|
|
166
|
+
return tags.includes(tag);
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Returns all of the tests associated with a given test suite, sorted by their sequence.
|
|
175
|
+
* @param suiteId
|
|
176
|
+
* @returns
|
|
177
|
+
*/
|
|
178
|
+
GetTestsForSuite(suiteId) {
|
|
179
|
+
const suiteTests = this._testSuiteTests.filter(t => t.SuiteID === suiteId);
|
|
180
|
+
const tests = [];
|
|
181
|
+
for (const st of suiteTests) {
|
|
182
|
+
const test = this.GetTestByID(st.TestID);
|
|
183
|
+
if (test) {
|
|
184
|
+
tests.push(test);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return tests.sort((a, b) => {
|
|
188
|
+
const aSuiteTest = suiteTests.find(st => st.TestID === a.ID);
|
|
189
|
+
const bSuiteTest = suiteTests.find(st => st.TestID === b.ID);
|
|
190
|
+
if (aSuiteTest && bSuiteTest) {
|
|
191
|
+
return aSuiteTest.Sequence - bSuiteTest.Sequence;
|
|
192
|
+
}
|
|
193
|
+
return 0;
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Get active tests (Status = 'Active')
|
|
198
|
+
*/
|
|
199
|
+
GetActiveTests() {
|
|
200
|
+
return this._tests.filter(t => t.Status === 'Active');
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Get active test suites (Status = 'Active')
|
|
204
|
+
*/
|
|
205
|
+
GetActiveTestSuites() {
|
|
206
|
+
return this._testSuites.filter(s => s.Status === 'Active');
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
exports.TestEngineBase = TestEngineBase;
|
|
210
|
+
//# sourceMappingURL=TestEngineBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestEngineBase.js","sourceRoot":"","sources":["../src/TestEngineBase.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAI8B;AAS9B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,cAAe,SAAQ,iBAA0B;IAA9D;;QACY,eAAU,GAAqB,EAAE,CAAC;QAClC,WAAM,GAAiB,EAAE,CAAC;QAC1B,gBAAW,GAAsB,EAAE,CAAC;QACpC,oBAAe,GAA0B,EAAE,CAAC;QAC5C,iBAAY,GAAuB,EAAE,CAAC;IAgMlD,CAAC;IA9LG;;OAEG;IACI,MAAM,KAAK,QAAQ;QACtB,OAAO,KAAK,CAAC,WAAW,EAAkB,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,IAAW,cAAc;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED;;;;;;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ist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MemberJunction Testing Engine Base
|
|
4
|
+
*
|
|
5
|
+
* Metadata cache for test framework (UI-safe, no execution logic)
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
__exportStar(require("./TestEngineBase"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,mDAAiC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/testing-engine-base",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
]
|
|
3
|
+
"version": "2.119.0",
|
|
4
|
+
"description": "MemberJunction Testing Framework Engine Base - Metadata cache for test types, suites, and tests (UI-safe, no execution)",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"start": "ts-node-dev src/index.ts",
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
|
+
},
|
|
15
|
+
"author": "MemberJunction.com",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"ts-node-dev": "^2.0.0",
|
|
19
|
+
"typescript": "^5.4.5",
|
|
20
|
+
"@types/debug": "^4.1.12"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@memberjunction/global": "2.119.0",
|
|
24
|
+
"@memberjunction/core": "2.119.0",
|
|
25
|
+
"@memberjunction/core-entities": "2.119.0",
|
|
26
|
+
"rxjs": "^7.8.1",
|
|
27
|
+
"debug": "^4.4.0"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/MemberJunction/MJ"
|
|
32
|
+
}
|
|
10
33
|
}
|
package/README.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# @memberjunction/testing-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/testing-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**
|