@pulumi/pulumi 3.150.1-alpha.x471f1af → 3.150.1-alpha.x6a2f6bd
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/package.json +1 -1
- package/version.js +1 -1
- package/provider/experimental/analyzer.d.ts +0 -20
- package/provider/experimental/analyzer.js +0 -88
- package/provider/experimental/analyzer.js.map +0 -1
- package/provider/experimental/index.d.ts +0 -1
- package/provider/experimental/index.js +0 -20
- package/provider/experimental/index.js.map +0 -1
- package/provider/experimental/provider.d.ts +0 -1
- package/provider/experimental/provider.js +0 -84
- package/provider/experimental/provider.js.map +0 -1
- package/provider/experimental/schema.d.ts +0 -58
- package/provider/experimental/schema.js +0 -60
- package/provider/experimental/schema.js.map +0 -1
package/package.json
CHANGED
package/version.js
CHANGED
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
// See the License for the specific language governing permissions and
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.version = "3.150.1-alpha.
|
|
16
|
+
exports.version = "3.150.1-alpha.x6a2f6bd";
|
|
17
17
|
//# sourceMappingURL=version.js.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare type ComponentDefinition = {
|
|
2
|
-
name: string;
|
|
3
|
-
};
|
|
4
|
-
export declare type TypeDefinition = {
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
export declare type AnalyzeResult = {
|
|
8
|
-
components: Record<string, ComponentDefinition>;
|
|
9
|
-
typeDefinitons: Record<string, TypeDefinition>;
|
|
10
|
-
};
|
|
11
|
-
export declare class Analyzer {
|
|
12
|
-
private checker;
|
|
13
|
-
private program;
|
|
14
|
-
private components;
|
|
15
|
-
private typeDefinitons;
|
|
16
|
-
constructor(dir: string);
|
|
17
|
-
analyze(): AnalyzeResult;
|
|
18
|
-
private analyseFile;
|
|
19
|
-
private isPulumiComponent;
|
|
20
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2025-2025, Pulumi Corporation.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
16
|
-
if (mod && mod.__esModule) return mod;
|
|
17
|
-
var result = {};
|
|
18
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
19
|
-
result["default"] = mod;
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
const path = __importStar(require("path"));
|
|
24
|
-
// Use the TypeScript shim which allows us to fallback to a vendored version of
|
|
25
|
-
// TypeScript if the user has not installed it.
|
|
26
|
-
// TODO: we should consider requiring the user to install TypeScript and not
|
|
27
|
-
// rely on the shim. In any case, we should add tests for providers with
|
|
28
|
-
// different versions of TypeScript in their dependencies, to ensure the
|
|
29
|
-
// analyzer code is compatible with all of them.
|
|
30
|
-
const ts = require("../../typescript-shim");
|
|
31
|
-
class Analyzer {
|
|
32
|
-
constructor(dir) {
|
|
33
|
-
this.components = {};
|
|
34
|
-
this.typeDefinitons = {};
|
|
35
|
-
const configPath = `${dir}/tsconfig.json`;
|
|
36
|
-
const config = ts.readConfigFile(configPath, ts.sys.readFile);
|
|
37
|
-
const parsedConfig = ts.parseJsonConfigFileContent(config.config, ts.sys, path.dirname(configPath));
|
|
38
|
-
this.program = ts.createProgram({
|
|
39
|
-
rootNames: parsedConfig.fileNames,
|
|
40
|
-
options: parsedConfig.options,
|
|
41
|
-
});
|
|
42
|
-
this.checker = this.program.getTypeChecker();
|
|
43
|
-
}
|
|
44
|
-
analyze() {
|
|
45
|
-
const sourceFiles = this.program.getSourceFiles();
|
|
46
|
-
for (const sourceFile of sourceFiles) {
|
|
47
|
-
if (sourceFile.fileName.includes("node_modules") || sourceFile.fileName.endsWith(".d.ts")) {
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
this.analyseFile(sourceFile);
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
components: this.components,
|
|
54
|
-
typeDefinitons: this.typeDefinitons,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
analyseFile(sourceFile) {
|
|
58
|
-
// We intentionally visit only the top-level nodes, because we only
|
|
59
|
-
// support components defined at the top-level. We have no way to
|
|
60
|
-
// instantiate components defined inside functions or methods.
|
|
61
|
-
sourceFile.forEachChild((node) => {
|
|
62
|
-
if (ts.isClassDeclaration(node) && this.isPulumiComponent(node) && node.name) {
|
|
63
|
-
const componentName = node.name.text;
|
|
64
|
-
this.components[componentName] = {
|
|
65
|
-
name: componentName,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
isPulumiComponent(node) {
|
|
71
|
-
if (!node.heritageClauses) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
return node.heritageClauses.some((clause) => {
|
|
75
|
-
return clause.types.some((clauseNode) => {
|
|
76
|
-
var _a;
|
|
77
|
-
const type = this.checker.getTypeAtLocation(clauseNode);
|
|
78
|
-
const symbol = type.getSymbol();
|
|
79
|
-
const matchesName = (symbol === null || symbol === void 0 ? void 0 : symbol.escapedName) === "ComponentResource";
|
|
80
|
-
const sourceFile = (_a = symbol === null || symbol === void 0 ? void 0 : symbol.declarations) === null || _a === void 0 ? void 0 : _a[0].getSourceFile();
|
|
81
|
-
const matchesSourceFile = (sourceFile === null || sourceFile === void 0 ? void 0 : sourceFile.fileName.endsWith("resource.ts")) || (sourceFile === null || sourceFile === void 0 ? void 0 : sourceFile.fileName.endsWith("resource.d.ts"));
|
|
82
|
-
return matchesName && matchesSourceFile;
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.Analyzer = Analyzer;
|
|
88
|
-
//# sourceMappingURL=analyzer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.js","sourceRoot":"","sources":["../../../provider/experimental/analyzer.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;AAKjC,2CAA6B;AAE7B,+EAA+E;AAC/E,+CAA+C;AAC/C,4EAA4E;AAC5E,wEAAwE;AACxE,wEAAwE;AACxE,gDAAgD;AAChD,MAAM,EAAE,GAAsB,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAe/D,MAAa,QAAQ;IAMjB,YAAY,GAAW;QAHf,eAAU,GAAwC,EAAE,CAAC;QACrD,mBAAc,GAAmC,EAAE,CAAC;QAGxD,MAAM,UAAU,GAAG,GAAG,GAAG,gBAAgB,CAAC;QAC1C,MAAM,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9D,MAAM,YAAY,GAAG,EAAE,CAAC,0BAA0B,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QACpG,IAAI,CAAC,OAAO,GAAG,EAAE,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OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;;gBACpC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;gBAChC,MAAM,WAAW,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,MAAK,mBAAmB,CAAC;gBAChE,MAAM,UAAU,SAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,YAAY,0CAAG,CAAC,EAAE,aAAa,EAAE,CAAC;gBAC7D,MAAM,iBAAiB,GACnB,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,CAAC,QAAQ,CAAC,aAAa,OAAK,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,CAAC,QAAQ,CAAC,eAAe,EAAC,CAAC;gBACnG,OAAO,WAAW,IAAI,iBAAiB,CAAC;YAC5C,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AA9DD,4BA8DC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./provider";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2025-2025, Pulumi Corporation.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
function __export(m) {
|
|
16
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
17
|
-
}
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
__export(require("./provider"));
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../provider/experimental/index.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;AAEjC,gCAA2B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function componentProviderHost(dirname?: string): Promise<void>;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2025-2025, Pulumi Corporation.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
-
if (mod && mod.__esModule) return mod;
|
|
26
|
-
var result = {};
|
|
27
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
28
|
-
result["default"] = mod;
|
|
29
|
-
return result;
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
const fs_1 = require("fs");
|
|
33
|
-
const path = __importStar(require("path"));
|
|
34
|
-
const server_1 = require("../server");
|
|
35
|
-
const schema_1 = require("./schema");
|
|
36
|
-
const analyzer_1 = require("./analyzer");
|
|
37
|
-
class ComponentProvider {
|
|
38
|
-
constructor(dir) {
|
|
39
|
-
this.dir = dir;
|
|
40
|
-
const absDir = path.resolve(dir);
|
|
41
|
-
const packStr = fs_1.readFileSync(`${absDir}/package.json`, { encoding: "utf-8" });
|
|
42
|
-
this.packageJSON = JSON.parse(packStr);
|
|
43
|
-
this.version = this.packageJSON.version;
|
|
44
|
-
this.path = absDir;
|
|
45
|
-
}
|
|
46
|
-
getSchema() {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const analyzer = new analyzer_1.Analyzer(this.path);
|
|
49
|
-
const { components, typeDefinitons } = analyzer.analyze();
|
|
50
|
-
const schema = schema_1.generateSchema(this.packageJSON, components, typeDefinitons);
|
|
51
|
-
return JSON.stringify(schema);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
construct(name, type, inputs, options) {
|
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
throw new Error("Not implemented");
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function componentProviderHost(dirname) {
|
|
61
|
-
const args = process.argv.slice(2);
|
|
62
|
-
// If dirname is not provided, get it from the call stack
|
|
63
|
-
if (!dirname) {
|
|
64
|
-
// Get the stack trace
|
|
65
|
-
const stack = new Error().stack;
|
|
66
|
-
// Parse the stack to get the caller's file
|
|
67
|
-
// Stack format is like:
|
|
68
|
-
// Error
|
|
69
|
-
// at componentProviderHost (.../src/index.ts:3:16)
|
|
70
|
-
// at Object.<anonymous> (.../caller/index.ts:4:1)
|
|
71
|
-
const callerLine = stack === null || stack === void 0 ? void 0 : stack.split("\n")[2];
|
|
72
|
-
const match = callerLine === null || callerLine === void 0 ? void 0 : callerLine.match(/\((.+):[0-9]+:[0-9]+\)/);
|
|
73
|
-
if (match === null || match === void 0 ? void 0 : match[1]) {
|
|
74
|
-
dirname = path.dirname(match[1]);
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
throw new Error("Could not determine caller directory");
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
const prov = new ComponentProvider(dirname);
|
|
81
|
-
return server_1.main(prov, args);
|
|
82
|
-
}
|
|
83
|
-
exports.componentProviderHost = componentProviderHost;
|
|
84
|
-
//# sourceMappingURL=provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../provider/experimental/provider.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;;;;;;;AAEjC,2BAAkC;AAClC,2CAA6B;AAI7B,sCAAiC;AACjC,qCAA0C;AAC1C,yCAAsC;AAEtC,MAAM,iBAAiB;IAKnB,YAAqB,GAAW;QAAX,QA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IAAI,EAAE,CAAC,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC1D,IAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,GAAG;YACZ,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACpC;aAAM;YACH,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;SAC3D;KACJ;IAED,MAAM,IAAI,GAAG,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC5C,OAAO,aAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC;AAtBD,sDAsBC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { ComponentDefinition, TypeDefinition } from "./analyzer";
|
|
2
|
-
export declare type PropertyType = "string" | "integer" | "number" | "boolean" | "array" | "object";
|
|
3
|
-
/**
|
|
4
|
-
* https://www.pulumi.com/docs/iac/using-pulumi/pulumi-packages/schema/#property
|
|
5
|
-
*/
|
|
6
|
-
export interface Property {
|
|
7
|
-
type: PropertyType;
|
|
8
|
-
items?: Property;
|
|
9
|
-
additionalProperties?: Property;
|
|
10
|
-
ref?: string;
|
|
11
|
-
plain?: boolean;
|
|
12
|
-
description?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* https://www.pulumi.com/docs/iac/using-pulumi/pulumi-packages/schema/#objecttype
|
|
16
|
-
*/
|
|
17
|
-
export interface ObjectType {
|
|
18
|
-
type: PropertyType;
|
|
19
|
-
description?: string;
|
|
20
|
-
properties?: {
|
|
21
|
-
[key: string]: Property;
|
|
22
|
-
};
|
|
23
|
-
required?: string[];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* https://www.pulumi.com/docs/iac/using-pulumi/pulumi-packages/schema/#complextype
|
|
27
|
-
*/
|
|
28
|
-
export interface ComplexType extends ObjectType {
|
|
29
|
-
enum?: string[];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* https://www.pulumi.com/docs/iac/using-pulumi/pulumi-packages/schema/#resource
|
|
33
|
-
*/
|
|
34
|
-
export interface Resource extends ObjectType {
|
|
35
|
-
isComponent?: boolean;
|
|
36
|
-
inputProperties?: {
|
|
37
|
-
[key: string]: Property;
|
|
38
|
-
};
|
|
39
|
-
requiredInputs?: string[];
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* https://www.pulumi.com/docs/iac/using-pulumi/pulumi-packages/schema/#package
|
|
43
|
-
*/
|
|
44
|
-
export interface PackageSpec {
|
|
45
|
-
name: string;
|
|
46
|
-
version?: string;
|
|
47
|
-
description?: string;
|
|
48
|
-
resources: {
|
|
49
|
-
[key: string]: Resource;
|
|
50
|
-
};
|
|
51
|
-
types: {
|
|
52
|
-
[key: string]: ComplexType;
|
|
53
|
-
};
|
|
54
|
-
language?: {
|
|
55
|
-
[key: string]: any;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export declare function generateSchema(packageJSON: Record<string, any>, components: Record<string, ComponentDefinition>, typeDefinitons: Record<string, TypeDefinition>): PackageSpec;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2025-2025, Pulumi Corporation.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
function generateSchema(packageJSON, components, typeDefinitons) {
|
|
17
|
-
const providerName = packageJSON.name;
|
|
18
|
-
const result = {
|
|
19
|
-
name: providerName,
|
|
20
|
-
version: packageJSON.version,
|
|
21
|
-
description: packageJSON.description,
|
|
22
|
-
resources: {},
|
|
23
|
-
types: {},
|
|
24
|
-
language: {
|
|
25
|
-
nodejs: {
|
|
26
|
-
dependencies: {},
|
|
27
|
-
devDependencies: {
|
|
28
|
-
typescript: "^5.0.0",
|
|
29
|
-
},
|
|
30
|
-
respectSchemaVersion: true,
|
|
31
|
-
},
|
|
32
|
-
python: {
|
|
33
|
-
respectSchemaVersion: true,
|
|
34
|
-
},
|
|
35
|
-
csharp: {
|
|
36
|
-
respectSchemaVersion: true,
|
|
37
|
-
},
|
|
38
|
-
java: {
|
|
39
|
-
respectSchemaVersion: true,
|
|
40
|
-
},
|
|
41
|
-
go: {
|
|
42
|
-
respectSchemaVersion: true,
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
for (const [name, component] of Object.entries(components)) {
|
|
47
|
-
result.resources[`${providerName}:index:${name}`] = {
|
|
48
|
-
type: "object",
|
|
49
|
-
isComponent: true,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
for (const [name, type] of Object.entries(typeDefinitons)) {
|
|
53
|
-
result.types[`${providerName}:index:${name}`] = {
|
|
54
|
-
type: "object",
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
return result;
|
|
58
|
-
}
|
|
59
|
-
exports.generateSchema = generateSchema;
|
|
60
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../provider/experimental/schema.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD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