@seventhlab/sonarqube-cloud 1.0.1

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/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,211 @@
1
+ # Pulumi SonarQube Cloud Provider
2
+
3
+ - [Pulumi SonarQube Cloud Provider](#pulumi-sonarqube-cloud-provider)
4
+ - [Features](#features)
5
+ - [Provider Configuration](#provider-configuration)
6
+ - [Quick Start (Local Development)](#quick-start-local-development)
7
+ - [1. Install tooling](#1-install-tooling)
8
+ - [2. Build and install SDKs](#2-build-and-install-sdks)
9
+ - [2. Start the mock SonarQube Cloud server](#2-start-the-mock-sonarqube-cloud-server)
10
+ - [3. Export provider environment variables](#3-export-provider-environment-variables)
11
+ - [4. Run an example](#4-run-an-example)
12
+ - [Building SDKs and Provider Locally](#building-sdks-and-provider-locally)
13
+ - [Automated SDK Releases](#automated-sdk-releases)
14
+ - [Development Commands](#development-commands)
15
+ - [Example Resource (YAML)](#example-resource-yaml)
16
+ - [Repository Layout](#repository-layout)
17
+ - [Notes](#notes)
18
+
19
+ [![Build](https://github.com/seventhlab/pulumi-sonarqube-cloud/actions/workflows/build.yml/badge.svg)](https://github.com/seventhlab/pulumi-sonarqube-cloud/actions/workflows/build.yml)
20
+ [![Tests](https://github.com/seventhlab/pulumi-sonarqube-cloud/actions/workflows/tests.yml/badge.svg)](https://github.com/seventhlab/pulumi-sonarqube-cloud/actions/workflows/tests.yml)
21
+ [![Lint](https://github.com/seventhlab/pulumi-sonarqube-cloud/actions/workflows/lint.yml/badge.svg)](https://github.com/seventhlab/pulumi-sonarqube-cloud/actions/workflows/lint.yml)
22
+
23
+ Native Pulumi provider for SonarQube Cloud.
24
+
25
+ The provider currently exposes a `Project` resource for managing SonarQube Cloud
26
+ projects, including optional GitHub repository linking to the SonarQube project.
27
+
28
+ ## Features
29
+
30
+ - Create, read, update, and delete SonarQube Cloud projects
31
+ - Set project visibility (`public` / `private`)
32
+ - Optionally link a GitHub repository during project creation via
33
+ `githubRepositoryId`
34
+ - Multi-language SDKs: YAML, Go, Node.js, Python, .NET, Java
35
+
36
+ ## Provider Configuration
37
+
38
+ Provider configuration supports:
39
+
40
+ - `token` (required): SonarQube Cloud token, or `SONAR_TOKEN`
41
+ - `host` (optional): SonarQube/SonarCloud host, or `SONAR_HOST`
42
+ - Defaults to `https://sonarcloud.io`
43
+
44
+ `organization` is now a required input on the `Project` resource itself (there
45
+ is no provider-level default organization setting).
46
+
47
+ ## Quick Start (Local Development)
48
+
49
+ ### 1. Install tooling
50
+
51
+ This repository uses `mise` to manage the development toolchain. You can setup all requirements with a simple setup pnpm target:
52
+
53
+ ```bash
54
+ pnpm setup
55
+ ```
56
+
57
+ Or if you don't have pnpm installed in your system you can manually run the setup script:
58
+
59
+ ```bash
60
+ ./scripts/dev/setup.sh
61
+ ```
62
+
63
+ ### 2. Build and install SDKs
64
+
65
+ In order to use the provider in the example projects you have to freshly generate and install locally the provider SDK for at least the language you are going to use:
66
+
67
+ ```bash
68
+ pnpm sdks:build && pnpm sdks:install
69
+ ```
70
+
71
+ ### 2. Start the mock SonarQube Cloud server
72
+
73
+ ```bash
74
+ pnpm serve:dev
75
+ ```
76
+
77
+ In another terminal, get the generated token:
78
+
79
+ ```bash
80
+ curl http://localhost:8080/api/token
81
+ ```
82
+
83
+ ### 3. Export provider environment variables
84
+
85
+ ```bash
86
+ export SONAR_HOST="http://localhost:8080"
87
+ export SONAR_TOKEN="<token from /api/token>"
88
+ ```
89
+
90
+ ### 4. Run an example
91
+
92
+ Pick any example under `examples/` (Go, Node.js, Python, .NET, Java, YAML).
93
+ For example, Node.js:
94
+
95
+ ```bash
96
+ cd examples/nodejs
97
+ pulumi stack init local
98
+ pulumi config set sonarHost "$SONAR_HOST"
99
+ pulumi config set --secret sonarToken "$SONAR_TOKEN"
100
+ pulumi up
101
+ ```
102
+
103
+ ## Building SDKs and Provider Locally
104
+
105
+ Build the provider binary, generate the schema, and build all SDKs:
106
+
107
+ ```bash
108
+ pnpm sdks:build
109
+ ```
110
+
111
+ Install the locally built plugin and SDK packages into the example projects:
112
+
113
+ ```bash
114
+ pnpm sdks:install
115
+ ```
116
+
117
+ ## Automated SDK Releases
118
+
119
+ Node.js SDK release is automated with semantic-release in
120
+ `.github/workflows/release-sdk.yml`.
121
+
122
+ - Push to `main` runs the publish flow for the `nodejs` SDK target.
123
+ - Manual dispatch supports dry-run validation without publishing.
124
+ - semantic-release and required plugins are pinned in root `devDependencies`
125
+ for reproducible runs.
126
+
127
+ Required repository secrets:
128
+
129
+ - `NPM_TOKEN`: npm automation token with publish access for
130
+ `@seventhlab/sonarqube-cloud`
131
+
132
+ Manual dry-run:
133
+
134
+ 1. Open GitHub Actions and run `Release SDKs`.
135
+ 2. Set `sdk=nodejs`.
136
+ 3. Set `dry_run=true`.
137
+
138
+ Local dry-run:
139
+
140
+ ```bash
141
+ ./scripts/release/run-semantic-release.sh -s nodejs -d
142
+ ```
143
+
144
+ Note: local dry-run defaults to a local `file://` repository URL to avoid
145
+ network dependency. If you want canonical GitHub links in generated notes, set
146
+ `SEMANTIC_RELEASE_REPOSITORY_URL=https://github.com/seventhlab/pulumi-sonarqube-cloud.git`.
147
+
148
+ When dry-run is executed in CI, the release script also performs live GitHub API
149
+ permission probes (using intentionally invalid write requests that should return
150
+ `422` when permissions are correct). This catches token permission gaps (for
151
+ `contents`, `issues`, and `pull-requests`) before a real publish run.
152
+
153
+ The workflow is intentionally matrix-based (`matrix.sdk`) and the release runner
154
+ script (`scripts/release/run-semantic-release.sh`) is target-aware, so adding
155
+ other SDK release targets only requires:
156
+
157
+ 1. Adding new entries to the workflow matrix.
158
+ 2. Adding a semantic-release config file for that target.
159
+ 3. Extending the release runner case statement.
160
+
161
+ ## Development Commands
162
+
163
+ ```bash
164
+ # Lint all code and config
165
+ pnpm lint
166
+
167
+ # Run unit tests
168
+ pnpm test:unit
169
+
170
+ # Run integration tests (builds SDKs, installs plugin, runs examples)
171
+ pnpm test:integration
172
+ ```
173
+
174
+ ## Example Resource (YAML)
175
+
176
+ ```yaml
177
+ resources:
178
+ example:
179
+ type: pulumi:providers:sonarqube-cloud
180
+ properties:
181
+ token: ${sonarToken}
182
+ host: ${sonarHost}
183
+
184
+ exampleProject:
185
+ type: sonarqube-cloud:index:Project
186
+ properties:
187
+ name: Example Project
188
+ organization: seventhlab
189
+ projectKey: example-project
190
+ visibility: public
191
+ githubRepositoryId: "123456789" # optional
192
+ options:
193
+ provider: ${example}
194
+ ```
195
+
196
+ You can find more examples in all available supported languages in [`examples/`](examples/) folder.
197
+
198
+ ## Repository Layout
199
+
200
+ - `provider/`: Pulumi provider implementation
201
+ - `internal/`: SonarQube API client, config, and domain logic
202
+ - `sdk/`: Generated language SDKs
203
+ - `examples/`: Example Pulumi programs used for local/manual testing
204
+ - `tests/`: Integration tests and mock SonarQube Cloud server
205
+ - `scripts/`: Build, install, lint, and formatter scripts
206
+
207
+ ## Notes
208
+
209
+ - The mock server under `tests/mock-server/` is intended for local development
210
+ and integration testing. It does not implement the full SonarQube Cloud API.
211
+ - Generated SDK files are rebuilt by `./scripts/build.sh`.
@@ -0,0 +1 @@
1
+ export * from "./vars";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ // Export members:
20
+ __exportStar(require("./vars"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
@@ -0,0 +1,2 @@
1
+ export declare const host: string | undefined;
2
+ export declare const token: string | undefined;
package/config/vars.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const pulumi = require("@pulumi/pulumi");
6
+ const __config = new pulumi.Config("sonarqube-cloud");
7
+ Object.defineProperty(exports, "host", {
8
+ get() {
9
+ return __config.get("host");
10
+ },
11
+ enumerable: true,
12
+ });
13
+ Object.defineProperty(exports, "token", {
14
+ get() {
15
+ return __config.get("token");
16
+ },
17
+ enumerable: true,
18
+ });
19
+ //# sourceMappingURL=vars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;AAEjF,yCAAyC;AAIzC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAGtD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE;IACnC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAGH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE;IACpC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
package/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export { ProjectArgs } from "./project";
2
+ export type Project = import("./project").Project;
3
+ export declare const Project: typeof import("./project").Project;
4
+ export { ProviderArgs } from "./provider";
5
+ export type Provider = import("./provider").Provider;
6
+ export declare const Provider: typeof import("./provider").Provider;
7
+ import * as config from "./config";
8
+ import * as model from "./model";
9
+ import * as types from "./types";
10
+ export { config, model, types, };
package/index.js ADDED
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.types = exports.model = exports.config = exports.Provider = exports.Project = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ exports.Project = null;
9
+ utilities.lazyLoad(exports, ["Project"], () => require("./project"));
10
+ exports.Provider = null;
11
+ utilities.lazyLoad(exports, ["Provider"], () => require("./provider"));
12
+ // Export sub-modules:
13
+ const config = require("./config");
14
+ exports.config = config;
15
+ const model = require("./model");
16
+ exports.model = model;
17
+ const types = require("./types");
18
+ exports.types = types;
19
+ const _module = {
20
+ version: utilities.getVersion(),
21
+ construct: (name, type, urn) => {
22
+ switch (type) {
23
+ case "sonarqube-cloud:index:Project":
24
+ return new exports.Project(name, undefined, { urn });
25
+ default:
26
+ throw new Error(`unknown resource type ${type}`);
27
+ }
28
+ },
29
+ };
30
+ pulumi.runtime.registerResourceModule("sonarqube-cloud", "index", _module);
31
+ pulumi.runtime.registerResourcePackage("sonarqube-cloud", {
32
+ version: utilities.getVersion(),
33
+ constructProvider: (name, type, urn) => {
34
+ if (type !== "pulumi:providers:sonarqube-cloud") {
35
+ throw new Error(`unknown provider type ${type}`);
36
+ }
37
+ return new exports.Provider(name, undefined, { urn });
38
+ },
39
+ });
40
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAK5B,QAAA,OAAO,GAAuC,IAAW,CAAC;AACvE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;AAIxD,QAAA,QAAQ,GAAyC,IAAW,CAAC;AAC1E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;AAGvE,sBAAsB;AACtB,mCAAmC;AAK/B,wBAAM;AAJV,iCAAiC;AAK7B,sBAAK;AAJT,iCAAiC;AAK7B,sBAAK;AAGT,MAAM,OAAO,GAAG;IACZ,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,SAAS,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAAmB,EAAE;QACpE,QAAQ,IAAI,EAAE;YACV,KAAK,+BAA+B;gBAChC,OAAO,IAAI,eAAO,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACrD;gBACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACxD;IACL,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAC1E,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,iBAAiB,EAAE;IACtD,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,iBAAiB,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAA2B,EAAE;QACpF,IAAI,IAAI,KAAK,kCAAkC,EAAE;YAC7C,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACpD;QACD,OAAO,IAAI,gBAAQ,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;CACJ,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "../types/enums/model";
package/model/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ // Export enums:
20
+ __exportStar(require("../types/enums/model"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;AAGjF,gBAAgB;AAChB,uDAAqC"}
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@seventhlab/sonarqube-cloud",
3
+ "version": "1.0.1",
4
+ "homepage": "https://seventhlab.es",
5
+ "scripts": {
6
+ "build": "tsc"
7
+ },
8
+ "dependencies": {
9
+ "@pulumi/pulumi": "^3.142.0"
10
+ },
11
+ "devDependencies": {
12
+ "@types/node": "^18",
13
+ "typescript": "^4.3.5"
14
+ },
15
+ "pulumi": {
16
+ "resource": true,
17
+ "name": "sonarqube-cloud",
18
+ "version": "0.1.0"
19
+ }
20
+ }
package/project.d.ts ADDED
@@ -0,0 +1,103 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as enums from "./types/enums";
3
+ /**
4
+ * A SonarQube Cloud project resource that represents a code quality analysis project.
5
+ *
6
+ * Projects in SonarQube Cloud are containers for managing code quality metrics,
7
+ * analyzing source code, tracking issues, and maintaining code standards.
8
+ *
9
+ * Example usage in go (see https://github.com/seventhlab/pulumi-sonarqube-cloud/tree/main/examples for more examples):
10
+ *
11
+ * package main
12
+ *
13
+ * import (
14
+ * "github.com/pulumi/pulumi-go-provider/infer"
15
+ * sonar "github.com/seventhlab/pulumi-sonarqube-cloud/sdk/go/sonarqube-cloud"
16
+ * "github.com/seventhlab/pulumi-sonarqube-cloud/sdk/go/sonarqube-cloud/model"
17
+ * )
18
+ *
19
+ * func main() {
20
+ * infer.Run(func(ctx *infer.Context) error {
21
+ * _, err := sonar.NewProject(ctx, "my-project", &sonar.ProjectArgs{
22
+ * Organization: "my-org",
23
+ * ProjectKey: "my-project-key",
24
+ * Name: "My Project",
25
+ * Visibility: model.ProjectVisibilityPrivate,
26
+ * })
27
+ * return err
28
+ * })
29
+ * }
30
+ */
31
+ export declare class Project extends pulumi.CustomResource {
32
+ /**
33
+ * Get an existing Project resource's state with the given name, ID, and optional extra
34
+ * properties used to qualify the lookup.
35
+ *
36
+ * @param name The _unique_ name of the resulting resource.
37
+ * @param id The _unique_ provider ID of the resource to lookup.
38
+ * @param opts Optional settings to control the behavior of the CustomResource.
39
+ */
40
+ static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Project;
41
+ /**
42
+ * Returns true if the given object is an instance of Project. This is designed to work even
43
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
44
+ */
45
+ static isInstance(obj: any): obj is Project;
46
+ /**
47
+ * (optional) The GitHub repository ID associated with the project for integration. If omitted, the project is created without GitHub integration. This field is immutable after creation.
48
+ */
49
+ readonly githubRepositoryId: pulumi.Output<string | undefined>;
50
+ /**
51
+ * The display name of the project.
52
+ */
53
+ readonly name: pulumi.Output<string>;
54
+ /**
55
+ * The key of the organization that the project belongs to. Use the GitHub organization name for GitHub integration. This is required and cannot be changed after creation.
56
+ */
57
+ readonly organization: pulumi.Output<string>;
58
+ /**
59
+ * The unique key for the project within the organization. Use the GitHub repository name for GitHub integration. This is required and cannot be changed after creation.
60
+ */
61
+ readonly projectKey: pulumi.Output<string>;
62
+ /**
63
+ * (optional) The URL to the project's dashboard in SonarQube Cloud. This is a computed field set after creation.
64
+ */
65
+ readonly url: pulumi.Output<string | undefined>;
66
+ /**
67
+ * (optional) The visibility of the project (e.g., public or private). Use `ProjectVisibility` enum values. If no visibility is specified, the default project visibility is used.
68
+ */
69
+ readonly visibility: pulumi.Output<enums.model.ProjectVisibility | undefined>;
70
+ /**
71
+ * Create a Project resource with the given unique name, arguments, and options.
72
+ *
73
+ * @param name The _unique_ name of the resource.
74
+ * @param args The arguments to use to populate this resource's properties.
75
+ * @param opts A bag of options that control this resource's behavior.
76
+ */
77
+ constructor(name: string, args: ProjectArgs, opts?: pulumi.CustomResourceOptions);
78
+ }
79
+ /**
80
+ * The set of arguments for constructing a Project resource.
81
+ */
82
+ export interface ProjectArgs {
83
+ /**
84
+ * (optional) The GitHub repository ID associated with the project for integration. If omitted, the project is created without GitHub integration. This field is immutable after creation.
85
+ */
86
+ githubRepositoryId?: pulumi.Input<string>;
87
+ /**
88
+ * The display name of the project.
89
+ */
90
+ name: pulumi.Input<string>;
91
+ /**
92
+ * The key of the organization that the project belongs to. Use the GitHub organization name for GitHub integration. This is required and cannot be changed after creation.
93
+ */
94
+ organization: pulumi.Input<string>;
95
+ /**
96
+ * The unique key for the project within the organization. Use the GitHub repository name for GitHub integration. This is required and cannot be changed after creation.
97
+ */
98
+ projectKey: pulumi.Input<string>;
99
+ /**
100
+ * (optional) The visibility of the project (e.g., public or private). Use `ProjectVisibility` enum values. If no visibility is specified, the default project visibility is used.
101
+ */
102
+ visibility?: pulumi.Input<enums.model.ProjectVisibility>;
103
+ }
package/project.js ADDED
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Project = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * A SonarQube Cloud project resource that represents a code quality analysis project.
10
+ *
11
+ * Projects in SonarQube Cloud are containers for managing code quality metrics,
12
+ * analyzing source code, tracking issues, and maintaining code standards.
13
+ *
14
+ * Example usage in go (see https://github.com/seventhlab/pulumi-sonarqube-cloud/tree/main/examples for more examples):
15
+ *
16
+ * package main
17
+ *
18
+ * import (
19
+ * "github.com/pulumi/pulumi-go-provider/infer"
20
+ * sonar "github.com/seventhlab/pulumi-sonarqube-cloud/sdk/go/sonarqube-cloud"
21
+ * "github.com/seventhlab/pulumi-sonarqube-cloud/sdk/go/sonarqube-cloud/model"
22
+ * )
23
+ *
24
+ * func main() {
25
+ * infer.Run(func(ctx *infer.Context) error {
26
+ * _, err := sonar.NewProject(ctx, "my-project", &sonar.ProjectArgs{
27
+ * Organization: "my-org",
28
+ * ProjectKey: "my-project-key",
29
+ * Name: "My Project",
30
+ * Visibility: model.ProjectVisibilityPrivate,
31
+ * })
32
+ * return err
33
+ * })
34
+ * }
35
+ */
36
+ class Project extends pulumi.CustomResource {
37
+ /**
38
+ * Get an existing Project resource's state with the given name, ID, and optional extra
39
+ * properties used to qualify the lookup.
40
+ *
41
+ * @param name The _unique_ name of the resulting resource.
42
+ * @param id The _unique_ provider ID of the resource to lookup.
43
+ * @param opts Optional settings to control the behavior of the CustomResource.
44
+ */
45
+ static get(name, id, opts) {
46
+ return new Project(name, undefined, { ...opts, id: id });
47
+ }
48
+ /**
49
+ * Returns true if the given object is an instance of Project. This is designed to work even
50
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
51
+ */
52
+ static isInstance(obj) {
53
+ if (obj === undefined || obj === null) {
54
+ return false;
55
+ }
56
+ return obj['__pulumiType'] === Project.__pulumiType;
57
+ }
58
+ /**
59
+ * Create a Project resource with the given unique name, arguments, and options.
60
+ *
61
+ * @param name The _unique_ name of the resource.
62
+ * @param args The arguments to use to populate this resource's properties.
63
+ * @param opts A bag of options that control this resource's behavior.
64
+ */
65
+ constructor(name, args, opts) {
66
+ let resourceInputs = {};
67
+ opts = opts || {};
68
+ if (!opts.id) {
69
+ if (args?.name === undefined && !opts.urn) {
70
+ throw new Error("Missing required property 'name'");
71
+ }
72
+ if (args?.organization === undefined && !opts.urn) {
73
+ throw new Error("Missing required property 'organization'");
74
+ }
75
+ if (args?.projectKey === undefined && !opts.urn) {
76
+ throw new Error("Missing required property 'projectKey'");
77
+ }
78
+ resourceInputs["githubRepositoryId"] = args?.githubRepositoryId;
79
+ resourceInputs["name"] = args?.name;
80
+ resourceInputs["organization"] = args?.organization;
81
+ resourceInputs["projectKey"] = args?.projectKey;
82
+ resourceInputs["visibility"] = args?.visibility;
83
+ resourceInputs["url"] = undefined /*out*/;
84
+ }
85
+ else {
86
+ resourceInputs["githubRepositoryId"] = undefined /*out*/;
87
+ resourceInputs["name"] = undefined /*out*/;
88
+ resourceInputs["organization"] = undefined /*out*/;
89
+ resourceInputs["projectKey"] = undefined /*out*/;
90
+ resourceInputs["url"] = undefined /*out*/;
91
+ resourceInputs["visibility"] = undefined /*out*/;
92
+ }
93
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
94
+ super(Project.__pulumiType, name, resourceInputs, opts);
95
+ }
96
+ }
97
+ exports.Project = Project;
98
+ /** @internal */
99
+ Project.__pulumiType = 'sonarqube-cloud:index:Project';
100
+ //# sourceMappingURL=project.js.map
package/project.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../project.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAIzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAa,OAAQ,SAAQ,MAAM,CAAC,cAAc;IAC9C;;;;;;;OAOG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,IAAmC;QAC5F,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE,SAAgB,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACpE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC;IACxD,CAAC;IA2BD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAiB,EAAE,IAAmC;QAC5E,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACV,IAAI,IAAI,EAAE,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACvC,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;aACvD;YACD,IAAI,IAAI,EAAE,YAAY,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC/C,MAAM,IAAI,KAA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ulumi/pulumi";
2
+ export declare class Provider extends pulumi.ProviderResource {
3
+ /**
4
+ * Returns true if the given object is an instance of Provider. This is designed to work even
5
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
6
+ */
7
+ static isInstance(obj: any): obj is Provider;
8
+ readonly host: pulumi.Output<string | undefined>;
9
+ readonly token: pulumi.Output<string>;
10
+ /**
11
+ * Create a Provider resource with the given unique name, arguments, and options.
12
+ *
13
+ * @param name The _unique_ name of the resource.
14
+ * @param args The arguments to use to populate this resource's properties.
15
+ * @param opts A bag of options that control this resource's behavior.
16
+ */
17
+ constructor(name: string, args: ProviderArgs, opts?: pulumi.ResourceOptions);
18
+ }
19
+ /**
20
+ * The set of arguments for constructing a Provider resource.
21
+ */
22
+ export interface ProviderArgs {
23
+ host?: pulumi.Input<string>;
24
+ token: pulumi.Input<string>;
25
+ }
package/provider.js ADDED
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Provider = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ class Provider extends pulumi.ProviderResource {
9
+ /**
10
+ * Returns true if the given object is an instance of Provider. This is designed to work even
11
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
12
+ */
13
+ static isInstance(obj) {
14
+ if (obj === undefined || obj === null) {
15
+ return false;
16
+ }
17
+ return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
18
+ }
19
+ /**
20
+ * Create a Provider resource with the given unique name, arguments, and options.
21
+ *
22
+ * @param name The _unique_ name of the resource.
23
+ * @param args The arguments to use to populate this resource's properties.
24
+ * @param opts A bag of options that control this resource's behavior.
25
+ */
26
+ constructor(name, args, opts) {
27
+ let resourceInputs = {};
28
+ opts = opts || {};
29
+ {
30
+ if (args?.token === undefined && !opts.urn) {
31
+ throw new Error("Missing required property 'token'");
32
+ }
33
+ resourceInputs["host"] = args?.host;
34
+ resourceInputs["token"] = args?.token ? pulumi.secret(args.token) : undefined;
35
+ }
36
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
37
+ const secretOpts = { additionalSecretOutputs: ["token"] };
38
+ opts = pulumi.mergeOptions(opts, secretOpts);
39
+ super(Provider.__pulumiType, name, resourceInputs, opts);
40
+ }
41
+ }
42
+ exports.Provider = Provider;
43
+ /** @internal */
44
+ Provider.__pulumiType = 'sonarqube-cloud';
45
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IAIjD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC;IAC/E,CAAC;IAKD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAkB,EAAE,IAA6B;QACvE,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB;YACI,IAAI,IAAI,EAAE,KAAK,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACxC,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;aACxD;YACD,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SACjF;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;;AAvCL,4BAwCC;AAvCG,gBAAgB;AACO,qBAAY,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import * as model from "./model";
2
+ export { model, };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.model = void 0;
6
+ // Export sub-modules:
7
+ const model = require("./model");
8
+ exports.model = model;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../types/enums/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,sBAAsB;AACtB,iCAAiC;AAG7B,sBAAK"}
@@ -0,0 +1,11 @@
1
+ export declare const ProjectVisibility: {
2
+ /**
3
+ * Project is publicly visible.
4
+ */
5
+ readonly Public: "public";
6
+ /**
7
+ * Project is private and requires access.
8
+ */
9
+ readonly Private: "private";
10
+ };
11
+ export type ProjectVisibility = (typeof ProjectVisibility)[keyof typeof ProjectVisibility];
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ProjectVisibility = void 0;
6
+ exports.ProjectVisibility = {
7
+ /**
8
+ * Project is publicly visible.
9
+ */
10
+ Public: "public",
11
+ /**
12
+ * Project is private and requires access.
13
+ */
14
+ Private: "private",
15
+ };
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../types/enums/model/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAGpE,QAAA,iBAAiB,GAAG;IAC7B;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,OAAO,EAAE,SAAS;CACZ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as enums from "./enums";
2
+ import * as input from "./input";
3
+ import * as output from "./output";
4
+ export { enums, input, output, };
package/types/index.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.output = exports.input = exports.enums = void 0;
6
+ // Export sub-modules:
7
+ const enums = require("./enums");
8
+ exports.enums = enums;
9
+ const input = require("./input");
10
+ exports.input = input;
11
+ const output = require("./output");
12
+ exports.output = output;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,sBAAsB;AACtB,iCAAiC;AAK7B,sBAAK;AAJT,iCAAiC;AAK7B,sBAAK;AAJT,mCAAmC;AAK/B,wBAAM"}
@@ -0,0 +1 @@
1
+ export {};
package/types/input.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../types/input.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../types/output.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF"}
package/utilities.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export declare function getEnv(...vars: string[]): string | undefined;
2
+ export declare function getEnvBoolean(...vars: string[]): boolean | undefined;
3
+ export declare function getEnvNumber(...vars: string[]): number | undefined;
4
+ export declare function getVersion(): string;
package/utilities.js ADDED
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.callAsync = exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
6
+ const runtime = require("@pulumi/pulumi/runtime");
7
+ function getEnv(...vars) {
8
+ for (const v of vars) {
9
+ const value = process.env[v];
10
+ if (value) {
11
+ return value;
12
+ }
13
+ }
14
+ return undefined;
15
+ }
16
+ exports.getEnv = getEnv;
17
+ function getEnvBoolean(...vars) {
18
+ const s = getEnv(...vars);
19
+ if (s !== undefined) {
20
+ // NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
21
+ // Terraform uses internally when parsing boolean values.
22
+ if (["1", "t", "T", "true", "TRUE", "True"].find(v => v === s) !== undefined) {
23
+ return true;
24
+ }
25
+ if (["0", "f", "F", "false", "FALSE", "False"].find(v => v === s) !== undefined) {
26
+ return false;
27
+ }
28
+ }
29
+ return undefined;
30
+ }
31
+ exports.getEnvBoolean = getEnvBoolean;
32
+ function getEnvNumber(...vars) {
33
+ const s = getEnv(...vars);
34
+ if (s !== undefined) {
35
+ const f = parseFloat(s);
36
+ if (!isNaN(f)) {
37
+ return f;
38
+ }
39
+ }
40
+ return undefined;
41
+ }
42
+ exports.getEnvNumber = getEnvNumber;
43
+ function getVersion() {
44
+ let version = require('./package.json').version;
45
+ // Node allows for the version to be prefixed by a "v", while semver doesn't.
46
+ // If there is a v, strip it off.
47
+ if (version.indexOf('v') === 0) {
48
+ version = version.slice(1);
49
+ }
50
+ return version;
51
+ }
52
+ exports.getVersion = getVersion;
53
+ /** @internal */
54
+ function resourceOptsDefaults() {
55
+ return { version: getVersion() };
56
+ }
57
+ exports.resourceOptsDefaults = resourceOptsDefaults;
58
+ /** @internal */
59
+ function lazyLoad(exports, props, loadModule) {
60
+ for (let property of props) {
61
+ Object.defineProperty(exports, property, {
62
+ enumerable: true,
63
+ get: function () {
64
+ return loadModule()[property];
65
+ },
66
+ });
67
+ }
68
+ }
69
+ exports.lazyLoad = lazyLoad;
70
+ /** @internal */
71
+ async function callAsync(tok, props, res, opts) {
72
+ const o = runtime.call(tok, props, res);
73
+ const value = await o.promise(true /*withUnknowns*/);
74
+ const isKnown = await o.isKnown;
75
+ const isSecret = await o.isSecret;
76
+ const problem = !isKnown ? "an unknown value"
77
+ : isSecret ? "a secret value"
78
+ : undefined;
79
+ // Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
80
+ if (problem) {
81
+ throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
82
+ "This is an error in the provider, please report this to the provider developer.");
83
+ }
84
+ // Extract a single property if requested.
85
+ if (opts && opts.property) {
86
+ return value[opts.property];
87
+ }
88
+ return value;
89
+ }
90
+ exports.callAsync = callAsync;
91
+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