@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
|
@@ -1264,9 +1264,12 @@ function createExportCatalogFn(proj, projEnv) {
|
|
|
1264
1264
|
...entityTypes.map(
|
|
1265
1265
|
(r) => ({ kind: "EntityType", ...stripServerFields(r) })
|
|
1266
1266
|
),
|
|
1267
|
-
...cells.map(
|
|
1268
|
-
|
|
1269
|
-
|
|
1267
|
+
...cells.map((r) => {
|
|
1268
|
+
const { entityTypeName, ...rest } = r;
|
|
1269
|
+
const stripped = stripServerFields(rest);
|
|
1270
|
+
if (entityTypeName != null) stripped.entityType = entityTypeName;
|
|
1271
|
+
return { kind: "Cell", ...stripped };
|
|
1272
|
+
}),
|
|
1270
1273
|
...relationshipTypes.map((r) => {
|
|
1271
1274
|
const { fromEntityTypeName, toEntityTypeName, ...rest } = r;
|
|
1272
1275
|
const stripped = stripServerFields(rest);
|
|
@@ -2032,6 +2035,27 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
2032
2035
|
};
|
|
2033
2036
|
}
|
|
2034
2037
|
|
|
2038
|
+
// src/resolve-source.ts
|
|
2039
|
+
import { z as z22 } from "zod";
|
|
2040
|
+
function createResolveSourceFn(proj) {
|
|
2041
|
+
return withSchema(
|
|
2042
|
+
z22.object({
|
|
2043
|
+
orgId: z22.string().describe("Organization slug"),
|
|
2044
|
+
projectId: z22.string().describe("Project ID"),
|
|
2045
|
+
kind: z22.literal("registry").describe('Source kind \u2014 only "registry" is supported today'),
|
|
2046
|
+
ref: z22.string().regex(/^[^/]+\/[^/]+\/[^/]+$/, { message: "ref must be <namespace>/<name>/<provider>" }).describe("Terraform Registry module ref (<namespace>/<name>/<provider>)"),
|
|
2047
|
+
version: z22.string().optional().describe("Module version semver \u2014 resolves latest if omitted")
|
|
2048
|
+
}),
|
|
2049
|
+
(params) => {
|
|
2050
|
+
const { orgId, projectId, kind, ref, version } = params;
|
|
2051
|
+
const json = version !== void 0 ? { kind, ref, version } : { kind, ref };
|
|
2052
|
+
return call(
|
|
2053
|
+
proj(orgId, projectId)["resolve-source"].$post({ json })
|
|
2054
|
+
);
|
|
2055
|
+
}
|
|
2056
|
+
);
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2035
2059
|
// src/index.ts
|
|
2036
2060
|
var createClient = (baseUrl, options = {}) => {
|
|
2037
2061
|
const opts = typeof options === "string" || typeof options === "function" ? { token: options } : options;
|
|
@@ -2069,6 +2093,7 @@ var createClient = (baseUrl, options = {}) => {
|
|
|
2069
2093
|
auditExport: createAuditExportClient(baseUrl, hcOpts),
|
|
2070
2094
|
userPreferences: createUserPreferencesClient(baseUrl, hcOpts),
|
|
2071
2095
|
importSources: createImportSourcesClient(proj),
|
|
2096
|
+
resolveSource: createResolveSourceFn(proj),
|
|
2072
2097
|
exportCatalog,
|
|
2073
2098
|
admin: createAdminClient(baseUrl, hcOpts)
|
|
2074
2099
|
};
|