@dagger.io/dagger 0.15.1 → 0.15.3
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 +59 -6
- package/dist/src/api/client.gen.d.ts.map +1 -1
- package/dist/src/api/client.gen.js +52 -166
- package/dist/src/common/context.d.ts +1 -1
- package/dist/src/common/context.d.ts.map +1 -1
- package/dist/src/common/context.js +2 -2
- package/dist/src/common/utils.d.ts +14 -14
- package/dist/src/module/decorators.d.ts.map +1 -1
- package/dist/src/module/entrypoint/invoke.d.ts.map +1 -1
- package/dist/src/module/entrypoint/invoke.js +10 -0
- package/dist/src/module/entrypoint/load.d.ts.map +1 -1
- package/dist/src/module/entrypoint/load.js +9 -3
- package/dist/src/module/entrypoint/register.d.ts.map +1 -1
- package/dist/src/module/entrypoint/register.js +23 -0
- package/dist/src/module/executor.d.ts +5 -0
- package/dist/src/module/executor.d.ts.map +1 -1
- package/dist/src/module/executor.js +110 -1
- package/dist/src/module/introspector/case_convertor.d.ts.map +1 -1
- package/dist/src/module/introspector/case_convertor.js +7 -9
- package/dist/src/module/introspector/dagger_module/argument.d.ts +2 -1
- package/dist/src/module/introspector/dagger_module/argument.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/argument.js +3 -1
- package/dist/src/module/introspector/dagger_module/enum.d.ts +3 -2
- package/dist/src/module/introspector/dagger_module/enum.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/enum.js +5 -2
- package/dist/src/module/introspector/dagger_module/enumBase.d.ts +3 -2
- package/dist/src/module/introspector/dagger_module/enumBase.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/enumClass.d.ts +3 -2
- package/dist/src/module/introspector/dagger_module/enumClass.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/enumClass.js +5 -2
- package/dist/src/module/introspector/dagger_module/function.d.ts +2 -1
- package/dist/src/module/introspector/dagger_module/function.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/function.js +3 -1
- package/dist/src/module/introspector/dagger_module/index.d.ts +2 -0
- package/dist/src/module/introspector/dagger_module/index.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/index.js +2 -0
- package/dist/src/module/introspector/dagger_module/interface.d.ts +25 -0
- package/dist/src/module/introspector/dagger_module/interface.d.ts.map +1 -0
- package/dist/src/module/introspector/dagger_module/interface.js +56 -0
- package/dist/src/module/introspector/dagger_module/interfaceFunction.d.ts +32 -0
- package/dist/src/module/introspector/dagger_module/interfaceFunction.d.ts.map +1 -0
- package/dist/src/module/introspector/dagger_module/interfaceFunction.js +87 -0
- package/dist/src/module/introspector/dagger_module/locatable.d.ts +12 -0
- package/dist/src/module/introspector/dagger_module/locatable.d.ts.map +1 -0
- package/dist/src/module/introspector/dagger_module/locatable.js +14 -0
- package/dist/src/module/introspector/dagger_module/module.d.ts +16 -1
- package/dist/src/module/introspector/dagger_module/module.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/module.js +36 -2
- package/dist/src/module/introspector/dagger_module/object.d.ts +17 -2
- package/dist/src/module/introspector/dagger_module/object.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/object.js +19 -1
- package/dist/src/module/introspector/dagger_module/objectBase.d.ts +3 -2
- package/dist/src/module/introspector/dagger_module/objectBase.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/property.d.ts +2 -1
- package/dist/src/module/introspector/dagger_module/property.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/property.js +3 -1
- package/dist/src/module/introspector/dagger_module/reference.d.ts +1 -1
- package/dist/src/module/introspector/dagger_module/reference.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/typeObject.d.ts +24 -2
- package/dist/src/module/introspector/dagger_module/typeObject.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/typeObject.js +26 -1
- package/dist/src/module/introspector/dagger_module/typeObjectProperty.d.ts +2 -1
- package/dist/src/module/introspector/dagger_module/typeObjectProperty.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/typeObjectProperty.js +3 -1
- package/dist/src/module/introspector/typedef.d.ts +8 -1
- package/dist/src/module/introspector/typedef.d.ts.map +1 -1
- package/dist/src/module/introspector/typescript_module/ast.d.ts +14 -0
- package/dist/src/module/introspector/typescript_module/ast.d.ts.map +1 -1
- package/dist/src/module/introspector/typescript_module/ast.js +37 -2
- package/dist/src/module/introspector/typescript_module/index.d.ts +1 -0
- package/dist/src/module/introspector/typescript_module/index.d.ts.map +1 -1
- package/dist/src/module/introspector/typescript_module/index.js +1 -0
- package/dist/src/module/introspector/typescript_module/location.d.ts +6 -0
- package/dist/src/module/introspector/typescript_module/location.d.ts.map +1 -0
- package/dist/src/module/introspector/typescript_module/location.js +1 -0
- package/dist/src/module/registry.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.js +1 -1
- package/package.json +21 -21
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as path from "path";
|
|
1
2
|
import ts from "typescript";
|
|
2
3
|
import { TypeDefKind } from "../../../api/client.gen.js";
|
|
3
4
|
import { IntrospectionError } from "../../../common/errors/index.js";
|
|
@@ -71,6 +72,33 @@ export class AST {
|
|
|
71
72
|
const position = ts.getLineAndCharacterOfPosition(sourceFile, node.getStart());
|
|
72
73
|
return `${sourceFile.fileName}:${position.line}:${position.character}`;
|
|
73
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Returns the location of the node in the source file.
|
|
77
|
+
*
|
|
78
|
+
* The filepath is relative to the module root directory.
|
|
79
|
+
* Ideally, we use the identifier of the node accessible by node.name but fallback
|
|
80
|
+
* to node itself if it's not available.
|
|
81
|
+
*
|
|
82
|
+
* The TypeScript SDK based it's line and column on index 0 but editors starts
|
|
83
|
+
* at 1 so we always add 1 to fix that difference.
|
|
84
|
+
*/
|
|
85
|
+
static getNodeLocation(node) {
|
|
86
|
+
const sourceFile = node.getSourceFile();
|
|
87
|
+
// Use the identifier of the node if available.
|
|
88
|
+
const targetNode = node.name ?? node;
|
|
89
|
+
const position = ts.getLineAndCharacterOfPosition(sourceFile, targetNode.getStart(sourceFile));
|
|
90
|
+
// sourceFile.fileName is the absolute path to the file, we need to get the relative path
|
|
91
|
+
// from the module path so we exclude the module path from the given path.
|
|
92
|
+
// But since root will always start with `/src`, we want to catch the second `src`
|
|
93
|
+
// inside the module.
|
|
94
|
+
const pathParts = sourceFile.fileName.split(path.sep);
|
|
95
|
+
const srcIndex = pathParts.indexOf("src", 2);
|
|
96
|
+
return {
|
|
97
|
+
filepath: pathParts.slice(srcIndex).join(path.sep),
|
|
98
|
+
line: position.line + 1,
|
|
99
|
+
column: position.character + 1,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
74
102
|
getDocFromSymbol(symbol) {
|
|
75
103
|
return ts.displayPartsToString(symbol.getDocumentationComment(this.checker));
|
|
76
104
|
}
|
|
@@ -159,8 +187,15 @@ export class AST {
|
|
|
159
187
|
tsTypeToTypeDef(node, type) {
|
|
160
188
|
if (type.flags & ts.TypeFlags.String)
|
|
161
189
|
return { kind: TypeDefKind.StringKind };
|
|
162
|
-
if (type.flags & ts.TypeFlags.Number)
|
|
190
|
+
if (type.flags & ts.TypeFlags.Number) {
|
|
191
|
+
// Float will be interpreted as number by the TypeScript compiler so we need to check if the
|
|
192
|
+
// text is "float" to know if it's a float or an integer.
|
|
193
|
+
// It can also be interpreted as a reference, but this is handled separately at an upper level.
|
|
194
|
+
if (node.getText().includes("float")) {
|
|
195
|
+
return { kind: TypeDefKind.FloatKind };
|
|
196
|
+
}
|
|
163
197
|
return { kind: TypeDefKind.IntegerKind };
|
|
198
|
+
}
|
|
164
199
|
if (type.flags & ts.TypeFlags.Boolean)
|
|
165
200
|
return { kind: TypeDefKind.BooleanKind };
|
|
166
201
|
if (type.flags & ts.TypeFlags.Void)
|
|
@@ -202,7 +237,7 @@ export class AST {
|
|
|
202
237
|
const type = typeof value;
|
|
203
238
|
switch (type) {
|
|
204
239
|
case "string":
|
|
205
|
-
case "number":
|
|
240
|
+
case "number": // float is also included here
|
|
206
241
|
case "bigint":
|
|
207
242
|
case "boolean":
|
|
208
243
|
case "object":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/module/introspector/typescript_module/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/module/introspector/typescript_module/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../../../src/module/introspector/typescript_module/location.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/module/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/module/registry.ts"],"names":[],"mappings":"AAIA,OAAO,kBAAkB,CAAA;AAIzB,MAAM,MAAM,KAAK,GAAG;IAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;CAAE,CAAA;AAEjD,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAA;AAE/C,MAAM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|
|
|
316
316
|
await new Promise((resolve, reject) => {
|
|
317
317
|
archiveResp.body?.pipe(archiveFile);
|
|
318
318
|
archiveResp.body?.on("error", reject);
|
|
319
|
-
archiveFile.on("finish", resolve);
|
|
319
|
+
archiveFile.on("finish", () => resolve(undefined));
|
|
320
320
|
});
|
|
321
321
|
const actualChecksum = crypto
|
|
322
322
|
.createHash("sha256")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.15.
|
|
1
|
+
export declare const CLI_VERSION = "0.15.3";
|
|
2
2
|
//# sourceMappingURL=default.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Code generated by dagger. DO NOT EDIT.
|
|
2
|
-
export const CLI_VERSION = "0.15.
|
|
2
|
+
export const CLI_VERSION = "0.15.3";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dagger.io/dagger",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"author": "hello@dagger.io",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,24 +17,24 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "dist/src/index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@grpc/grpc-js": "^1.
|
|
20
|
+
"@grpc/grpc-js": "^1.12.5",
|
|
21
21
|
"@lifeomic/axios-fetch": "^3.1.0",
|
|
22
22
|
"@opentelemetry/api": "^1.9.0",
|
|
23
|
-
"@opentelemetry/exporter-trace-otlp-http": "^0.
|
|
24
|
-
"@opentelemetry/sdk-metrics": "^1.
|
|
25
|
-
"@opentelemetry/sdk-node": "^0.
|
|
23
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.57.1",
|
|
24
|
+
"@opentelemetry/sdk-metrics": "^1.30.1",
|
|
25
|
+
"@opentelemetry/sdk-node": "^0.57.1",
|
|
26
26
|
"@opentelemetry/semantic-conventions": "^1.25.1",
|
|
27
|
-
"adm-zip": "^0.5.
|
|
27
|
+
"adm-zip": "^0.5.16",
|
|
28
28
|
"env-paths": "^3.0.0",
|
|
29
|
-
"execa": "^9.
|
|
30
|
-
"graphql": "^16.
|
|
31
|
-
"graphql-request": "^7.1.
|
|
29
|
+
"execa": "^9.5.2",
|
|
30
|
+
"graphql": "^16.10.0",
|
|
31
|
+
"graphql-request": "^7.1.2",
|
|
32
32
|
"graphql-tag": "^2.12.6",
|
|
33
33
|
"node-color-log": "^12.0.1",
|
|
34
34
|
"node-fetch": "^3.3.2",
|
|
35
35
|
"reflect-metadata": "^0.2.2",
|
|
36
36
|
"tar": "^7.4.2",
|
|
37
|
-
"typescript": "^5.
|
|
37
|
+
"typescript": "^5.7.3"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "tsc",
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@eslint/js": "^10.0.0",
|
|
53
|
-
"@trivago/prettier-plugin-sort-imports": "^
|
|
54
|
-
"@types/adm-zip": "^0.5.
|
|
53
|
+
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
|
|
54
|
+
"@types/adm-zip": "^0.5.7",
|
|
55
55
|
"@types/mocha": "^10.0.7",
|
|
56
|
-
"@types/node": "~22.
|
|
56
|
+
"@types/node": "~22.10.10",
|
|
57
57
|
"@types/tar": "^6.1.13",
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "^8.0
|
|
59
|
-
"@typescript-eslint/parser": "^8.0
|
|
60
|
-
"eslint": "^9.
|
|
61
|
-
"eslint-config-prettier": "^
|
|
62
|
-
"eslint-plugin-prettier": "^5.2.
|
|
63
|
-
"mocha": "^
|
|
64
|
-
"prettier": "^3.
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^8.21.0",
|
|
59
|
+
"@typescript-eslint/parser": "^8.21.0",
|
|
60
|
+
"eslint": "^9.19.0",
|
|
61
|
+
"eslint-config-prettier": "^10.0.1",
|
|
62
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
63
|
+
"mocha": "^11.1.0",
|
|
64
|
+
"prettier": "^3.4.2",
|
|
65
65
|
"ts-node": "^10.9.2",
|
|
66
66
|
"tsx": "^4.19.2",
|
|
67
|
-
"typescript-eslint": "^8.0
|
|
67
|
+
"typescript-eslint": "^8.21.0"
|
|
68
68
|
}
|
|
69
69
|
}
|