@cdktn/provider-schema 0.22.0-pre.2

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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @cdktn/provider-schema
2
+
3
+ This package contains all methods related to terraform provider schemas.
package/ambient.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ // Copyright (c) HashiCorp, Inc
2
+ // Licensed under the Mozilla Public License 2.0
3
+
4
+ declare module 'child_process' {
5
+ interface SpawnOptions {
6
+ signal?: AbortSignal;
7
+ }
8
+ }
9
+
10
+ declare module "archiver";
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ import { fixupConfigRules } from "@eslint/compat";
7
+ import eslint from "@eslint/js";
8
+ import tseslint from "typescript-eslint";
9
+ import tsParser from "@typescript-eslint/parser";
10
+ import react from "eslint-plugin-react";
11
+ import prettierConfig from "eslint-plugin-prettier/recommended";
12
+ import path from "node:path";
13
+ import { fileURLToPath } from "node:url";
14
+ import js from "@eslint/js";
15
+ import { FlatCompat } from "@eslint/eslintrc";
16
+
17
+ const __filename = fileURLToPath(import.meta.url);
18
+ const __dirname = path.dirname(__filename);
19
+ const compat = new FlatCompat({
20
+ baseDirectory: __dirname,
21
+ recommendedConfig: js.configs.recommended,
22
+ allConfig: js.configs.all,
23
+ });
24
+
25
+ export default [
26
+ {
27
+ ignores: [
28
+ "**/node_modules",
29
+ "**/dist",
30
+ "**/coverage",
31
+ "**/*.d.ts",
32
+ "**/*.js",
33
+ ],
34
+ },
35
+ ...tseslint.config(eslint.configs.recommended, tseslint.configs.recommended),
36
+ {
37
+ settings: {
38
+ react: {
39
+ version: "detect",
40
+ },
41
+ },
42
+ },
43
+ react.configs.flat.recommended,
44
+ ...fixupConfigRules(compat.extends("plugin:react-hooks/recommended")).map(
45
+ (config) => ({
46
+ ...config,
47
+ files: ["**/*.ts", "**/*.tsx"],
48
+ }),
49
+ ),
50
+ {
51
+ files: ["**/*.ts", "**/*.tsx"],
52
+
53
+ languageOptions: {
54
+ parser: tsParser,
55
+ },
56
+
57
+ rules: {
58
+ "@typescript-eslint/no-explicit-any": 0,
59
+ "@typescript-eslint/explicit-function-return-type": 0,
60
+ "@typescript-eslint/no-use-before-define": 0,
61
+ "@typescript-eslint/explicit-module-boundary-types": 0,
62
+ "@typescript-eslint/no-var-requires": 0,
63
+ "react/no-unescaped-entities": 0,
64
+ "no-sequences": "error",
65
+
66
+ "no-irregular-whitespace": [
67
+ "error",
68
+ {
69
+ skipTemplates: true,
70
+ },
71
+ ],
72
+ },
73
+ },
74
+ prettierConfig,
75
+ ];
package/jest.config.js ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ module.exports = {
7
+ roots: [
8
+ "<rootDir>"
9
+ ],
10
+ testMatch: ['**/*.test.ts', '**/*.test.tsx'],
11
+ transform: {
12
+ "^.+\\.tsx?$": "ts-jest"
13
+ },
14
+ moduleFileExtensions: [
15
+ "js",
16
+ "ts",
17
+ "tsx"
18
+ ],
19
+ }
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@cdktn/provider-schema",
3
+ "version": "0.22.0-pre.2",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "description": "CDK Terrain utilities to work with provider schemas",
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "watch": "tsc -w",
11
+ "watch-preserve-output": "tsc -w --preserveWatchOutput",
12
+ "lint": "eslint . ",
13
+ "lint:fix": "eslint . --fix",
14
+ "pretest": "yarn build",
15
+ "pretest:ci": "yarn build",
16
+ "test": "yarn lint && jest",
17
+ "test:ci": "yarn lint && jest --ci",
18
+ "test:update": "jest -u",
19
+ "jest-watch": "jest --watch",
20
+ "package": "./package.sh",
21
+ "dist-clean": "rm -rf dist",
22
+ "package:js": "./package.sh"
23
+ },
24
+ "main": "src/index.js",
25
+ "types": "src/index.d.ts",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git://github.com/open-constructs/cdk-terrain.git",
29
+ "directory": "packages/@cdktn/provider-schema"
30
+ },
31
+ "author": {
32
+ "name": "OpenConstructs",
33
+ "url": "https://github.com/open-constructs"
34
+ },
35
+ "keywords": [
36
+ "cdk",
37
+ "cdktf",
38
+ "terraform"
39
+ ],
40
+ "license": "MPL-2.0",
41
+ "dependencies": {
42
+ "@cdktn/commons": "0.22.0-pre.2",
43
+ "@cdktn/hcl2json": "0.22.0-pre.2",
44
+ "deepmerge": "4.3.1",
45
+ "fs-extra": "11.3.0"
46
+ },
47
+ "devDependencies": {
48
+ "@eslint/compat": "^1.2.9",
49
+ "@eslint/eslintrc": "^3.3.1",
50
+ "@eslint/js": "^9.27.0",
51
+ "@types/follow-redirects": "1.14.4",
52
+ "@types/fs-extra": "11.0.4",
53
+ "@types/json-stable-stringify": "1.2.0",
54
+ "@types/uuid": "9.0.8",
55
+ "@typescript-eslint/parser": "^8.32.1",
56
+ "eslint": "^9.27.0",
57
+ "eslint-plugin-prettier": "^5.4.0",
58
+ "eslint-plugin-react": "7.37.5",
59
+ "jest": "^29.7.0",
60
+ "json-stable-stringify": "1.3.0",
61
+ "lint-staged": "^15.5.2",
62
+ "ts-jest": "29.3.4",
63
+ "tsc-files": "1.1.4",
64
+ "typescript": "5.4.5",
65
+ "typescript-eslint": "^8.32.1"
66
+ },
67
+ "lint-staged": {
68
+ "src/**/*.{ts,tsx}": "tsc-files ambient.d.ts --noEmit"
69
+ }
70
+ }