@terrantula/sdk 0.11.0 → 0.11.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/dist/{chunk-5JCSB6F5.mjs → chunk-773V5YNO.mjs} +28 -3
- package/dist/index.d.mts +357 -62
- package/dist/index.d.ts +357 -62
- package/dist/index.js +28 -3
- package/dist/index.mjs +1 -1
- package/dist/local.d.mts +258 -54
- package/dist/local.d.ts +258 -54
- package/dist/local.js +28 -3
- package/dist/local.mjs +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1287,9 +1287,12 @@ function createExportCatalogFn(proj, projEnv) {
|
|
|
1287
1287
|
...entityTypes.map(
|
|
1288
1288
|
(r) => ({ kind: "EntityType", ...stripServerFields(r) })
|
|
1289
1289
|
),
|
|
1290
|
-
...cells.map(
|
|
1291
|
-
|
|
1292
|
-
|
|
1290
|
+
...cells.map((r) => {
|
|
1291
|
+
const { entityTypeName, ...rest } = r;
|
|
1292
|
+
const stripped = stripServerFields(rest);
|
|
1293
|
+
if (entityTypeName != null) stripped.entityType = entityTypeName;
|
|
1294
|
+
return { kind: "Cell", ...stripped };
|
|
1295
|
+
}),
|
|
1293
1296
|
...relationshipTypes.map((r) => {
|
|
1294
1297
|
const { fromEntityTypeName, toEntityTypeName, ...rest } = r;
|
|
1295
1298
|
const stripped = stripServerFields(rest);
|
|
@@ -2055,6 +2058,27 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2055
2058
|
};
|
|
2056
2059
|
}
|
|
2057
2060
|
|
|
2061
|
+
// src/resolve-source.ts
|
|
2062
|
+
var import_zod22 = require("zod");
|
|
2063
|
+
function createResolveSourceFn(proj) {
|
|
2064
|
+
return withSchema(
|
|
2065
|
+
import_zod22.z.object({
|
|
2066
|
+
orgId: import_zod22.z.string().describe("Organization slug"),
|
|
2067
|
+
projectId: import_zod22.z.string().describe("Project ID"),
|
|
2068
|
+
kind: import_zod22.z.literal("registry").describe('Source kind \u2014 only "registry" is supported today'),
|
|
2069
|
+
ref: import_zod22.z.string().regex(/^[^/]+\/[^/]+\/[^/]+$/, { message: "ref must be <namespace>/<name>/<provider>" }).describe("Terraform Registry module ref (<namespace>/<name>/<provider>)"),
|
|
2070
|
+
version: import_zod22.z.string().optional().describe("Module version semver \u2014 resolves latest if omitted")
|
|
2071
|
+
}),
|
|
2072
|
+
(params) => {
|
|
2073
|
+
const { orgId, projectId, kind, ref, version } = params;
|
|
2074
|
+
const json = version !== void 0 ? { kind, ref, version } : { kind, ref };
|
|
2075
|
+
return call(
|
|
2076
|
+
proj(orgId, projectId)["resolve-source"].$post({ json })
|
|
2077
|
+
);
|
|
2078
|
+
}
|
|
2079
|
+
);
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2058
2082
|
// src/index.ts
|
|
2059
2083
|
var createClient = (baseUrl, options = {}) => {
|
|
2060
2084
|
const opts = typeof options === "string" || typeof options === "function" ? { token: options } : options;
|
|
@@ -2092,6 +2116,7 @@ var createClient = (baseUrl, options = {}) => {
|
|
|
2092
2116
|
auditExport: createAuditExportClient(baseUrl, hcOpts),
|
|
2093
2117
|
userPreferences: createUserPreferencesClient(baseUrl, hcOpts),
|
|
2094
2118
|
importSources: createImportSourcesClient(proj),
|
|
2119
|
+
resolveSource: createResolveSourceFn(proj),
|
|
2095
2120
|
exportCatalog,
|
|
2096
2121
|
admin: createAdminClient(baseUrl, hcOpts)
|
|
2097
2122
|
};
|