Skip to content

Commit 05eb218

Browse files
committed
wip
1 parent c0b77ca commit 05eb218

File tree

221 files changed

+980
-1021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+980
-1021
lines changed

Diff for: examples/tests/invalid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "examples-invalid",
33
"dependencies": {
4-
"cdktf": "0.17.0",
4+
"cdktf": "^0.17.3",
55
"constructs": "^10.2.70",
66
"jsii-code-samples": "1.7.0"
77
},

Diff for: examples/tests/valid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"aws-cdk-lib": "^2.94.0",
1010
"cdk8s": "^2.64.2",
1111
"cdk8s-plus-27": "^2.7.1",
12-
"cdktf": "0.17.0",
12+
"cdktf": "^0.17.3",
1313
"constructs": "^10.2.70",
1414
"jsii-code-samples": "1.7.0",
1515
"projen": "^0.71.163",

Diff for: libs/wingsdk/.projen/deps.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: libs/wingsdk/.projen/tasks.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: libs/wingsdk/.projenrc.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ if (undocumentedResources.length) {
2323
);
2424
}
2525

26-
const JSII_DEPS = ["constructs@~10.2.69"];
27-
const CDKTF_VERSION = "0.17.0";
26+
const JSII_DEPS = ["constructs@~10.2.70"];
27+
const CDKTF_VERSION = "^0.17.3";
2828

2929
const CDKTF_PROVIDERS = [
3030
"aws@~>4.65.0",

Diff for: libs/wingsdk/package.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: libs/wingsdk/src/.gen/constraints.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"cdktf": "0.17.0",
2+
"cdktf": "0.17.3",
33
"providers": {
44
"aws": "~>4.65.0",
55
"azurerm": "~>3.54.0",

Diff for: libs/wingsdk/src/core/plugin-manager.ts

+3-29
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { readFileSync, writeFileSync } from "fs";
2-
import { dirname, resolve } from "path";
3-
import * as vm from "vm";
1+
import { writeFileSync } from "fs";
2+
import { resolve } from "path";
43
import { IConstruct } from "constructs";
54

65
/**
@@ -55,33 +54,8 @@ export class PluginManager {
5554
);
5655
}
5756

58-
const hooks: ICompilationHook = {
59-
name: pluginAbsolutePath,
60-
};
61-
62-
const pluginDir = dirname(pluginAbsolutePath);
63-
64-
const modulePaths = module.paths ?? [__dirname];
65-
66-
const requireResolve = (path: string) =>
67-
require.resolve(path, { paths: [...modulePaths, pluginDir] });
6857
// eslint-disable-next-line @typescript-eslint/no-require-imports
69-
const pluginRequire = (path: string) => require(requireResolve(path));
70-
pluginRequire.resolve = requireResolve;
71-
72-
const context = vm.createContext({
73-
require: pluginRequire,
74-
console,
75-
exports: hooks,
76-
process,
77-
__dirname: pluginDir,
78-
});
79-
80-
const pluginCode = readFileSync(pluginAbsolutePath, "utf8");
81-
const script = new vm.Script(pluginCode);
82-
script.runInContext(context);
83-
84-
this.hooks.push(hooks);
58+
this.hooks.push(require(pluginAbsolutePath));
8559
}
8660

8761
/**

0 commit comments

Comments
 (0)