@powerhousedao/vetra 4.1.0-dev.21 → 4.1.0-dev.23
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/document-models/app-module/gen/object.d.ts +3 -3
- package/dist/document-models/app-module/gen/object.d.ts.map +1 -1
- package/dist/document-models/app-module/gen/object.js.map +1 -1
- package/dist/document-models/app-module/gen/types.d.ts +2 -2
- package/dist/document-models/app-module/gen/types.d.ts.map +1 -1
- package/dist/document-models/app-module/gen/utils.d.ts.map +1 -1
- package/dist/document-models/app-module/gen/utils.js +2 -1
- package/dist/document-models/app-module/gen/utils.js.map +1 -1
- package/dist/document-models/document-editor/gen/object.d.ts +3 -3
- package/dist/document-models/document-editor/gen/object.d.ts.map +1 -1
- package/dist/document-models/document-editor/gen/object.js.map +1 -1
- package/dist/document-models/document-editor/gen/types.d.ts +2 -2
- package/dist/document-models/document-editor/gen/types.d.ts.map +1 -1
- package/dist/document-models/document-editor/gen/utils.d.ts.map +1 -1
- package/dist/document-models/document-editor/gen/utils.js +2 -1
- package/dist/document-models/document-editor/gen/utils.js.map +1 -1
- package/dist/document-models/processor-module/gen/object.d.ts +3 -3
- package/dist/document-models/processor-module/gen/object.d.ts.map +1 -1
- package/dist/document-models/processor-module/gen/object.js.map +1 -1
- package/dist/document-models/processor-module/gen/types.d.ts +2 -2
- package/dist/document-models/processor-module/gen/types.d.ts.map +1 -1
- package/dist/document-models/processor-module/gen/utils.d.ts.map +1 -1
- package/dist/document-models/processor-module/gen/utils.js +2 -1
- package/dist/document-models/processor-module/gen/utils.js.map +1 -1
- package/dist/document-models/subgraph-module/gen/object.d.ts +3 -3
- package/dist/document-models/subgraph-module/gen/object.d.ts.map +1 -1
- package/dist/document-models/subgraph-module/gen/object.js.map +1 -1
- package/dist/document-models/subgraph-module/gen/types.d.ts +2 -2
- package/dist/document-models/subgraph-module/gen/types.d.ts.map +1 -1
- package/dist/document-models/subgraph-module/gen/utils.d.ts.map +1 -1
- package/dist/document-models/subgraph-module/gen/utils.js +2 -1
- package/dist/document-models/subgraph-module/gen/utils.js.map +1 -1
- package/dist/document-models/vetra-package/gen/object.d.ts +3 -3
- package/dist/document-models/vetra-package/gen/object.d.ts.map +1 -1
- package/dist/document-models/vetra-package/gen/object.js.map +1 -1
- package/dist/document-models/vetra-package/gen/types.d.ts +2 -2
- package/dist/document-models/vetra-package/gen/types.d.ts.map +1 -1
- package/dist/document-models/vetra-package/gen/utils.d.ts.map +1 -1
- package/dist/document-models/vetra-package/gen/utils.js +2 -1
- package/dist/document-models/vetra-package/gen/utils.js.map +1 -1
- package/dist/editors/document-editor/components/DocumentEditorForm.d.ts.map +1 -1
- package/dist/editors/document-editor/components/DocumentEditorForm.js +20 -15
- package/dist/editors/document-editor/components/DocumentEditorForm.js.map +1 -1
- package/dist/editors/processor-editor/components/ProcessorEditorForm.d.ts.map +1 -1
- package/dist/editors/processor-editor/components/ProcessorEditorForm.js +22 -23
- package/dist/editors/processor-editor/components/ProcessorEditorForm.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/processors/codegen/document-handlers/app-handler.js +1 -1
- package/dist/processors/codegen/document-handlers/app-handler.js.map +1 -1
- package/dist/processors/codegen/document-handlers/package-handler.d.ts +1 -1
- package/dist/processors/codegen/document-handlers/package-handler.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/package-handler.js +2 -2
- package/dist/processors/codegen/document-handlers/package-handler.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useReactor } from "@powerhousedao/state";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
4
|
import { StatusPill } from "../../components/index.js";
|
|
5
|
+
import { useDebounce } from "../../hooks/index.js";
|
|
5
6
|
export const ProcessorEditorForm = ({ processorName: initialProcessorName = "", processorType: initialProcessorType = "", documentTypes: initialDocumentTypes = [], status = "DRAFT", onNameChange, onTypeChange, onAddDocumentType, onRemoveDocumentType, onConfirm, }) => {
|
|
6
7
|
const [processorName, setProcessorName] = useState(initialProcessorName);
|
|
7
8
|
const [processorType, setProcessorType] = useState(initialProcessorType);
|
|
8
9
|
const [documentTypes, setDocumentTypes] = useState(initialDocumentTypes);
|
|
9
|
-
const [
|
|
10
|
+
const [selectedDocumentType, setSelectedDocumentType] = useState("");
|
|
10
11
|
const [isConfirmed, setIsConfirmed] = useState(false);
|
|
12
|
+
// Get available document types from reactor
|
|
13
|
+
const reactor = useReactor();
|
|
14
|
+
const docModels = reactor?.getDocumentModelModules() ?? [];
|
|
15
|
+
const availableDocumentTypes = docModels.map((model) => model.documentModel.id);
|
|
11
16
|
// Use the debounce hook for name and type changes
|
|
12
17
|
useDebounce(processorName, onNameChange, 300);
|
|
13
18
|
useDebounce(processorType, onTypeChange, 300);
|
|
@@ -35,31 +40,25 @@ export const ProcessorEditorForm = ({ processorName: initialProcessorName = "",
|
|
|
35
40
|
onConfirm?.();
|
|
36
41
|
}
|
|
37
42
|
};
|
|
38
|
-
const handleAddDocumentType = () => {
|
|
39
|
-
if (documentTypeInput.trim()) {
|
|
40
|
-
const id = Date.now().toString();
|
|
41
|
-
const documentType = documentTypeInput.trim();
|
|
42
|
-
if (!documentTypes.some((dt) => dt.documentType === documentType)) {
|
|
43
|
-
const newType = {
|
|
44
|
-
id,
|
|
45
|
-
documentType,
|
|
46
|
-
};
|
|
47
|
-
setDocumentTypes([...documentTypes, newType]);
|
|
48
|
-
onAddDocumentType?.(id, documentType);
|
|
49
|
-
}
|
|
50
|
-
setDocumentTypeInput("");
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
43
|
const handleRemoveDocumentType = (id) => {
|
|
54
44
|
setDocumentTypes(documentTypes.filter((dt) => dt.id !== id));
|
|
55
45
|
onRemoveDocumentType?.(id);
|
|
56
46
|
};
|
|
57
47
|
const canConfirm = processorName.trim() && processorType && documentTypes.length > 0;
|
|
58
|
-
return (_jsxs("div", { className: "space-y-6 bg-white p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900", children: "Processor Configuration" }), _jsx(StatusPill, { status: status === "CONFIRMED" ? 'confirmed' : 'draft', label: status === "CONFIRMED" ? 'Confirmed' : 'Draft' })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-2 block text-sm font-medium text-gray-700", children: "Processor Name" }), _jsx("input", { type: "text", value: processorName, onChange: (e) => setProcessorName(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, placeholder: "Enter processor name" })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-2 block text-sm font-medium text-gray-700", children: "Type" }), _jsxs("select", { value: processorType, onChange: (e) => setProcessorType(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, children: [_jsx("option", { value: "", children: "Select type..." }), _jsx("option", { value: "analytics", children: "Analytics" }), _jsx("option", { value: "relational", children: "Relational Database" })] })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-2 block text-sm font-medium text-gray-700", children: "Document Types" }), _jsxs("div", { className: "space-y-2", children: [!isReadOnly && (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
48
|
+
return (_jsxs("div", { className: "space-y-6 bg-white p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900", children: "Processor Configuration" }), _jsx(StatusPill, { status: status === "CONFIRMED" ? 'confirmed' : 'draft', label: status === "CONFIRMED" ? 'Confirmed' : 'Draft' })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-2 block text-sm font-medium text-gray-700", children: "Processor Name" }), _jsx("input", { type: "text", value: processorName, onChange: (e) => setProcessorName(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, placeholder: "Enter processor name" })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-2 block text-sm font-medium text-gray-700", children: "Type" }), _jsxs("select", { value: processorType, onChange: (e) => setProcessorType(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, children: [_jsx("option", { value: "", children: "Select type..." }), _jsx("option", { value: "analytics", children: "Analytics" }), _jsx("option", { value: "relational", children: "Relational Database" })] })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-2 block text-sm font-medium text-gray-700", children: "Document Types" }), _jsxs("div", { className: "space-y-2", children: [!isReadOnly && availableDocumentTypes.length > 0 && (_jsxs("select", { value: selectedDocumentType, onChange: (e) => {
|
|
49
|
+
const selectedValue = e.target.value;
|
|
50
|
+
if (selectedValue && !documentTypes.some(dt => dt.documentType === selectedValue)) {
|
|
51
|
+
const id = Date.now().toString();
|
|
52
|
+
const newType = {
|
|
53
|
+
id,
|
|
54
|
+
documentType: selectedValue
|
|
55
|
+
};
|
|
56
|
+
setDocumentTypes([...documentTypes, newType]);
|
|
57
|
+
onAddDocumentType?.(id, selectedValue);
|
|
62
58
|
}
|
|
63
|
-
|
|
59
|
+
setSelectedDocumentType('');
|
|
60
|
+
}, className: "w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500", children: [_jsx("option", { value: "", children: "Select a document type to add" }), availableDocumentTypes
|
|
61
|
+
.filter(docType => !documentTypes.some(dt => dt.documentType === docType))
|
|
62
|
+
.map((docType) => (_jsx("option", { value: docType, children: docType }, docType)))] })), _jsx("div", { className: "space-y-1", children: documentTypes.map((type) => (_jsxs("div", { className: "flex items-center py-1", children: [_jsx("span", { className: "text-sm text-gray-700", children: type.documentType }), !isReadOnly && (_jsx("button", { onClick: () => handleRemoveDocumentType(type.id), className: "ml-2 text-gray-400 hover:text-gray-600 focus:outline-none", children: "\u00D7" }))] }, type.id))) })] })] }), !isReadOnly && (_jsx("div", { children: _jsx("button", { onClick: handleConfirm, disabled: !canConfirm, className: "rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:bg-gray-300", children: "Confirm" }) }))] }));
|
|
64
63
|
};
|
|
65
64
|
//# sourceMappingURL=ProcessorEditorForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessorEditorForm.js","sourceRoot":"","sources":["../../../../editors/processor-editor/components/ProcessorEditorForm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ProcessorEditorForm.js","sourceRoot":"","sources":["../../../../editors/processor-editor/components/ProcessorEditorForm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAcnD,MAAM,CAAC,MAAM,mBAAmB,GAAuC,CAAC,EACtE,aAAa,EAAE,oBAAoB,GAAG,EAAE,EACxC,aAAa,EAAE,oBAAoB,GAAG,EAAE,EACxC,aAAa,EAAE,oBAAoB,GAAG,EAAE,EACxC,MAAM,GAAG,OAAO,EAChB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,GACV,EA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C,CAAC,GAAG,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;wCAC9C,iBAAiB,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;oCACzC,CAAC;oCACD,uBAAuB,CAAC,EAAE,CAAC,CAAC;gCAC9B,CAAC,EACD,SAAS,EAAC,iIAAiI,aAE3I,iBAAQ,KAAK,EAAC,EAAE,8CAAuC,EACtD,sBAAsB;yCACpB,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,YAAY,KAAK,OAAO,CAAC,CAAC;yCACzE,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAChB,iBAAsB,KAAK,EAAE,OAAO,YACjC,OAAO,IADG,OAAO,CAEX,CACV,CAAC,IAEG,CACV,EACD,cAAK,SAAS,EAAC,WAAW,YACvB,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC3B,eAAmB,SAAS,EAAC,wBAAwB,aACnD,eAAM,SAAS,EAAC,uBAAuB,YACpC,IAAI,CAAC,YAAY,GACb,EACN,CAAC,UAAU,IAAI,CACd,iBACE,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC,EAChD,SAAS,EAAC,2DAA2D,uBAG9D,CACV,KAXO,IAAI,CAAC,EAAE,CAYX,CACP,CAAC,GACE,IACF,IACF,EAGL,CAAC,UAAU,IAAI,CACd,wBACE,iBACE,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,CAAC,UAAU,EACrB,SAAS,EAAC,wLAAwL,wBAG3L,GACL,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -16,7 +16,7 @@ export class AppHandler {
|
|
|
16
16
|
// Generate app ID using kebabCase
|
|
17
17
|
const appId = kebabCase(state.name);
|
|
18
18
|
// Generate the drive editor using the codegen function
|
|
19
|
-
await generateDriveEditor(state.name, this.config.PH_CONFIG);
|
|
19
|
+
await generateDriveEditor(state.name, this.config.PH_CONFIG, appId);
|
|
20
20
|
logger.info(`✅ Drive editor generation completed successfully for app: ${state.name}`);
|
|
21
21
|
// Update the manifest with the new app
|
|
22
22
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-handler.js","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/app-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,MAAM,OAAO,UAAU;IAGD;IAFpB,YAAY,GAAG,gBAAgB,CAAC;IAEhC,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEtC,KAAK,CAAC,MAAM,CAAC,MAAwD;QACnE,MAAM,KAAK,GAAG,MAAM,CAAC,KAAuB,CAAC;QAE7C,uDAAuD;QACvD,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;YAC/C,MAAM,CAAC,IAAI,CAAC,gDAAgD,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YAC1E,IAAI,CAAC;gBACH,kCAAkC;gBAClC,MAAM,KAAK,GAAW,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAE5C,uDAAuD;gBACvD,MAAM,mBAAmB,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"app-handler.js","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/app-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/E,O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M,CAAC,KAAK,CACV,wCAAwC,KAAK,CAAC,IAAI,GAAG,EACrD,aAAa,CACd,CAAC;oBACF,4DAA4D;gBAC9D,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,KAAK,CACV,kDAAkD,KAAK,CAAC,IAAI,GAAG,EAC/D,KAAK,CACN,CAAC;gBACF,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;oBAC3B,MAAM,CAAC,KAAK,CAAC,oBAAoB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;gBACpD,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;gBAChB,MAAM,CAAC,KAAK,CACV,4DAA4D,CAC7D,CAAC;YACJ,CAAC;iBAAM,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBACxC,MAAM,CAAC,KAAK,CACV,8CAA8C,KAAK,CAAC,IAAI,+BAA+B,KAAK,CAAC,MAAM,GAAG,CACvG,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InternalTransmitterUpdate } from "document-drive/server/listener/transmitter/internal";
|
|
2
2
|
import { type DocumentModelDocument } from "document-model";
|
|
3
|
-
import { type
|
|
3
|
+
import { type Config, type DocumentHandler } from "./types.js";
|
|
4
4
|
export declare class PackageHandler implements DocumentHandler {
|
|
5
5
|
private config;
|
|
6
6
|
documentType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-handler.d.ts","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/package-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"package-handler.d.ts","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/package-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAE/D,qBAAa,cAAe,YAAW,eAAe;IAGxC,OAAO,CAAC,MAAM;IAF1B,YAAY,SAAwB;gBAEhB,MAAM,EAAE,MAAM;IAE5B,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAetF"}
|
|
@@ -14,8 +14,8 @@ export class PackageHandler {
|
|
|
14
14
|
category: state.category ?? "",
|
|
15
15
|
description: state.description ?? "",
|
|
16
16
|
publisher: {
|
|
17
|
-
name: state.author
|
|
18
|
-
url: state.author
|
|
17
|
+
name: state.author?.name ?? "",
|
|
18
|
+
url: state.author?.website ?? "",
|
|
19
19
|
},
|
|
20
20
|
}, this.config.CURRENT_WORKING_DIR);
|
|
21
21
|
logger.info("✅ Manifest generated successfully");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-handler.js","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/package-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,MAAM,OAAO,cAAc;IAGL;IAFpB,YAAY,GAAG,oBAAoB,CAAC;IAEpC,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEtC,KAAK,CAAC,MAAM,CAAC,MAAwD;QACnE,MAAM,KAAK,GAAG,MAAM,CAAC,KAA0B,CAAC;QAEhD,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;QAClD,gBAAgB,CAAC;YACf,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;YACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE;YAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,EAAE;YACpC,SAAS,EAAE;gBACT,IAAI,EAAE,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"package-handler.js","sourceRoot":"","sources":["../../../../processors/codegen/document-handlers/package-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,MAAM,OAAO,cAAc;IAGL;IAFpB,YAAY,GAAG,oBAAoB,CAAC;IAEpC,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEtC,KAAK,CAAC,MAAM,CAAC,MAAwD;QACnE,MAAM,KAAK,GAAG,MAAM,CAAC,KAA0B,CAAC;QAEhD,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;QAClD,gBAAgB,CAAC;YACf,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;YACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE;YAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,EAAE;YACpC,SAAS,EAAE;gBACT,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE;gBAC9B,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE;aACjC;SACF,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;IACnD,CAAC;CACF"}
|