@nexo-alpha/context 0.1.0 → 0.2.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/context.d.ts +12 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +19 -4
- package/dist/context.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/knowledge.d.ts +63 -0
- package/dist/knowledge.d.ts.map +1 -0
- package/dist/knowledge.js +71 -0
- package/dist/knowledge.js.map +1 -0
- package/package.json +5 -2
package/dist/context.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ApplicationState,
|
|
1
|
+
import type { ApplicationState, NexoApi, NexoApplication, NexoJob, NexoService } from "@nexo-alpha/core";
|
|
2
|
+
import { type ApplicationKnowledge, type DevelopmentState, type NexoConstraint, type NexoDecision } from "./knowledge.js";
|
|
2
3
|
export interface ModuleContext {
|
|
3
4
|
readonly name: string;
|
|
4
5
|
readonly description?: string | undefined;
|
|
@@ -23,6 +24,15 @@ export interface ApplicationContext {
|
|
|
23
24
|
readonly constraints: readonly NexoConstraint[];
|
|
24
25
|
readonly developmentState: DevelopmentState;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Builds an ApplicationContext from the structural model plus optional
|
|
29
|
+
* human-authored knowledge.
|
|
30
|
+
*
|
|
31
|
+
* @param app The Nexo application (structure + lifecycle).
|
|
32
|
+
* @param knowledge Optional knowledge object created with createKnowledge().
|
|
33
|
+
* When omitted, decisions/constraints/developmentState are
|
|
34
|
+
* empty/default in the resulting context.
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildContext(app: NexoApplication, knowledge?: ApplicationKnowledge): ApplicationContext;
|
|
27
37
|
export declare function contextToJson(context: ApplicationContext): string;
|
|
28
38
|
//# sourceMappingURL=context.d.ts.map
|
package/dist/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,OAAO,EACP,eAAe,EACf,OAAO,EACP,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,EAAE;QACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1C,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;KAClC,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAC3C,QAAQ,CAAC,SAAS,EAAE,SAAS,YAAY,EAAE,CAAC;IAC5C,QAAQ,CAAC,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;IAChD,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;CAC7C;AASD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,eAAe,EACpB,SAAS,CAAC,EAAE,oBAAoB,GAC/B,kBAAkB,CA0BpB;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAEjE"}
|
package/dist/context.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
const EMPTY_DEVELOPMENT_STATE = {
|
|
2
|
+
completed: [],
|
|
3
|
+
inProgress: [],
|
|
4
|
+
blocked: [],
|
|
5
|
+
knownIssues: []
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Builds an ApplicationContext from the structural model plus optional
|
|
9
|
+
* human-authored knowledge.
|
|
10
|
+
*
|
|
11
|
+
* @param app The Nexo application (structure + lifecycle).
|
|
12
|
+
* @param knowledge Optional knowledge object created with createKnowledge().
|
|
13
|
+
* When omitted, decisions/constraints/developmentState are
|
|
14
|
+
* empty/default in the resulting context.
|
|
15
|
+
*/
|
|
16
|
+
export function buildContext(app, knowledge) {
|
|
2
17
|
const modules = app.getModules().map((module) => ({
|
|
3
18
|
name: module.name,
|
|
4
19
|
...(module.description !== undefined && { description: module.description }),
|
|
@@ -19,9 +34,9 @@ export function buildContext(app) {
|
|
|
19
34
|
state: app.state
|
|
20
35
|
},
|
|
21
36
|
modules,
|
|
22
|
-
decisions:
|
|
23
|
-
constraints:
|
|
24
|
-
developmentState:
|
|
37
|
+
decisions: knowledge?.getDecisions() ?? [],
|
|
38
|
+
constraints: knowledge?.getConstraints() ?? [],
|
|
39
|
+
developmentState: knowledge?.getDevelopmentState() ?? EMPTY_DEVELOPMENT_STATE
|
|
25
40
|
};
|
|
26
41
|
}
|
|
27
42
|
export function contextToJson(context) {
|
package/dist/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAwCA,MAAM,uBAAuB,GAAqB;IAChD,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAC1B,GAAoB,EACpB,SAAgC;IAEhC,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAiB,EAAE,CAAC,CAAC;QAC/D,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,GAAG,CAAC,MAAM,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC;QAC5E,GAAG,CAAC,MAAM,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;QAChE,GAAG,CAAC,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;QAC7D,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,EAAE;QACvC,UAAU,EAAE,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC;QAC1C,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE;QAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;QAC3B,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE;KACxB,CAAC,CAAC,CAAC;IAEJ,OAAO;QACL,WAAW,EAAE;YACX,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,GAAG,CAAC,GAAG,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC;YACtE,KAAK,EAAE,GAAG,CAAC,KAAK;SACjB;QACD,OAAO;QACP,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE;QAC1C,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE;QAC9C,gBAAgB,EAAE,SAAS,EAAE,mBAAmB,EAAE,IAAI,uBAAuB;KAC9E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAA2B;IACvD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC1C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { buildContext, contextToJson } from "./context.js";
|
|
2
2
|
export type { ApplicationContext, ModuleContext } from "./context.js";
|
|
3
|
+
export { createKnowledge, knowledgeToJson, knowledgeFromJson } from "./knowledge.js";
|
|
4
|
+
export type { ApplicationKnowledge, SerializedKnowledge, DevelopmentState, NexoConstraint, NexoDecision, NexoHistoryEntry } from "./knowledge.js";
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACd,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,kBAAkB,EAClB,aAAa,EACd,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACd,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,kBAAkB,EAClB,aAAa,EACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,gBAAgB,EACjB,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACd,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACd,MAAM,cAAc,CAAC;AAOtB,OAAO,EACL,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export interface NexoDecision {
|
|
2
|
+
readonly title: string;
|
|
3
|
+
readonly reason?: string;
|
|
4
|
+
readonly alternatives?: string;
|
|
5
|
+
readonly status?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface NexoConstraint {
|
|
8
|
+
readonly description: string;
|
|
9
|
+
readonly reason?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DevelopmentState {
|
|
12
|
+
readonly currentObjective?: string;
|
|
13
|
+
readonly completed: readonly string[];
|
|
14
|
+
readonly inProgress: readonly string[];
|
|
15
|
+
readonly blocked: readonly string[];
|
|
16
|
+
readonly knownIssues: readonly string[];
|
|
17
|
+
readonly nextStep?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface NexoHistoryEntry {
|
|
20
|
+
readonly timestamp: string;
|
|
21
|
+
readonly operation: string;
|
|
22
|
+
readonly target?: string;
|
|
23
|
+
readonly actor?: string;
|
|
24
|
+
readonly result: "success" | "denied" | "failed";
|
|
25
|
+
readonly detail?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Human-authored knowledge about an application.
|
|
29
|
+
*
|
|
30
|
+
* Distinct from the structural model in @nexo-alpha/core, which describes
|
|
31
|
+
* what the application IS (modules, APIs, services, lifecycle). Knowledge
|
|
32
|
+
* describes what we know ABOUT the application: architectural decisions,
|
|
33
|
+
* constraints, current development state, and an audit history of operations.
|
|
34
|
+
*
|
|
35
|
+
* Create with createKnowledge() and pass to buildContext() to include in the
|
|
36
|
+
* application manifest, or to createReadInterface()/createWriteInterface() in
|
|
37
|
+
* @nexo-alpha/tools so the AI interface can read and write it.
|
|
38
|
+
*/
|
|
39
|
+
export interface ApplicationKnowledge {
|
|
40
|
+
addDecision(decision: NexoDecision): this;
|
|
41
|
+
getDecisions(): readonly NexoDecision[];
|
|
42
|
+
addConstraint(constraint: NexoConstraint): this;
|
|
43
|
+
getConstraints(): readonly NexoConstraint[];
|
|
44
|
+
/**
|
|
45
|
+
* Shallow-merges a partial patch into the current development state.
|
|
46
|
+
* Array fields (completed, inProgress, blocked, knownIssues) are replaced
|
|
47
|
+
* wholesale — the caller owns the full list, not an append log.
|
|
48
|
+
*/
|
|
49
|
+
setDevelopmentState(patch: Partial<DevelopmentState>): this;
|
|
50
|
+
getDevelopmentState(): DevelopmentState;
|
|
51
|
+
addHistoryEntry(entry: Omit<NexoHistoryEntry, "timestamp">): this;
|
|
52
|
+
getHistory(): readonly NexoHistoryEntry[];
|
|
53
|
+
}
|
|
54
|
+
export declare function createKnowledge(): ApplicationKnowledge;
|
|
55
|
+
export interface SerializedKnowledge {
|
|
56
|
+
readonly decisions: readonly NexoDecision[];
|
|
57
|
+
readonly constraints: readonly NexoConstraint[];
|
|
58
|
+
readonly developmentState: DevelopmentState;
|
|
59
|
+
readonly history: readonly NexoHistoryEntry[];
|
|
60
|
+
}
|
|
61
|
+
export declare function knowledgeToJson(knowledge: ApplicationKnowledge): string;
|
|
62
|
+
export declare function knowledgeFromJson(json: string): ApplicationKnowledge;
|
|
63
|
+
//# sourceMappingURL=knowledge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../src/knowledge.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE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],
|
|
7
|
+
inProgress: [],
|
|
8
|
+
blocked: [],
|
|
9
|
+
knownIssues: []
|
|
10
|
+
};
|
|
11
|
+
const knowledge = {
|
|
12
|
+
addDecision(decision) {
|
|
13
|
+
decisions.push(decision);
|
|
14
|
+
return knowledge;
|
|
15
|
+
},
|
|
16
|
+
getDecisions() {
|
|
17
|
+
return [...decisions];
|
|
18
|
+
},
|
|
19
|
+
addConstraint(constraint) {
|
|
20
|
+
constraints.push(constraint);
|
|
21
|
+
return knowledge;
|
|
22
|
+
},
|
|
23
|
+
getConstraints() {
|
|
24
|
+
return [...constraints];
|
|
25
|
+
},
|
|
26
|
+
setDevelopmentState(patch) {
|
|
27
|
+
developmentState = { ...developmentState, ...patch };
|
|
28
|
+
return knowledge;
|
|
29
|
+
},
|
|
30
|
+
getDevelopmentState() {
|
|
31
|
+
return developmentState;
|
|
32
|
+
},
|
|
33
|
+
addHistoryEntry(entry) {
|
|
34
|
+
history.push({ ...entry, timestamp: new Date().toISOString() });
|
|
35
|
+
return knowledge;
|
|
36
|
+
},
|
|
37
|
+
getHistory() {
|
|
38
|
+
return [...history];
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
return knowledge;
|
|
42
|
+
}
|
|
43
|
+
export function knowledgeToJson(knowledge) {
|
|
44
|
+
const data = {
|
|
45
|
+
decisions: knowledge.getDecisions(),
|
|
46
|
+
constraints: knowledge.getConstraints(),
|
|
47
|
+
developmentState: knowledge.getDevelopmentState(),
|
|
48
|
+
history: knowledge.getHistory()
|
|
49
|
+
};
|
|
50
|
+
return JSON.stringify(data, null, 2);
|
|
51
|
+
}
|
|
52
|
+
export function knowledgeFromJson(json) {
|
|
53
|
+
const parsed = JSON.parse(json);
|
|
54
|
+
const knowledge = createKnowledge();
|
|
55
|
+
for (const decision of parsed.decisions ?? []) {
|
|
56
|
+
knowledge.addDecision(decision);
|
|
57
|
+
}
|
|
58
|
+
for (const constraint of parsed.constraints ?? []) {
|
|
59
|
+
knowledge.addConstraint(constraint);
|
|
60
|
+
}
|
|
61
|
+
if (parsed.developmentState) {
|
|
62
|
+
knowledge.setDevelopmentState(parsed.developmentState);
|
|
63
|
+
}
|
|
64
|
+
for (const entry of parsed.history ?? []) {
|
|
65
|
+
const entryCopy = { ...entry };
|
|
66
|
+
delete entryCopy.timestamp;
|
|
67
|
+
knowledge.addHistoryEntry(entryCopy);
|
|
68
|
+
}
|
|
69
|
+
return knowledge;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=knowledge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge.js","sourceRoot":"","sources":["../src/knowledge.ts"],"names":[],"mappings":"AA6DA,MAAM,UAAU,eAAe;IAC7B,MAAM,SAAS,GAAmB,EAAE,CAAC;IACrC,MAAM,WAAW,GAAqB,EAAE,CAAC;IACzC,MAAM,OAAO,GAAuB,EAAE,CAAC;IACvC,IAAI,gBAAgB,GAAqB;QACvC,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,EAAE;KAChB,CAAC;IAEF,MAAM,SAAS,GAAyB;QACtC,WAAW,CAAC,QAAQ;YAClB,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACzB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,YAAY;YACV,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;QACxB,CAAC;QAED,aAAa,CAAC,UAAU;YACtB,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC7B,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,cAAc;YACZ,OAAO,CAAC,GAAG,WAAW,CAAC,CAAC;QAC1B,CAAC;QAED,mBAAmB,CAAC,KAAK;YACvB,gBAAgB,GAAG,EAAE,GAAG,gBAAgB,EAAE,GAAG,KAAK,EAAE,CAAC;YACrD,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,mBAAmB;YACjB,OAAO,gBAAgB,CAA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,EAAE,EAAE,CAAC;QACzC,MAAM,SAAS,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;QAC/B,OAAQ,SAAoC,CAAC,SAAS,CAAC;QACvD,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexo-alpha/context",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Application context manifest for the Nexo framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nexo",
|
|
@@ -20,11 +20,14 @@
|
|
|
20
20
|
"import": "./dist/index.js"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
23
26
|
"files": [
|
|
24
27
|
"dist"
|
|
25
28
|
],
|
|
26
29
|
"dependencies": {
|
|
27
|
-
"@nexo-alpha/core": "0.
|
|
30
|
+
"@nexo-alpha/core": "0.2.0"
|
|
28
31
|
},
|
|
29
32
|
"scripts": {
|
|
30
33
|
"build": "tsc -p tsconfig.json",
|