@dagger.io/dagger 0.19.11 → 0.20.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/src/api/client.gen.d.ts +269 -1
- package/dist/src/api/client.gen.d.ts.map +1 -1
- package/dist/src/api/client.gen.js +345 -1
- package/dist/src/common/graphql/connect.d.ts.map +1 -1
- package/dist/src/common/graphql/connect.js +1 -1
- package/dist/src/module/entrypoint/introspection_entrypoint.js +1 -1
- package/dist/src/module/entrypoint/invoke.js +1 -1
- package/dist/src/provisioning/bin.d.ts.map +1 -1
- package/dist/src/provisioning/bin.js +1 -1
- package/dist/src/provisioning/default.d.ts +1 -1
- package/dist/src/provisioning/default.d.ts.map +1 -1
- package/dist/src/provisioning/default.js +1 -1
- package/package.json +20 -20
|
@@ -1067,6 +1067,13 @@ export class Binding extends BaseClient {
|
|
|
1067
1067
|
const response = await ctx.execute();
|
|
1068
1068
|
return response;
|
|
1069
1069
|
};
|
|
1070
|
+
/**
|
|
1071
|
+
* Retrieve the binding value, as type Workspace
|
|
1072
|
+
*/
|
|
1073
|
+
asWorkspace = () => {
|
|
1074
|
+
const ctx = this._ctx.select("asWorkspace");
|
|
1075
|
+
return new Workspace(ctx);
|
|
1076
|
+
};
|
|
1070
1077
|
/**
|
|
1071
1078
|
* Returns the digest of the binding value
|
|
1072
1079
|
*/
|
|
@@ -1353,6 +1360,13 @@ export class Check extends BaseClient {
|
|
|
1353
1360
|
const response = await ctx.execute();
|
|
1354
1361
|
return response;
|
|
1355
1362
|
};
|
|
1363
|
+
/**
|
|
1364
|
+
* If the check failed, this is the error
|
|
1365
|
+
*/
|
|
1366
|
+
error = () => {
|
|
1367
|
+
const ctx = this._ctx.select("error");
|
|
1368
|
+
return new Error(ctx);
|
|
1369
|
+
};
|
|
1356
1370
|
/**
|
|
1357
1371
|
* Return the fully qualified name of the check
|
|
1358
1372
|
*/
|
|
@@ -1364,6 +1378,13 @@ export class Check extends BaseClient {
|
|
|
1364
1378
|
const response = await ctx.execute();
|
|
1365
1379
|
return response;
|
|
1366
1380
|
};
|
|
1381
|
+
/**
|
|
1382
|
+
* The original module in which the check has been defined
|
|
1383
|
+
*/
|
|
1384
|
+
originalModule = () => {
|
|
1385
|
+
const ctx = this._ctx.select("originalModule");
|
|
1386
|
+
return new Module_(ctx);
|
|
1387
|
+
};
|
|
1367
1388
|
/**
|
|
1368
1389
|
* Whether the check passed
|
|
1369
1390
|
*/
|
|
@@ -1627,6 +1648,13 @@ export class Container extends BaseClient {
|
|
|
1627
1648
|
const ctx = this._ctx.select("directory", { path, ...opts });
|
|
1628
1649
|
return new Directory(ctx);
|
|
1629
1650
|
};
|
|
1651
|
+
/**
|
|
1652
|
+
* Retrieves this container's configured docker healthcheck.
|
|
1653
|
+
*/
|
|
1654
|
+
dockerHealthcheck = () => {
|
|
1655
|
+
const ctx = this._ctx.select("dockerHealthcheck");
|
|
1656
|
+
return new HealthcheckConfig(ctx);
|
|
1657
|
+
};
|
|
1630
1658
|
/**
|
|
1631
1659
|
* Return the container's OCI entrypoint.
|
|
1632
1660
|
*/
|
|
@@ -2048,6 +2076,20 @@ export class Container extends BaseClient {
|
|
|
2048
2076
|
const ctx = this._ctx.select("withDirectory", { path, source, ...opts });
|
|
2049
2077
|
return new Container(ctx);
|
|
2050
2078
|
};
|
|
2079
|
+
/**
|
|
2080
|
+
* Retrieves this container with the specificed docker healtcheck command set.
|
|
2081
|
+
* @param args Healthcheck command to execute. Example: ["go", "run", "main.go"].
|
|
2082
|
+
* @param opts.shell When true, command must be a single element, which is run using the container's shell
|
|
2083
|
+
* @param opts.interval Interval between running healthcheck. Example: "30s"
|
|
2084
|
+
* @param opts.timeout Healthcheck timeout. Example: "3s"
|
|
2085
|
+
* @param opts.startPeriod StartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example: "0s"
|
|
2086
|
+
* @param opts.startInterval StartInterval configures the duration between checks during the startup phase. Example: "5s"
|
|
2087
|
+
* @param opts.retries The maximum number of consecutive failures before the container is marked as unhealthy. Example: "3"
|
|
2088
|
+
*/
|
|
2089
|
+
withDockerHealthcheck = (args, opts) => {
|
|
2090
|
+
const ctx = this._ctx.select("withDockerHealthcheck", { args, ...opts });
|
|
2091
|
+
return new Container(ctx);
|
|
2092
|
+
};
|
|
2051
2093
|
/**
|
|
2052
2094
|
* Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
|
|
2053
2095
|
* @param args Arguments of the entrypoint. Example: ["go", "run"].
|
|
@@ -2398,6 +2440,13 @@ export class Container extends BaseClient {
|
|
|
2398
2440
|
const ctx = this._ctx.select("withoutDirectory", { path, ...opts });
|
|
2399
2441
|
return new Container(ctx);
|
|
2400
2442
|
};
|
|
2443
|
+
/**
|
|
2444
|
+
* Retrieves this container without a configured docker healtcheck command.
|
|
2445
|
+
*/
|
|
2446
|
+
withoutDockerHealthcheck = () => {
|
|
2447
|
+
const ctx = this._ctx.select("withoutDockerHealthcheck");
|
|
2448
|
+
return new Container(ctx);
|
|
2449
|
+
};
|
|
2401
2450
|
/**
|
|
2402
2451
|
* Reset the container's OCI entrypoint.
|
|
2403
2452
|
* @param opts.keepDefaultArgs Don't remove the default arguments when unsetting the entrypoint.
|
|
@@ -3158,6 +3207,10 @@ export class EngineCache extends BaseClient {
|
|
|
3158
3207
|
/**
|
|
3159
3208
|
* Prune the cache of releaseable entries
|
|
3160
3209
|
* @param opts.useDefaultPolicy Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
|
|
3210
|
+
* @param opts.maxUsedSpace Override the maximum disk space to keep before pruning (e.g. "200GB" or "80%").
|
|
3211
|
+
* @param opts.reservedSpace Override the minimum disk space to retain during pruning (e.g. "500GB" or "10%").
|
|
3212
|
+
* @param opts.minFreeSpace Override the minimum free disk space target during pruning (e.g. "20GB" or "20%").
|
|
3213
|
+
* @param opts.targetSpace Override the target disk space to keep after pruning (e.g. "200GB" or "50%").
|
|
3161
3214
|
*/
|
|
3162
3215
|
prune = async (opts) => {
|
|
3163
3216
|
if (this._prune) {
|
|
@@ -3199,10 +3252,11 @@ export class EngineCacheEntry extends BaseClient {
|
|
|
3199
3252
|
_description = undefined;
|
|
3200
3253
|
_diskSpaceBytes = undefined;
|
|
3201
3254
|
_mostRecentUseTimeUnixNano = undefined;
|
|
3255
|
+
_recordType = undefined;
|
|
3202
3256
|
/**
|
|
3203
3257
|
* Constructor is used for internal usage only, do not create object from it.
|
|
3204
3258
|
*/
|
|
3205
|
-
constructor(ctx, _id, _activelyUsed, _createdTimeUnixNano, _description, _diskSpaceBytes, _mostRecentUseTimeUnixNano) {
|
|
3259
|
+
constructor(ctx, _id, _activelyUsed, _createdTimeUnixNano, _description, _diskSpaceBytes, _mostRecentUseTimeUnixNano, _recordType) {
|
|
3206
3260
|
super(ctx);
|
|
3207
3261
|
this._id = _id;
|
|
3208
3262
|
this._activelyUsed = _activelyUsed;
|
|
@@ -3210,6 +3264,7 @@ export class EngineCacheEntry extends BaseClient {
|
|
|
3210
3264
|
this._description = _description;
|
|
3211
3265
|
this._diskSpaceBytes = _diskSpaceBytes;
|
|
3212
3266
|
this._mostRecentUseTimeUnixNano = _mostRecentUseTimeUnixNano;
|
|
3267
|
+
this._recordType = _recordType;
|
|
3213
3268
|
}
|
|
3214
3269
|
/**
|
|
3215
3270
|
* A unique identifier for this EngineCacheEntry.
|
|
@@ -3277,6 +3332,17 @@ export class EngineCacheEntry extends BaseClient {
|
|
|
3277
3332
|
const response = await ctx.execute();
|
|
3278
3333
|
return response;
|
|
3279
3334
|
};
|
|
3335
|
+
/**
|
|
3336
|
+
* The type of the cache record (e.g. regular, internal, frontend, source.local, source.git.checkout, exec.cachemount).
|
|
3337
|
+
*/
|
|
3338
|
+
recordType = async () => {
|
|
3339
|
+
if (this._recordType) {
|
|
3340
|
+
return this._recordType;
|
|
3341
|
+
}
|
|
3342
|
+
const ctx = this._ctx.select("recordType");
|
|
3343
|
+
const response = await ctx.execute();
|
|
3344
|
+
return response;
|
|
3345
|
+
};
|
|
3280
3346
|
}
|
|
3281
3347
|
/**
|
|
3282
3348
|
* A set of cache entries returned by a query to a cache
|
|
@@ -4209,6 +4275,29 @@ export class Env extends BaseClient {
|
|
|
4209
4275
|
const ctx = this._ctx.select("withWorkspace", { workspace });
|
|
4210
4276
|
return new Env(ctx);
|
|
4211
4277
|
};
|
|
4278
|
+
/**
|
|
4279
|
+
* Create or update a binding of type Workspace in the environment
|
|
4280
|
+
* @param name The name of the binding
|
|
4281
|
+
* @param value The Workspace value to assign to the binding
|
|
4282
|
+
* @param description The purpose of the input
|
|
4283
|
+
*/
|
|
4284
|
+
withWorkspaceInput = (name, value, description) => {
|
|
4285
|
+
const ctx = this._ctx.select("withWorkspaceInput", {
|
|
4286
|
+
name,
|
|
4287
|
+
value,
|
|
4288
|
+
description,
|
|
4289
|
+
});
|
|
4290
|
+
return new Env(ctx);
|
|
4291
|
+
};
|
|
4292
|
+
/**
|
|
4293
|
+
* Declare a desired Workspace output to be assigned in the environment
|
|
4294
|
+
* @param name The name of the binding
|
|
4295
|
+
* @param description A description of the desired value of the binding
|
|
4296
|
+
*/
|
|
4297
|
+
withWorkspaceOutput = (name, description) => {
|
|
4298
|
+
const ctx = this._ctx.select("withWorkspaceOutput", { name, description });
|
|
4299
|
+
return new Env(ctx);
|
|
4300
|
+
};
|
|
4212
4301
|
/**
|
|
4213
4302
|
* Returns a new environment without any outputs
|
|
4214
4303
|
*/
|
|
@@ -5357,6 +5446,21 @@ export class Generator extends BaseClient {
|
|
|
5357
5446
|
const response = await ctx.execute();
|
|
5358
5447
|
return response;
|
|
5359
5448
|
};
|
|
5449
|
+
/**
|
|
5450
|
+
* The original module in which the generator has been defined
|
|
5451
|
+
*/
|
|
5452
|
+
originalModule = () => {
|
|
5453
|
+
const ctx = this._ctx.select("originalModule");
|
|
5454
|
+
return new Module_(ctx);
|
|
5455
|
+
};
|
|
5456
|
+
/**
|
|
5457
|
+
* The path of the generator within its module
|
|
5458
|
+
*/
|
|
5459
|
+
path = async () => {
|
|
5460
|
+
const ctx = this._ctx.select("path");
|
|
5461
|
+
const response = await ctx.execute();
|
|
5462
|
+
return response;
|
|
5463
|
+
};
|
|
5360
5464
|
/**
|
|
5361
5465
|
* Execute the generator
|
|
5362
5466
|
*/
|
|
@@ -5509,6 +5613,7 @@ export class GitRef extends BaseClient {
|
|
|
5509
5613
|
* The filesystem tree at this ref.
|
|
5510
5614
|
* @param opts.discardGitDir Set to true to discard .git directory.
|
|
5511
5615
|
* @param opts.depth The depth of the tree to fetch.
|
|
5616
|
+
* @param opts.includeTags Set to true to populate tag refs in the local checkout .git.
|
|
5512
5617
|
*/
|
|
5513
5618
|
tree = (opts) => {
|
|
5514
5619
|
const ctx = this._ctx.select("tree", { ...opts });
|
|
@@ -5631,6 +5736,116 @@ export class GitRepository extends BaseClient {
|
|
|
5631
5736
|
return response;
|
|
5632
5737
|
};
|
|
5633
5738
|
}
|
|
5739
|
+
/**
|
|
5740
|
+
* Image healthcheck configuration.
|
|
5741
|
+
*/
|
|
5742
|
+
export class HealthcheckConfig extends BaseClient {
|
|
5743
|
+
_id = undefined;
|
|
5744
|
+
_interval = undefined;
|
|
5745
|
+
_retries = undefined;
|
|
5746
|
+
_shell = undefined;
|
|
5747
|
+
_startInterval = undefined;
|
|
5748
|
+
_startPeriod = undefined;
|
|
5749
|
+
_timeout = undefined;
|
|
5750
|
+
/**
|
|
5751
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
5752
|
+
*/
|
|
5753
|
+
constructor(ctx, _id, _interval, _retries, _shell, _startInterval, _startPeriod, _timeout) {
|
|
5754
|
+
super(ctx);
|
|
5755
|
+
this._id = _id;
|
|
5756
|
+
this._interval = _interval;
|
|
5757
|
+
this._retries = _retries;
|
|
5758
|
+
this._shell = _shell;
|
|
5759
|
+
this._startInterval = _startInterval;
|
|
5760
|
+
this._startPeriod = _startPeriod;
|
|
5761
|
+
this._timeout = _timeout;
|
|
5762
|
+
}
|
|
5763
|
+
/**
|
|
5764
|
+
* A unique identifier for this HealthcheckConfig.
|
|
5765
|
+
*/
|
|
5766
|
+
id = async () => {
|
|
5767
|
+
if (this._id) {
|
|
5768
|
+
return this._id;
|
|
5769
|
+
}
|
|
5770
|
+
const ctx = this._ctx.select("id");
|
|
5771
|
+
const response = await ctx.execute();
|
|
5772
|
+
return response;
|
|
5773
|
+
};
|
|
5774
|
+
/**
|
|
5775
|
+
* Healthcheck command arguments.
|
|
5776
|
+
*/
|
|
5777
|
+
args = async () => {
|
|
5778
|
+
const ctx = this._ctx.select("args");
|
|
5779
|
+
const response = await ctx.execute();
|
|
5780
|
+
return response;
|
|
5781
|
+
};
|
|
5782
|
+
/**
|
|
5783
|
+
* Interval between running healthcheck. Example:30s
|
|
5784
|
+
*/
|
|
5785
|
+
interval = async () => {
|
|
5786
|
+
if (this._interval) {
|
|
5787
|
+
return this._interval;
|
|
5788
|
+
}
|
|
5789
|
+
const ctx = this._ctx.select("interval");
|
|
5790
|
+
const response = await ctx.execute();
|
|
5791
|
+
return response;
|
|
5792
|
+
};
|
|
5793
|
+
/**
|
|
5794
|
+
* The maximum number of consecutive failures before the container is marked as unhealthy. Example:3
|
|
5795
|
+
*/
|
|
5796
|
+
retries = async () => {
|
|
5797
|
+
if (this._retries) {
|
|
5798
|
+
return this._retries;
|
|
5799
|
+
}
|
|
5800
|
+
const ctx = this._ctx.select("retries");
|
|
5801
|
+
const response = await ctx.execute();
|
|
5802
|
+
return response;
|
|
5803
|
+
};
|
|
5804
|
+
/**
|
|
5805
|
+
* Healthcheck command is a shell command.
|
|
5806
|
+
*/
|
|
5807
|
+
shell = async () => {
|
|
5808
|
+
if (this._shell) {
|
|
5809
|
+
return this._shell;
|
|
5810
|
+
}
|
|
5811
|
+
const ctx = this._ctx.select("shell");
|
|
5812
|
+
const response = await ctx.execute();
|
|
5813
|
+
return response;
|
|
5814
|
+
};
|
|
5815
|
+
/**
|
|
5816
|
+
* StartInterval configures the duration between checks during the startup phase. Example:5s
|
|
5817
|
+
*/
|
|
5818
|
+
startInterval = async () => {
|
|
5819
|
+
if (this._startInterval) {
|
|
5820
|
+
return this._startInterval;
|
|
5821
|
+
}
|
|
5822
|
+
const ctx = this._ctx.select("startInterval");
|
|
5823
|
+
const response = await ctx.execute();
|
|
5824
|
+
return response;
|
|
5825
|
+
};
|
|
5826
|
+
/**
|
|
5827
|
+
* StartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example:0s
|
|
5828
|
+
*/
|
|
5829
|
+
startPeriod = async () => {
|
|
5830
|
+
if (this._startPeriod) {
|
|
5831
|
+
return this._startPeriod;
|
|
5832
|
+
}
|
|
5833
|
+
const ctx = this._ctx.select("startPeriod");
|
|
5834
|
+
const response = await ctx.execute();
|
|
5835
|
+
return response;
|
|
5836
|
+
};
|
|
5837
|
+
/**
|
|
5838
|
+
* Healthcheck timeout. Example:3s
|
|
5839
|
+
*/
|
|
5840
|
+
timeout = async () => {
|
|
5841
|
+
if (this._timeout) {
|
|
5842
|
+
return this._timeout;
|
|
5843
|
+
}
|
|
5844
|
+
const ctx = this._ctx.select("timeout");
|
|
5845
|
+
const response = await ctx.execute();
|
|
5846
|
+
return response;
|
|
5847
|
+
};
|
|
5848
|
+
}
|
|
5634
5849
|
/**
|
|
5635
5850
|
* Information about the host environment.
|
|
5636
5851
|
*/
|
|
@@ -6875,6 +7090,13 @@ export class ModuleSource extends BaseClient {
|
|
|
6875
7090
|
const response = await ctx.execute();
|
|
6876
7091
|
return response;
|
|
6877
7092
|
};
|
|
7093
|
+
/**
|
|
7094
|
+
* The generated files and directories made on top of the module source's context directory, returned as a Changeset.
|
|
7095
|
+
*/
|
|
7096
|
+
generatedContextChangeset = () => {
|
|
7097
|
+
const ctx = this._ctx.select("generatedContextChangeset");
|
|
7098
|
+
return new Changeset(ctx);
|
|
7099
|
+
};
|
|
6878
7100
|
/**
|
|
6879
7101
|
* The generated files and directories made on top of the module source's context directory.
|
|
6880
7102
|
*/
|
|
@@ -7432,6 +7654,13 @@ export class Client extends BaseClient {
|
|
|
7432
7654
|
const ctx = this._ctx.select("cacheVolume", { key });
|
|
7433
7655
|
return new CacheVolume(ctx);
|
|
7434
7656
|
};
|
|
7657
|
+
/**
|
|
7658
|
+
* Creates an empty changeset
|
|
7659
|
+
*/
|
|
7660
|
+
changeset = () => {
|
|
7661
|
+
const ctx = this._ctx.select("changeset");
|
|
7662
|
+
return new Changeset(ctx);
|
|
7663
|
+
};
|
|
7435
7664
|
/**
|
|
7436
7665
|
* Dagger Cloud configuration and state
|
|
7437
7666
|
*/
|
|
@@ -7485,6 +7714,15 @@ export class Client extends BaseClient {
|
|
|
7485
7714
|
const response = await ctx.execute();
|
|
7486
7715
|
return response.map((r) => new Client(ctx.copy()).loadTypeDefFromID(r.id));
|
|
7487
7716
|
};
|
|
7717
|
+
/**
|
|
7718
|
+
* Detect and return the current workspace.
|
|
7719
|
+
* @param opts.skipMigrationCheck If true, skip legacy dagger.json migration checks.
|
|
7720
|
+
* @experimental
|
|
7721
|
+
*/
|
|
7722
|
+
currentWorkspace = (opts) => {
|
|
7723
|
+
const ctx = this._ctx.select("currentWorkspace", { ...opts });
|
|
7724
|
+
return new Workspace(ctx);
|
|
7725
|
+
};
|
|
7488
7726
|
/**
|
|
7489
7727
|
* The default platform of the engine.
|
|
7490
7728
|
*/
|
|
@@ -7838,6 +8076,13 @@ export class Client extends BaseClient {
|
|
|
7838
8076
|
const ctx = this._ctx.select("loadGitRepositoryFromID", { id });
|
|
7839
8077
|
return new GitRepository(ctx);
|
|
7840
8078
|
};
|
|
8079
|
+
/**
|
|
8080
|
+
* Load a HealthcheckConfig from its ID.
|
|
8081
|
+
*/
|
|
8082
|
+
loadHealthcheckConfigFromID = (id) => {
|
|
8083
|
+
const ctx = this._ctx.select("loadHealthcheckConfigFromID", { id });
|
|
8084
|
+
return new HealthcheckConfig(ctx);
|
|
8085
|
+
};
|
|
7841
8086
|
/**
|
|
7842
8087
|
* Load a Host from its ID.
|
|
7843
8088
|
*/
|
|
@@ -8006,6 +8251,13 @@ export class Client extends BaseClient {
|
|
|
8006
8251
|
const ctx = this._ctx.select("loadTypeDefFromID", { id });
|
|
8007
8252
|
return new TypeDef(ctx);
|
|
8008
8253
|
};
|
|
8254
|
+
/**
|
|
8255
|
+
* Load a Workspace from its ID.
|
|
8256
|
+
*/
|
|
8257
|
+
loadWorkspaceFromID = (id) => {
|
|
8258
|
+
const ctx = this._ctx.select("loadWorkspaceFromID", { id });
|
|
8259
|
+
return new Workspace(ctx);
|
|
8260
|
+
};
|
|
8009
8261
|
/**
|
|
8010
8262
|
* Create a new module.
|
|
8011
8263
|
*/
|
|
@@ -8973,4 +9225,96 @@ export class TypeDef extends BaseClient {
|
|
|
8973
9225
|
return arg(this);
|
|
8974
9226
|
};
|
|
8975
9227
|
}
|
|
9228
|
+
/**
|
|
9229
|
+
* A Dagger workspace detected from the current working directory.
|
|
9230
|
+
*/
|
|
9231
|
+
export class Workspace extends BaseClient {
|
|
9232
|
+
_id = undefined;
|
|
9233
|
+
_clientId = undefined;
|
|
9234
|
+
_findUp = undefined;
|
|
9235
|
+
_root = undefined;
|
|
9236
|
+
/**
|
|
9237
|
+
* Constructor is used for internal usage only, do not create object from it.
|
|
9238
|
+
*/
|
|
9239
|
+
constructor(ctx, _id, _clientId, _findUp, _root) {
|
|
9240
|
+
super(ctx);
|
|
9241
|
+
this._id = _id;
|
|
9242
|
+
this._clientId = _clientId;
|
|
9243
|
+
this._findUp = _findUp;
|
|
9244
|
+
this._root = _root;
|
|
9245
|
+
}
|
|
9246
|
+
/**
|
|
9247
|
+
* A unique identifier for this Workspace.
|
|
9248
|
+
*/
|
|
9249
|
+
id = async () => {
|
|
9250
|
+
if (this._id) {
|
|
9251
|
+
return this._id;
|
|
9252
|
+
}
|
|
9253
|
+
const ctx = this._ctx.select("id");
|
|
9254
|
+
const response = await ctx.execute();
|
|
9255
|
+
return response;
|
|
9256
|
+
};
|
|
9257
|
+
/**
|
|
9258
|
+
* The client ID that owns this workspace's host filesystem.
|
|
9259
|
+
*/
|
|
9260
|
+
clientId = async () => {
|
|
9261
|
+
if (this._clientId) {
|
|
9262
|
+
return this._clientId;
|
|
9263
|
+
}
|
|
9264
|
+
const ctx = this._ctx.select("clientId");
|
|
9265
|
+
const response = await ctx.execute();
|
|
9266
|
+
return response;
|
|
9267
|
+
};
|
|
9268
|
+
/**
|
|
9269
|
+
* Returns a Directory from the workspace.
|
|
9270
|
+
*
|
|
9271
|
+
* Path is relative to workspace root. Use "." for the root directory.
|
|
9272
|
+
* @param path Location of the directory to retrieve, relative to the workspace root (e.g., "src", ".").
|
|
9273
|
+
* @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
|
|
9274
|
+
* @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
|
|
9275
|
+
* @param opts.gitignore Apply .gitignore filter rules inside the directory.
|
|
9276
|
+
*/
|
|
9277
|
+
directory = (path, opts) => {
|
|
9278
|
+
const ctx = this._ctx.select("directory", { path, ...opts });
|
|
9279
|
+
return new Directory(ctx);
|
|
9280
|
+
};
|
|
9281
|
+
/**
|
|
9282
|
+
* Returns a File from the workspace.
|
|
9283
|
+
*
|
|
9284
|
+
* Path is relative to workspace root.
|
|
9285
|
+
* @param path Location of the file to retrieve, relative to the workspace root (e.g., "go.mod").
|
|
9286
|
+
*/
|
|
9287
|
+
file = (path) => {
|
|
9288
|
+
const ctx = this._ctx.select("file", { path });
|
|
9289
|
+
return new File(ctx);
|
|
9290
|
+
};
|
|
9291
|
+
/**
|
|
9292
|
+
* Search for a file or directory by walking up from the start path within the workspace.
|
|
9293
|
+
*
|
|
9294
|
+
* Returns the path relative to the workspace root if found, or null if not found.
|
|
9295
|
+
*
|
|
9296
|
+
* The search stops at the workspace root and will not traverse above it.
|
|
9297
|
+
* @param name The name of the file or directory to search for.
|
|
9298
|
+
* @param opts.from Path to start the search from, relative to the workspace root.
|
|
9299
|
+
*/
|
|
9300
|
+
findUp = async (name, opts) => {
|
|
9301
|
+
if (this._findUp) {
|
|
9302
|
+
return this._findUp;
|
|
9303
|
+
}
|
|
9304
|
+
const ctx = this._ctx.select("findUp", { name, ...opts });
|
|
9305
|
+
const response = await ctx.execute();
|
|
9306
|
+
return response;
|
|
9307
|
+
};
|
|
9308
|
+
/**
|
|
9309
|
+
* Absolute path to the workspace root directory.
|
|
9310
|
+
*/
|
|
9311
|
+
root = async () => {
|
|
9312
|
+
if (this._root) {
|
|
9313
|
+
return this._root;
|
|
9314
|
+
}
|
|
9315
|
+
const ctx = this._ctx.select("root");
|
|
9316
|
+
const response = await ctx.execute();
|
|
9317
|
+
return response;
|
|
9318
|
+
};
|
|
9319
|
+
}
|
|
8976
9320
|
export const dag = new Client();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../../src/common/graphql/connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGlD;;;GAGG;AACH,wBAAsB,aAAa,CAAC,CAAC,EACnC,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,GAC3C,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../../src/common/graphql/connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGlD;;;GAGG;AACH,wBAAsB,aAAa,CAAC,CAAC,EACnC,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,GAC3C,OAAO,CAAC,CAAC,CAAC,CAwBZ"}
|
|
@@ -17,6 +17,6 @@ export async function withGQLClient(connectOpts, cb) {
|
|
|
17
17
|
return await provisioning.withEngineSession(connectOpts, cb);
|
|
18
18
|
}
|
|
19
19
|
catch (e) {
|
|
20
|
-
throw new Error(`failed to execute function with automatic provisioning: ${e}
|
|
20
|
+
throw new Error(`failed to execute function with automatic provisioning: ${e}`, { cause: e });
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -30,7 +30,7 @@ export async function invoke(executor, module, ctx) {
|
|
|
30
30
|
const parentState = await loadParentState(executor, object, ctx);
|
|
31
31
|
// Disabling linter because the result could be anything.
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
|
-
let result
|
|
33
|
+
let result;
|
|
34
34
|
try {
|
|
35
35
|
result = await executor.getResult(object.name, method.name, parentState, args);
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../src/provisioning/bin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAS,aAAa,EAAE,MAAM,OAAO,CAAA;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAgB/C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAiB,MAAM,iBAAiB,CAAA;AAMxE,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,IAAI,CAAA;IACZ,OAAO,EAAE,IAAI,CAAA;CACd,CAAC,CAAA;AAEF;;GAEG;AACH,qBAAa,GAAI,YAAW,UAAU;IACpC,OAAO,CAAC,WAAW,CAAC,CAAmB;IAEvC,OAAO,CAAC,OAAO,CAAC,CAAQ;IACxB,OAAO,CAAC,UAAU,CAAC,CAAQ;IAE3B,OAAO,CAAC,QAAQ,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../src/provisioning/bin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAS,aAAa,EAAE,MAAM,OAAO,CAAA;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAgB/C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAiB,MAAM,iBAAiB,CAAA;AAMxE,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,IAAI,CAAA;IACZ,OAAO,EAAE,IAAI,CAAA;CACd,CAAC,CAAA;AAEF;;GAEG;AACH,qBAAa,GAAI,YAAW,UAAU;IACpC,OAAO,CAAC,WAAW,CAAC,CAAmB;IAEvC,OAAO,CAAC,OAAO,CAAC,CAAQ;IACxB,OAAO,CAAC,UAAU,CAAC,CAAQ;IAE3B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2C;IAEpE,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAW;gBAErC,OAAO,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAKjD,IAAI,IAAI,MAAM;IAId,IAAI,UAAU,IAAI,iBAAiB,GAAG,SAAS,CAE9C;IAEK,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;YAgB1C,WAAW;IAkEzB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAqBrB;;;OAGG;YACW,gBAAgB;YA2EhB,iBAAiB;IA6BzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAM5B;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IAItB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAOpB;;OAEG;IACH,OAAO,CAAC,cAAc;IAWtB;;OAEG;IACH,OAAO,CAAC,cAAc;IAStB;;OAEG;IACH,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,cAAc;YAOR,WAAW;YAkBX,gBAAgB;YAWhB,cAAc;IA4C5B;;OAEG;IACH,OAAO,CAAC,WAAW;CAGpB;AAGD,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEjD;AAGD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE1D"}
|
|
@@ -22,7 +22,7 @@ export class Bin {
|
|
|
22
22
|
_subProcess;
|
|
23
23
|
binPath;
|
|
24
24
|
cliVersion;
|
|
25
|
-
cacheDir =
|
|
25
|
+
cacheDir = envPaths("dagger", { suffix: "" }).cache;
|
|
26
26
|
DAGGER_CLI_BIN_PREFIX = "dagger";
|
|
27
27
|
constructor(binPath, cliVersion) {
|
|
28
28
|
this.binPath = binPath;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.
|
|
1
|
+
export declare const CLI_VERSION = "0.20.1";
|
|
2
2
|
//# sourceMappingURL=default.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/provisioning/default.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/provisioning/default.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,WAAW,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Code generated by dagger. DO NOT EDIT.
|
|
2
|
-
export const CLI_VERSION = "0.
|
|
2
|
+
export const CLI_VERSION = "0.20.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dagger.io/dagger",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"author": "hello@dagger.io",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -20,22 +20,22 @@
|
|
|
20
20
|
"@grpc/grpc-js": "^1.14.3",
|
|
21
21
|
"@lifeomic/axios-fetch": "^3.1.0",
|
|
22
22
|
"@opentelemetry/api": "^1.9.0",
|
|
23
|
-
"@opentelemetry/core": "^2.
|
|
24
|
-
"@opentelemetry/exporter-jaeger": "^2.
|
|
25
|
-
"@opentelemetry/exporter-trace-otlp-http": "^0.
|
|
26
|
-
"@opentelemetry/sdk-metrics": "^2.
|
|
27
|
-
"@opentelemetry/sdk-node": "^0.
|
|
28
|
-
"@opentelemetry/semantic-conventions": "^1.
|
|
23
|
+
"@opentelemetry/core": "^2.5.1",
|
|
24
|
+
"@opentelemetry/exporter-jaeger": "^2.5.1",
|
|
25
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.212.0",
|
|
26
|
+
"@opentelemetry/sdk-metrics": "^2.5.1",
|
|
27
|
+
"@opentelemetry/sdk-node": "^0.212.0",
|
|
28
|
+
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
29
29
|
"adm-zip": "^0.5.16",
|
|
30
|
-
"env-paths": "^
|
|
30
|
+
"env-paths": "^4.0.0",
|
|
31
31
|
"execa": "^9.6.1",
|
|
32
|
-
"graphql": "^16.
|
|
32
|
+
"graphql": "^16.13.0",
|
|
33
33
|
"graphql-request": "^7.4.0",
|
|
34
34
|
"graphql-tag": "^2.12.6",
|
|
35
35
|
"node-color-log": "^13.0.3",
|
|
36
36
|
"node-fetch": "^3.3.2",
|
|
37
37
|
"reflect-metadata": "^0.2.2",
|
|
38
|
-
"tar": "^7.5.
|
|
38
|
+
"tar": "^7.5.9",
|
|
39
39
|
"typescript": "^5.9.3"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
@@ -51,24 +51,24 @@
|
|
|
51
51
|
"docs:fmt": "cd ../../docs/current_docs && eslint --fix -c ../../sdk/typescript/eslint-docs.config.js --max-warnings=0 ./**/*.ts"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@eslint/js": "^10.0.
|
|
54
|
+
"@eslint/js": "^10.0.1",
|
|
55
55
|
"@otel-test-runner/mocha-test": "0.3.1",
|
|
56
56
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
57
57
|
"@types/adm-zip": "^0.5.7",
|
|
58
58
|
"@types/mocha": "^10.0.10",
|
|
59
|
-
"@types/node": "~25.
|
|
60
|
-
"@types/tar": "^
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
62
|
-
"@typescript-eslint/parser": "^8.
|
|
63
|
-
"eslint": "^
|
|
59
|
+
"@types/node": "~25.3.3",
|
|
60
|
+
"@types/tar": "^7.0.87",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
62
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
63
|
+
"eslint": "^10.0.2",
|
|
64
64
|
"eslint-config-prettier": "^10.1.8",
|
|
65
|
-
"eslint-plugin-prettier": "^5.5.
|
|
65
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
66
66
|
"mocha": "^11.7.5",
|
|
67
|
-
"prettier": "^3.
|
|
68
|
-
"rollup": "^4.
|
|
67
|
+
"prettier": "^3.8.1",
|
|
68
|
+
"rollup": "^4.59.0",
|
|
69
69
|
"rollup-plugin-dts": "^6.3.0",
|
|
70
70
|
"ts-node": "^10.9.2",
|
|
71
71
|
"tsx": "^4.21.0",
|
|
72
|
-
"typescript-eslint": "^8.
|
|
72
|
+
"typescript-eslint": "^8.56.1"
|
|
73
73
|
}
|
|
74
74
|
}
|