@dagger.io/dagger 0.18.16 → 0.18.18
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 +676 -6
- package/dist/src/api/client.gen.d.ts.map +1 -1
- package/dist/src/api/client.gen.js +895 -7
- package/dist/src/common/utils.d.ts +1 -0
- package/dist/src/common/utils.d.ts.map +1 -1
- package/dist/src/module/decorators.d.ts.map +1 -1
- package/dist/src/module/entrypoint/register.d.ts.map +1 -1
- package/dist/src/module/entrypoint/register.js +2 -2
- package/dist/src/module/introspector/dagger_module/module.d.ts +4 -0
- package/dist/src/module/introspector/dagger_module/module.d.ts.map +1 -1
- package/dist/src/module/introspector/dagger_module/module.js +35 -13
- package/dist/src/module/introspector/typescript_module/ast.d.ts +1 -0
- package/dist/src/module/introspector/typescript_module/ast.d.ts.map +1 -1
- package/dist/src/module/introspector/typescript_module/ast.js +33 -0
- package/dist/src/module/registry.d.ts +2 -2
- package/dist/src/provisioning/default.d.ts +1 -1
- package/dist/src/provisioning/default.js +1 -1
- package/package.json +21 -20
|
@@ -8,6 +8,7 @@ export declare const log: (stack?: string) => {
|
|
|
8
8
|
setLogStream(stream: import("stream")): /*elided*/ any;
|
|
9
9
|
setLevelNoColor(): void;
|
|
10
10
|
setLevelColor(): void;
|
|
11
|
+
enableFileAndLine(enable: boolean, isShortFile?: boolean): void;
|
|
11
12
|
isLevelValid(level: "error" | "debug" | "info" | "warn" | "disable" | "success"): boolean;
|
|
12
13
|
isAllowedLevel(level: "error" | "debug" | "info" | "warn" | "disable" | "success"): boolean;
|
|
13
14
|
checkSetting(setting: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/common/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,GAAI,QAAQ,MAAM
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/common/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,GAAI,QAAQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACe,CAAA;AAEjD,wBAAgB,MAAM,IAAI,OAAO,CAGhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../src/module/decorators.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,MAAM,wEAAkB,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../src/module/decorators.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,MAAM,wEAAkB,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,IAAI,gFAkCitC,CAAC,8BAlClsC,CAAA;AAEjC;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,qEAAiB,CAAA;AAEnC;;;GAGG;AACH,eAAO,MAAM,QAAQ,wEAAoB,CAAA;AAEzC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,yIAAoB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/module/entrypoint/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAET,QAAQ,EACR,OAAO,EAGR,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,eAAe,IAAI,SAAS,EAC5B,iBAAiB,IAAI,WAAW,EAChC,cAAc,IAAI,MAAM,EACxB,YAAY,EAEZ,cAAc,EACf,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAA;AAU5F,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,YAAY;IAEjD;;OAEG;IACG,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;IAgF9B;;OAEG;IACH,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS;IAInE;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS;IAQ7D;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,CAAC,GAAG,EAAE,SAAS,KAAK,SAAS;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/module/entrypoint/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAET,QAAQ,EACR,OAAO,EAGR,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,eAAe,IAAI,SAAS,EAC5B,iBAAiB,IAAI,WAAW,EAChC,cAAc,IAAI,MAAM,EACxB,YAAY,EAEZ,cAAc,EACf,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAA;AAU5F,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,YAAY;IAEjD;;OAEG;IACG,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;IAgF9B;;OAEG;IACH,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS;IAInE;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS;IAQ7D;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,CAAC,GAAG,EAAE,SAAS,KAAK,SAAS;IAkDtD;;;;;;;OAOG;IACH,sBAAsB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,GAAG,SAAS;CA4BjE"}
|
|
@@ -98,8 +98,8 @@ export class Register {
|
|
|
98
98
|
typeDef = typeDef.withOptional(true);
|
|
99
99
|
}
|
|
100
100
|
// Check if both values are used, return an error if so.
|
|
101
|
-
if (arg.defaultValue
|
|
102
|
-
throw new Error("cannot set
|
|
101
|
+
if ([arg.defaultValue, arg.defaultPath].filter((v) => v).length > 1) {
|
|
102
|
+
throw new Error("cannot set multiple defaults");
|
|
103
103
|
}
|
|
104
104
|
// We do not set the default value if it's not a primitive type, we let TypeScript
|
|
105
105
|
// resolve the default value during the runtime instead.
|
|
@@ -106,6 +106,10 @@ export declare class DaggerModule {
|
|
|
106
106
|
* If the type cannot be resolved or is not supported, we throw an error.
|
|
107
107
|
*/
|
|
108
108
|
private resolveTypeAlias;
|
|
109
|
+
/**
|
|
110
|
+
* Find the classes in the AST. Returns only our main class if it exists
|
|
111
|
+
*/
|
|
112
|
+
private findClasses;
|
|
109
113
|
/**
|
|
110
114
|
* Recursively propagate references to all objects properties and functions.
|
|
111
115
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/module/introspector/dagger_module/module.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAKhC,OAAO,EAEL,GAAG,EAGJ,MAAM,+BAA+B,CAAA;AAGtC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAmB,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAInD;;;;;;;;GAQG;AACH,qBAAa,YAAY;IAuEd,IAAI,EAAE,MAAM;IACnB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,GAAG;IAxEb;;;;;;;;;;;;;;;;;;;OAmBG;IACI,OAAO,EAAE,iBAAiB,CAAK;IAEtC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACI,KAAK,EAAE,eAAe,CAAK;IAElC;;;;;;;;;;OAUG;IACI,UAAU,EAAE,gBAAgB,CAAK;IAEjC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAEtC,OAAO,CAAC,UAAU,CAKjB;gBAGQ,IAAI,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAAE,EACpB,GAAG,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/module/introspector/dagger_module/module.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAKhC,OAAO,EAEL,GAAG,EAGJ,MAAM,+BAA+B,CAAA;AAGtC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAmB,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAInD;;;;;;;;GAQG;AACH,qBAAa,YAAY;IAuEd,IAAI,EAAE,MAAM;IACnB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,GAAG;IAxEb;;;;;;;;;;;;;;;;;;;OAmBG;IACI,OAAO,EAAE,iBAAiB,CAAK;IAEtC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACI,KAAK,EAAE,eAAe,CAAK;IAElC;;;;;;;;;;OAUG;IACI,UAAU,EAAE,gBAAgB,CAAK;IAEjC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAEtC,OAAO,CAAC,UAAU,CAKjB;gBAGQ,IAAI,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAAE,EACpB,GAAG,EAAE,GAAG;IA8BlB;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,iBAAiB;IAkIzB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,gBAAgB;IAsExB;;OAEG;IACH,OAAO,CAAC,WAAW;IA2BnB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;OAEG;IACH,OAAO,CAAC,cAAc;IAgBtB,MAAM;;;;;;;CASP"}
|
|
@@ -93,20 +93,22 @@ export class DaggerModule {
|
|
|
93
93
|
if (!mainModule) {
|
|
94
94
|
console.warn(`could not find module entrypoint: class ${this.name} from import. Class should be exported to benefit from all features.`);
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
const classObjects = this.findClasses();
|
|
97
|
+
for (const classObject of classObjects) {
|
|
98
|
+
// This only applies to cloud. If this is the true main object, it is correct
|
|
99
|
+
// if this is a blueprint, the description will not matter in any situation
|
|
100
|
+
const mainFileContent = classObject.file.getFullText();
|
|
101
|
+
this.description = this.getDescription(mainFileContent);
|
|
102
|
+
const daggerObject = new DaggerObject(classObject.node, this.ast);
|
|
103
|
+
const objectName = classObject.node.name?.getText() || this.name;
|
|
104
|
+
this.objects[objectName] = daggerObject;
|
|
105
|
+
this.references[objectName] = {
|
|
106
|
+
kind: TypeDefKind.ObjectKind,
|
|
107
|
+
name: objectName,
|
|
108
|
+
};
|
|
109
|
+
this.resolveReferences(daggerObject.getReferences());
|
|
110
|
+
this.propagateReferences();
|
|
99
111
|
}
|
|
100
|
-
const mainFileContent = mainObjectNode.file.getFullText();
|
|
101
|
-
this.description = this.getDescription(mainFileContent);
|
|
102
|
-
const mainDaggerObject = new DaggerObject(mainObjectNode.node, this.ast);
|
|
103
|
-
this.objects[this.name] = mainDaggerObject;
|
|
104
|
-
this.references[this.name] = {
|
|
105
|
-
kind: TypeDefKind.ObjectKind,
|
|
106
|
-
name: this.name,
|
|
107
|
-
};
|
|
108
|
-
this.resolveReferences(mainDaggerObject.getReferences());
|
|
109
|
-
this.propagateReferences();
|
|
110
112
|
}
|
|
111
113
|
/**
|
|
112
114
|
* Find the reference of the module and register it to the module references.
|
|
@@ -271,6 +273,26 @@ export class DaggerModule {
|
|
|
271
273
|
}
|
|
272
274
|
throw new IntrospectionError(`could not resolve type reference for ${reference} at ${AST.getNodePosition(typeAlias.node)}`);
|
|
273
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* Find the classes in the AST. Returns only our main class if it exists
|
|
278
|
+
*/
|
|
279
|
+
findClasses() {
|
|
280
|
+
const allClassDeclarations = this.ast.findAllDeclarations(ts.SyntaxKind.ClassDeclaration);
|
|
281
|
+
const allClasses = [];
|
|
282
|
+
for (const classDecl of allClassDeclarations) {
|
|
283
|
+
const convertedDecl = classDecl;
|
|
284
|
+
// Check if the class matches this.name and return only that if so
|
|
285
|
+
if (convertedDecl.node.name &&
|
|
286
|
+
convertedDecl.node.name.getText() === this.name) {
|
|
287
|
+
return [convertedDecl];
|
|
288
|
+
}
|
|
289
|
+
// or we return all classes decorated with @object
|
|
290
|
+
if (this.ast.isNodeDecoratedWith(classDecl.node, OBJECT_DECORATOR)) {
|
|
291
|
+
allClasses.push(convertedDecl);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return allClasses;
|
|
295
|
+
}
|
|
274
296
|
/**
|
|
275
297
|
* Recursively propagate references to all objects properties and functions.
|
|
276
298
|
*/
|
|
@@ -24,6 +24,7 @@ export declare class AST {
|
|
|
24
24
|
* what we're looking for.
|
|
25
25
|
*/
|
|
26
26
|
kind: T): ResolvedNodeWithSymbol<T> | undefined;
|
|
27
|
+
findAllDeclarations<T extends keyof DeclarationsMap>(kind: T): ResolvedNodeWithSymbol<T>[];
|
|
27
28
|
getTypeFromTypeAlias(typeAlias: ts.TypeAliasDeclaration): ts.Type;
|
|
28
29
|
static getNodePosition(node: ts.Node): string;
|
|
29
30
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../../../../src/module/introspector/typescript_module/ast.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,eAAe,EAAmB,MAA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BAAoB,GAC5B,EAAE,CAAC,SAAS;IAWR,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,MAAM,GAAG,SAAS;IAI/C,mBAAmB,CACxB,IAAI,EAAE,EAAE,CAAC,aAAa,EACtB,eAAe,EAAE,gBAAgB,GAChC,OAAO;IAsBH,oBAAoB,CAAC,CAAC,EAC3B,IAAI,EAAE,EAAE,CAAC,aAAa,EACtB,eAAe,EAAE,gBAAgB,EACjC,IAAI,EAAE,QAAQ,GAAG,QAAQ,EACzB,QAAQ,SAAI,GACX,CAAC,GAAG,SAAS;IA4BT,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAYjD,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAY/C,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAY/C,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,MAAM;IAMvC,eAAe,CACpB,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS;IA4DnC,OAAO,CAAC,yCAAyC;IAoB1C,4BAA4B,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,GAAG;CAkDpE"}
|
|
@@ -63,6 +63,39 @@ export class AST {
|
|
|
63
63
|
}
|
|
64
64
|
return result;
|
|
65
65
|
}
|
|
66
|
+
findAllDeclarations(kind) {
|
|
67
|
+
const results = [];
|
|
68
|
+
for (const sourceFile of this.sourceFiles) {
|
|
69
|
+
ts.forEachChild(sourceFile, (node) => {
|
|
70
|
+
// Skip if it's not from the client gen nor the user module
|
|
71
|
+
if (!sourceFile.fileName.endsWith(CLIENT_GEN_FILE) &&
|
|
72
|
+
!this.files.includes(sourceFile.fileName)) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (kind !== undefined && node.kind === kind) {
|
|
76
|
+
const isDeclarationValid = isDeclarationOf[kind](node);
|
|
77
|
+
if (!isDeclarationValid)
|
|
78
|
+
return;
|
|
79
|
+
const convertedNode = node;
|
|
80
|
+
if (!convertedNode.name) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const symbol = this.checker.getSymbolAtLocation(convertedNode.name);
|
|
84
|
+
if (!symbol) {
|
|
85
|
+
console.debug(`missing symbol for ${convertedNode.name.getText()} at ${sourceFile.fileName}:${node.pos}`);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
results.push({
|
|
89
|
+
type: kind,
|
|
90
|
+
node: convertedNode,
|
|
91
|
+
symbol: symbol,
|
|
92
|
+
file: sourceFile,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return results;
|
|
98
|
+
}
|
|
66
99
|
getTypeFromTypeAlias(typeAlias) {
|
|
67
100
|
const symbol = this.getSymbolOrThrow(typeAlias.name);
|
|
68
101
|
return this.checker.getDeclaredTypeOfSymbol(symbol);
|
|
@@ -10,9 +10,9 @@ export type ArgumentOptions = {
|
|
|
10
10
|
/**
|
|
11
11
|
* The contextual value to use for the argument.
|
|
12
12
|
*
|
|
13
|
-
* This should only be used for Directory or
|
|
13
|
+
* This should only be used for Directory/File or GitRepository/GitRef types.
|
|
14
14
|
*
|
|
15
|
-
* An
|
|
15
|
+
* An absolute path would be related to the context source directory (the git repo root or the module source root).
|
|
16
16
|
* A relative path would be relative to the module source root.
|
|
17
17
|
*/
|
|
18
18
|
defaultPath?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.18.
|
|
1
|
+
export declare const CLI_VERSION = "0.18.18";
|
|
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.18.
|
|
2
|
+
export const CLI_VERSION = "0.18.18";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dagger.io/dagger",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.18",
|
|
4
4
|
"author": "hello@dagger.io",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -20,22 +20,23 @@
|
|
|
20
20
|
"@grpc/grpc-js": "^1.13.4",
|
|
21
21
|
"@lifeomic/axios-fetch": "^3.1.0",
|
|
22
22
|
"@opentelemetry/api": "^1.9.0",
|
|
23
|
-
"@opentelemetry/core": "^2.0
|
|
24
|
-
"@opentelemetry/exporter-
|
|
25
|
-
"@opentelemetry/
|
|
26
|
-
"@opentelemetry/sdk-
|
|
27
|
-
"@opentelemetry/
|
|
23
|
+
"@opentelemetry/core": "^2.1.0",
|
|
24
|
+
"@opentelemetry/exporter-jaeger": "^2.1.0",
|
|
25
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.205.0",
|
|
26
|
+
"@opentelemetry/sdk-metrics": "^2.1.0",
|
|
27
|
+
"@opentelemetry/sdk-node": "^0.205.0",
|
|
28
|
+
"@opentelemetry/semantic-conventions": "^1.37.0",
|
|
28
29
|
"adm-zip": "^0.5.16",
|
|
29
30
|
"env-paths": "^3.0.0",
|
|
30
31
|
"execa": "^9.6.0",
|
|
31
32
|
"graphql": "^16.11.0",
|
|
32
33
|
"graphql-request": "^7.2.0",
|
|
33
34
|
"graphql-tag": "^2.12.6",
|
|
34
|
-
"node-color-log": "^
|
|
35
|
+
"node-color-log": "^13.0.3",
|
|
35
36
|
"node-fetch": "^3.3.2",
|
|
36
37
|
"reflect-metadata": "^0.2.2",
|
|
37
38
|
"tar": "^7.4.2",
|
|
38
|
-
"typescript": "^5.
|
|
39
|
+
"typescript": "^5.9.2"
|
|
39
40
|
},
|
|
40
41
|
"scripts": {
|
|
41
42
|
"build": "tsc",
|
|
@@ -54,19 +55,19 @@
|
|
|
54
55
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
55
56
|
"@types/adm-zip": "^0.5.7",
|
|
56
57
|
"@types/mocha": "^10.0.10",
|
|
57
|
-
"@types/node": "~24.0
|
|
58
|
+
"@types/node": "~24.4.0",
|
|
58
59
|
"@types/tar": "^6.1.13",
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
60
|
-
"@typescript-eslint/parser": "^8.
|
|
61
|
-
"eslint": "^9.
|
|
62
|
-
"eslint-config-prettier": "^10.1.
|
|
63
|
-
"eslint-plugin-prettier": "^5.5.
|
|
64
|
-
"mocha": "^11.7.
|
|
65
|
-
"prettier": "^3.6.
|
|
66
|
-
"rollup": "^4.
|
|
67
|
-
"rollup-plugin-dts": "^6.2.
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
|
61
|
+
"@typescript-eslint/parser": "^8.43.0",
|
|
62
|
+
"eslint": "^9.35.0",
|
|
63
|
+
"eslint-config-prettier": "^10.1.8",
|
|
64
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
65
|
+
"mocha": "^11.7.2",
|
|
66
|
+
"prettier": "^3.6.2",
|
|
67
|
+
"rollup": "^4.50.2",
|
|
68
|
+
"rollup-plugin-dts": "^6.2.3",
|
|
68
69
|
"ts-node": "^10.9.2",
|
|
69
|
-
"tsx": "^4.20.
|
|
70
|
-
"typescript-eslint": "^8.
|
|
70
|
+
"tsx": "^4.20.5",
|
|
71
|
+
"typescript-eslint": "^8.43.0"
|
|
71
72
|
}
|
|
72
73
|
}
|