@powerhousedao/codegen 0.37.3 → 0.37.4
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/src/codegen/.hygen/templates/powerhouse/generate-document-model/index.d.ts +25 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model/index.d.ts.map +1 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model/index.js +62 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model-module/index.d.ts +24 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model-module/index.d.ts.map +1 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model-module/index.js +27 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model-mutations/index.d.ts +22 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model-mutations/index.d.ts.map +1 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model-mutations/index.js +21 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-editor/index.d.ts +20 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-editor/index.d.ts.map +1 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-editor/index.js +15 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-import-script/index.d.ts +14 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-import-script/index.d.ts.map +1 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-import-script/index.js +10 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-processor-analytics/index.d.ts +20 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-processor-analytics/index.d.ts.map +1 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-processor-analytics/index.js +15 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-processor-operational/index.d.ts +20 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-processor-operational/index.d.ts.map +1 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-processor-operational/index.js +15 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-subgraph/index.d.ts +16 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-subgraph/index.d.ts.map +1 -0
- package/dist/src/codegen/.hygen/templates/powerhouse/generate-subgraph/index.js +11 -0
- package/package.json +4 -4
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type Args = {
|
|
2
|
+
documentModel: string;
|
|
3
|
+
rootDir: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: {
|
|
6
|
+
params: ({ args, }: {
|
|
7
|
+
args: Args;
|
|
8
|
+
}) => {
|
|
9
|
+
rootDir: string;
|
|
10
|
+
documentModel: string;
|
|
11
|
+
documentTypeId: string;
|
|
12
|
+
documentType: string;
|
|
13
|
+
extension: string;
|
|
14
|
+
modules: Array<{
|
|
15
|
+
name: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}>;
|
|
18
|
+
fileExtension: string;
|
|
19
|
+
hasLocalSchema: boolean;
|
|
20
|
+
initialGlobalState: string;
|
|
21
|
+
initialLocalState: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/codegen/.hygen/templates/powerhouse/generate-document-model/index.ts"],"names":[],"mappings":"AA4BA,MAAM,MAAM,IAAI,GAAG;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;;wBAKG;QACD,IAAI,EAAE,IAAI,CAAC;KACZ,KAAG;QACF,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAC,CAAC;QACrD,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;QACxB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,iBAAiB,EAAE,MAAM,CAAC;KAC3B;;AAhBH,wBAoCE"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const change_case_1 = require("change-case");
|
|
4
|
+
function documentModelToString(documentModel) {
|
|
5
|
+
return JSON.stringify({
|
|
6
|
+
...documentModel,
|
|
7
|
+
specifications: documentModel.specifications.map((s) => ({
|
|
8
|
+
...s,
|
|
9
|
+
state: Object.keys(s.state).reduce((values, scope) => {
|
|
10
|
+
const state = s.state[scope];
|
|
11
|
+
return {
|
|
12
|
+
...values,
|
|
13
|
+
[scope]: {
|
|
14
|
+
...state,
|
|
15
|
+
// initial value has to be stringified twice
|
|
16
|
+
// as it is expected to be a string
|
|
17
|
+
initialValue: JSON.stringify(state.initialValue),
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}, {}),
|
|
21
|
+
})),
|
|
22
|
+
}, null, 2);
|
|
23
|
+
}
|
|
24
|
+
exports.default = {
|
|
25
|
+
params: ({ args, }) => {
|
|
26
|
+
const documentModel = JSON.parse(args.documentModel);
|
|
27
|
+
const latestSpec = documentModel.specifications[documentModel.specifications.length - 1];
|
|
28
|
+
return {
|
|
29
|
+
rootDir: args.rootDir,
|
|
30
|
+
documentModel: documentModelToString(documentModel),
|
|
31
|
+
documentTypeId: documentModel.id,
|
|
32
|
+
documentType: documentModel.name,
|
|
33
|
+
extension: documentModel.extension,
|
|
34
|
+
modules: latestSpec.modules.map((m) => ({
|
|
35
|
+
...m,
|
|
36
|
+
name: (0, change_case_1.paramCase)(m.name),
|
|
37
|
+
})),
|
|
38
|
+
fileExtension: documentModel.extension,
|
|
39
|
+
hasLocalSchema: latestSpec.state.local.schema !== "",
|
|
40
|
+
...getInitialStates(latestSpec.state),
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
function getInitialStates(scopeState) {
|
|
45
|
+
const { global, local } = scopeState;
|
|
46
|
+
const scopes = { global, local };
|
|
47
|
+
Object.entries(scopes).forEach(([scope, state]) => {
|
|
48
|
+
if (!isEmptyStateSchema(state.schema) && state.initialValue === "") {
|
|
49
|
+
throw new Error(`${scope.charAt(0).toLocaleUpperCase() + scope.slice(1)} scope has a defined schema but is missing an initial value.`);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
initialGlobalState: handleEmptyState(global.initialValue),
|
|
54
|
+
initialLocalState: handleEmptyState(local.initialValue),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function isEmptyStateSchema(schema) {
|
|
58
|
+
return schema === "" || !schema.includes("{");
|
|
59
|
+
}
|
|
60
|
+
function handleEmptyState(state) {
|
|
61
|
+
return state === "" ? "{}" : state;
|
|
62
|
+
}
|
package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model-module/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OperationScope } from "document-model";
|
|
2
|
+
import { Args } from "../generate-document-model/index.js";
|
|
3
|
+
type ModuleArgs = Args & {
|
|
4
|
+
module: string;
|
|
5
|
+
};
|
|
6
|
+
type Actions = {
|
|
7
|
+
name: string | null;
|
|
8
|
+
hasInput: boolean;
|
|
9
|
+
hasAttachment: boolean | undefined;
|
|
10
|
+
scope: OperationScope;
|
|
11
|
+
state: string;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: {
|
|
14
|
+
params: ({ args }: {
|
|
15
|
+
args: ModuleArgs;
|
|
16
|
+
}) => {
|
|
17
|
+
rootDir: string;
|
|
18
|
+
documentType: string;
|
|
19
|
+
module: string;
|
|
20
|
+
actions: Actions[];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model-module/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/codegen/.hygen/templates/powerhouse/generate-document-model-module/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAE3D,KAAK,UAAU,GAAG,IAAI,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5C,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;;uBAGmB;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE;;;;;;;AADzC,wBA6BE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const change_case_1 = require("change-case");
|
|
4
|
+
exports.default = {
|
|
5
|
+
params: ({ args }) => {
|
|
6
|
+
const documentModel = JSON.parse(args.documentModel);
|
|
7
|
+
const latestSpec = documentModel.specifications[documentModel.specifications.length - 1];
|
|
8
|
+
const filteredModules = latestSpec.modules.filter((m) => m.name === args.module);
|
|
9
|
+
const actions = filteredModules.length > 0
|
|
10
|
+
? filteredModules[0].operations.map((a) => ({
|
|
11
|
+
name: a.name,
|
|
12
|
+
hasInput: a.schema !== null,
|
|
13
|
+
hasAttachment: a.schema?.includes(": Attachment"),
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
15
|
+
scope: a.scope || "global",
|
|
16
|
+
state: a.scope === "global" ? "" : a.scope, // the state this action affects
|
|
17
|
+
errors: a.errors,
|
|
18
|
+
}))
|
|
19
|
+
: [];
|
|
20
|
+
return {
|
|
21
|
+
rootDir: args.rootDir,
|
|
22
|
+
documentType: documentModel.name,
|
|
23
|
+
module: (0, change_case_1.paramCase)(args.module),
|
|
24
|
+
actions,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
};
|
package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model-mutations/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type Args = {
|
|
2
|
+
documentModel: string;
|
|
3
|
+
rootDir: string;
|
|
4
|
+
subgraph: string;
|
|
5
|
+
};
|
|
6
|
+
declare const generateDocumentModelMutations: {
|
|
7
|
+
params: ({ args, }: {
|
|
8
|
+
args: Args;
|
|
9
|
+
}) => {
|
|
10
|
+
rootDir: string;
|
|
11
|
+
subgraph: string;
|
|
12
|
+
documentTypeId: string;
|
|
13
|
+
documentType: string;
|
|
14
|
+
schema: any;
|
|
15
|
+
modules: Array<{
|
|
16
|
+
name: string;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default generateDocumentModelMutations;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/codegen/.hygen/templates/powerhouse/generate-document-model-mutations/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,IAAI,GAAG;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,QAAA,MAAM,8BAA8B;wBAG/B;QACD,IAAI,EAAE,IAAI,CAAC;KACZ,KAAG;QACF,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,GAAG,CAAC;QACZ,OAAO,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAC,CAAC;KACtD;CAiBF,CAAC;AACF,eAAe,8BAA8B,CAAC"}
|
package/dist/src/codegen/.hygen/templates/powerhouse/generate-document-model-mutations/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const change_case_1 = require("change-case");
|
|
4
|
+
const generateDocumentModelMutations = {
|
|
5
|
+
params: ({ args, }) => {
|
|
6
|
+
const documentModel = JSON.parse(args.documentModel);
|
|
7
|
+
const latestSpec = documentModel.specifications[documentModel.specifications.length - 1];
|
|
8
|
+
return {
|
|
9
|
+
rootDir: args.rootDir,
|
|
10
|
+
subgraph: args.subgraph,
|
|
11
|
+
documentTypeId: documentModel.id,
|
|
12
|
+
documentType: documentModel.name,
|
|
13
|
+
schema: latestSpec.state.global.schema,
|
|
14
|
+
modules: latestSpec.modules.map((m) => ({
|
|
15
|
+
...m,
|
|
16
|
+
name: (0, change_case_1.paramCase)(m.name),
|
|
17
|
+
})),
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
exports.default = generateDocumentModelMutations;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Args = {
|
|
2
|
+
name: string;
|
|
3
|
+
rootDir: string;
|
|
4
|
+
documentModelsDir: string;
|
|
5
|
+
documentTypes: string;
|
|
6
|
+
documentTypesMap: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: {
|
|
9
|
+
params: ({ args }: {
|
|
10
|
+
args: Args;
|
|
11
|
+
}) => {
|
|
12
|
+
rootDir: string;
|
|
13
|
+
documentModelsDir: string;
|
|
14
|
+
name: string;
|
|
15
|
+
documentTypes: string[];
|
|
16
|
+
documentTypesMap: JSON;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/codegen/.hygen/templates/powerhouse/generate-editor/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;;uBAGmB;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE;;;;;0BAQ0B,IAAI;;;AATjE,wBAYE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
params: ({ args }) => {
|
|
5
|
+
return {
|
|
6
|
+
rootDir: args.rootDir,
|
|
7
|
+
documentModelsDir: args.documentModelsDir,
|
|
8
|
+
name: args.name,
|
|
9
|
+
documentTypes: args.documentTypes
|
|
10
|
+
.split(",")
|
|
11
|
+
.filter((type) => type !== ""),
|
|
12
|
+
documentTypesMap: JSON.parse(args.documentTypesMap),
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/codegen/.hygen/templates/powerhouse/generate-import-script/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;;uBAGmB;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE;;;;;AADnC,wBAOE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Args = {
|
|
2
|
+
name: string;
|
|
3
|
+
rootDir: string;
|
|
4
|
+
documentModelsDir: string;
|
|
5
|
+
documentTypes: string;
|
|
6
|
+
documentTypesMap: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: {
|
|
9
|
+
params: ({ args }: {
|
|
10
|
+
args: Args;
|
|
11
|
+
}) => {
|
|
12
|
+
rootDir: string;
|
|
13
|
+
documentModelsDir: string;
|
|
14
|
+
name: string;
|
|
15
|
+
documentTypes: string[];
|
|
16
|
+
documentTypesMap: JSON;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/codegen/.hygen/templates/powerhouse/generate-processor-analytics/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/codegen/.hygen/templates/powerhouse/generate-processor-analytics/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;;uBAGmB;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE;;;;;0BAQ0B,IAAI;;;AATjE,wBAYE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
params: ({ args }) => {
|
|
5
|
+
return {
|
|
6
|
+
rootDir: args.rootDir,
|
|
7
|
+
documentModelsDir: args.documentModelsDir,
|
|
8
|
+
name: args.name,
|
|
9
|
+
documentTypes: args.documentTypes
|
|
10
|
+
.split(",")
|
|
11
|
+
.filter((type) => type !== ""),
|
|
12
|
+
documentTypesMap: JSON.parse(args.documentTypesMap),
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
};
|
package/dist/src/codegen/.hygen/templates/powerhouse/generate-processor-operational/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Args = {
|
|
2
|
+
name: string;
|
|
3
|
+
rootDir: string;
|
|
4
|
+
documentModelsDir: string;
|
|
5
|
+
documentTypes: string;
|
|
6
|
+
documentTypesMap: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: {
|
|
9
|
+
params: ({ args }: {
|
|
10
|
+
args: Args;
|
|
11
|
+
}) => {
|
|
12
|
+
rootDir: string;
|
|
13
|
+
documentModelsDir: string;
|
|
14
|
+
name: string;
|
|
15
|
+
documentTypes: string[];
|
|
16
|
+
documentTypesMap: JSON;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/codegen/.hygen/templates/powerhouse/generate-processor-operational/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/codegen/.hygen/templates/powerhouse/generate-processor-operational/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;;uBAGmB;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE;;;;;0BAQ0B,IAAI;;;AATjE,wBAYE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
params: ({ args }) => {
|
|
5
|
+
return {
|
|
6
|
+
rootDir: args.rootDir,
|
|
7
|
+
documentModelsDir: args.documentModelsDir,
|
|
8
|
+
name: args.name,
|
|
9
|
+
documentTypes: args.documentTypes
|
|
10
|
+
.split(",")
|
|
11
|
+
.filter((type) => type !== ""),
|
|
12
|
+
documentTypesMap: JSON.parse(args.documentTypesMap),
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type Args = {
|
|
2
|
+
name: string;
|
|
3
|
+
rootDir: string;
|
|
4
|
+
loadFromFile: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: {
|
|
7
|
+
params: ({ args }: {
|
|
8
|
+
args: Args;
|
|
9
|
+
}) => {
|
|
10
|
+
rootDir: string;
|
|
11
|
+
name: string;
|
|
12
|
+
loadFromFile: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/codegen/.hygen/templates/powerhouse/generate-subgraph/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;;uBAGmB;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE;;;;;;AADnC,wBAQE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/codegen",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.4",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"esbuild-fix-imports-plugin": "^1.0.7",
|
|
35
35
|
"graphql": "^16.8.1",
|
|
36
36
|
"husky": "^8.0.3",
|
|
37
|
-
"@powerhousedao/
|
|
38
|
-
"@powerhousedao/
|
|
37
|
+
"@powerhousedao/codegen": "0.37.4",
|
|
38
|
+
"@powerhousedao/scalars": "1.25.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build:tsc": "tsc --build",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"clean": "rimraf dist/",
|
|
45
45
|
"copy-templates": "copyfiles src/codegen/.hygen/templates/**/*.esm.t dist/",
|
|
46
46
|
"copy-hygen-pkg": "copyfiles src/codegen/.hygen/package.json dist/",
|
|
47
|
-
"prebuild": "rimraf dist/src/codegen/.hygen
|
|
47
|
+
"prebuild": "rimraf dist/src/codegen/.hygen/**/*.esm.t",
|
|
48
48
|
"build": "tsc --build",
|
|
49
49
|
"postbuild": "npm run copy-templates && npm run copy-hygen-pkg",
|
|
50
50
|
"build:create-lib": "tsc --project src/create-lib/tsconfig.json",
|