@caatinga/core 0.2.4 → 2.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/README.md +2 -2
- package/dist/{browser-CuET2GqM.d.cts → browser-djYObNl8.d.cts} +0 -1
- package/dist/{browser-CuET2GqM.d.ts → browser-djYObNl8.d.ts} +0 -1
- package/dist/browser.cjs +0 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +72 -5
- package/dist/index.cjs +142 -79
- package/dist/index.d.cts +37 -16
- package/dist/index.d.ts +37 -16
- package/dist/index.js +211 -81
- package/dist/runtime/requirements.cjs +50 -0
- package/dist/runtime/requirements.d.cts +5 -0
- package/dist/runtime/requirements.d.ts +5 -0
- package/dist/runtime/requirements.js +12 -0
- package/package.json +7 -2
- package/dist/browser-DUcSR5D3.d.cts +0 -173
- package/dist/browser-DUcSR5D3.d.ts +0 -173
- package/dist/chunk-EKHNKCJV.js +0 -79
- package/dist/chunk-GMABXVEY.js +0 -78
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as CaatingaArtifacts, a as ContractArtifact, b as CaatingaErrorCodeValue, c as CaatingaError } from './browser-
|
|
2
|
-
export { d as CaatingaArtifactsSchema, e as CaatingaErrorCode, t as toCaatingaError } from './browser-
|
|
1
|
+
import { C as CaatingaArtifacts, a as ContractArtifact, b as CaatingaErrorCodeValue, c as CaatingaError } from './browser-djYObNl8.cjs';
|
|
2
|
+
export { d as CaatingaArtifactsSchema, e as CaatingaErrorCode, t as toCaatingaError } from './browser-djYObNl8.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
declare const CAATINGA_CORE_VERSION = "0.
|
|
5
|
+
declare const CAATINGA_CORE_VERSION = "2.0.1";
|
|
6
6
|
|
|
7
7
|
declare const ContractConfigSchema: z.ZodObject<{
|
|
8
8
|
path: z.ZodString;
|
|
@@ -135,7 +135,10 @@ declare function loadConfig(options?: LoadConfigOptions): Promise<CaatingaConfig
|
|
|
135
135
|
declare function readArtifacts(cwd?: string): Promise<CaatingaArtifacts>;
|
|
136
136
|
|
|
137
137
|
declare function writeArtifacts(artifacts: CaatingaArtifacts, cwd?: string): Promise<string>;
|
|
138
|
-
|
|
138
|
+
type CreateInitialArtifactsOptions = {
|
|
139
|
+
networks?: string[];
|
|
140
|
+
};
|
|
141
|
+
declare function createInitialArtifacts(project: string, options?: CreateInitialArtifactsOptions): CaatingaArtifacts;
|
|
139
142
|
|
|
140
143
|
declare function updateArtifact(artifacts: CaatingaArtifacts, networkName: string, contractName: string, contractArtifact: ContractArtifact, networkExtras?: {
|
|
141
144
|
dependencyGraph?: Record<string, string[]>;
|
|
@@ -157,14 +160,12 @@ type RunCommandResult = {
|
|
|
157
160
|
type RunCommandOptions = {
|
|
158
161
|
cwd?: string;
|
|
159
162
|
env?: NodeJS.ProcessEnv;
|
|
160
|
-
allowUntestedStellarCli?: boolean;
|
|
161
163
|
skipStellarVersionCheck?: boolean;
|
|
162
164
|
failureCode?: CaatingaErrorCodeValue;
|
|
163
165
|
};
|
|
164
166
|
declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise<RunCommandResult>;
|
|
165
167
|
|
|
166
168
|
type CheckBinaryOptions = {
|
|
167
|
-
allowUntestedStellarCli?: boolean;
|
|
168
169
|
skipStellarVersionCheck?: boolean;
|
|
169
170
|
};
|
|
170
171
|
declare function checkBinary(binary: string, hint: string, options?: CheckBinaryOptions): Promise<void>;
|
|
@@ -172,12 +173,36 @@ declare function checkBinary(binary: string, hint: string, options?: CheckBinary
|
|
|
172
173
|
declare function parseContractId(output: string): string;
|
|
173
174
|
|
|
174
175
|
declare const STELLAR_CLI_MIN_VERSION = "23.0.0";
|
|
175
|
-
declare const STELLAR_CLI_TESTED_MAX_VERSION = "25.2.0";
|
|
176
176
|
declare function parseStellarCliVersion(output: string): string;
|
|
177
|
-
|
|
177
|
+
|
|
178
|
+
declare const STELLAR_CLI_LAST_TESTED_VERSION = "25.2.0";
|
|
179
|
+
type CompatibilityStatus = "supported" | "untested" | "unsupported";
|
|
180
|
+
type CompatibilityWarningCode = "STELLAR_CLI_UNTESTED_VERSION" | "STELLAR_CLI_MISSING_FEATURE";
|
|
181
|
+
type CompatibilityWarning = {
|
|
182
|
+
code: CompatibilityWarningCode;
|
|
183
|
+
message: string;
|
|
184
|
+
remediation?: string;
|
|
185
|
+
};
|
|
186
|
+
type CompatibilityReport = {
|
|
187
|
+
version: string;
|
|
188
|
+
status: CompatibilityStatus;
|
|
189
|
+
minVersion: string;
|
|
190
|
+
lastTestedVersion: string;
|
|
191
|
+
warnings: CompatibilityWarning[];
|
|
192
|
+
};
|
|
193
|
+
type EvaluateStellarCliCompatibilityInput = {
|
|
178
194
|
version: string;
|
|
179
|
-
|
|
180
|
-
|
|
195
|
+
features?: readonly string[];
|
|
196
|
+
lastTestedVersion?: string;
|
|
197
|
+
};
|
|
198
|
+
declare function evaluateStellarCliCompatibility(input: EvaluateStellarCliCompatibilityInput): CompatibilityReport;
|
|
199
|
+
|
|
200
|
+
type CheckStellarCliVersionOptions = {
|
|
201
|
+
features?: readonly string[];
|
|
202
|
+
lastTestedVersion?: string;
|
|
203
|
+
onWarning?: (warning: CompatibilityWarning) => void;
|
|
204
|
+
};
|
|
205
|
+
declare function checkStellarCliVersion(input?: CheckStellarCliVersionOptions): Promise<CompatibilityReport>;
|
|
181
206
|
|
|
182
207
|
declare function validateSourceShape(source: string): CaatingaError | undefined;
|
|
183
208
|
|
|
@@ -193,7 +218,6 @@ type BuildContractOptions = {
|
|
|
193
218
|
config: CaatingaConfig;
|
|
194
219
|
contractName: string;
|
|
195
220
|
cwd?: string;
|
|
196
|
-
allowUntestedStellarCli?: boolean;
|
|
197
221
|
};
|
|
198
222
|
declare function buildContract(options: BuildContractOptions): Promise<{
|
|
199
223
|
contract: {
|
|
@@ -218,7 +242,6 @@ type DeployContractOptions = {
|
|
|
218
242
|
networkName?: string;
|
|
219
243
|
source?: string;
|
|
220
244
|
cwd?: string;
|
|
221
|
-
allowUntestedStellarCli?: boolean;
|
|
222
245
|
force?: boolean;
|
|
223
246
|
checkStaleWasm?: boolean;
|
|
224
247
|
resolvedDeployArgs?: Record<string, DeployArgValue>;
|
|
@@ -258,6 +281,7 @@ type SkippedContract = {
|
|
|
258
281
|
network: string;
|
|
259
282
|
reason: "already-deployed";
|
|
260
283
|
};
|
|
284
|
+
|
|
261
285
|
type StaleWasmWarning = {
|
|
262
286
|
contract: string;
|
|
263
287
|
message: string;
|
|
@@ -279,7 +303,6 @@ declare function deployContractGraph(options: {
|
|
|
279
303
|
cwd?: string;
|
|
280
304
|
includeDependencies: boolean;
|
|
281
305
|
force: boolean;
|
|
282
|
-
allowUntestedStellarCli?: boolean;
|
|
283
306
|
checkStaleWasm?: boolean;
|
|
284
307
|
verifyDeps?: boolean;
|
|
285
308
|
}): Promise<DeployContractGraphResult>;
|
|
@@ -297,7 +320,6 @@ type GenerateBindingsOptions = {
|
|
|
297
320
|
contractName: string;
|
|
298
321
|
networkName?: string;
|
|
299
322
|
cwd?: string;
|
|
300
|
-
allowUntestedStellarCli?: boolean;
|
|
301
323
|
};
|
|
302
324
|
declare function generateBindings(options: GenerateBindingsOptions): Promise<{
|
|
303
325
|
contractName: string;
|
|
@@ -317,7 +339,6 @@ type InvokeContractOptions = {
|
|
|
317
339
|
networkName?: string;
|
|
318
340
|
source?: string;
|
|
319
341
|
cwd?: string;
|
|
320
|
-
allowUntestedStellarCli?: boolean;
|
|
321
342
|
};
|
|
322
343
|
declare function parseInvokeTarget(target: string): InvokeTarget;
|
|
323
344
|
declare function invokeContract(options: InvokeContractOptions): Promise<{
|
|
@@ -445,4 +466,4 @@ type TemplateManifest = z.infer<typeof TemplateManifestSchema>;
|
|
|
445
466
|
|
|
446
467
|
declare function isTransientTestnetSmokeFailure(logText: string): boolean;
|
|
447
468
|
|
|
448
|
-
export { type BuildContractOptions, CAATINGA_CORE_VERSION, CaatingaArtifacts, type CaatingaConfig, CaatingaConfigSchema, CaatingaError, ContractArtifact, type ContractConfig, type CreateProjectFromTemplateOptions, type DeployArgValue, type DeployContractGraphResult, type DeployContractOptions, type GenerateBindingsOptions, type InvokeContractOptions, type InvokeTarget, type LoadConfigOptions, type NetworkConfig, type ResolvedContract, type ResolvedNetwork, type RunCommandResult,
|
|
469
|
+
export { type BuildContractOptions, CAATINGA_CORE_VERSION, CaatingaArtifacts, type CaatingaConfig, CaatingaConfigSchema, CaatingaError, type CheckStellarCliVersionOptions, type CompatibilityReport, type CompatibilityStatus, type CompatibilityWarning, type CompatibilityWarningCode, ContractArtifact, type ContractConfig, type CreateInitialArtifactsOptions, type CreateProjectFromTemplateOptions, type DeployArgValue, type DeployContractGraphResult, type DeployContractOptions, type EvaluateStellarCliCompatibilityInput, type GenerateBindingsOptions, type InvokeContractOptions, type InvokeTarget, type LoadConfigOptions, type NetworkConfig, type ResolvedContract, type ResolvedNetwork, type RunCommandResult, STELLAR_CLI_LAST_TESTED_VERSION, STELLAR_CLI_MIN_VERSION, type SkippedContract, type TemplateManifest, TemplateManifestSchema, WELL_KNOWN_NETWORKS, buildContract, buildDependencyGraph, checkBinary, checkStellarCliVersion, createInitialArtifacts, createProjectFromTemplate, defineConfig, deployContract, deployContractGraph, evaluateStellarCliCompatibility, generateBindings, invokeContract, isTransientTestnetSmokeFailure, loadConfig, parseContractId, parseInvokeTarget, parseStellarCliVersion, readArtifacts, resolveContract, resolveDeployArgs, resolveDeployOrder, resolveNetwork, runCommand, updateArtifact, validateSourceShape, writeArtifacts };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as CaatingaArtifacts, a as ContractArtifact, b as CaatingaErrorCodeValue, c as CaatingaError } from './browser-
|
|
2
|
-
export { d as CaatingaArtifactsSchema, e as CaatingaErrorCode, t as toCaatingaError } from './browser-
|
|
1
|
+
import { C as CaatingaArtifacts, a as ContractArtifact, b as CaatingaErrorCodeValue, c as CaatingaError } from './browser-djYObNl8.js';
|
|
2
|
+
export { d as CaatingaArtifactsSchema, e as CaatingaErrorCode, t as toCaatingaError } from './browser-djYObNl8.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
declare const CAATINGA_CORE_VERSION = "0.
|
|
5
|
+
declare const CAATINGA_CORE_VERSION = "2.0.1";
|
|
6
6
|
|
|
7
7
|
declare const ContractConfigSchema: z.ZodObject<{
|
|
8
8
|
path: z.ZodString;
|
|
@@ -135,7 +135,10 @@ declare function loadConfig(options?: LoadConfigOptions): Promise<CaatingaConfig
|
|
|
135
135
|
declare function readArtifacts(cwd?: string): Promise<CaatingaArtifacts>;
|
|
136
136
|
|
|
137
137
|
declare function writeArtifacts(artifacts: CaatingaArtifacts, cwd?: string): Promise<string>;
|
|
138
|
-
|
|
138
|
+
type CreateInitialArtifactsOptions = {
|
|
139
|
+
networks?: string[];
|
|
140
|
+
};
|
|
141
|
+
declare function createInitialArtifacts(project: string, options?: CreateInitialArtifactsOptions): CaatingaArtifacts;
|
|
139
142
|
|
|
140
143
|
declare function updateArtifact(artifacts: CaatingaArtifacts, networkName: string, contractName: string, contractArtifact: ContractArtifact, networkExtras?: {
|
|
141
144
|
dependencyGraph?: Record<string, string[]>;
|
|
@@ -157,14 +160,12 @@ type RunCommandResult = {
|
|
|
157
160
|
type RunCommandOptions = {
|
|
158
161
|
cwd?: string;
|
|
159
162
|
env?: NodeJS.ProcessEnv;
|
|
160
|
-
allowUntestedStellarCli?: boolean;
|
|
161
163
|
skipStellarVersionCheck?: boolean;
|
|
162
164
|
failureCode?: CaatingaErrorCodeValue;
|
|
163
165
|
};
|
|
164
166
|
declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise<RunCommandResult>;
|
|
165
167
|
|
|
166
168
|
type CheckBinaryOptions = {
|
|
167
|
-
allowUntestedStellarCli?: boolean;
|
|
168
169
|
skipStellarVersionCheck?: boolean;
|
|
169
170
|
};
|
|
170
171
|
declare function checkBinary(binary: string, hint: string, options?: CheckBinaryOptions): Promise<void>;
|
|
@@ -172,12 +173,36 @@ declare function checkBinary(binary: string, hint: string, options?: CheckBinary
|
|
|
172
173
|
declare function parseContractId(output: string): string;
|
|
173
174
|
|
|
174
175
|
declare const STELLAR_CLI_MIN_VERSION = "23.0.0";
|
|
175
|
-
declare const STELLAR_CLI_TESTED_MAX_VERSION = "25.2.0";
|
|
176
176
|
declare function parseStellarCliVersion(output: string): string;
|
|
177
|
-
|
|
177
|
+
|
|
178
|
+
declare const STELLAR_CLI_LAST_TESTED_VERSION = "25.2.0";
|
|
179
|
+
type CompatibilityStatus = "supported" | "untested" | "unsupported";
|
|
180
|
+
type CompatibilityWarningCode = "STELLAR_CLI_UNTESTED_VERSION" | "STELLAR_CLI_MISSING_FEATURE";
|
|
181
|
+
type CompatibilityWarning = {
|
|
182
|
+
code: CompatibilityWarningCode;
|
|
183
|
+
message: string;
|
|
184
|
+
remediation?: string;
|
|
185
|
+
};
|
|
186
|
+
type CompatibilityReport = {
|
|
187
|
+
version: string;
|
|
188
|
+
status: CompatibilityStatus;
|
|
189
|
+
minVersion: string;
|
|
190
|
+
lastTestedVersion: string;
|
|
191
|
+
warnings: CompatibilityWarning[];
|
|
192
|
+
};
|
|
193
|
+
type EvaluateStellarCliCompatibilityInput = {
|
|
178
194
|
version: string;
|
|
179
|
-
|
|
180
|
-
|
|
195
|
+
features?: readonly string[];
|
|
196
|
+
lastTestedVersion?: string;
|
|
197
|
+
};
|
|
198
|
+
declare function evaluateStellarCliCompatibility(input: EvaluateStellarCliCompatibilityInput): CompatibilityReport;
|
|
199
|
+
|
|
200
|
+
type CheckStellarCliVersionOptions = {
|
|
201
|
+
features?: readonly string[];
|
|
202
|
+
lastTestedVersion?: string;
|
|
203
|
+
onWarning?: (warning: CompatibilityWarning) => void;
|
|
204
|
+
};
|
|
205
|
+
declare function checkStellarCliVersion(input?: CheckStellarCliVersionOptions): Promise<CompatibilityReport>;
|
|
181
206
|
|
|
182
207
|
declare function validateSourceShape(source: string): CaatingaError | undefined;
|
|
183
208
|
|
|
@@ -193,7 +218,6 @@ type BuildContractOptions = {
|
|
|
193
218
|
config: CaatingaConfig;
|
|
194
219
|
contractName: string;
|
|
195
220
|
cwd?: string;
|
|
196
|
-
allowUntestedStellarCli?: boolean;
|
|
197
221
|
};
|
|
198
222
|
declare function buildContract(options: BuildContractOptions): Promise<{
|
|
199
223
|
contract: {
|
|
@@ -218,7 +242,6 @@ type DeployContractOptions = {
|
|
|
218
242
|
networkName?: string;
|
|
219
243
|
source?: string;
|
|
220
244
|
cwd?: string;
|
|
221
|
-
allowUntestedStellarCli?: boolean;
|
|
222
245
|
force?: boolean;
|
|
223
246
|
checkStaleWasm?: boolean;
|
|
224
247
|
resolvedDeployArgs?: Record<string, DeployArgValue>;
|
|
@@ -258,6 +281,7 @@ type SkippedContract = {
|
|
|
258
281
|
network: string;
|
|
259
282
|
reason: "already-deployed";
|
|
260
283
|
};
|
|
284
|
+
|
|
261
285
|
type StaleWasmWarning = {
|
|
262
286
|
contract: string;
|
|
263
287
|
message: string;
|
|
@@ -279,7 +303,6 @@ declare function deployContractGraph(options: {
|
|
|
279
303
|
cwd?: string;
|
|
280
304
|
includeDependencies: boolean;
|
|
281
305
|
force: boolean;
|
|
282
|
-
allowUntestedStellarCli?: boolean;
|
|
283
306
|
checkStaleWasm?: boolean;
|
|
284
307
|
verifyDeps?: boolean;
|
|
285
308
|
}): Promise<DeployContractGraphResult>;
|
|
@@ -297,7 +320,6 @@ type GenerateBindingsOptions = {
|
|
|
297
320
|
contractName: string;
|
|
298
321
|
networkName?: string;
|
|
299
322
|
cwd?: string;
|
|
300
|
-
allowUntestedStellarCli?: boolean;
|
|
301
323
|
};
|
|
302
324
|
declare function generateBindings(options: GenerateBindingsOptions): Promise<{
|
|
303
325
|
contractName: string;
|
|
@@ -317,7 +339,6 @@ type InvokeContractOptions = {
|
|
|
317
339
|
networkName?: string;
|
|
318
340
|
source?: string;
|
|
319
341
|
cwd?: string;
|
|
320
|
-
allowUntestedStellarCli?: boolean;
|
|
321
342
|
};
|
|
322
343
|
declare function parseInvokeTarget(target: string): InvokeTarget;
|
|
323
344
|
declare function invokeContract(options: InvokeContractOptions): Promise<{
|
|
@@ -445,4 +466,4 @@ type TemplateManifest = z.infer<typeof TemplateManifestSchema>;
|
|
|
445
466
|
|
|
446
467
|
declare function isTransientTestnetSmokeFailure(logText: string): boolean;
|
|
447
468
|
|
|
448
|
-
export { type BuildContractOptions, CAATINGA_CORE_VERSION, CaatingaArtifacts, type CaatingaConfig, CaatingaConfigSchema, CaatingaError, ContractArtifact, type ContractConfig, type CreateProjectFromTemplateOptions, type DeployArgValue, type DeployContractGraphResult, type DeployContractOptions, type GenerateBindingsOptions, type InvokeContractOptions, type InvokeTarget, type LoadConfigOptions, type NetworkConfig, type ResolvedContract, type ResolvedNetwork, type RunCommandResult,
|
|
469
|
+
export { type BuildContractOptions, CAATINGA_CORE_VERSION, CaatingaArtifacts, type CaatingaConfig, CaatingaConfigSchema, CaatingaError, type CheckStellarCliVersionOptions, type CompatibilityReport, type CompatibilityStatus, type CompatibilityWarning, type CompatibilityWarningCode, ContractArtifact, type ContractConfig, type CreateInitialArtifactsOptions, type CreateProjectFromTemplateOptions, type DeployArgValue, type DeployContractGraphResult, type DeployContractOptions, type EvaluateStellarCliCompatibilityInput, type GenerateBindingsOptions, type InvokeContractOptions, type InvokeTarget, type LoadConfigOptions, type NetworkConfig, type ResolvedContract, type ResolvedNetwork, type RunCommandResult, STELLAR_CLI_LAST_TESTED_VERSION, STELLAR_CLI_MIN_VERSION, type SkippedContract, type TemplateManifest, TemplateManifestSchema, WELL_KNOWN_NETWORKS, buildContract, buildDependencyGraph, checkBinary, checkStellarCliVersion, createInitialArtifacts, createProjectFromTemplate, defineConfig, deployContract, deployContractGraph, evaluateStellarCliCompatibility, generateBindings, invokeContract, isTransientTestnetSmokeFailure, loadConfig, parseContractId, parseInvokeTarget, parseStellarCliVersion, readArtifacts, resolveContract, resolveDeployArgs, resolveDeployOrder, resolveNetwork, runCommand, updateArtifact, validateSourceShape, writeArtifacts };
|