@rayutek/abap-adt-api 6.2.1-pkg-1.0.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/.abapgit.xml +27 -0
- package/LICENSE +21 -0
- package/README.md +23 -0
- package/build/AdtClient.d.ts +292 -0
- package/build/AdtClient.d.ts.map +1 -0
- package/build/AdtClient.js +628 -0
- package/build/AdtException.d.ts +62 -0
- package/build/AdtException.d.ts.map +1 -0
- package/build/AdtException.js +185 -0
- package/build/AdtHTTP.d.ts +113 -0
- package/build/AdtHTTP.d.ts.map +1 -0
- package/build/AdtHTTP.js +285 -0
- package/build/api/abapgit.d.ts +86 -0
- package/build/api/abapgit.d.ts.map +1 -0
- package/build/api/abapgit.js +300 -0
- package/build/api/activate.d.ts +39 -0
- package/build/api/activate.d.ts.map +1 -0
- package/build/api/activate.js +105 -0
- package/build/api/atc.d.ts +163 -0
- package/build/api/atc.d.ts.map +1 -0
- package/build/api/atc.js +440 -0
- package/build/api/cds.d.ts +52 -0
- package/build/api/cds.d.ts.map +1 -0
- package/build/api/cds.js +147 -0
- package/build/api/debugger.d.ts +238 -0
- package/build/api/debugger.d.ts.map +1 -0
- package/build/api/debugger.js +299 -0
- package/build/api/delete.d.ts +20 -0
- package/build/api/delete.d.ts.map +1 -0
- package/build/api/delete.js +29 -0
- package/build/api/discovery.d.ts +44 -0
- package/build/api/discovery.d.ts.map +1 -0
- package/build/api/discovery.js +78 -0
- package/build/api/feeds.d.ts +63 -0
- package/build/api/feeds.d.ts.map +1 -0
- package/build/api/feeds.js +65 -0
- package/build/api/index.d.ts +22 -0
- package/build/api/index.d.ts.map +1 -0
- package/build/api/index.js +37 -0
- package/build/api/nodeContents.d.ts +41 -0
- package/build/api/nodeContents.d.ts.map +1 -0
- package/build/api/nodeContents.js +78 -0
- package/build/api/objectcontents.d.ts +21 -0
- package/build/api/objectcontents.d.ts.map +1 -0
- package/build/api/objectcontents.js +68 -0
- package/build/api/objectcreator.d.ts +103 -0
- package/build/api/objectcreator.d.ts.map +1 -0
- package/build/api/objectcreator.js +372 -0
- package/build/api/objectstructure.d.ts +71 -0
- package/build/api/objectstructure.d.ts.map +1 -0
- package/build/api/objectstructure.js +37 -0
- package/build/api/refactor.d.ts +122 -0
- package/build/api/refactor.d.ts.map +1 -0
- package/build/api/refactor.js +470 -0
- package/build/api/revisions.d.ts +12 -0
- package/build/api/revisions.d.ts.map +1 -0
- package/build/api/revisions.js +61 -0
- package/build/api/search.d.ts +25 -0
- package/build/api/search.d.ts.map +1 -0
- package/build/api/search.js +67 -0
- package/build/api/syntax.d.ts +133 -0
- package/build/api/syntax.d.ts.map +1 -0
- package/build/api/syntax.js +327 -0
- package/build/api/tablecontents.d.ts +141 -0
- package/build/api/tablecontents.d.ts.map +1 -0
- package/build/api/tablecontents.js +186 -0
- package/build/api/trace.test.d.ts +2 -0
- package/build/api/trace.test.d.ts.map +1 -0
- package/build/api/trace.test.js +39 -0
- package/build/api/traces.d.ts +13 -0
- package/build/api/traces.d.ts.map +1 -0
- package/build/api/traces.js +97 -0
- package/build/api/tracetypes.d.ts +276 -0
- package/build/api/tracetypes.d.ts.map +1 -0
- package/build/api/tracetypes.js +474 -0
- package/build/api/transports.d.ts +158 -0
- package/build/api/transports.d.ts.map +1 -0
- package/build/api/transports.js +292 -0
- package/build/api/unittest.d.ts +81 -0
- package/build/api/unittest.d.ts.map +1 -0
- package/build/api/unittest.js +164 -0
- package/build/api/urlparser.d.ts +34 -0
- package/build/api/urlparser.d.ts.map +1 -0
- package/build/api/urlparser.js +86 -0
- package/build/index.d.ts +10 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +49 -0
- package/build/requestLogger.d.ts +30 -0
- package/build/requestLogger.d.ts.map +1 -0
- package/build/requestLogger.js +100 -0
- package/build/utilities.d.ts +42 -0
- package/build/utilities.d.ts.map +1 -0
- package/build/utilities.js +221 -0
- package/jest.config.js +32 -0
- package/package.json +45 -0
- package/setenv_sample.js +27 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.objectTypes = exports.adtCompatibilityGraph = exports.adtCoreDiscovery = exports.adtDiscovery = void 0;
|
|
4
|
+
const utilities_1 = require("../utilities");
|
|
5
|
+
async function adtDiscovery(h) {
|
|
6
|
+
const response = await h.request("/sap/bc/adt/discovery");
|
|
7
|
+
const ret = (0, utilities_1.fullParse)(response.body);
|
|
8
|
+
const objects = (0, utilities_1.xmlArray)(ret, "app:service", "app:workspace").map((o) => {
|
|
9
|
+
return {
|
|
10
|
+
collection: (0, utilities_1.xmlArray)(o, "app:collection").map((c) => {
|
|
11
|
+
return {
|
|
12
|
+
href: c["@_href"],
|
|
13
|
+
templateLinks: (0, utilities_1.xmlArray)(c, "adtcomp:templateLinks", "adtcomp:templateLink").map(utilities_1.xmlNodeAttr),
|
|
14
|
+
title: c["atom:title"]
|
|
15
|
+
};
|
|
16
|
+
}),
|
|
17
|
+
title: o["atom:title"]
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
return objects;
|
|
21
|
+
}
|
|
22
|
+
exports.adtDiscovery = adtDiscovery;
|
|
23
|
+
async function adtCoreDiscovery(h) {
|
|
24
|
+
const response = await h.request("/sap/bc/adt/core/discovery");
|
|
25
|
+
const ret = (0, utilities_1.fullParse)(response.body);
|
|
26
|
+
const workspaces = (0, utilities_1.xmlArray)(ret, "app:service", "app:workspace").filter((w) => w["app:collection"]);
|
|
27
|
+
return workspaces.map((w) => {
|
|
28
|
+
const collection = w["app:collection"];
|
|
29
|
+
return {
|
|
30
|
+
collection: {
|
|
31
|
+
category: collection["atom:category"]["@_term"],
|
|
32
|
+
href: collection["@_href"],
|
|
33
|
+
title: collection["atom:title"]
|
|
34
|
+
},
|
|
35
|
+
title: w["atom:title"]
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
exports.adtCoreDiscovery = adtCoreDiscovery;
|
|
40
|
+
async function adtCompatibilityGraph(h) {
|
|
41
|
+
const response = await h.request("/sap/bc/adt/compatibility/graph");
|
|
42
|
+
const ret = (0, utilities_1.fullParse)(response.body);
|
|
43
|
+
const edges = (0, utilities_1.xmlArray)(ret, "compatibility:graph", "edges", "edge").map((e) => {
|
|
44
|
+
return {
|
|
45
|
+
sourceNode: (0, utilities_1.xmlNodeAttr)(e.sourceNode),
|
|
46
|
+
targetNode: (0, utilities_1.xmlNodeAttr)(e.targetNode)
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
const nodes = (0, utilities_1.xmlArray)(ret, "compatibility:graph", "nodes", "node").map(utilities_1.xmlNodeAttr);
|
|
50
|
+
return { edges, nodes };
|
|
51
|
+
}
|
|
52
|
+
exports.adtCompatibilityGraph = adtCompatibilityGraph;
|
|
53
|
+
async function objectTypes(h) {
|
|
54
|
+
const qs = { maxItemCount: 999, name: "*", data: "usedByProvider" };
|
|
55
|
+
const response = await h.request("/sap/bc/adt/repository/informationsystem/objecttypes", { qs });
|
|
56
|
+
const ret = (0, utilities_1.parse)(response.body);
|
|
57
|
+
const types = (0, utilities_1.xmlArray)(ret, "nameditem:namedItemList", "nameditem:namedItem")
|
|
58
|
+
.map((n) => {
|
|
59
|
+
const data = n["nameditem:data"] || "";
|
|
60
|
+
const fields = data.split(";").reduce((acc, cur) => {
|
|
61
|
+
const parts = cur.split(":", 2);
|
|
62
|
+
acc[parts[0]] = parts[1] || "";
|
|
63
|
+
return acc;
|
|
64
|
+
}, {});
|
|
65
|
+
let o;
|
|
66
|
+
if (fields.type && fields.usedBy)
|
|
67
|
+
o = {
|
|
68
|
+
name: n["nameditem:name"],
|
|
69
|
+
description: n["nameditem:description"],
|
|
70
|
+
type: fields.type,
|
|
71
|
+
usedBy: fields.usedBy.split(",")
|
|
72
|
+
};
|
|
73
|
+
return o;
|
|
74
|
+
})
|
|
75
|
+
.filter(x => x);
|
|
76
|
+
return types;
|
|
77
|
+
}
|
|
78
|
+
exports.objectTypes = objectTypes;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Link } from ".";
|
|
2
|
+
import { AdtHTTP } from "../AdtHTTP";
|
|
3
|
+
export interface Feed {
|
|
4
|
+
author: string;
|
|
5
|
+
href: string;
|
|
6
|
+
published: Date;
|
|
7
|
+
summary: string;
|
|
8
|
+
title: string;
|
|
9
|
+
updated: Date;
|
|
10
|
+
accept: string;
|
|
11
|
+
refresh: FeedRefresh;
|
|
12
|
+
paging?: number;
|
|
13
|
+
operators: FeedOperator[];
|
|
14
|
+
dataTypes: FeedDataType[];
|
|
15
|
+
attributes: FeedAttribute[];
|
|
16
|
+
queryIsObligatory?: boolean;
|
|
17
|
+
queryDepth?: number;
|
|
18
|
+
queryVariants: FeedQueryVariant[];
|
|
19
|
+
}
|
|
20
|
+
export interface FeedDataType {
|
|
21
|
+
id: string;
|
|
22
|
+
label: string;
|
|
23
|
+
operators: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface FeedAttribute extends FeedDataType {
|
|
26
|
+
dataType: string;
|
|
27
|
+
}
|
|
28
|
+
export interface FeedOperator {
|
|
29
|
+
id: string;
|
|
30
|
+
numberOfOperands: number;
|
|
31
|
+
kind: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}
|
|
34
|
+
export interface FeedQueryVariant {
|
|
35
|
+
queryString: string;
|
|
36
|
+
title: string;
|
|
37
|
+
isDefault: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface FeedRefresh {
|
|
40
|
+
value: number;
|
|
41
|
+
unit: string;
|
|
42
|
+
}
|
|
43
|
+
export interface DumpsFeed {
|
|
44
|
+
href: string;
|
|
45
|
+
title: string;
|
|
46
|
+
updated: Date;
|
|
47
|
+
dumps: Dump[];
|
|
48
|
+
}
|
|
49
|
+
export interface Dump {
|
|
50
|
+
categories: DumpCategory[];
|
|
51
|
+
links: Link[];
|
|
52
|
+
id: string;
|
|
53
|
+
author?: string;
|
|
54
|
+
text: string;
|
|
55
|
+
type: string;
|
|
56
|
+
}
|
|
57
|
+
export interface DumpCategory {
|
|
58
|
+
term: string;
|
|
59
|
+
label: "ABAP runtime error" | "Terminated ABAP program";
|
|
60
|
+
}
|
|
61
|
+
export declare function feeds(h: AdtHTTP): Promise<Feed[]>;
|
|
62
|
+
export declare function dumps(h: AdtHTTP, query?: string): Promise<DumpsFeed>;
|
|
63
|
+
//# sourceMappingURL=feeds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feeds.d.ts","sourceRoot":"","sources":["../../src/api/feeds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAA;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAGpC,MAAM,WAAW,IAAI;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,gBAAgB,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,aAAc,SAAQ,YAAY;IAC/C,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,IAAI;IACjB,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,oBAAoB,GAAG,yBAAyB,CAAA;CAC1D;AAkDD,wBAAsB,KAAK,CAAC,CAAC,EAAE,OAAO,mBAIrC;AAED,wBAAsB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,GAAE,MAAW,sBAOzD"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dumps = exports.feeds = void 0;
|
|
4
|
+
const utilities_1 = require("../utilities");
|
|
5
|
+
const parseFeeds = (body) => {
|
|
6
|
+
const raw = (0, utilities_1.fullParse)(body, { removeNSPrefix: true });
|
|
7
|
+
const parseDt = (dt) => {
|
|
8
|
+
const { "@_id": id, label = "" } = dt;
|
|
9
|
+
const operators = (0, utilities_1.xmlArray)(dt, "operators", "operator");
|
|
10
|
+
return { id, label, operators: operators.map((o) => o["@_id"]) };
|
|
11
|
+
};
|
|
12
|
+
const parseAttribute = (at) => {
|
|
13
|
+
var _a;
|
|
14
|
+
const dataType = (_a = at.dataType) === null || _a === void 0 ? void 0 : _a["@_id"];
|
|
15
|
+
return { ...parseDt(at), dataType };
|
|
16
|
+
};
|
|
17
|
+
const parseOperators = (op) => ({ ...(0, utilities_1.xmlNodeAttr)(op), label: op.label });
|
|
18
|
+
const feeds = (0, utilities_1.xmlArray)(raw, "feed", "entry").map((f) => {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
const author = (0, utilities_1.xmlNode)(f, "author", "name");
|
|
21
|
+
const { href, type: accept } = (0, utilities_1.xmlNodeAttr)(f["link"]);
|
|
22
|
+
const { published, summary, title, updated } = f;
|
|
23
|
+
const ed = f.extendedData;
|
|
24
|
+
const refresh = (0, utilities_1.xmlNodeAttr)((_a = ed === null || ed === void 0 ? void 0 : ed.refresh) === null || _a === void 0 ? void 0 : _a.interval);
|
|
25
|
+
const paging = (_b = ed === null || ed === void 0 ? void 0 : ed.paging) === null || _b === void 0 ? void 0 : _b['@_size'];
|
|
26
|
+
const { queryIsObligatory, queryDepth } = ed;
|
|
27
|
+
const operators = (0, utilities_1.xmlArray)(ed, "operators", "operator").map(parseOperators);
|
|
28
|
+
const dataTypes = (0, utilities_1.xmlArray)(ed, "dataTypes", "dataType").map(parseDt);
|
|
29
|
+
const attributes = (0, utilities_1.xmlArray)(ed, "attributes", "attribute").map(parseAttribute);
|
|
30
|
+
const queryVariants = (0, utilities_1.xmlArray)(ed, "queryVariants", "queryVariant").map(utilities_1.xmlNodeAttr);
|
|
31
|
+
return {
|
|
32
|
+
author, href, published: (0, utilities_1.parseJsonDate)(published), summary, title, updated: (0, utilities_1.parseJsonDate)(updated), accept, refresh, paging,
|
|
33
|
+
operators, dataTypes, attributes,
|
|
34
|
+
queryIsObligatory, queryDepth, queryVariants
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
return feeds;
|
|
38
|
+
};
|
|
39
|
+
const parseDumps = (body) => {
|
|
40
|
+
var _a;
|
|
41
|
+
const raw = (_a = (0, utilities_1.fullParse)(body, { removeNSPrefix: true })) === null || _a === void 0 ? void 0 : _a.feed;
|
|
42
|
+
const { href } = (0, utilities_1.xmlNodeAttr)(raw === null || raw === void 0 ? void 0 : raw.link);
|
|
43
|
+
const { title, updated } = raw;
|
|
44
|
+
const dumps = (0, utilities_1.xmlArray)(raw, "entry").map((e) => {
|
|
45
|
+
const { category, id, author: { name: author }, summary: { "#text": text, "@_type": type } } = e;
|
|
46
|
+
const links = (0, utilities_1.xmlArray)(e, "link").map(utilities_1.xmlNodeAttr);
|
|
47
|
+
return { categories: category.map(utilities_1.xmlNodeAttr), links, id, author, text: text, type };
|
|
48
|
+
});
|
|
49
|
+
return { href, title, updated: (0, utilities_1.parseJsonDate)(updated), dumps };
|
|
50
|
+
};
|
|
51
|
+
async function feeds(h) {
|
|
52
|
+
const headers = { Accept: "application/atom+xml;type=feed" };
|
|
53
|
+
const response = await h.request("/sap/bc/adt/feeds", { method: "GET", headers });
|
|
54
|
+
return parseFeeds(response.body);
|
|
55
|
+
}
|
|
56
|
+
exports.feeds = feeds;
|
|
57
|
+
async function dumps(h, query = "") {
|
|
58
|
+
const headers = { Accept: "application/atom+xml;type=feed" };
|
|
59
|
+
const qs = {};
|
|
60
|
+
if (query)
|
|
61
|
+
qs["$query"] = query;
|
|
62
|
+
const response = await h.request("/sap/bc/adt/runtime/dumps", { method: "GET", qs, headers });
|
|
63
|
+
return parseDumps(response.body);
|
|
64
|
+
}
|
|
65
|
+
exports.dumps = dumps;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from "./atc";
|
|
2
|
+
export * from "./cds";
|
|
3
|
+
export * from "./delete";
|
|
4
|
+
export * from "./discovery";
|
|
5
|
+
export * from "./nodeContents";
|
|
6
|
+
export * from "./transports";
|
|
7
|
+
export * from "./objectcreator";
|
|
8
|
+
export * from "./objectstructure";
|
|
9
|
+
export * from "./activate";
|
|
10
|
+
export * from "./objectcontents";
|
|
11
|
+
export * from "./revisions";
|
|
12
|
+
export * from "./refactor";
|
|
13
|
+
export * from "./search";
|
|
14
|
+
export * from "./syntax";
|
|
15
|
+
export * from "./unittest";
|
|
16
|
+
export * from "./urlparser";
|
|
17
|
+
export * from "./abapgit";
|
|
18
|
+
export * from "./tablecontents";
|
|
19
|
+
export * from "./feeds";
|
|
20
|
+
export * from "./debugger";
|
|
21
|
+
export * from "./traces";
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./atc"), exports);
|
|
18
|
+
__exportStar(require("./cds"), exports);
|
|
19
|
+
__exportStar(require("./delete"), exports);
|
|
20
|
+
__exportStar(require("./discovery"), exports);
|
|
21
|
+
__exportStar(require("./nodeContents"), exports);
|
|
22
|
+
__exportStar(require("./transports"), exports);
|
|
23
|
+
__exportStar(require("./objectcreator"), exports);
|
|
24
|
+
__exportStar(require("./objectstructure"), exports);
|
|
25
|
+
__exportStar(require("./activate"), exports);
|
|
26
|
+
__exportStar(require("./objectcontents"), exports);
|
|
27
|
+
__exportStar(require("./revisions"), exports);
|
|
28
|
+
__exportStar(require("./refactor"), exports);
|
|
29
|
+
__exportStar(require("./search"), exports);
|
|
30
|
+
__exportStar(require("./syntax"), exports);
|
|
31
|
+
__exportStar(require("./unittest"), exports);
|
|
32
|
+
__exportStar(require("./urlparser"), exports);
|
|
33
|
+
__exportStar(require("./abapgit"), exports);
|
|
34
|
+
__exportStar(require("./tablecontents"), exports);
|
|
35
|
+
__exportStar(require("./feeds"), exports);
|
|
36
|
+
__exportStar(require("./debugger"), exports);
|
|
37
|
+
__exportStar(require("./traces"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AdtHTTP } from "../AdtHTTP";
|
|
2
|
+
export type NodeParents = "DEVC/K" | "PROG/P" | "FUGR/F" | "PROG/PI";
|
|
3
|
+
export declare function isNodeParent(t: string): t is NodeParents;
|
|
4
|
+
export interface Node {
|
|
5
|
+
OBJECT_TYPE: string;
|
|
6
|
+
OBJECT_NAME: string;
|
|
7
|
+
TECH_NAME: string;
|
|
8
|
+
OBJECT_URI: string;
|
|
9
|
+
OBJECT_VIT_URI: string;
|
|
10
|
+
EXPANDABLE: string;
|
|
11
|
+
VISIBILITY?: number;
|
|
12
|
+
NODE_ID?: string;
|
|
13
|
+
DESCRIPTION?: string;
|
|
14
|
+
DESCRIPTION_TYPE?: string;
|
|
15
|
+
IS_ABSTRACT?: string;
|
|
16
|
+
IS_CONSTANT?: string;
|
|
17
|
+
IS_CONSTRUCTOR?: string;
|
|
18
|
+
IS_EVENT_HANDLER?: string;
|
|
19
|
+
IS_FINAL?: string;
|
|
20
|
+
IS_FOR_TESTING?: string;
|
|
21
|
+
IS_READ_ONLY?: string;
|
|
22
|
+
IS_REDEFINITION?: string;
|
|
23
|
+
IS_STATIC?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface NodeCategory {
|
|
26
|
+
CATEGORY: string;
|
|
27
|
+
CATEGORY_LABEL: string;
|
|
28
|
+
}
|
|
29
|
+
export interface NodeObjectType {
|
|
30
|
+
OBJECT_TYPE: string;
|
|
31
|
+
CATEGORY_TAG: string;
|
|
32
|
+
OBJECT_TYPE_LABEL: string;
|
|
33
|
+
NODE_ID: string;
|
|
34
|
+
}
|
|
35
|
+
export interface NodeStructure {
|
|
36
|
+
nodes: Node[];
|
|
37
|
+
categories: NodeCategory[];
|
|
38
|
+
objectTypes: NodeObjectType[];
|
|
39
|
+
}
|
|
40
|
+
export declare function nodeContents(h: AdtHTTP, parent_type: NodeParents, parent_name?: string, user_name?: string, parent_tech_name?: string, rebuild_tree?: boolean, parentnodes?: number[]): Promise<NodeStructure>;
|
|
41
|
+
//# sourceMappingURL=nodeContents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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IAC5B,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,UAAU,EAAE,YAAY,EAAE,CAAA;IAC1B,WAAW,EAAE,cAAc,EAAE,CAAA;CAC9B;AAiDD,wBAAsB,YAAY,CAChC,CAAC,EAAE,OAAO,EACV,WAAW,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM,EAClB,gBAAgB,CAAC,EAAE,MAAM,EACzB,YAAY,CAAC,EAAE,OAAO,EACtB,WAAW,CAAC,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,aAAa,CAAC,CAwBxB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nodeContents = exports.isNodeParent = void 0;
|
|
4
|
+
const utilities_1 = require("../utilities");
|
|
5
|
+
function isNodeParent(t) {
|
|
6
|
+
return t === "DEVC/K" || t === "PROG/P" || t === "FUGR/F" || t === "PROG/PI";
|
|
7
|
+
}
|
|
8
|
+
exports.isNodeParent = isNodeParent;
|
|
9
|
+
const decodeComponents = (keys) => (x) => {
|
|
10
|
+
if ((0, utilities_1.isObject)(x)) {
|
|
11
|
+
const o = keys.reduce((acc, key) => {
|
|
12
|
+
const v = x[key] || "";
|
|
13
|
+
return (0, utilities_1.isString)(v) ? { ...acc, [key]: v } : acc;
|
|
14
|
+
}, {});
|
|
15
|
+
return { ...x, ...o };
|
|
16
|
+
}
|
|
17
|
+
return x;
|
|
18
|
+
};
|
|
19
|
+
const parsePackageResponse = (data) => {
|
|
20
|
+
let nodes = [];
|
|
21
|
+
let categories = [];
|
|
22
|
+
let objectTypes = [];
|
|
23
|
+
if (data) {
|
|
24
|
+
const xml = (0, utilities_1.parse)(data);
|
|
25
|
+
const root = xml["asx:abap"]["asx:values"].DATA;
|
|
26
|
+
nodes = (0, utilities_1.xmlArray)(root, "TREE_CONTENT", "SEU_ADT_REPOSITORY_OBJ_NODE");
|
|
27
|
+
for (const node of nodes) {
|
|
28
|
+
if (!(0, utilities_1.isString)(node.OBJECT_NAME)) {
|
|
29
|
+
node.OBJECT_NAME = (node.OBJECT_NAME || "").toString();
|
|
30
|
+
node.TECH_NAME = (node.TECH_NAME || "").toString();
|
|
31
|
+
}
|
|
32
|
+
node.DESCRIPTION = node.DESCRIPTION || "";
|
|
33
|
+
}
|
|
34
|
+
categories = (0, utilities_1.xmlArray)(root, "CATEGORIES", "SEU_ADT_OBJECT_CATEGORY_INFO");
|
|
35
|
+
objectTypes = (0, utilities_1.xmlArray)(root, "OBJECT_TYPES", "SEU_ADT_OBJECT_TYPE_INFO")
|
|
36
|
+
.map(decodeComponents(["OBJECT_TYPE_LABEL"]))
|
|
37
|
+
.map(ot => {
|
|
38
|
+
const o = ot;
|
|
39
|
+
return o.OBJECT_TYPE_LABEL === "<no type text>" &&
|
|
40
|
+
o.OBJECT_TYPE === "FUGR/I"
|
|
41
|
+
? { ...o, OBJECT_TYPE_LABEL: "Includes" }
|
|
42
|
+
: o;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
categories,
|
|
47
|
+
nodes,
|
|
48
|
+
objectTypes
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
// tslint:disable: variable-name
|
|
52
|
+
async function nodeContents(h, parent_type, parent_name, user_name, parent_tech_name, rebuild_tree, parentnodes) {
|
|
53
|
+
const qs = {
|
|
54
|
+
parent_type,
|
|
55
|
+
withShortDescriptions: true
|
|
56
|
+
};
|
|
57
|
+
const options = { method: "POST", qs };
|
|
58
|
+
if (parent_name)
|
|
59
|
+
qs.parent_name = parent_name;
|
|
60
|
+
if (parent_tech_name)
|
|
61
|
+
qs.parent_tech_name = parent_tech_name;
|
|
62
|
+
if (user_name)
|
|
63
|
+
qs.user_name = user_name;
|
|
64
|
+
if (rebuild_tree)
|
|
65
|
+
qs.rebuild_tree = "X";
|
|
66
|
+
if (parentnodes === null || parentnodes === void 0 ? void 0 : parentnodes.length)
|
|
67
|
+
options.body = `<?xml version="1.0" encoding="UTF-8" ?><asx:abap version="1.0" xmlns:asx="http://www.sap.com/abapxml">
|
|
68
|
+
<asx:values><DATA>
|
|
69
|
+
${parentnodes
|
|
70
|
+
.map(n => `<TV_NODEKEY>${n.toString().padStart(6, "0")}</TV_NODEKEY>`)
|
|
71
|
+
.join("")}
|
|
72
|
+
<TV_NODEKEY>000000</TV_NODEKEY>
|
|
73
|
+
</DATA></asx:values></asx:abap>
|
|
74
|
+
`;
|
|
75
|
+
const response = await h.request("/sap/bc/adt/repository/nodestructure", options);
|
|
76
|
+
return parsePackageResponse(response.body);
|
|
77
|
+
}
|
|
78
|
+
exports.nodeContents = nodeContents;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AdtHTTP } from "../AdtHTTP";
|
|
2
|
+
import { ObjectVersion } from "./objectstructure";
|
|
3
|
+
export interface AdtLock {
|
|
4
|
+
LOCK_HANDLE: string;
|
|
5
|
+
CORRNR: string;
|
|
6
|
+
CORRUSER: string;
|
|
7
|
+
CORRTEXT: string;
|
|
8
|
+
IS_LOCAL: string;
|
|
9
|
+
IS_LINK_UP: string;
|
|
10
|
+
MODIFICATION_SUPPORT: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ObjectSourceOptions {
|
|
13
|
+
version?: ObjectVersion;
|
|
14
|
+
gitUser?: string;
|
|
15
|
+
gitPassword?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function getObjectSource(h: AdtHTTP, objectSourceUrl: string, options?: ObjectSourceOptions): Promise<string>;
|
|
18
|
+
export declare function setObjectSource(h: AdtHTTP, objectSourceUrl: string, source: string, lockHandle: string, transport?: string): Promise<void>;
|
|
19
|
+
export declare function lock(h: AdtHTTP, objectUrl: string, accessMode?: string): Promise<AdtLock>;
|
|
20
|
+
export declare function unLock(h: AdtHTTP, objectUrl: string, lockHandle: string): Promise<string>;
|
|
21
|
+
//# sourceMappingURL=objectcontents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectcontents.d.ts","sourceRoot":"","sources":["../../src/api/objectcontents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAA;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,MAAM,WAAW,OAAO;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB,EAAE,MAAM,CAAA;CAC7B;AACD,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,wBAAsB,eAAe,CACnC,CAAC,EAAE,OAAO,EACV,eAAe,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,mBAAmB,mBAa9B;AAED,wBAAsB,eAAe,CACnC,CAAC,EAAE,OAAO,EACV,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,iBAenB;AAED,wBAAsB,IAAI,CACxB,CAAC,EAAE,OAAO,EACV,SAAS,EAAE,MAAM,EACjB,UAAU,GAAE,MAAiB,oBAgB9B;AAED,wBAAsB,MAAM,CAC1B,CAAC,EAAE,OAAO,EACV,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,mBAYnB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unLock = exports.lock = exports.setObjectSource = exports.getObjectSource = void 0;
|
|
4
|
+
const AdtException_1 = require("../AdtException");
|
|
5
|
+
const utilities_1 = require("../utilities");
|
|
6
|
+
async function getObjectSource(h, objectSourceUrl, options) {
|
|
7
|
+
(0, AdtException_1.ValidateObjectUrl)(objectSourceUrl);
|
|
8
|
+
const config = {};
|
|
9
|
+
const { gitPassword, gitUser, version } = options || {};
|
|
10
|
+
if (gitUser || gitPassword) {
|
|
11
|
+
config.headers = {};
|
|
12
|
+
if (gitUser)
|
|
13
|
+
config.headers.Username = gitUser;
|
|
14
|
+
if (gitPassword)
|
|
15
|
+
config.headers.Password = (0, utilities_1.btoa)(gitPassword);
|
|
16
|
+
}
|
|
17
|
+
if (version)
|
|
18
|
+
config.qs = { version };
|
|
19
|
+
const response = await h.request(objectSourceUrl, config);
|
|
20
|
+
return response.body;
|
|
21
|
+
}
|
|
22
|
+
exports.getObjectSource = getObjectSource;
|
|
23
|
+
async function setObjectSource(h, objectSourceUrl, source, lockHandle, transport) {
|
|
24
|
+
(0, AdtException_1.ValidateObjectUrl)(objectSourceUrl);
|
|
25
|
+
(0, AdtException_1.ValidateStateful)(h);
|
|
26
|
+
const qs = { lockHandle };
|
|
27
|
+
const ctype = source.match(/^<\?xml\s/i)
|
|
28
|
+
? "application/*"
|
|
29
|
+
: "text/plain; charset=utf-8";
|
|
30
|
+
if (transport)
|
|
31
|
+
qs.corrNr = transport;
|
|
32
|
+
await h.request(objectSourceUrl, {
|
|
33
|
+
body: source,
|
|
34
|
+
headers: { "content-type": ctype },
|
|
35
|
+
method: "PUT",
|
|
36
|
+
qs
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
exports.setObjectSource = setObjectSource;
|
|
40
|
+
async function lock(h, objectUrl, accessMode = "MODIFY") {
|
|
41
|
+
(0, AdtException_1.ValidateObjectUrl)(objectUrl);
|
|
42
|
+
(0, AdtException_1.ValidateStateful)(h);
|
|
43
|
+
const qs = { _action: "LOCK", accessMode };
|
|
44
|
+
const response = await h.request(objectUrl, {
|
|
45
|
+
headers: {
|
|
46
|
+
Accept: "application/*,application/vnd.sap.as+xml;charset=UTF-8;dataname=com.sap.adt.lock.result"
|
|
47
|
+
},
|
|
48
|
+
method: "POST",
|
|
49
|
+
qs
|
|
50
|
+
});
|
|
51
|
+
const raw = (0, utilities_1.parse)(response.body);
|
|
52
|
+
const locks = (0, utilities_1.xmlArray)(raw, "asx:abap", "asx:values", "DATA");
|
|
53
|
+
return locks[0];
|
|
54
|
+
}
|
|
55
|
+
exports.lock = lock;
|
|
56
|
+
async function unLock(h, objectUrl, lockHandle) {
|
|
57
|
+
(0, AdtException_1.ValidateObjectUrl)(objectUrl);
|
|
58
|
+
const qs = {
|
|
59
|
+
_action: "UNLOCK",
|
|
60
|
+
lockHandle: encodeURIComponent(lockHandle)
|
|
61
|
+
};
|
|
62
|
+
const response = await h.request(objectUrl, {
|
|
63
|
+
method: "POST",
|
|
64
|
+
qs
|
|
65
|
+
});
|
|
66
|
+
return response.body;
|
|
67
|
+
}
|
|
68
|
+
exports.unLock = unLock;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { AdtHTTP } from "../AdtHTTP";
|
|
2
|
+
export type PackageTypeId = "DEVC/K";
|
|
3
|
+
export type GroupTypeIds = "FUGR/FF" | "FUGR/I";
|
|
4
|
+
export type BindingTypeId = "SRVB/SVB";
|
|
5
|
+
export type NonGroupTypeIds = "CLAS/OC" | "FUGR/F" | "INTF/OI" | "PROG/I" | "PROG/P" | "DCLS/DL" | "DDLS/DF" | "DDLX/EX" | "DDLA/ADF" | "TABL/DT" | "SRVD/SRV" | "AUTH" | "DTEL/DE" | "SUSO/B" | "MSAG/N";
|
|
6
|
+
export type ParentTypeIds = "DEVC/K" | "FUGR/F";
|
|
7
|
+
export type CreatableTypeIds = GroupTypeIds | NonGroupTypeIds | PackageTypeId | BindingTypeId;
|
|
8
|
+
export interface CreatableType {
|
|
9
|
+
validationPath: string;
|
|
10
|
+
creationPath: string;
|
|
11
|
+
rootName: string;
|
|
12
|
+
nameSpace: string;
|
|
13
|
+
label: string;
|
|
14
|
+
typeId: CreatableTypeIds;
|
|
15
|
+
extra?: string;
|
|
16
|
+
maxLen: number;
|
|
17
|
+
}
|
|
18
|
+
interface BaseValidateOptions {
|
|
19
|
+
objname: string;
|
|
20
|
+
description: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ObjectValidateOptions extends BaseValidateOptions {
|
|
23
|
+
objtype: NonGroupTypeIds;
|
|
24
|
+
packagename: string;
|
|
25
|
+
}
|
|
26
|
+
export interface GroupValidateOptions extends BaseValidateOptions {
|
|
27
|
+
objtype: GroupTypeIds;
|
|
28
|
+
fugrname: string;
|
|
29
|
+
}
|
|
30
|
+
export type PackageTypes = "development" | "structure" | "main";
|
|
31
|
+
export interface PackageSpecificData {
|
|
32
|
+
swcomp: string;
|
|
33
|
+
transportLayer: string;
|
|
34
|
+
packagetype: PackageTypes;
|
|
35
|
+
}
|
|
36
|
+
export interface PackageValidateOptions extends PackageSpecificData, BaseValidateOptions {
|
|
37
|
+
objtype: PackageTypeId;
|
|
38
|
+
packagename: string;
|
|
39
|
+
}
|
|
40
|
+
export interface BindingValidationOptions extends BaseValidateOptions {
|
|
41
|
+
objtype: BindingTypeId;
|
|
42
|
+
serviceBindingVersion: "ODATA\\V2";
|
|
43
|
+
serviceDefinition: string;
|
|
44
|
+
package: string;
|
|
45
|
+
}
|
|
46
|
+
export interface NewObjectOptions {
|
|
47
|
+
objtype: CreatableTypeIds;
|
|
48
|
+
name: string;
|
|
49
|
+
parentName: string;
|
|
50
|
+
description: string;
|
|
51
|
+
parentPath: string;
|
|
52
|
+
responsible?: string;
|
|
53
|
+
transport?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface NewPackageOptions extends NewObjectOptions, PackageSpecificData {
|
|
56
|
+
objtype: PackageTypeId;
|
|
57
|
+
}
|
|
58
|
+
export type BindingCategory = "0" | "1";
|
|
59
|
+
export declare const BindinTypes: {
|
|
60
|
+
description: string;
|
|
61
|
+
bindingtype: string;
|
|
62
|
+
category: string;
|
|
63
|
+
}[];
|
|
64
|
+
export interface NewBindingOptions extends NewObjectOptions {
|
|
65
|
+
objtype: BindingTypeId;
|
|
66
|
+
service: string;
|
|
67
|
+
bindingtype: "ODATA";
|
|
68
|
+
category: BindingCategory;
|
|
69
|
+
}
|
|
70
|
+
export declare const hasPackageOptions: (o: any) => o is PackageSpecificData;
|
|
71
|
+
export declare const isPackageOptions: (o: NewObjectOptions) => o is NewPackageOptions;
|
|
72
|
+
export declare const isBindingOptions: (o: NewObjectOptions) => o is NewBindingOptions;
|
|
73
|
+
export interface ObjectType {
|
|
74
|
+
CAPABILITIES: string[];
|
|
75
|
+
CATEGORY: string;
|
|
76
|
+
CATEGORY_LABEL: string;
|
|
77
|
+
OBJECT_TYPE: string;
|
|
78
|
+
OBJECT_TYPE_LABEL: string;
|
|
79
|
+
OBJNAME_MAXLENGTH: number;
|
|
80
|
+
PARENT_OBJECT_TYPE: string;
|
|
81
|
+
URI_TEMPLATE: string;
|
|
82
|
+
}
|
|
83
|
+
export interface ValidationResult {
|
|
84
|
+
success: boolean;
|
|
85
|
+
SEVERITY?: string;
|
|
86
|
+
SHORT_TEXT?: string;
|
|
87
|
+
}
|
|
88
|
+
export type ValidateOptions = ObjectValidateOptions | GroupValidateOptions | PackageValidateOptions | BindingValidationOptions;
|
|
89
|
+
export declare function loadTypes(h: AdtHTTP): Promise<ObjectType[]>;
|
|
90
|
+
export declare function objectPath(objOptions: NewObjectOptions): string;
|
|
91
|
+
export declare function objectPath(typeId: "DEVC/K", name: string): string;
|
|
92
|
+
export declare function objectPath(typeId: CreatableTypeIds, name: string, parentName: string): string;
|
|
93
|
+
export declare function validateNewObject(h: AdtHTTP, options: ValidateOptions): Promise<ValidationResult>;
|
|
94
|
+
export declare function createObject(h: AdtHTTP, options: NewObjectOptions | NewPackageOptions): Promise<void>;
|
|
95
|
+
export declare function createTestInclude(h: AdtHTTP, clas: string, lockHandle: string, corrNr: string): Promise<void>;
|
|
96
|
+
export declare function isGroupType(type: any): type is GroupTypeIds;
|
|
97
|
+
export declare function isPackageType(type: any): type is PackageTypeId;
|
|
98
|
+
export declare const CreatableTypes: Map<CreatableTypeIds, CreatableType>;
|
|
99
|
+
export declare function isNonGroupType(type: any): type is NonGroupTypeIds;
|
|
100
|
+
export declare function isCreatableTypeId(type: any): type is CreatableTypeIds;
|
|
101
|
+
export declare function parentTypeId(type: CreatableTypeIds): ParentTypeIds;
|
|
102
|
+
export {};
|
|
103
|
+
//# sourceMappingURL=objectcreator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectcreator.d.ts","sourceRoot":"","sources":["../../src/api/objectcreator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAGpC,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAA;AAEpC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAA;AAC/C,MAAM,MAAM,aAAa,GAAG,UAAU,CAAA;AACtC,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,GACV,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,CAAA;AAEZ,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE/C,MAAM,MAAM,gBAAgB,GACxB,YAAY,GACZ,eAAe,GACf,aAAa,GACb,aAAa,CAAA;AACjB,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,gBAAgB,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf;AAED,UAAU,mBAAmB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